[ADF-5410] code fixes and updates prior to Angular 12 upgrade (#7177)

* package fixes

* upgrade stylelint config

* upgrade configuration and stats

* code fixes based on Angular upgrade

* rework scss-bundle usage

* use node 14 with travis (lts)

* fix production builds

* fix node sass version
This commit is contained in:
Denys Vuika
2021-07-15 12:48:23 +01:00
committed by GitHub
parent 182021a127
commit c1860f0c1f
54 changed files with 168 additions and 324 deletions

View File

@@ -9,7 +9,7 @@ language: node_js
arch: arm64-graviton2
dist: bionic
node_js:
- '12.18.4'
- '14'
before_install: . ./scripts/ci/job_hooks/before_install.sh
install: ./scripts/ci/job_hooks/install.sh
@@ -119,7 +119,7 @@ jobs:
name: "Demo Shell :Build && dockerize"
script:
# Build Demo shell for production docker"
- NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --prod
- NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production
- ./scripts/travis/release/release-docker.sh
workspaces:
create:

View File

@@ -138,7 +138,7 @@ registerLocaleData(localeSv);
BrowserModule,
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
ReactiveFormsModule,
RouterModule.forRoot(appRoutes, { useHash: true }),
RouterModule.forRoot(appRoutes, { useHash: true, relativeLinkResolution: 'legacy' }),
FormsModule,
HttpClientModule,
MaterialModule,

View File

@@ -16,12 +16,7 @@
*/
import { Component, OnInit } from '@angular/core';
import {
name,
version,
commit,
dependencies
} from '../../../../../package.json';
import pkg from '../../../../../package.json';
import { AppConfigService } from '@alfresco/adf-core';
@Component({
@@ -30,9 +25,9 @@ import { AppConfigService } from '@alfresco/adf-core';
styleUrls: ['./about.component.scss']
})
export class AboutComponent implements OnInit {
url = `https://github.com/Alfresco/${name}/commits/${commit}`;
version = version;
dependencies = dependencies;
url = `https://github.com/Alfresco/${pkg.name}/commits/${pkg.commit}`;
version = pkg.version;
dependencies = pkg.dependencies;
showExtensions = true;
application = '';

View File

@@ -16,7 +16,7 @@
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
import { AppExtensionService } from '@alfresco/adf-extensions';
import { AppExtensionService, DocumentListPresetRef } from '@alfresco/adf-extensions';
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@@ -28,7 +28,7 @@ import { takeUntil } from 'rxjs/operators';
export class ExtensionPresetsComponent implements OnInit, OnDestroy {
onDestroy$ = new Subject<boolean>();
columns: any[] = [];
columns: DocumentListPresetRef[] = [];
isSmallScreen = false;
constructor(
@@ -55,7 +55,7 @@ export class ExtensionPresetsComponent implements OnInit, OnDestroy {
this.onDestroy$.complete();
}
trackById(_: number, obj: { id: string }) {
trackById(_: number, obj: DocumentListPresetRef): string {
return obj.id;
}
}

View File

@@ -2,6 +2,7 @@
"compilerOptions": {
"declaration": true,
"module": "commonjs",
"declarationMap": true,
"moduleResolution": "node",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -1,6 +0,0 @@
var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs').writeFileSync;
new Bundler().Bundle('./lib/content-services/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent);
});

View File

@@ -1,6 +0,0 @@
var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs').writeFileSync;
new Bundler().Bundle('./lib/core/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/core/_theming.scss', result.bundledContent);
});

View File

@@ -1,6 +0,0 @@
var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs').writeFileSync;
new Bundler().Bundle('./lib/insights/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/insights/_theming.scss', result.bundledContent);
});

View File

@@ -1,6 +0,0 @@
var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs').writeFileSync;
new Bundler().Bundle('./lib/process-services-cloud/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/process-services-cloud/_theming.scss', result.bundledContent);
});

View File

