From c1860f0c1f3e199ee52ea22e48930f1506a9d7d0 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 15 Jul 2021 12:48:23 +0100 Subject: [PATCH] [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 --- .travis.yml | 4 +- demo-shell/src/app/app.module.ts | 2 +- .../app/components/about/about.component.ts | 13 +- .../extension-presets.component.ts | 6 +- lib/cli/tsconfig.json | 1 + lib/cli/tsconfig.lib.prod.json | 5 +- lib/config/bundle-content-services-scss.js | 6 - lib/config/bundle-core-scss.js | 6 - lib/config/bundle-insights-scss.js | 6 - .../bundle-process-services-cloud-scss.js | 6 - lib/config/bundle-process-services-scss.js | 6 - lib/content-services/scss-bundle.config.json | 10 + .../search-form/search-form.component.ts | 1 - lib/content-services/tsconfig.lib.json | 1 + lib/content-services/tsconfig.lib.prod.json | 5 +- .../card-view-textitem.component.spec.ts | 4 +- .../dynamic-table/dynamic-table.widget.ts | 1 - lib/core/ng-package.json | 3 +- lib/core/pipes/public-api.ts | 2 + lib/core/scss-bundle.config.json | 10 + lib/core/tsconfig.lib.json | 1 + lib/core/tsconfig.lib.prod.json | 5 +- lib/core/utils/file-utils.ts | 2 +- .../components/pdf-viewer-password-dialog.ts | 3 +- .../src/lib/services/app-extension.service.ts | 2 +- lib/extensions/tsconfig.lib.json | 1 + lib/extensions/tsconfig.lib.prod.json | 5 +- lib/insights/scss-bundle.config.json | 10 + lib/insights/src/lib/material.module.ts | 5 +- lib/insights/tsconfig.lib.json | 1 + lib/insights/tsconfig.lib.prod.json | 5 +- lib/process-services-cloud/ng-package.json | 8 +- .../scss-bundle.config.json | 10 + .../src/lib/material.module.ts | 5 +- lib/process-services-cloud/tsconfig.lib.json | 1 + .../tsconfig.lib.prod.json | 5 +- lib/process-services/scss-bundle.config.json | 10 + .../src/lib/material.module.ts | 5 +- lib/process-services/tsconfig.lib.json | 1 + lib/process-services/tsconfig.lib.prod.json | 5 +- lib/testing/ng-package.json | 3 +- lib/testing/shared/package.json | 5 +- lib/testing/tsconfig.lib.json | 1 + lib/testing/tsconfig.lib.prod.json | 5 +- package-lock.json | 221 ------------------ package.json | 13 +- scripts/build/build-content-services.sh | 8 +- scripts/build/build-core.sh | 8 +- scripts/build/build-extensions.sh | 4 +- scripts/build/build-insights.sh | 8 +- scripts/build/build-process-services-cloud.sh | 8 +- scripts/build/build-process-services.sh | 8 +- scripts/build/build-testing.sh | 4 +- stylelint-config.json | 8 +- 54 files changed, 168 insertions(+), 324 deletions(-) delete mode 100644 lib/config/bundle-content-services-scss.js delete mode 100644 lib/config/bundle-core-scss.js delete mode 100644 lib/config/bundle-insights-scss.js delete mode 100644 lib/config/bundle-process-services-cloud-scss.js delete mode 100644 lib/config/bundle-process-services-scss.js create mode 100644 lib/content-services/scss-bundle.config.json create mode 100644 lib/core/scss-bundle.config.json create mode 100644 lib/insights/scss-bundle.config.json create mode 100644 lib/process-services-cloud/scss-bundle.config.json create mode 100644 lib/process-services/scss-bundle.config.json diff --git a/.travis.yml b/.travis.yml index 317717724c..4d44e3675c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index 713e2d8a0e..c736763b8c 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -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, diff --git a/demo-shell/src/app/components/about/about.component.ts b/demo-shell/src/app/components/about/about.component.ts index f55f3972aa..a6dbc7311e 100644 --- a/demo-shell/src/app/components/about/about.component.ts +++ b/demo-shell/src/app/components/about/about.component.ts @@ -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 = ''; diff --git a/demo-shell/src/app/components/document-list/extension-presets/extension-presets.component.ts b/demo-shell/src/app/components/document-list/extension-presets/extension-presets.component.ts index 52b8f8609b..66ff5207e5 100644 --- a/demo-shell/src/app/components/document-list/extension-presets/extension-presets.component.ts +++ b/demo-shell/src/app/components/document-list/extension-presets/extension-presets.component.ts @@ -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(); - 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; } } diff --git a/lib/cli/tsconfig.json b/lib/cli/tsconfig.json index e98a973e07..9841b76db4 100644 --- a/lib/cli/tsconfig.json +++ b/lib/cli/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "declaration": true, "module": "commonjs", + "declarationMap": true, "moduleResolution": "node", "noEmitOnError": true, "noFallthroughCasesInSwitch": true, diff --git a/lib/cli/tsconfig.lib.prod.json b/lib/cli/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/cli/tsconfig.lib.prod.json +++ b/lib/cli/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/config/bundle-content-services-scss.js b/lib/config/bundle-content-services-scss.js deleted file mode 100644 index 79d06bc905..0000000000 --- a/lib/config/bundle-content-services-scss.js +++ /dev/null @@ -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); -}); diff --git a/lib/config/bundle-core-scss.js b/lib/config/bundle-core-scss.js deleted file mode 100644 index d38b8fbe5e..0000000000 --- a/lib/config/bundle-core-scss.js +++ /dev/null @@ -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); -}); diff --git a/lib/config/bundle-insights-scss.js b/lib/config/bundle-insights-scss.js deleted file mode 100644 index c75e2586b6..0000000000 --- a/lib/config/bundle-insights-scss.js +++ /dev/null @@ -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); -}); diff --git a/lib/config/bundle-process-services-cloud-scss.js b/lib/config/bundle-process-services-cloud-scss.js deleted file mode 100644 index 92a49f9058..0000000000 --- a/lib/config/bundle-process-services-cloud-scss.js +++ /dev/null @@ -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); -}); diff --git a/lib/config/bundle-process-services-scss.js b/lib/config/bundle-process-services-scss.js deleted file mode 100644 index d8bdd4b038..0000000000 --- a/lib/config/bundle-process-services-scss.js +++ /dev/null @@ -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); -}); diff --git a/lib/content-services/scss-bundle.config.json b/lib/content-services/scss-bundle.config.json new file mode 100644 index 0000000000..684a0f4341 --- /dev/null +++ b/lib/content-services/scss-bundle.config.json @@ -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" + } +} diff --git a/lib/content-services/src/lib/search/components/search-form/search-form.component.ts b/lib/content-services/src/lib/search/components/search-form/search-form.component.ts index 61c21beeee..8402722e0f 100644 --- a/lib/content-services/src/lib/search/components/search-form/search-form.component.ts +++ b/lib/content-services/src/lib/search/components/search-form/search-form.component.ts @@ -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 { diff --git a/lib/content-services/tsconfig.lib.json b/lib/content-services/tsconfig.lib.json index f33acf8526..0eb9f5931b 100644 --- a/lib/content-services/tsconfig.lib.json +++ b/lib/content-services/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/content-services/", + "declarationMap": true, "baseUrl": "src", "paths": { "@alfresco/adf-extensions": ["../../dist/extensions"], diff --git a/lib/content-services/tsconfig.lib.prod.json b/lib/content-services/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/content-services/tsconfig.lib.prod.json +++ b/lib/content-services/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.spec.ts b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.spec.ts index 0e401ab20d..6f2fd93119 100644 --- a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.spec.ts +++ b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.spec.ts @@ -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({ diff --git a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts index c8fd997daf..6889f4ae75 100644 --- a/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts +++ b/lib/core/form/components/widgets/dynamic-table/dynamic-table.widget.ts @@ -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)', diff --git a/lib/core/ng-package.json b/lib/core/ng-package.json index a3a8ee8749..6a87337ee0 100644 --- a/lib/core/ng-package.json +++ b/lib/core/ng-package.json @@ -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" } } } diff --git a/lib/core/pipes/public-api.ts b/lib/core/pipes/public-api.ts index 1521fc1907..1fd17a9f0e 100644 --- a/lib/core/pipes/public-api.ts +++ b/lib/core/pipes/public-api.ts @@ -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'; diff --git a/lib/core/scss-bundle.config.json b/lib/core/scss-bundle.config.json new file mode 100644 index 0000000000..8d645eca4c --- /dev/null +++ b/lib/core/scss-bundle.config.json @@ -0,0 +1,10 @@ +{ + "bundlerOptions": { + "entryFile": "./lib/core/styles/_index.scss", + "rootDir": ".", + "project": "../../", + "outFile": "./lib/dist/core/_theming.scss", + "ignoreImports": ["~@angular/.*"], + "logLevel": "info" + } +} diff --git a/lib/core/tsconfig.lib.json b/lib/core/tsconfig.lib.json index 3ced01e064..23151ad94e 100644 --- a/lib/core/tsconfig.lib.json +++ b/lib/core/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/core/", + "declarationMap": true, "baseUrl": "./", "paths": { "@alfresco/adf-extensions": ["../dist/extensions"], diff --git a/lib/core/tsconfig.lib.prod.json b/lib/core/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/core/tsconfig.lib.prod.json +++ b/lib/core/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/core/utils/file-utils.ts b/lib/core/utils/file-utils.ts index 420c8849f3..2e27c4d766 100644 --- a/lib/core/utils/file-utils.ts +++ b/lib/core/utils/file-utils.ts @@ -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((resolveFile) => { entry.file(function (file: File) { files.push({ entry: entry, diff --git a/lib/core/viewer/components/pdf-viewer-password-dialog.ts b/lib/core/viewer/components/pdf-viewer-password-dialog.ts index a35952f809..ff1fd0eaf5 100644 --- a/lib/core/viewer/components/pdf-viewer-password-dialog.ts +++ b/lib/core/viewer/components/pdf-viewer-password-dialog.ts @@ -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; diff --git a/lib/extensions/src/lib/services/app-extension.service.ts b/lib/extensions/src/lib/services/app-extension.service.ts index 5da3d61b9a..99fe9592ba 100644 --- a/lib/extensions/src/lib/services/app-extension.service.ts +++ b/lib/extensions/src/lib/services/app-extension.service.ts @@ -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( `features.documentList.${key}` diff --git a/lib/extensions/tsconfig.lib.json b/lib/extensions/tsconfig.lib.json index b1b4448f2d..b0f198fb5f 100644 --- a/lib/extensions/tsconfig.lib.json +++ b/lib/extensions/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/extensions/", + "declarationMap": true, "baseUrl": "src" }, "angularCompilerOptions": { diff --git a/lib/extensions/tsconfig.lib.prod.json b/lib/extensions/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/extensions/tsconfig.lib.prod.json +++ b/lib/extensions/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/insights/scss-bundle.config.json b/lib/insights/scss-bundle.config.json new file mode 100644 index 0000000000..839d0da219 --- /dev/null +++ b/lib/insights/scss-bundle.config.json @@ -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" + } +} diff --git a/lib/insights/src/lib/material.module.ts b/lib/insights/src/lib/material.module.ts index 5160b1ec8c..b38c8ff806 100644 --- a/lib/insights/src/lib/material.module.ts +++ b/lib/insights/src/lib/material.module.ts @@ -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 {} diff --git a/lib/insights/tsconfig.lib.json b/lib/insights/tsconfig.lib.json index 2cb1ce71f8..c814e384e5 100644 --- a/lib/insights/tsconfig.lib.json +++ b/lib/insights/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/insights/", + "declarationMap": true, "baseUrl": "src", "paths": { "@alfresco/adf-extensions": ["../../dist/extensions"], diff --git a/lib/insights/tsconfig.lib.prod.json b/lib/insights/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/insights/tsconfig.lib.prod.json +++ b/lib/insights/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/process-services-cloud/ng-package.json b/lib/process-services-cloud/ng-package.json index 81ee0cad1f..984058ef60 100644 --- a/lib/process-services-cloud/ng-package.json +++ b/lib/process-services-cloud/ng-package.json @@ -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": [ diff --git a/lib/process-services-cloud/scss-bundle.config.json b/lib/process-services-cloud/scss-bundle.config.json new file mode 100644 index 0000000000..43dd12000e --- /dev/null +++ b/lib/process-services-cloud/scss-bundle.config.json @@ -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" + } +} diff --git a/lib/process-services-cloud/src/lib/material.module.ts b/lib/process-services-cloud/src/lib/material.module.ts index d8ec7cbdcc..70c88cd4c0 100644 --- a/lib/process-services-cloud/src/lib/material.module.ts +++ b/lib/process-services-cloud/src/lib/material.module.ts @@ -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, diff --git a/lib/process-services-cloud/tsconfig.lib.json b/lib/process-services-cloud/tsconfig.lib.json index 1c3f907505..5a5058a11e 100644 --- a/lib/process-services-cloud/tsconfig.lib.json +++ b/lib/process-services-cloud/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/process-services-cloud/", + "declarationMap": true, "baseUrl": "src", "resolveJsonModule": true, "paths": { diff --git a/lib/process-services-cloud/tsconfig.lib.prod.json b/lib/process-services-cloud/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/process-services-cloud/tsconfig.lib.prod.json +++ b/lib/process-services-cloud/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/process-services/scss-bundle.config.json b/lib/process-services/scss-bundle.config.json new file mode 100644 index 0000000000..f4f0306087 --- /dev/null +++ b/lib/process-services/scss-bundle.config.json @@ -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" + } +} diff --git a/lib/process-services/src/lib/material.module.ts b/lib/process-services/src/lib/material.module.ts index 9b50061162..244816ab51 100644 --- a/lib/process-services/src/lib/material.module.ts +++ b/lib/process-services/src/lib/material.module.ts @@ -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, diff --git a/lib/process-services/tsconfig.lib.json b/lib/process-services/tsconfig.lib.json index 4402662121..e546252062 100644 --- a/lib/process-services/tsconfig.lib.json +++ b/lib/process-services/tsconfig.lib.json @@ -2,6 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist/process-services/", + "declarationMap": true, "baseUrl": "src", "paths": { "@alfresco/adf-extensions": ["../../dist/extensions"], diff --git a/lib/process-services/tsconfig.lib.prod.json b/lib/process-services/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/process-services/tsconfig.lib.prod.json +++ b/lib/process-services/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/lib/testing/ng-package.json b/lib/testing/ng-package.json index 72cc5b7dd8..203b045a5a 100644 --- a/lib/testing/ng-package.json +++ b/lib/testing/ng-package.json @@ -10,7 +10,8 @@ "protractor": "protractor", "selenium-webdriver": "selenium-webdriver", "fs": "fs", - "path": "path" + "path": "path", + "protractor/built/util": "protractor/built/util" } } } diff --git a/lib/testing/shared/package.json b/lib/testing/shared/package.json index 6d69f069a8..f267c5202e 100644 --- a/lib/testing/shared/package.json +++ b/lib/testing/shared/package.json @@ -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" + } } } } diff --git a/lib/testing/tsconfig.lib.json b/lib/testing/tsconfig.lib.json index 7a0835670e..672036f111 100644 --- a/lib/testing/tsconfig.lib.json +++ b/lib/testing/tsconfig.lib.json @@ -3,6 +3,7 @@ "compilerOptions": { "outDir": "../dist/testing/", "baseUrl": "src", + "declarationMap": true, "allowJs": true, "paths": {} }, diff --git a/lib/testing/tsconfig.lib.prod.json b/lib/testing/tsconfig.lib.prod.json index b1d501abbc..04c0e66277 100644 --- a/lib/testing/tsconfig.lib.prod.json +++ b/lib/testing/tsconfig.lib.prod.json @@ -1,6 +1,9 @@ { "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, "angularCompilerOptions": { "enableIvy": false } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 57f565c541..5b5061995a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 6b32cf3b31..caac2cafab 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/build/build-content-services.sh b/scripts/build/build-content-services.sh index 430555b8af..c5cc0442c3 100755 --- a/scripts/build/build-content-services.sh +++ b/scripts/build/build-content-services.sh @@ -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 diff --git a/scripts/build/build-core.sh b/scripts/build/build-core.sh index 8aa9704015..9b430b32ca 100755 --- a/scripts/build/build-core.sh +++ b/scripts/build/build-core.sh @@ -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 diff --git a/scripts/build/build-extensions.sh b/scripts/build/build-extensions.sh index dcf4b8fe28..ee1b9e8eb9 100755 --- a/scripts/build/build-extensions.sh +++ b/scripts/build/build-extensions.sh @@ -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 diff --git a/scripts/build/build-insights.sh b/scripts/build/build-insights.sh index 78dbcc5f2d..acb81bb95f 100755 --- a/scripts/build/build-insights.sh +++ b/scripts/build/build-insights.sh @@ -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 diff --git a/scripts/build/build-process-services-cloud.sh b/scripts/build/build-process-services-cloud.sh index 3fe7569400..4dc958adc1 100755 --- a/scripts/build/build-process-services-cloud.sh +++ b/scripts/build/build-process-services-cloud.sh @@ -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 diff --git a/scripts/build/build-process-services.sh b/scripts/build/build-process-services.sh index 2a8596f6ed..81905ab91c 100755 --- a/scripts/build/build-process-services.sh +++ b/scripts/build/build-process-services.sh @@ -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 diff --git a/scripts/build/build-testing.sh b/scripts/build/build-testing.sh index 15f7c54719..3711f7b9bc 100755 --- a/scripts/build/build-testing.sh +++ b/scripts/build/build-testing.sh @@ -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 ======" diff --git a/stylelint-config.json b/stylelint-config.json index dc06f29ce4..2a7125a0d2 100644 --- a/stylelint-config.json +++ b/stylelint-config.json @@ -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)",