@@ -1,6 +0,0 @@
var Bundler = require('scss-bundle').Bundler;
var writeFileSync = require('fs').writeFileSync;
new Bundler().Bundle('./lib/process-services/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/process-services/_theming.scss', result.bundledContent);
});

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/content-services/src/lib/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/content-services/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -23,7 +23,6 @@ import { SEARCH_QUERY_SERVICE_TOKEN } from '../../search-query-service.token';
@Component({
selector: 'adf-search-form',
templateUrl: './search-form.component.html',
styleUrls: ['./search-form.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class SearchFormComponent {

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/content-services/",
"declarationMap": true,
"baseUrl": "src",
"paths": {
"@alfresco/adf-extensions": ["../../dist/extensions"],

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { ComponentFixture, TestBed, tick, fakeAsync, async, discardPeriodicTasks } from '@angular/core/testing';
import { ComponentFixture, TestBed, tick, fakeAsync, discardPeriodicTasks } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { CardViewTextItemModel } from '../../models/card-view-textitem.model';
import { CardViewUpdateService } from '../../services/card-view-update.service';
@@ -600,7 +600,7 @@ describe('CardViewTextItemComponent', () => {
expect(component.property.value).toBe(component.editedValue);
});
it('should render the default as value if the value is empty, clickable is true and displayEmpty is true', async(async (done) => {
it('should render the default as value if the value is empty, clickable is true and displayEmpty is true', fakeAsync(async (done) => {
const functionTestClick = () => done();
component.property = new CardViewTextItemModel({

View File

@@ -29,7 +29,6 @@ import { DynamicTableModel } from './dynamic-table.widget.model';
@Component({
selector: 'dynamic-table-widget',
templateUrl: './dynamic-table.widget.html',
styleUrls: ['./dynamic-table.widget.scss'],
host: {
'(click)': 'event($event)',
'(blur)': 'event($event)',

View File

@@ -16,7 +16,8 @@
"moment": "moment",
"moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core"
"@ngx-translate/core": "@ngx-translate/core",
"cropperjs": "cropperjs"
}
}
}

View File

@@ -29,3 +29,5 @@ export * from './time-ago.pipe';
export * from './user-initial.pipe';
export * from './localized-role.pipe';
export * from './pipe.module';
export * from './moment-date.pipe';
export * from './moment-datetime.pipe';

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/core/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/core/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/core/",
"declarationMap": true,
"baseUrl": "./",
"paths": {
"@alfresco/adf-extensions": ["../dist/extensions"],

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -35,7 +35,7 @@ export class FileUtils {
} else {
iterations.push(Promise.all(entries.map((entry) => {
if (entry.isFile) {
return new Promise((resolveFile) => {
return new Promise<void>((resolveFile) => {
entry.file(function (file: File) {
files.push({
entry: entry,

View File

@@ -23,8 +23,7 @@ declare const pdfjsLib: any;
@Component({
selector: 'adf-pdf-viewer-password-dialog',
templateUrl: './pdf-viewer-password-dialog.html',
styleUrls: [ './pdf-viewer-password-dialog.scss' ]
templateUrl: './pdf-viewer-password-dialog.html'
})
export class PdfPasswordDialogComponent implements OnInit {
passwordFormControl: FormControl;

View File

@@ -55,7 +55,7 @@ export class AppExtensionService {
* The result is filtered by the **disabled** state.
* @param key Preset key.
*/
getDocumentListPreset(key: string) {
getDocumentListPreset(key: string): DocumentListPresetRef[] {
return this.extensionService
.getElements<DocumentListPresetRef>(
`features.documentList.${key}`

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/extensions/",
"declarationMap": true,
"baseUrl": "src"
},
"angularCompilerOptions": {

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/insights/src/lib/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/insights/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -21,7 +21,8 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MatNativeDateModule, MatOptionModule, MatRippleModule, MAT_LABEL_GLOBAL_OPTIONS } from '@angular/material/core';
import { MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDialogModule } from '@angular/material/dialog';
import { MatGridListModule } from '@angular/material/grid-list';
@@ -53,7 +54,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
MatChipsModule, MatMenuModule
],
providers: [
{ provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'never' }}
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'never' } }
]
})
export class MaterialModule {}

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/insights/",
"declarationMap": true,
"baseUrl": "src",
"paths": {
"@alfresco/adf-extensions": ["../../dist/extensions"],

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -11,7 +11,13 @@
"@alfresco/adf-content-services": "@alfresco/adf-content-services",
"moment": "moment",
"moment-es6": "moment-es6",
"@ngx-translate/core": "@ngx-translate/core"
"@ngx-translate/core": "@ngx-translate/core",
"@apollo/client/core": "@apollo/client/core",
"@apollo/client/link/ws": "@apollo/client/link/ws",
"@apollo/client/link/error": "@apollo/client/link/error",
"@apollo/client/utilities": "@apollo/client/utilities",
"apollo-angular": "apollo-angular",
"apollo-angular/http": "apollo-angular/http"
}
},
"whitelistedNonPeerDependencies": [

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/process-services-cloud/src/lib/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/process-services-cloud/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -21,7 +21,8 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MAT_LABEL_GLOBAL_OPTIONS, MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
import { MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDialogModule } from '@angular/material/dialog';
import { MatExpansionModule } from '@angular/material/expansion';
@@ -40,7 +41,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
@NgModule({
providers: [
{provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'never' }}
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'never' } }
],
imports: [
MatAutocompleteModule, MatButtonModule, MatCardModule, MatDialogModule,

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/process-services-cloud/",
"declarationMap": true,
"baseUrl": "src",
"resolveJsonModule": true,
"paths": {

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/process-services/src/lib/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/process-services/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -21,7 +21,8 @@ import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatChipsModule } from '@angular/material/chips';
import { MAT_LABEL_GLOBAL_OPTIONS, MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
import { MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatDialogModule } from '@angular/material/dialog';
import { MatGridListModule } from '@angular/material/grid-list';
@@ -39,7 +40,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
@NgModule({
providers: [
{provide: MAT_LABEL_GLOBAL_OPTIONS, useValue: { float: 'never' }}
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'never' } }
],
imports: [
MatAutocompleteModule, MatButtonModule, MatCardModule, MatDialogModule,

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/process-services/",
"declarationMap": true,
"baseUrl": "src",
"paths": {
"@alfresco/adf-extensions": ["../../dist/extensions"],

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

View File

@@ -10,7 +10,8 @@
"protractor": "protractor",
"selenium-webdriver": "selenium-webdriver",
"fs": "fs",
"path": "path"
"path": "path",
"protractor/built/util": "protractor/built/util"
}
}
}

View File

@@ -2,7 +2,10 @@
"ngPackage": {
"lib": {
"entryFile": "../src/lib/shared/index.ts",
"flatModuleFile": "adf-testing-shared"
"flatModuleFile": "adf-testing-shared",
"umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-api"
}
}
}
}

View File

@@ -3,6 +3,7 @@
"compilerOptions": {
"outDir": "../dist/testing/",
"baseUrl": "src",
"declarationMap": true,
"allowJs": true,
"paths": {}
},

View File

@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}

221
package-lock.json generated
View File

@@ -5898,12 +5898,6 @@
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
"dev": true
},
"archy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
"dev": true
},
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
@@ -11846,15 +11840,6 @@
"integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=",
"dev": true
},
"globs": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/globs/-/globs-0.1.4.tgz",
"integrity": "sha512-D23dWbOq48vlOraoSigbcQV4tWrnhwk+E/Um2cMuDS3/5dwGmdFeA7L/vAvDhLFlQOTDqHcXh35m/71g2A2WzQ==",
"dev": true,
"requires": {
"glob": "^7.1.1"
}
},
"globule": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz",
@@ -18424,12 +18409,6 @@
"integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==",
"dev": true
},
"pretty-bytes": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
"dev": true
},
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -20222,206 +20201,6 @@
"integrity": "sha1-Cm+I1fXRrBa2z3Ji7/ujH+5I7RI=",
"dev": true
},
"scss-bundle": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/scss-bundle/-/scss-bundle-2.3.2.tgz",
"integrity": "sha512-Mp12Wa/PbTBY5E6zlN4Vq8ccK4Ex4WX9dvc8QP3BXzatfo9VvQijZIAsMQ4nT+vD0oM1I4m6Cy9twJWYr9oBew==",
"dev": true,
"requires": {
"archy": "^1.0.0",
"fs-extra": "^5.0.0",
"globs": "^0.1.3",
"node-sass": "^4.9.0",
"pretty-bytes": "^4.0.2",
"promise": "^8.0.1",
"yargs": "^11.0.0"
},
"dependencies": {
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
"dev": true
},
"cliui": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
"dev": true,
"requires": {
"string-width": "^2.1.1",
"strip-ansi": "^4.0.0",
"wrap-ansi": "^2.0.0"
}
},
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"dev": true,
"requires": {
"locate-path": "^2.0.0"
}
},
"fs-extra": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "^1.0.0"
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
}
},
"p-limit": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"dev": true,
"requires": {
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"dev": true,
"requires": {
"p-limit": "^1.1.0"
}
},
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
"dev": true
},
"promise": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz",
"integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==",
"dev": true,
"requires": {
"asap": "~2.0.6"
}
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true,
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
}
}
},
"y18n": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
"integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
"dev": true
},
"yargs": {
"version": "11.1.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz",
"integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==",
"dev": true,
"requires": {
"cliui": "^4.0.0",
"decamelize": "^1.1.1",
"find-up": "^2.1.0",
"get-caller-file": "^1.0.1",
"os-locale": "^3.1.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^9.0.2"
}
},
"yargs-parser": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
"integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
"dev": true,
"requires": {
"camelcase": "^4.1.0"
}
}
}
},
"scss-tokenizer": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",

View File

@@ -23,8 +23,13 @@
"unit-test": "concurrently \"ng test content-services --watch=false\" \"ng test process-services --watch=false\" \"ng test core --watch=false\" \"ng test extensions --watch=false\" \"ng test insights --watch=false\" \"ng test process-services-cloud --watch=false\" ",
"build-lib": "./scripts/build/build-all-lib.sh",
"affected:libs": "nx affected:libs",
"inspect.bundle": "ng build demoshell --prod --stats-json && npx webpack-bundle-analyzer dist/demo-shell/stats-es2015.json",
"inspect.bundle": "ng build demoshell --configuration production --stats-json && npx webpack-bundle-analyzer dist/demo-shell/stats.json",
"coverage": "./lib/config/create-coverage-index.sh && lite-server -c ./lib/config/proxy-coverage.json",
"scss-bundle:core": "npx scss-bundle -c ./lib/core/scss-bundle.config.json",
"scss-bundle:content-services": "npx scss-bundle -c ./lib/content-services/scss-bundle.config.json",
"scss-bundle:insights": "npx scss-bundle -c ./lib/insights/scss-bundle.config.json",
"scss-bundle:process-services": "npx scss-bundle -c ./lib/process-services/scss-bundle.config.json",
"scss-bundle:process-services-cloud": "npx scss-bundle -c ./lib/process-services-cloud/scss-bundle.config.json",
"03": "echo -------------------------------------------- Lint -----------------------------------------------",
"03s": "",
"lint-demo": "tslint -p tsconfig.json -c tslint.json",
@@ -36,9 +41,9 @@
"04": "echo -------------------------------------------- Demo Shell -----------------------------------------------",
"04s": "",
"start": "concurrently \"ng serve demoshell --open\" \"npm run style:dev -- --watch >&-\" ",
"start:prod": "ng serve demoshell --prod --open",
"start:prod": "ng serve demoshell --configuration production --open",
"build": "npm run style:dev && ng build demoshell",
"build:prod": "node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build demoshell --prod",
"build:prod": "node --max-old-space-size=12000 node_modules/@angular/cli/bin/ng build demoshell --configuration production",
"style:dev": "npm run webpack -- --config ./lib/config/webpack.style.js --progress --profile --bail",
"test": "ng test demoshell --watch=false",
"05": "echo -------------------------------------------- E2e -----------------------------------------------",
@@ -148,6 +153,7 @@
"mini-css-extract-plugin": "^1.6.0",
"nconf": "^0.11.1",
"ng-packagr": "^10.1.2",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"protractor": "^7.0.0",
"protractor-retry-angular-cli": "^2.0.2",
@@ -156,7 +162,6 @@
"rimraf": "^3.0.2",
"rxjs-tslint-rules": "^4.34.7",
"sass-loader": "10.1.1",
"scss-bundle": "2.3.2",
"selenium-webdriver": "4.0.0-beta.4",
"stylelint": "^13.13.1",
"ts-node": "^10.0.0",

View File

@@ -9,14 +9,14 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building content-services for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build content-services --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build content-services --configuration production || exit 1
else
echo "Building content-services for development"
nx build content-services || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build content-services || exit 1
fi
echo "====== Build style ======"
node ./lib/config/bundle-content-services-scss.js || exit 1
echo "====== Bundle styles ======"
npm run scss-bundle:content-services || exit 1
echo "====== Copy i18n ======"
mkdir -p ./lib/dist/content-services/bundles/assets/adf-content-services/i18n

View File

@@ -9,14 +9,14 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building core for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build core --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build core --configuration production || exit 1
else
echo "Building core for development"
nx build core || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build core || exit 1
fi
echo "====== Build style ======"
node ./lib/config/bundle-core-scss.js || exit 1
echo "====== Bundle styles ======"
npm run scss-bundle:core || exit 1
echo "====== Copy i18n ======"
mkdir -p ./lib/dist/core/bundles/assets/adf-core/i18n

View File

@@ -7,8 +7,8 @@ cd $DIR/../..
if [ "$CI" = "true" ]; then
echo "Building extensions for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build extensions --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build extensions --configuration production || exit 1
else
echo "Building extensions for development"
nx build extensions || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build extensions || exit 1
fi

View File

@@ -9,14 +9,14 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building insights for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build insights --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build insights --configuration production || exit 1
else
echo "Building insights for development"
nx build insights || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build insights || exit 1
fi
echo "====== Build style ======"
node ./lib/config/bundle-insights-scss.js || exit 1
echo "====== Bundle styles ======"
npm run scss-bundle:insights || exit 1
echo "====== Copy i18n ======"
mkdir -p ./lib/dist/insights/bundles/assets/adf-insights/i18n

View File

@@ -9,14 +9,14 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building process-services-cloud for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services-cloud --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services-cloud --configuration production || exit 1
else
echo "Building process-services-cloud for development"
nx build process-services-cloud || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services-cloud || exit 1
fi
echo "====== Build style ======"
node ./lib/config/bundle-process-services-cloud-scss.js || exit 1
echo "====== Bundle styles ======"
npm run scss-bundle:process-services-cloud || exit 1
echo "====== Copy i18n ======"
mkdir -p ./lib/dist/process-services-cloud/bundles/assets/adf-process-services-cloud/i18n

View File

@@ -9,14 +9,14 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building process-services for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services --configuration production || exit 1
else
echo "Building process-services for development"
nx build process-services || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build process-services || exit 1
fi
echo "====== Build style ======"
node ./lib/config/bundle-process-services-scss.js || exit 1
echo "====== Bundle styles ======"
npm run scss-bundle:process-services || exit 1
echo "====== Copy i18n ======"
mkdir -p ./lib/dist/process-services/bundles/assets/adf-process-services/i18n

View File

@@ -10,10 +10,10 @@ echo "====== Build ======"
if [ "$CI" = "true" ]; then
echo "Building testing for production"
NODE_OPTIONS="--max-old-space-size=8192" nx build testing --prod || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build testing --configuration production || exit 1
else
echo "Building testing for development"
nx build testing || exit 1
NODE_OPTIONS="--max-old-space-size=8192" nx build testing || exit 1
fi
echo "====== Move to node_modules ======"

View File

@@ -7,7 +7,7 @@
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-url-quotes": "always",
"function-url-scheme-blacklist": [
"function-url-scheme-disallowed-list": [
"data"
],
"function-whitespace-after": "always",
@@ -18,7 +18,7 @@
"string-quotes": "single",
"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": [
"unit-allowed-list": [
"px",
"%",
"deg",
@@ -48,7 +48,7 @@
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-property-value-blacklist": [
"declaration-property-value-disallowed-list": [
{
"/.*/": [
"initial"
@@ -78,7 +78,7 @@
"selector-max-id": 0,
"no-missing-end-of-source-newline": true,
"no-eol-whitespace": true,
"max-line-length": 100,
"max-line-length": 240,
"linebreaks": "unix",
"selector-class-pattern": [
"^_?(adf|adf-|app|app-|cdk-|example-|demo-|mat-|material-|textLayer|canvasWrapper|page)",