diff --git a/.gitignore b/.gitignore index e95c71a25d..a8b1999fa9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.angular/cache *.log node_modules bundles @@ -30,3 +31,5 @@ out-tsc e2e-result-* licenses.txt .DS_Store + +.angular diff --git a/.storybook/tsconfig.json b/.storybook/tsconfig.json index ee045f6496..54a658ae74 100644 --- a/.storybook/tsconfig.json +++ b/.storybook/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "../tsconfig.json", - "exclude": [ - "../**/*.spec.js", - "../**/*.spec.ts", - "../**/*.spec.tsx", - "../**/*.spec.jsx" - ], - "include": ["../**/*"] + "extends": "../tsconfig.json", + "exclude": [ + "../**/*.spec.js", + "../**/*.spec.ts", + "../**/*.spec.tsx", + "../**/*.spec.jsx" + ], + "include": ["../**/*"] } diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js deleted file mode 100644 index 69fcea7697..0000000000 --- a/.storybook/webpack.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Export a function. Accept the base config as the only param. - * @param {Object} options - * @param {Required} options.config - * @param {'DEVELOPMENT' | 'PRODUCTION'} options.mode - change the build configuration. 'PRODUCTION' is used when building the static version of storybook. - */ -module.exports = async ({ config, mode }) => { - // Make whatever fine-grained changes you need - - // Return the altered config - return config; -}; diff --git a/.stylelintignore b/.stylelintignore index 66f64bc148..e4152edfa6 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,2 +1,3 @@ _theming.scss lib/core/viewer/components/pdf-viewer-host.component.scss +lib/dist diff --git a/.travis.yml b/.travis.yml index fbd6878b3c..bdef25463c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,13 @@ branches: only: - /^master(-patch.*)?$/ - /^develop(-patch.*)?$/ + - master + - develop +#remove after upgrade + - angular-upgrade-v13 + - angular-upgrade-v14 + - /.*old-env.*/ + - /.*next-release.*/ - /.*beta.*/ stages: @@ -61,9 +68,9 @@ stages: - name: "Build Demo shell" if: tag IS blank - name: "Unit test Lib" - if: type = pull_request || (type = cron || type = api) + if: type = pull_request || (type = cron || type = api) || branch = "angular-upgrade-v13" - name: "e2e Test" - if: type = pull_request || (type = cron || type = api) + if: type = pull_request || (type = cron || type = api) || branch = "angular-upgrade-v13" - name: "Release tag" if: branch =~ /^master(-patch.*)?$/ - name: "Deprecate develop builds" @@ -120,10 +127,13 @@ jobs: - stage: "Build Demo shell" name: "Demo Shell & Storybook :Build && dockerize" + before_script: + - NODE_OPTIONS="--max-old-space-size=8192" $(npm bin)/nx run cli:build --prod + - ./scripts/build/build-cli.sh script: # Build Demo shell & Storybook for production docker" - NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production - - NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci + - NODE_OPTIONS=--max_old_space_size=8192 nx run stories:build-storybook --configuration ci --projectBuildConfig=stories:build-storybook - ./scripts/travis/release/release-docker.sh workspaces: create: @@ -187,11 +197,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="core" - PROVIDER='ALL' @@ -203,11 +217,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="content-services/components" - PROVIDER="ECM" @@ -219,11 +237,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="content-services/directives" - PROVIDER="ECM" @@ -235,11 +257,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="content-services/document-list" - PROVIDER="ECM" @@ -251,11 +277,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="content-services/metadata" - PROVIDER="ECM" @@ -267,11 +297,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="content-services/upload" - PROVIDER="ECM" @@ -283,11 +317,15 @@ jobs: - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="search" - PROVIDER="ECM" @@ -296,15 +334,19 @@ jobs: - stage: "e2e Test" name: "Process: Form" before_script: - - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 + - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services/form" - PROVIDER="BPM" @@ -313,15 +355,19 @@ jobs: - stage: "e2e Test" name: "Process: Process" before_script: - - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 + - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services/process" - PROVIDER="BPM" @@ -330,15 +376,19 @@ jobs: - stage: "e2e Test" name: "Process: Tasks" before_script: - - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 + - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services/tasks" - PROVIDER="BPM" @@ -347,20 +397,36 @@ jobs: - stage: "e2e Test" name: "Process: Widgets" before_script: - - ./scripts/ci/job_hooks/before_e2e.sh || travis_terminate 1 + - ./scripts/ci/job_hooks/before_e2e.sh - ./scripts/ci/check-env/check-ps-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-external-cs-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services/widgets" - PROVIDER="BPM" - AUTH_TYPE="OAUTH" + - stage: "e2e Test" + name: "Process Cloud:playwright" + before_script: + - ./scripts/ci/job_hooks/before_e2e.sh + - ./scripts/ci/jobs/dbpci-before-playwright || travis_terminate 1 + - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 + script: ./scripts/travis/storybook-testing/storybook-test.sh + workspaces: + use: + - built_libs_cache + - built_demo_shell_cache + - stage: "e2e Test" name: "Process Cloud : Form" before_script: @@ -368,11 +434,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services-cloud/form-field" - PROVIDER="ALL" @@ -386,11 +456,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services-cloud/people" - PROVIDER="ALL" @@ -404,11 +478,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services-cloud/process" - PROVIDER="ALL" @@ -422,11 +500,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services-cloud/start-task" - PROVIDER="ALL" @@ -440,11 +522,15 @@ jobs: - ./scripts/ci/check-env/check-cs-env.sh || travis_terminate 1 - ./scripts/ci/check-env/check-ps-cloud-env.sh || travis_terminate 1 script: ./scripts/travis/e2e/e2e.sh - after_script: ./scripts/ci/job_hooks/after_e2e.sh workspaces: - use: - - built_libs_cache - - built_demo_shell_cache + create: + name: e2e_cache + paths: + - "$SMART_RUNNER_DIRECTORY" + use: + - built_libs_cache + - built_demo_shell_cache + - e2e_cache env: - FOLDER="process-services-cloud/task-list" - PROVIDER="ALL" diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c96455222c..7714c29670 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,4 @@ { "recommendations": [ - "stylelint.vscode-stylelint", - "editorconfig.editorconfig", ] } diff --git a/NX b/NX new file mode 100644 index 0000000000..e69de29bb2 diff --git a/README.md b/README.md index 1f5ea291ad..3bc9b02183 100644 --- a/README.md +++ b/README.md @@ -72,4 +72,3 @@ All components are supported in the following browsers: * Due to a [known issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1188880) in Firefox, the Alfresco Upload Component does not currently support folder upload functionality on Firefox. See the [Browser Support](BROWSER-SUPPORT.md) article for more details. - diff --git a/angular.json b/angular.json index 8fc764f4eb..a7c5611e56 100644 --- a/angular.json +++ b/angular.json @@ -11,12 +11,10 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "extractCss": true, "aot": true, "allowedCommonJsDependencies": [ "minimatch", "minimatch-browser", - "moment-es6", "superagent", "event-emitter", "brace-expansion", @@ -177,24 +175,27 @@ "node_modules/pdfjs-dist/web/pdf_viewer.js", "node_modules/raphael/raphael.min.js", "node_modules/moment/min/moment.min.js" - ] + ], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true }, "configurations": { "production": { "budgets": [ { "type": "anyComponentStyle", - "maximumWarning": "6kb" + "maximumWarning": "12kb" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, - "aot": true, "extractLicenses": true, - "vendorChunk": true, "buildOptimizer": true, "verbose": false, "fileReplacements": [ @@ -214,11 +215,8 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, - "aot": true, "extractLicenses": true, - "vendorChunk": true, "buildOptimizer": true, "verbose": false, "fileReplacements": [ @@ -228,7 +226,8 @@ } ] } - } + }, + "defaultConfiguration": "" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", @@ -389,29 +388,17 @@ "protractorConfig": "./e2e/protractor.conf.js", "devServerTarget": "lib-e2e-test:serve" } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "./e2e/tsconfig.e2e.json" - ], - "exclude": [ - "**/lib/**/*", - "**/node_modules/**/*" - ] - } } } }, "core": { + "projectType": "library", "root": "lib/core", "sourceRoot": "lib/core", - "projectType": "library", "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/core/tsconfig.lib.json", "project": "lib/core/ng-package.json" @@ -420,8 +407,12 @@ "production": { "project": "lib/core/ng-package.json", "tsConfig": "lib/core/tsconfig.lib.prod.json" + }, + "development": { + "tsConfig": "lib/core/tsconfig.lib.json" } - } + }, + "defaultConfiguration": "production" }, "test": { "builder": "@angular-devkit/build-angular:karma", @@ -486,7 +477,7 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/content-services/tsconfig.lib.json", "project": "lib/content-services/ng-package.json" @@ -558,7 +549,7 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/process-services/tsconfig.lib.json", "project": "lib/process-services/ng-package.json" @@ -597,7 +588,7 @@ "prefix": "adf-cloud", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/process-services-cloud/tsconfig.lib.json", "project": "lib/process-services-cloud/ng-package.json" @@ -669,7 +660,7 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/insights/tsconfig.lib.json", "project": "lib/insights/ng-package.json" @@ -708,7 +699,7 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@angular-devkit/build-angular:ng-packagr", "options": { "tsConfig": "lib/extensions/tsconfig.lib.json", "project": "lib/extensions/ng-package.json" @@ -746,13 +737,26 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@nrwl/node:webpack", "options": { - "tsConfig": "lib/testing/tsconfig.lib.json", - "project": "lib/testing/ng-package.json" + "projectRoot": "lib/testing", + "outputPath": "lib/dist/testing", + "main": "lib/testing/index.ts", + "generatePackageJson" : true, + "tsConfig": "lib/testing/tsconfig.lib.prod.json", + "additionalEntryPoints": [ + { + "entryName": "shared", + "entryPath": "/lib/testing/src/lib/shared/index.ts" + } + ] }, "configurations": { "production": { + "projectRoot": "lib/testing", + "outputPath": "lib/dist/testing", + "main": "lib/testing/index.ts", + "generatePackageJson" : true, "tsConfig": "lib/testing/tsconfig.lib.prod.json" } } @@ -775,13 +779,15 @@ "prefix": "adf", "architect": { "build": { - "builder": "@angular-devkit/build-ng-packagr:build", + "builder": "@nrwl/workspace:run-commands", "options": { - "tsConfig": "lib/cli/tsconfig.json" + "commands": [ + "cd lib/cli && npm i && npm run dist" + ] }, "configurations": { "production": { - "tsConfig": "lib/cli/tsconfig.lib.prod.json" + "tsConfig": "lib/cli/tsconfig.json" } } }, diff --git a/demo-shell/e2e/tsconfig.e2e.json b/demo-shell/e2e/tsconfig.e2e.json index 69ed26a1b4..8ad53b9929 100644 --- a/demo-shell/e2e/tsconfig.e2e.json +++ b/demo-shell/e2e/tsconfig.e2e.json @@ -4,10 +4,6 @@ "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", - "types":[ - "jasmine", - "jasminewd2", - "node" - ] + "types": ["jasmine", "jasminewd2", "node"] } } diff --git a/demo-shell/package.json b/demo-shell/package.json index 9e1f74bde9..559419d51a 100644 --- a/demo-shell/package.json +++ b/demo-shell/package.json @@ -1,7 +1,7 @@ { "name": "Alfresco-ADF-Angular-Demo", "description": "Demo shell for Alfresco Angular components", - "version": "4.11.0", + "version": "5.0.0-angular.13.2", "author": "Alfresco Software, Ltd.", "repository": { "type": "git", diff --git a/demo-shell/src/app/components/aspect-list-sample/aspect-list-sample.component.ts b/demo-shell/src/app/components/aspect-list-sample/aspect-list-sample.component.ts index e9f08a2d44..766cced546 100644 --- a/demo-shell/src/app/components/aspect-list-sample/aspect-list-sample.component.ts +++ b/demo-shell/src/app/components/aspect-list-sample/aspect-list-sample.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AspectListService } from '@alfresco/adf-content-services'; +import { DialogAspectListService } from '@alfresco/adf-content-services'; import { Component } from '@angular/core'; @Component({ @@ -30,14 +30,14 @@ export class AspectListSampleComponent { currentResult: string[] = []; - constructor(private aspectListService: AspectListService) { } + constructor(private dialogAspectListService: DialogAspectListService) { } showAspectForNode() { this.isShowed = !this.isShowed; } openAspectDialog() { - this.aspectListService.openAspectListDialog(this.currentNodeId).subscribe((result) => this.currentResult = Array.from(result)); + this.dialogAspectListService.openAspectListDialog(this.currentNodeId).subscribe((result) => this.currentResult = Array.from(result)); } onValueChanged(aspects) { diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index 98199965c5..7dcfef8379 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -38,7 +38,7 @@ import { LibraryDialogComponent, ContentMetadataService, FilterSearch, - AspectListService + DialogAspectListService } from '@alfresco/adf-content-services'; import { SelectAppsDialogComponent, ProcessFormRenderingService } from '@alfresco/adf-process-services'; @@ -233,7 +233,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { public alfrescoApiService: AlfrescoApiService, private contentMetadataService: ContentMetadataService, private sharedLinksApiService: SharedLinksApiService, - private aspectListService: AspectListService, + private dialogAspectListService: DialogAspectListService, private nodeService: NodesApiService) { } @@ -474,7 +474,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { } onAspectUpdate(event: any) { - this.aspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => { + this.dialogAspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => { this.nodeService.updateNode(event.value.entry.id, {aspectNames : [...aspectList]}).subscribe(() => { this.openSnackMessageInfo('Node Aspects Updated'); }); diff --git a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts index 17601beec1..f84b892ebe 100644 --- a/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts +++ b/demo-shell/src/app/components/task-list-demo/task-list-demo.component.ts @@ -19,7 +19,7 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms'; import { ActivatedRoute, Params } from '@angular/router'; import { debounceTime, takeUntil } from 'rxjs/operators'; -import moment from 'moment-es6'; +import moment from 'moment'; import { Subject } from 'rxjs'; const DEFAULT_SIZE = 20; diff --git a/demo-shell/src/custom-style-dev.scss b/demo-shell/src/custom-style-dev.scss index 497d0dc730..c35d1e11ef 100644 --- a/demo-shell/src/custom-style-dev.scss +++ b/demo-shell/src/custom-style-dev.scss @@ -1,11 +1,11 @@ -@import '~@angular/material/theming'; +@use '@angular/material' as mat; @import '../../lib/core/styles/index'; -@include mat-core($alfresco-typography); +@include mat.core($alfresco-typography); -$primary: mat-palette($alfresco-accent-orange); -$accent: mat-palette($alfresco-accent-purple); -$warn: mat-palette($alfresco-warn); -$theme: mat-light-theme( +$primary: mat.define-palette($alfresco-accent-orange); +$accent: mat.define-palette($alfresco-accent-purple); +$warn: mat.define-palette($alfresco-warn); +$theme: mat.define-light-theme( ( color: ( primary: $primary, @@ -14,7 +14,7 @@ $theme: mat-light-theme( ) ); -@include angular-material-theme($theme); +@include mat.all-component-themes($theme); @include alfresco-material-theme($theme); body, @@ -22,9 +22,9 @@ html { margin: 0; height: 100%; overflow: hidden; - font-size: mat-font-size($alfresco-typography, body-1); - font-family: mat-font-family($alfresco-typography); - line-height: mat-line-height($alfresco-typography, body-1); + font-size: mat.font-size($alfresco-typography, body-1); + font-family: mat.font-family($alfresco-typography); + line-height: mat.line-height($alfresco-typography, body-1); } body { diff --git a/demo-shell/src/custom-style.scss b/demo-shell/src/custom-style.scss index 40bd0fe084..c7cc6f98fd 100644 --- a/demo-shell/src/custom-style.scss +++ b/demo-shell/src/custom-style.scss @@ -1,11 +1,11 @@ -@import '~@angular/material/theming'; +@use '@angular/material' as mat; @import '~@alfresco/adf-core/theming'; -@include mat-core($alfresco-typography); +@include mat.core($alfresco-typography); -$primary: mat-palette($alfresco-accent-orange); -$accent: mat-palette($alfresco-accent-purple); -$warn: mat-palette($alfresco-warn); -$theme: mat-light-theme( +$primary: mat.define-palette($alfresco-accent-orange); +$accent: mat.define-palette($alfresco-accent-purple); +$warn: mat.define-palette($alfresco-warn); +$theme: mat.define-light-theme( ( color: ( primary: $primary, @@ -14,7 +14,7 @@ $theme: mat-light-theme( ) ); -@include angular-material-theme($theme); +@include mat.all-component-themes($theme); @include alfresco-material-theme($theme); body, @@ -22,9 +22,9 @@ html { margin: 0; height: 100%; overflow: hidden; - font-size: mat-font-size($alfresco-typography, body-1); - font-family: mat-font-family($alfresco-typography); - line-height: mat-line-height($alfresco-typography, body-1); + font-size: mat.font-size($alfresco-typography, body-1); + font-family: mat.font-family($alfresco-typography); + line-height: mat.line-height($alfresco-typography, body-1); } body { diff --git a/demo-shell/src/polyfills.ts b/demo-shell/src/polyfills.ts index 60af05a667..b31c92476c 100644 --- a/demo-shell/src/polyfills.ts +++ b/demo-shell/src/polyfills.ts @@ -35,13 +35,10 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - /*************************************************************************************************** * Zone JS is required by Angular itself. */ -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js'; // Included with Angular CLI. /** * Support custom event in IE11 diff --git a/demo-shell/src/test.ts b/demo-shell/src/test.ts index b5b7ec32d1..b4f5f1fe3b 100644 --- a/demo-shell/src/test.ts +++ b/demo-shell/src/test.ts @@ -17,7 +17,7 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, @@ -29,7 +29,9 @@ declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +} ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/docs/license-info/README.md b/docs/license-info/README.md index 0836e8ecc9..99e3d4a168 100644 --- a/docs/license-info/README.md +++ b/docs/license-info/README.md @@ -29,3 +29,4 @@ The pages linked below contain the licenses for all third party dependencies of - [ADF 4.9.0](license-info-4.9.0.md) - [ADF 4.10.0](license-info-4.10.0.md) - [ADF 4.11.0](license-info-4.11.0.md) +- [ADF 5.0.0-angular.13](license-info-5.0.0-angular.13.md) diff --git a/docs/license-info/license-info-5.0.0-angular.13.md b/docs/license-info/license-info-5.0.0-angular.13.md new file mode 100644 index 0000000000..de19b94e53 --- /dev/null +++ b/docs/license-info/license-info-5.0.0-angular.13.md @@ -0,0 +1,193 @@ +--- +Title: License info, alfresco-ng2-components 5.0.0-angular.13 +--- + +# License information for alfresco-ng2-components 5.0.0-angular.13 + +This page lists all third party libraries the project depends on. + +## Libraries + +| Name | Version | License | +| --- | --- | --- | +| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.12.0-238 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [@angular/animations](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/cdk](https://github.com/angular/components) | 13.2.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/common](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/compiler](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/compiler](https://github.com/angular/angular) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/core](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/core](https://github.com/angular/angular) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/flex-layout](https://github.com/angular/flex-layout) | 13.0.0-beta.38 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/forms](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material-moment-adapter](https://github.com/angular/components) | 13.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/material](https://github.com/angular/components) | 13.3.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/platform-browser](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@angular/router](https://github.com/angular/angular) | 13.3.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.6.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/code-frame](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/helper-validator-identifier](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@babel/highlight](https://github.com/babel/babel) | 7.18.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@editorjs/editorjs](https://github.com/codex-team/editor.js) | 2.25.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [@editorjs/header](https://github.com/editor-js/header) | 2.6.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@editorjs/list](https://github.com/editor-js/list) | 1.7.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@editorjs/underline](https://github.com/editor-js/underline) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@graphql-typed-document-node/core](https://github.com/dotansimha/graphql-typed-document-node) | 3.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 9.0.68 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@mat-datetimepicker/moment](https://github.com/kuhnroyal/mat-datetimepicker) | 9.0.68 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@ngx-translate/core](https://github.com/ngx-translate/core) | 13.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@types/chart.js](https://github.com/DefinitelyTyped/DefinitelyTyped) | 2.9.37 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/context](https://github.com/benjamn/wryware) | 0.6.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/equality](https://github.com/benjamn/wryware) | 0.5.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [@wry/trie](https://github.com/benjamn/wryware) | 0.3.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [adf-tslint-rules](https://github.com/Alfresco/alfresco-ng2-components) | 0.0.7 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [alfresco-ng2-components](https://github.com/Alfresco/alfresco-ng2-components) | 5.0.0-angular.13 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [ansi-styles](https://github.com/chalk/ansi-styles) | 3.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [app-root-path](https://github.com/inxilpro/node-app-root-path) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [app-root-path](https://github.com/inxilpro/node-app-root-path) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [argparse](https://github.com/nodeca/argparse) | 1.0.10 | [MIT](http://www.opensource.org/licenses/MIT) | +| [aria-query](https://github.com/A11yance/aria-query) | 3.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [ast-types-flow](https://github.com/kyldvs/ast-types-flow) | 0.0.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [axobject-query](https://github.com/A11yance/axobject-query) | 2.0.2 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [backo2](https://github.com/mokesmokes/backo) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.11 | [MIT](http://www.opensource.org/licenses/MIT) | +| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [builtin-modules](https://github.com/sindresorhus/builtin-modules) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chalk](https://github.com/chalk/chalk) | 2.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chart.js](https://github.com/chartjs/Chart.js) | 2.9.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chartjs-color-string](https://github.com/chartjs/chartjs-color-string) | 0.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [chartjs-color](https://github.com/chartjs/chartjs-color) | 2.4.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [codelyzer](https://github.com/mgechev/codelyzer) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [codex-notifier](https://github.com/codex-team/js-notifier) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [codex-tooltip](https://github.com/codex-team/codex.tooltips) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-convert](https://github.com/Qix-/color-convert) | 1.9.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/dfcreative/color-name) | 1.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [color-name](https://github.com/colorjs/color-name) | 1.1.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [commander](https://github.com/tj/commander.js) | 2.20.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.5.12 | [MIT](http://www.opensource.org/licenses/MIT) | +| [css-selector-tokenizer](https://github.com/css-modules/css-selector-tokenizer) | 0.7.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [css-selector-tokenizer](https://github.com/css-modules/css-selector-tokenizer) | 0.7.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cssauron](https://github.com/chrisdickinson/cssauron) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cssesc](https://github.com/mathiasbynens/cssesc) | 0.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [cssesc](https://github.com/mathiasbynens/cssesc) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [custom-event-polyfill](https://github.com/kumarharsh/custom-event-polyfill) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [damerau-levenshtein](https://github.com/tad-lispy/node-damerau-levenshtein) | 1.0.8 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [debug](https://github.com/debug-js/debug) | 4.3.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [diff](https://github.com/kpdecker/jsdiff) | 4.0.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| editorjs-html | 3.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [editorjs-paragraph-with-alignment](https://github.com/kaaaaaaaaaaai/paragraph-with-alignment) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.61 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [escape-string-regexp](https://github.com/sindresorhus/escape-string-regexp) | 1.0.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [esprima](https://github.com/jquery/esprima) | 4.0.1 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) | +| [eve-raphael](https://github.com/tomasAlabes/eve) | 0.5.0 | [Apache](http://www.apache.org/licenses/LICENSE-2.0) | +| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [eventemitter3](https://github.com/primus/eventemitter3) | 3.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ext](https://github.com/medikoo/es5-ext.git#ext) | 1.6.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [extract-files](https://github.com/jaydenseric/extract-files) | 9.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fastparse](https://github.com/webpack/fastparse) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [fs.realpath](https://github.com/isaacs/fs.realpath) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [glob](https://github.com/isaacs/node-glob) | 7.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [graphql-tag](https://github.com/apollographql/graphql-tag) | 2.12.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [graphql](https://github.com/graphql/graphql-js) | 15.8.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-flag](https://github.com/sindresorhus/has-flag) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [hoist-non-react-statics](https://github.com/mridgway/hoist-non-react-statics) | 3.3.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [inflight](https://github.com/npm/inflight) | 1.0.6 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [inherits](https://github.com/isaacs/inherits) | 2.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [is-core-module](https://github.com/inspect-js/is-core-module) | 2.9.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [iterall](https://github.com/leebyron/iterall) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-tokens](https://github.com/lydell/js-tokens) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [js-yaml](https://github.com/nodeca/js-yaml) | 3.14.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [jsesc](https://github.com/mathiasbynens/jsesc) | 0.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lodash-es](https://github.com/lodash/lodash) | 4.17.21 | [MIT](http://www.opensource.org/licenses/MIT) | +| [loose-envify](https://github.com/zertosh/loose-envify) | 1.4.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-db](https://github.com/jshttp/mime-db) | 1.52.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime-types](https://github.com/jshttp/mime-types) | 2.1.35 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [minimist](https://github.com/substack/minimist) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [mkdirp](https://github.com/substack/node-mkdirp) | 0.5.6 | [MIT](http://www.opensource.org/licenses/MIT) | +| [moment](https://github.com/moment/moment) | 2.29.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [nanoid](https://github.com/ai/nanoid) | 3.3.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [next-tick](https://github.com/medikoo/next-tick) | 1.1.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ng2-charts](https://github.com/valor-software/ng2-charts) | 2.4.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ngx-monaco-editor](https://github.com/atularen/ngx-monaco-editor) | 8.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [object-assign](https://github.com/sindresorhus/object-assign) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [optimism](https://github.com/benjamn/optimism) | 0.16.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [parse5](https://github.com/inikulin/parse5) | 5.1.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-is-absolute](https://github.com/sindresorhus/path-is-absolute) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [path-parse](https://github.com/jbgutierrez/path-parse) | 1.0.7 | [MIT](http://www.opensource.org/licenses/MIT) | +| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 2.5.207 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [prop-types](https://github.com/facebook/prop-types) | 15.8.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react-is](https://github.com/facebook/react) | 16.13.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [react](https://github.com/facebook/react) | 16.14.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regenerate](https://github.com/mathiasbynens/regenerate) | 1.4.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regexpu-core](https://github.com/mathiasbynens/regexpu-core) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regjsgen](https://github.com/d10/regjsgen) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [regjsparser](https://github.com/jviereck/regjsparser) | 0.1.5 | [BSD](http://www.opensource.org/licenses/BSD-2-Clause) | +| [resolve](https://github.com/browserify/resolve) | 1.22.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [rxjs](https://github.com/reactivex/rxjs) | 6.6.7 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [semver-dsl](https://github.com/mgechev/semver-dsl) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) | +| [semver](https://github.com/npm/node-semver) | 5.7.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [semver](https://github.com/npm/node-semver) | 7.3.7 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) | +| [source-map](https://github.com/mozilla/source-map) | 0.5.6 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [source-map](https://github.com/mozilla/source-map) | 0.5.7 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [sprintf-js](https://github.com/alexei/sprintf.js) | 1.0.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [sprintf-js](https://github.com/alexei/sprintf.js) | 1.1.2 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | +| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-color](https://github.com/chalk/supports-color) | 5.5.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [supports-preserve-symlinks-flag](https://github.com/inspect-js/node-supports-preserve-symlinks-flag) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 1.2.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [symbol-observable](https://github.com/blesh/symbol-observable) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [through](https://github.com/dominictarr/through) | 2.3.8 | [MIT](http://www.opensource.org/licenses/MIT) | +| [ts-invariant](https://github.com/apollographql/invariant-packages) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [tslib](https://github.com/Microsoft/tslib) | 1.14.1 | [0BSD](http://landley.net/toybox/license.html) | +| [tslib](https://github.com/Microsoft/tslib) | 2.4.0 | [0BSD](http://landley.net/toybox/license.html) | +| [tslint](https://github.com/palantir/tslint) | 6.1.3 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [tsutils](https://github.com/ajafff/tsutils) | 2.29.0 | [MIT](http://www.opensource.org/licenses/MIT) | +| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [type](https://github.com/medikoo/type) | 2.6.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [typescript](https://github.com/Microsoft/TypeScript) | 4.5.5 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) | +| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) | +| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [ws](https://github.com/websockets/ws) | 7.5.9 | [MIT](http://www.opensource.org/licenses/MIT) | +| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) | +| [zen-observable-ts](https://github.com/apollographql/zen-observable-ts) | 1.2.5 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zen-observable](https://github.com/zenparsing/zen-observable) | 0.8.15 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zone.js](https://github.com/angular/angular) | 0.10.3 | [MIT](http://www.opensource.org/licenses/MIT) | +| [zone.js](https://github.com/angular/angular) | 0.11.7 | [MIT](http://www.opensource.org/licenses/MIT) | + diff --git a/docs/vulnerability/README.md b/docs/vulnerability/README.md index b9a50d7198..0a5a3fc57a 100644 --- a/docs/vulnerability/README.md +++ b/docs/vulnerability/README.md @@ -26,3 +26,4 @@ The pages linked below contain the audit for all third party dependencies of ADF - [ADF 4.9.0](audit-info-4.9.0.md) - [ADF 4.10.0](audit-info-4.10.0.md) - [ADF 4.11.0](audit-info-4.11.0.md) +- [ADF 5.0.0-angular.13](audit-info-5.0.0-angular.13.md) diff --git a/docs/vulnerability/audit-info-5.0.0-angular.13.md b/docs/vulnerability/audit-info-5.0.0-angular.13.md new file mode 100644 index 0000000000..8361454568 --- /dev/null +++ b/docs/vulnerability/audit-info-5.0.0-angular.13.md @@ -0,0 +1,22 @@ +--- +Title: Audit info, alfresco-ng2-components 5.0.0-angular.13 +--- + +# Audit information for alfresco-ng2-components 5.0.0-angular.13 + +This page lists the security audit of the dependencies this project depends on. + +## Risks + +- Critical risk: 0 +- High risk: 0 +- Moderate risk: 0 +- Low risk: 0 + +Dependencies analyzed: 138 + +## Libraries + +| Severity | Module | Vulnerable versions | +| --- | --- | --- | + diff --git a/e2e/content-services/directives/delete-directive.e2e.ts b/e2e/content-services/directives/delete-directive.e2e.ts index fdc3ef5623..ce5f5aabda 100644 --- a/e2e/content-services/directives/delete-directive.e2e.ts +++ b/e2e/content-services/directives/delete-directive.e2e.ts @@ -149,7 +149,7 @@ describe('Delete Directive', () => { await contentListPage.dataTable.checkContentIsNotDisplayed('Display name', folderInfo.name); }); - it('[C260193] Delete file when different selections are set', async () => { + it('[C260193] Delete file when different selections are set', async () => { await contentServicesPage.chooseSelectionMode('None'); await contentListPage.selectRow(txtFileModel.name); await contentListPage.dataTable.checkRowIsNotSelected('Display name', txtFileModel.name); diff --git a/e2e/content-services/document-list/document-list-component.e2e.ts b/e2e/content-services/document-list/document-list-component.e2e.ts index 9ee20528a6..7bc6028e29 100644 --- a/e2e/content-services/document-list/document-list-component.e2e.ts +++ b/e2e/content-services/document-list/document-list-component.e2e.ts @@ -19,7 +19,7 @@ import { ContentServicesPage } from '../../core/pages/content-services.page'; import { browser } from 'protractor'; import { createApiService, LoginPage, StringUtil, UploadActions, UsersActions, ViewerPage } from '@alfresco/adf-testing'; import { FileModel } from '../../models/ACS/file.model'; -import moment from 'moment-es6'; +import * as moment from 'moment'; import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; describe('Document List Component', () => { diff --git a/e2e/content-services/metadata/metadata-content-type.e2e.ts b/e2e/content-services/metadata/metadata-content-type.e2e.ts index 186034ceb3..7096b42323 100644 --- a/e2e/content-services/metadata/metadata-content-type.e2e.ts +++ b/e2e/content-services/metadata/metadata-content-type.e2e.ts @@ -109,7 +109,7 @@ describe('content type', () => { }); it('[C593560] Should the user be able to select a new content type and save it only after the confirmation dialog', async () => { - await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`); + await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`); await viewerPage.checkFileIsLoaded(pdfFile.name); await viewerPage.clickInfoButton(); await viewerPage.checkInfoSideBarIsDisplayed(); @@ -134,7 +134,7 @@ describe('content type', () => { await loginPage.login(acsUser.username, acsUser.password); await navigationBarPage.navigateToContentServices(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded(); - await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`); + await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pdfFile.id}/view)`); await viewerPage.checkFileIsLoaded(pdfFile.name); await viewerPage.clickInfoButton(); await viewerPage.checkInfoSideBarIsDisplayed(); @@ -150,7 +150,7 @@ describe('content type', () => { }); it('[C593559] Should the user be able to select a new content type and not save it when press cancel in the confirmation dialog', async () => { - await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`); + await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`); await viewerPage.checkFileIsLoaded(docxFileModel.name); await viewerPage.clickInfoButton(); await viewerPage.checkInfoSideBarIsDisplayed(); @@ -173,7 +173,7 @@ describe('content type', () => { await loginPage.login(acsUser.username, acsUser.password); await navigationBarPage.navigateToContentServices(); await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded(); - await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`); + await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${docxFileModel.id}/view)`); await viewerPage.checkFileIsLoaded(docxFileModel.name); await viewerPage.clickInfoButton(); await viewerPage.checkInfoSideBarIsDisplayed(); diff --git a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts b/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts index 722643c578..c071a5632d 100644 --- a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts +++ b/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts @@ -30,7 +30,7 @@ import { MetadataViewPage } from '../../core/pages/metadata-view.page'; import { FileModel } from '../../models/ACS/file.model'; import { browser } from 'protractor'; import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; -import moment = require('moment'); +import * as moment from 'moment'; describe('Metadata component', () => { @@ -269,7 +269,7 @@ describe('Metadata component', () => { it('[C279960] Should show the last username modifier when modify a File', async () => { await loginPage.loginWithProfile('admin'); - await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pngFileModel.id}/view)`); + await BrowserActions.getUrl(browser.baseUrl + `/files(overlay:files/${pngFileModel.id}/view)`); await viewerPage.clickInfoButton(); await viewerPage.checkInfoSideBarIsDisplayed(); diff --git a/e2e/core/datatable/data-table-component.e2e.ts b/e2e/core/datatable/data-table-component.e2e.ts index c963a3a4a7..054acd424e 100644 --- a/e2e/core/datatable/data-table-component.e2e.ts +++ b/e2e/core/datatable/data-table-component.e2e.ts @@ -29,8 +29,6 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; describe('Datatable component', () => { - const dataTablePage = new DataTablePage('defaultTable'); - const copyContentDataTablePage = new DataTablePage('copyClipboardDataTable'); const dragAndDropDataTablePage = new DataTablePage(); const loginPage = new LoginPage(); const acsUser = new UserModel(); @@ -56,48 +54,6 @@ describe('Datatable component', () => { await navigationBarPage.clickLogoutButton(); }); - describe('Datatable component - copyContent', () => { - beforeAll(async () => { - await navigationBarPage.navigateToCopyContentDatatable(); - await dataTablePage.dataTable.waitForTableBody(); - }); - - it('[C307040] A column value with copyContent set to true is copied when clicking on it', async () => { - await dataTablePage.mouseOverIdColumn('1'); - await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy'); - await dataTablePage.clickOnIdColumn('1'); - await notificationHistoryPage.checkNotifyContains('Text copied to clipboard'); - await dataTablePage.clickOnIdColumn('2'); - await notificationHistoryPage.checkNotifyContains('Text copied to clipboard'); - await dataTablePage.pasteClipboard(); - await expect(await dataTablePage.getClipboardInputText()).toEqual('2'); - }); - - it('[C307073] A column value with copyContent set to true is copied when clicking on it', async () => { - await copyContentDataTablePage.mouseOverIdColumn('1'); - await expect(await copyContentDataTablePage.getCopyContentTooltip()).toEqual('Click to copy'); - await copyContentDataTablePage.clickOnIdColumn('1'); - await notificationHistoryPage.checkNotifyContains('Text copied to clipboard'); - await copyContentDataTablePage.clickOnIdColumn('2'); - await notificationHistoryPage.checkNotifyContains('Text copied to clipboard'); - await copyContentDataTablePage.pasteClipboard(); - await expect(await copyContentDataTablePage.getClipboardInputText()).toEqual('2'); - }); - - it('[C307100] A column value of type text and with copyContent set to true is copied when clicking on it', async () => { - await dataTablePage.mouseOverIdColumn('1'); - await expect(await dataTablePage.getCopyContentTooltip()).toEqual('Click to copy'); - await dataTablePage.clickOnIdColumn('1'); - await notificationHistoryPage.checkNotifyContains('Text copied to clipboard'); - await dataTablePage.pasteClipboard(); - await expect(await dataTablePage.getClipboardInputText()).toEqual('1'); - }); - - afterAll(async () => { - await navigationBarPage.clickHomeButton(); - }); - }); - describe('Datatable component - Drag and Drop', () => { beforeAll(async () => { await navigationBarPage.navigateToDragAndDropDatatable(); diff --git a/e2e/core/pages/content-services.page.ts b/e2e/core/pages/content-services.page.ts index c9fd712605..288a573971 100644 --- a/e2e/core/pages/content-services.page.ts +++ b/e2e/core/pages/content-services.page.ts @@ -93,7 +93,7 @@ export class ContentServicesPage { notMarkedFavorite = element(by.cssContainingText('button[data-automation-id="favorite"] mat-icon', 'star_border')); multiSelectToggle = $('[data-automation-id="multiSelectToggle"]'); selectAllCheckbox = $$('.adf-checkbox-sr-only').first(); - selectionModeDropdown = $('.mat-select[aria-label="Selection Mode"]'); + selectionModeDropdown = $('.mat-select[placeholder="Selection Mode"]'); selectedNodesList = $$('.app-content-service-settings li'); siteListDropdown = new DropdownPage($(`mat-select[data-automation-id='site-my-files-option']`)); sortingDropdown = new DropdownPage($('mat-select[data-automation-id="grid-view-sorting"]')); diff --git a/e2e/core/pages/dialog/share-dialog.page.ts b/e2e/core/pages/dialog/share-dialog.page.ts index c1af62a1d7..af92b6cc9a 100644 --- a/e2e/core/pages/dialog/share-dialog.page.ts +++ b/e2e/core/pages/dialog/share-dialog.page.ts @@ -17,7 +17,7 @@ import { $$, $ } from 'protractor'; import { BrowserVisibility, TogglePage, BrowserActions, DateTimePickerPage } from '@alfresco/adf-testing'; -import moment = require('moment'); +import * as moment from 'moment'; export class ShareDialogPage { diff --git a/e2e/core/pages/login-shell.page.ts b/e2e/core/pages/login-shell.page.ts index ea9dd6dc8b..c596439de6 100644 --- a/e2e/core/pages/login-shell.page.ts +++ b/e2e/core/pages/login-shell.page.ts @@ -32,8 +32,8 @@ export class LoginShellPage { usernameError = $('span[data-automation-id="username-error"]'); passwordError = $('span[data-automation-id="password-required"]'); loginError = $('.adf-login-error-message'); - usernameInactive = $('input[id="username"][aria-invalid="false"]'); - passwordInactive = $('input[id="password"][aria-invalid="false"]'); + usernameInactive = $('input[id="username"][class*="ng-invalid"]'); + passwordInactive = $('input[id="password"][class*="ng-invalid"]'); adfLogo = $('.adf-img-logo'); usernameHighlighted = $('input[id="username"][aria-invalid="true"]'); @@ -115,6 +115,7 @@ export class LoginShellPage { async checkPasswordHighlighted(): Promise { await BrowserActions.click(this.adfLogo); + await browser.sleep(900000); await BrowserVisibility.waitUntilElementIsVisible(this.passwordHighlighted); } diff --git a/e2e/process-services-cloud/pages/people-group-cloud-component.page.ts b/e2e/process-services-cloud/pages/people-group-cloud-component.page.ts index b95a9e0615..6ad827fe6b 100644 --- a/e2e/process-services-cloud/pages/people-group-cloud-component.page.ts +++ b/e2e/process-services-cloud/pages/people-group-cloud-component.page.ts @@ -33,7 +33,7 @@ export class PeopleGroupCloudComponentPage { groupAppInput = $('input[data-automation-id="app-group-app-input"]'); peopleCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'People Cloud Component')); groupCloudComponentTitle = element(by.cssContainingText('mat-card-title', 'Groups Cloud Component')); - preselectValidation = $$('mat-checkbox.app-preselect-value').first(); + preselectValidation = $$('mat-checkbox.app-preselect-value label').first(); preselectValidationStatus = $$('mat-checkbox.app-preselect-value label input').first(); async navigateTo() { diff --git a/e2e/process-services-cloud/process/process-filter-results.e2e.ts b/e2e/process-services-cloud/process/process-filter-results.e2e.ts index 8bed6136df..fa4663c664 100644 --- a/e2e/process-services-cloud/process/process-filter-results.e2e.ts +++ b/e2e/process-services-cloud/process/process-filter-results.e2e.ts @@ -35,7 +35,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; import { ProcessListPage } from '../../process-services/pages/process-list.page'; import { EditProcessFilterConfiguration } from './../config/edit-process-filter.config'; import { ProcessListCloudConfiguration } from './../config/process-list-cloud.config'; -import moment = require('moment'); +import * as moment from 'moment'; describe('Process filters cloud', () => { diff --git a/e2e/process-services-cloud/process/process-header-cloud.e2e.ts b/e2e/process-services-cloud/process/process-header-cloud.e2e.ts index d2d52550c1..06d73faf5e 100644 --- a/e2e/process-services-cloud/process/process-header-cloud.e2e.ts +++ b/e2e/process-services-cloud/process/process-header-cloud.e2e.ts @@ -21,7 +21,7 @@ import { ProcessCloudDemoPage } from './../pages/process-cloud-demo.page'; import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page'; import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; import CONSTANTS = require('../../util/constants'); -import moment = require('moment'); +import * as moment from 'moment'; import { EditProcessFilterConfiguration } from './../config/edit-process-filter.config'; describe('Process Header cloud component', () => { diff --git a/e2e/process-services-cloud/task-list/task-header-cloud.e2e.ts b/e2e/process-services-cloud/task-list/task-header-cloud.e2e.ts index 96db495219..1b20699c44 100644 --- a/e2e/process-services-cloud/task-list/task-header-cloud.e2e.ts +++ b/e2e/process-services-cloud/task-list/task-header-cloud.e2e.ts @@ -29,7 +29,7 @@ import { createApiService, import { browser } from 'protractor'; import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page'; import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; -import moment = require('moment'); +import * as moment from 'moment'; const isValueInvalid = (value: any): boolean => { return value === null || value === undefined; diff --git a/e2e/process-services-cloud/task-list/task-list-properties.e2e.ts b/e2e/process-services-cloud/task-list/task-list-properties.e2e.ts index df21a4d171..9f34906d5a 100644 --- a/e2e/process-services-cloud/task-list/task-list-properties.e2e.ts +++ b/e2e/process-services-cloud/task-list/task-list-properties.e2e.ts @@ -25,7 +25,7 @@ import { import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page'; import { TaskListCloudConfiguration } from './../config/task-list-cloud.config'; -import moment = require('moment'); +import * as moment from 'moment'; import { taskFilterConfiguration } from './../config/task-filter.config'; describe('Edit task filters and task list properties', () => { diff --git a/e2e/process-services/process/process-instance-details.e2e.ts b/e2e/process-services/process/process-instance-details.e2e.ts index 5ea4f4c0dc..e681222e16 100644 --- a/e2e/process-services/process/process-instance-details.e2e.ts +++ b/e2e/process-services/process/process-instance-details.e2e.ts @@ -28,7 +28,7 @@ import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.page'; import { ProcessListPage } from './../pages/process-list.page'; import { ProcessDetailsPage } from './../pages/process-details.page'; -import moment = require('moment'); +import * as moment from 'moment'; import { ProcessInstancesApi } from '@alfresco/js-api'; describe('Process Instance Details', () => { diff --git a/e2e/process-services/tasks/custom-tasks-filters.e2e.ts b/e2e/process-services/tasks/custom-tasks-filters.e2e.ts index 62dda7cc6a..6b5b731bcd 100644 --- a/e2e/process-services/tasks/custom-tasks-filters.e2e.ts +++ b/e2e/process-services/tasks/custom-tasks-filters.e2e.ts @@ -28,7 +28,7 @@ import { browser } from 'protractor'; import { TaskListDemoPage } from './../pages/task-list-demo.page'; import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; import { TaskActionsApi, TaskRepresentation, TasksApi } from '@alfresco/js-api'; -import moment = require('moment'); +import * as moment from 'moment'; describe('Start Task - Custom App', () => { diff --git a/e2e/process-services/tasks/info-drawer.e2e.ts b/e2e/process-services/tasks/info-drawer.e2e.ts index 64d34fa378..14fe46b70c 100644 --- a/e2e/process-services/tasks/info-drawer.e2e.ts +++ b/e2e/process-services/tasks/info-drawer.e2e.ts @@ -33,7 +33,7 @@ import { ProcessServiceTabBarPage } from './../pages/process-service-tab-bar.pag import { ProcessFiltersPage } from './../pages/process-filters.page'; import { infoDrawerConfiguration } from './../config/task.config'; import CONSTANTS = require('../../util/constants'); -import moment = require('moment'); +import * as moment from 'moment'; describe('Info Drawer', () => { diff --git a/e2e/process-services/tasks/task-details.e2e.ts b/e2e/process-services/tasks/task-details.e2e.ts index 2e441e59ba..69b408190a 100644 --- a/e2e/process-services/tasks/task-details.e2e.ts +++ b/e2e/process-services/tasks/task-details.e2e.ts @@ -31,7 +31,7 @@ import Task = require('../../models/APS/Task'); import TaskModel = require('../../models/APS/TaskModel'); import FormModel = require('../../models/APS/FormModel'); import CONSTANTS = require('../../util/constants'); -import moment = require('moment'); +import * as moment from 'moment'; describe('Task Details component', () => { diff --git a/e2e/search/search-filters.e2e.ts b/e2e/search/search-filters.e2e.ts index c17367d818..c299d87a5c 100644 --- a/e2e/search/search-filters.e2e.ts +++ b/e2e/search/search-filters.e2e.ts @@ -20,7 +20,8 @@ import { SearchFiltersPage } from './pages/search-filters.page'; import { SearchResultsPage } from './pages/search-results.page'; import { FileModel } from '../models/ACS/file.model'; import { NavigationBarPage } from '../core/pages/navigation-bar.page'; -import { createApiService, +import { + createApiService, BrowserActions, DocumentListPage, LocalStorageUtil, @@ -33,7 +34,7 @@ import { createApiService, } from '@alfresco/adf-testing'; import { browser } from 'protractor'; import { SearchConfiguration } from './search.config'; -import moment from 'moment-es6'; +import * as moment from 'moment'; describe('Search Filters', () => { @@ -104,6 +105,9 @@ describe('Search Filters', () => { await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded + }); + + beforeEach(async () => { jsonFile = SearchConfiguration.getConfiguration(); }); @@ -118,6 +122,37 @@ describe('Search Filters', () => { await navigationBarPage.clickLogoutButton(); }); + it('[C291980] Should group search facets under specified labels', async () => { + const currentYear = moment().year(); + + jsonFile.facetQueries.queries[0] = { + 'query': `created:${currentYear}`, + 'label': 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR' + }; + jsonFile.facetQueries.queries[1] = { + 'query': `content.mimetype:text/html`, + 'label': 'SEARCH.FACET_QUERIES.MIMETYPE', + 'group': 'Type facet queries' + }; + jsonFile.facetQueries.queries[2] = { + 'query': `content.size:[0 TO 10240]`, + 'label': 'SEARCH.FACET_QUERIES.XTRASMALL', + 'group': 'Size facet queries' + }; + + + await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile)); + + await searchBarPage.clickOnSearchIcon(); + await searchBarPage.enterTextAndPressEnter('*'); + await searchResults.dataTable.waitTillContentLoaded(); + + await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed(); + await searchFiltersPage.checkTypeFacetQueryGroupIsDisplayed(); + + await searchFiltersPage.checkSizeFacetQueryGroupIsDisplayed(); + }); + it('[C286298] Should be able to cancel a filter using "x" button from the toolbar', async () => { await searchBarPage.checkSearchIconIsVisible(); await searchBarPage.clickOnSearchIcon(); @@ -176,25 +211,6 @@ describe('Search Filters', () => { }); }); - it('[C291980] Should group search facets under specified labels', async () => { - const currentYear = moment().year(); - - jsonFile.facetQueries.queries[0] = {'query': `created:${currentYear}`, 'label': 'SEARCH.FACET_QUERIES.CREATED_THIS_YEAR'}; - jsonFile.facetQueries.queries[1] = {'query': `content.mimetype:text/html`, 'label': 'SEARCH.FACET_QUERIES.MIMETYPE', 'group': 'Type facet queries'}; - jsonFile.facetQueries.queries[2] = {'query': `content.size:[0 TO 10240]`, 'label': 'SEARCH.FACET_QUERIES.XTRASMALL', 'group': 'Size facet queries'}; - - await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile)); - - await searchBarPage.clickOnSearchIcon(); - await searchBarPage.enterTextAndPressEnter('*'); - await searchResults.dataTable.waitTillContentLoaded(); - - await searchFiltersPage.checkDefaultFacetQueryGroupIsDisplayed(); - await searchFiltersPage.checkTypeFacetQueryGroupIsDisplayed(); - - await searchFiltersPage.checkSizeFacetQueryGroupIsDisplayed(); - }); - it('[C297509] Should display search intervals under specified labels from config', async () => { await searchBarPage.clickOnSearchIcon(); await searchBarPage.enterTextAndPressEnter('*'); diff --git a/e2e/test.config.js b/e2e/test.config.js index e67e524f90..72292dd3c6 100644 --- a/e2e/test.config.js +++ b/e2e/test.config.js @@ -7,7 +7,7 @@ require('dotenv').config({path: process.env.ENV_FILE}); const HOST = process.env.URL_HOST_ADF; -const LOG = process.env.LOG; +const LOG = process.env.E2E_LOG_LEVEL; const HOST_ECM = process.env.PROXY_HOST_ECM || HOST || 'ecm'; const HOST_BPM = process.env.PROXY_HOST_BPM || HOST || 'bpm'; diff --git a/e2e/util/resources.js b/e2e/util/resources.js index dfff18362d..32d8400439 100644 --- a/e2e/util/resources.js +++ b/e2e/util/resources.js @@ -22,7 +22,7 @@ * @class util.Resources */ var path = require('path'); -const ACTIVITI_CLOUD_APPS = require('../../lib/dist/testing/src'); +const ACTIVITI_CLOUD_APPS = require('../../lib/dist/testing'); const RESOURCES = { ...ACTIVITI_CLOUD_APPS, diff --git a/lib/cli/package-lock.json b/lib/cli/package-lock.json deleted file mode 100644 index edf9b83245..0000000000 --- a/lib/cli/package-lock.json +++ /dev/null @@ -1,1924 +0,0 @@ -{ - "name": "@alfresco/adf-cli", - "version": "4.11.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@alfresco/js-api": { - "version": "4.12.0-197", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-4.12.0-197.tgz", - "integrity": "sha512-JL9b+Qc5PJFOrAZnEwZG0nn7zng/M5NyECwOIurV4AnqVfMbuiT15qpTj6OB5hb3aaSdv7crTcqoneDRMjcybA==", - "requires": { - "event-emitter": "^0.3.5", - "minimatch": "5.0.1", - "superagent": "^6.0.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "@types/ejs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.0.tgz", - "integrity": "sha512-DCg+Ka+uDQ31lJ/UtEXVlaeV3d6t81gifaVWKJy4MYVVgvJttyX/viREy+If7fz+tK/gVxTGMtyrFPnm4gjrVA==", - "dev": true - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/node": { - "version": "14.14.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", - "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==", - "dev": true - }, - "@types/shelljs": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.8.tgz", - "integrity": "sha512-lD3LWdg6j8r0VRBFahJVaxoW0SIcswxKaFUrmKl33RJVeeoNYQAz4uqCJ5Z6v4oIBOsC5GozX+I5SorIKiTcQA==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", - "requires": { - "humanize-ms": "^1.2.1" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=" - }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "cookiejar": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", - "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==" - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cyclist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", - "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=" - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=" - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "dezalgo": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", - "requires": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ejs": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", - "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "requires": { - "iconv-lite": "^0.6.2" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" - }, - "es5-ext": { - "version": "0.10.61", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz", - "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==", - "requires": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "next-tick": "^1.1.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "^4.0.3" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "ext": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", - "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", - "requires": { - "type": "^2.5.0" - }, - "dependencies": { - "type": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", - "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==" - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" - }, - "figgy-pudding": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", - "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==" - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "formidable": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", - "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==" - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==" - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", - "requires": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "^2.0.0" - } - }, - "iconv-lite": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", - "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "requires": { - "has": "^1.0.3" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "license-checker": { - "version": "25.0.1", - "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", - "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==", - "requires": { - "chalk": "^2.4.1", - "debug": "^3.1.0", - "mkdirp": "^0.5.1", - "nopt": "^4.0.1", - "read-installed": "~4.0.3", - "semver": "^5.5.0", - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0", - "spdx-satisfies": "^4.0.0", - "treeify": "^1.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, - "make-fetch-happen": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", - "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", - "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^12.0.0", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" - }, - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" - }, - "mime-db": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", - "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" - }, - "mime-types": { - "version": "2.1.28", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", - "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", - "requires": { - "mime-db": "1.45.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" - }, - "node-fetch-npm": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", - "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" - }, - "npm-package-arg": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", - "requires": { - "hosted-git-info": "^2.7.1", - "osenv": "^0.1.5", - "semver": "^5.6.0", - "validate-npm-package-name": "^3.0.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "npm-registry-fetch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.7.tgz", - "integrity": "sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==", - "requires": { - "JSONStream": "^1.3.4", - "bluebird": "^3.5.1", - "figgy-pudding": "^3.4.1", - "lru-cache": "^5.1.1", - "make-fetch-happen": "^5.0.0", - "npm-package-arg": "^6.1.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "parallel-transform": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", - "requires": { - "cyclist": "^1.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" - }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", - "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "requires": { - "side-channel": "^1.0.4" - } - }, - "read-installed": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", - "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", - "requires": { - "debuglog": "^1.0.1", - "graceful-fs": "^4.1.2", - "read-package-json": "^2.0.0", - "readdir-scoped-modules": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "slide": "~1.1.3", - "util-extend": "^1.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "read-package-json": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", - "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", - "requires": { - "glob": "^7.1.1", - "json-parse-even-better-errors": "^2.3.0", - "normalize-package-data": "^2.0.0", - "npm-normalize-package-bin": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdir-scoped-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", - "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", - "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "^1.1.6" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - } - } - }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", - "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" - } - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=" - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "requires": { - "aproba": "^1.1.1" - } - }, - "rxjs": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", - "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "slide": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", - "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" - }, - "smart-buffer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==" - }, - "socks": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", - "requires": { - "ip": "1.1.5", - "smart-buffer": "^4.1.0" - } - }, - "socks-proxy-agent": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", - "requires": { - "agent-base": "~4.2.1", - "socks": "~2.3.2" - }, - "dependencies": { - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "requires": { - "es6-promisify": "^5.0.0" - } - } - } - }, - "spdx-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", - "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", - "requires": { - "array-find-index": "^1.0.2", - "spdx-expression-parse": "^3.0.0", - "spdx-ranges": "^2.0.0" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" - }, - "spdx-license-list": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-5.0.0.tgz", - "integrity": "sha512-N5u9tEFRBUzQDjMKRRt8SHxC/UaqYApPmdF4MMFnICQg3z52onNbnneuro/sWw2rd+eGu9agQOzUbD671Xia7Q==" - }, - "spdx-ranges": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", - "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==" - }, - "spdx-satisfies": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz", - "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==", - "requires": { - "spdx-compare": "^1.0.0", - "spdx-expression-parse": "^3.0.0", - "spdx-ranges": "^2.0.0" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", - "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "superagent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-6.1.0.tgz", - "integrity": "sha512-OUDHEssirmplo3F+1HWKUrUjvnQuA+nZI6i/JJBdXb5eq9IyEQwPyPpqND+SSsxf6TygpBEkUjISVRN4/VOpeg==", - "requires": { - "component-emitter": "^1.3.0", - "cookiejar": "^2.1.2", - "debug": "^4.1.1", - "fast-safe-stringify": "^2.0.7", - "form-data": "^3.0.0", - "formidable": "^1.2.2", - "methods": "^1.1.2", - "mime": "^2.4.6", - "qs": "^6.9.4", - "readable-stream": "^3.6.0", - "semver": "^7.3.2" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==" - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "typescript": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", - "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util-extend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", - "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "requires": { - "builtins": "^1.0.3" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/lib/cli/package.json b/lib/cli/package.json index 5cf6029da6..dda020eb1b 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -1,7 +1,7 @@ { "name": "@alfresco/adf-cli", "description": "Alfresco ADF cli and utils", - "version": "4.11.0", + "version": "5.0.0-angular.13.2", "author": "Alfresco Software, Ltd.", "bin": { "adf-cli": "./bin/adf-cli", @@ -20,8 +20,8 @@ "dist": "rm -rf ./dist/ && npm run build && cp -R ./bin ./dist/ && cp -R ./resources ./dist && cp -R ./templates ./dist && cp ./package.json ./dist/" }, "dependencies": { - "@alfresco/js-api": "4.12.0-197", - "commander": "^4.0.0", + "@alfresco/js-api": "4.12.0-244", + "commander": "6.2.1", "ejs": "^2.6.1", "license-checker": "^25.0.1", "npm-registry-fetch": "^4.0.5", diff --git a/lib/cli/scripts/artifact-from-s3.ts b/lib/cli/scripts/artifact-from-s3.ts index 33c3639ce3..1f338f3a23 100644 --- a/lib/cli/scripts/artifact-from-s3.ts +++ b/lib/cli/scripts/artifact-from-s3.ts @@ -19,7 +19,7 @@ import { exec } from './exec'; import { logger } from './logger'; -import * as program from 'commander'; +import program from 'commander'; function test(output: string) { const response = exec('test !', [`-d ${output} && mkdir ${output}`], {}); diff --git a/lib/cli/scripts/artifact-to-s3.ts b/lib/cli/scripts/artifact-to-s3.ts index 851aaad78c..c33b1c6013 100644 --- a/lib/cli/scripts/artifact-to-s3.ts +++ b/lib/cli/scripts/artifact-to-s3.ts @@ -19,7 +19,7 @@ import { exec } from './exec'; import { logger } from './logger'; -import * as program from 'commander'; +import program from 'commander'; function zipArtifact(artifact: string) { logger.info(`Perform zip artifact ${artifact}`); diff --git a/lib/cli/scripts/audit.ts b/lib/cli/scripts/audit.ts index 9aca3c7f58..bfa4164bad 100644 --- a/lib/cli/scripts/audit.ts +++ b/lib/cli/scripts/audit.ts @@ -21,7 +21,7 @@ import * as shell from 'shelljs'; import * as ejs from 'ejs'; import * as path from 'path'; import * as fs from 'fs'; -import * as program from 'commander'; +import program from 'commander'; export default function main(_args: string[], workingDir: string) { program diff --git a/lib/cli/scripts/changelog.ts b/lib/cli/scripts/changelog.ts index e112815e42..4c61832f29 100644 --- a/lib/cli/scripts/changelog.ts +++ b/lib/cli/scripts/changelog.ts @@ -21,7 +21,7 @@ import * as shell from 'shelljs'; import * as path from 'path'; -import * as program from 'commander'; +import program from 'commander'; import * as fs from 'fs'; import * as ejs from 'ejs'; diff --git a/lib/cli/scripts/docker.ts b/lib/cli/scripts/docker.ts index a6b24321b2..bb6239a292 100644 --- a/lib/cli/scripts/docker.ts +++ b/lib/cli/scripts/docker.ts @@ -18,7 +18,7 @@ */ import { exec } from './exec'; -import * as program from 'commander'; +import program from 'commander'; import { logger } from './logger'; import { resolve } from 'path'; diff --git a/lib/cli/scripts/init-aae-env.ts b/lib/cli/scripts/init-aae-env.ts index 992688aa63..1d14262042 100644 --- a/lib/cli/scripts/init-aae-env.ts +++ b/lib/cli/scripts/init-aae-env.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import * as program from 'commander'; +import program from 'commander'; import request = require('request'); import * as fs from 'fs'; import { logger } from './logger'; diff --git a/lib/cli/scripts/kubectl-clean-app.ts b/lib/cli/scripts/kubectl-clean-app.ts index 0f2ba27ead..83cccaf13b 100644 --- a/lib/cli/scripts/kubectl-clean-app.ts +++ b/lib/cli/scripts/kubectl-clean-app.ts @@ -17,8 +17,8 @@ * limitations under the License. */ -import * as program from 'commander'; -import moment from 'moment-es6'; +import program from 'commander'; +import moment from 'moment'; import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; import { logger } from './logger'; import * as kube from './kube-utils'; @@ -192,13 +192,16 @@ const main = async (args: ConfigArgs) => { 'adf-cli kubectl-clean-app --host "gateway_env" --modelerUsername "modelerusername" --modelerPassword "modelerpassword" --oauth "identity_env" --username "username" --password "password"') .option('-h, --host [type]', 'Host gateway') .option('-o, --oauth [type]', 'Host sso server') - .option('--clientId[type]', 'sso client') + .option('--clusterEnv [type]', 'cluster Envirorment') + .option('--clusterUrl [type]', 'cluster URL') + .option('--clientId [type]', 'sso client') .option('--devopsUsername [type]', 'username of user with ACTIVITI_DEVOPS role') .option('--devopsPassword [type]', 'password of user with ACTIVITI_DEVOPS role') .option('--modelerUsername [type]', 'username of a user with role ACTIVIT_MODELER') .option('--modelerPassword [type]', 'modeler password') .option('--rancherUsername [type]', 'rancher username') - .option('--rancherPassword [type]', 'rancher password') + .option('--rancherToken [type]', 'rancher token') + .option('--apps [type]', 'Application prefix') .option('--enableLike [boolean]', 'Enable the like for app name') .option('--intervalTime [string]', 'In case of enableLike it specify the time related to the createDate') .parse(process.argv); diff --git a/lib/cli/scripts/kubectl-delete.ts b/lib/cli/scripts/kubectl-delete.ts index e94bdbaf2a..b3d897bc12 100644 --- a/lib/cli/scripts/kubectl-delete.ts +++ b/lib/cli/scripts/kubectl-delete.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import * as program from 'commander'; +import program from 'commander'; import * as kube from './kube-utils'; // eslint-disable-next-line prefer-arrow/prefer-arrow-functions diff --git a/lib/cli/scripts/kubectl-image.ts b/lib/cli/scripts/kubectl-image.ts index 7def05a9e0..c84d42d1c6 100644 --- a/lib/cli/scripts/kubectl-image.ts +++ b/lib/cli/scripts/kubectl-image.ts @@ -18,7 +18,7 @@ */ import { exec } from './exec'; -import * as program from 'commander'; +import program from 'commander'; import { logger } from './logger'; import * as kube from './kube-utils'; diff --git a/lib/cli/scripts/licenses.ts b/lib/cli/scripts/licenses.ts index 93d03f745e..bd318ab7fe 100644 --- a/lib/cli/scripts/licenses.ts +++ b/lib/cli/scripts/licenses.ts @@ -22,7 +22,7 @@ import * as fs from 'fs'; import * as checker from 'license-checker'; import * as licenseList from 'spdx-license-list'; import * as ejs from 'ejs'; -import * as program from 'commander'; +import program from 'commander'; interface PackageInfo { name: string; diff --git a/lib/cli/scripts/npm-publish.ts b/lib/cli/scripts/npm-publish.ts index 65602b4be0..a8ffccae27 100644 --- a/lib/cli/scripts/npm-publish.ts +++ b/lib/cli/scripts/npm-publish.ts @@ -20,7 +20,7 @@ import * as path from 'path'; import fs = require('fs'); import { exec } from './exec'; -import * as program from 'commander'; +import program from 'commander'; import { logger } from './logger'; export interface PublishArgs { diff --git a/lib/cli/scripts/scan-env.ts b/lib/cli/scripts/scan-env.ts index 88afa927f3..8cbd6a5367 100644 --- a/lib/cli/scripts/scan-env.ts +++ b/lib/cli/scripts/scan-env.ts @@ -1,5 +1,5 @@ import { AlfrescoApi, PeopleApi, NodesApi, GroupsApi, SitesApi, SearchApi, AlfrescoApiConfig } from '@alfresco/js-api'; -import * as program from 'commander'; +import program from 'commander'; import { logger } from './logger'; interface PeopleTally { enabled: number; disabled: number } diff --git a/lib/cli/scripts/update-commit-sha.ts b/lib/cli/scripts/update-commit-sha.ts index 0f394952d4..f30439f763 100644 --- a/lib/cli/scripts/update-commit-sha.ts +++ b/lib/cli/scripts/update-commit-sha.ts @@ -18,7 +18,7 @@ */ import { exec } from './exec'; -import * as program from 'commander'; +import program from 'commander'; import { logger } from './logger'; export interface CommitArgs { diff --git a/lib/cli/scripts/update-version.ts b/lib/cli/scripts/update-version.ts index 71fb8884f7..38e66211ae 100644 --- a/lib/cli/scripts/update-version.ts +++ b/lib/cli/scripts/update-version.ts @@ -17,7 +17,7 @@ * limitations under the License. */ -import * as program from 'commander'; +import program from 'commander'; import * as path from 'path'; import * as fs from 'fs'; import * as shell from 'shelljs'; diff --git a/lib/cli/tsconfig.json b/lib/cli/tsconfig.json index 9841b76db4..a323a98be1 100644 --- a/lib/cli/tsconfig.json +++ b/lib/cli/tsconfig.json @@ -10,6 +10,7 @@ "noImplicitThis": false, "noUnusedParameters": true, "noUnusedLocals": true, + "esModuleInterop": true, "outDir": "./dist", "rootDir": ".", "skipLibCheck": true, diff --git a/lib/cli/tsconfig.lib.prod.json b/lib/cli/tsconfig.lib.prod.json index 04c0e66277..2a2faa884c 100644 --- a/lib/cli/tsconfig.lib.prod.json +++ b/lib/cli/tsconfig.lib.prod.json @@ -4,6 +4,6 @@ "declarationMap": false }, "angularCompilerOptions": { - "enableIvy": false + "compilationMode": "partial" } } diff --git a/lib/config/app.config.json b/lib/config/app.config.json new file mode 100644 index 0000000000..729fb251d2 --- /dev/null +++ b/lib/config/app.config.json @@ -0,0 +1,7 @@ +{ + "description" : "this config file is used in the unit test", + "ecmHost": "http://{hostname}:{port}/ecm", + "bpmHost": "http://{hostname}:{port}/bpm", + "baseShareUrl": null, + "logLevel" : "silent" +} diff --git a/lib/config/webpack.style.js b/lib/config/webpack.style.js new file mode 100644 index 0000000000..a76983a4aa --- /dev/null +++ b/lib/config/webpack.style.js @@ -0,0 +1,38 @@ +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const path = require("path"); +const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); + +module.exports = { + + mode: 'production', + + optimization: { + minimizer: [new CssMinimizerPlugin({})], + }, + + entry: { + 'adf-blue-orange': './lib/core/styles/prebuilt/adf-blue-orange.scss', + 'adf-blue-purple': './lib/core/styles/prebuilt/adf-blue-purple.scss', + 'adf-cyan-orange': './lib/core/styles/prebuilt/adf-cyan-orange.scss', + 'adf-cyan-purple': './lib/core/styles/prebuilt/adf-cyan-purple.scss', + 'adf-green-purple': './lib/core/styles/prebuilt/adf-green-purple.scss', + 'adf-green-orange': './lib/core/styles/prebuilt/adf-green-orange.scss', + 'adf-pink-bluegrey': './lib/core/styles/prebuilt/adf-pink-bluegrey.scss', + 'adf-indigo-pink': './lib/core/styles/prebuilt/adf-indigo-pink.scss', + 'adf-purple-green': './lib/core/styles/prebuilt/adf-purple-green.scss' + }, + + output: { + path: path.resolve(__dirname, '../dist/core/prebuilt-themes/'), + filename: '[name].js', + publicPath: '/dist' + }, + + module: { + rules: [{ + test: /\.scss$/, + use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"] + }] + }, + plugins: [new MiniCssExtractPlugin()] +}; diff --git a/lib/content-services/karma.conf.js b/lib/content-services/karma.conf.js index c18fb3d052..d5878708e4 100644 --- a/lib/content-services/karma.conf.js +++ b/lib/content-services/karma.conf.js @@ -15,7 +15,12 @@ module.exports = function (config) { }, {pattern: 'node_modules/moment/min/moment.min.js', included: true, watched: false}, {pattern: 'lib/content-services/src/lib/i18n/**/en.json', included: false, served: true, watched: false}, - {pattern: 'lib/content-services/src/lib/assets/images/**/*.svg', included: false, served: true, watched: false}, + { + pattern: 'lib/content-services/src/lib/assets/images/**/*.svg', + included: false, + served: true, + watched: false + }, {pattern: 'lib/core/assets/images/ft_ic_folder.svg', included: false, served: true, watched: false}, {pattern: 'lib/core/i18n/**/en.json', included: false, served: true, watched: false}, {pattern: 'lib/content-services/**/*.ts', included: false, served: true, watched: false}, @@ -39,12 +44,15 @@ module.exports = function (config) { require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), + require('karma-coverage'), require('@angular-devkit/build-angular/plugins/karma'), require('karma-mocha-reporter') ], client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser + clearContext: false, + jasmine: { + random: false + } }, coverageIstanbulReporter: { diff --git a/lib/content-services/ng-package.json b/lib/content-services/ng-package.json index 902dd18567..75ad7aa8bc 100644 --- a/lib/content-services/ng-package.json +++ b/lib/content-services/ng-package.json @@ -8,22 +8,6 @@ ], "lib": { "entryFile": "src/public-api.ts", - "flatModuleFile": "adf-content-services", - "umdModuleIds": { - "@alfresco/js-api": "@alfresco/js-api", - "@angular/platform-browser/animations": "@angular/platform-browser/animations", - "@angular/material": "@angular/material", - "@mat-datetimepicker/core": "@mat-datetimepicker/core", - "@mat-datetimepicker/moment": "@mat-datetimepicker/moment", - "@angular/flex-layout": "@angular/flex-layout", - "@alfresco/adf-core": "@alfresco/adf-core", - "@angular/animations": "@angular/animations", - "@angular/cdk/platform": "@angular/cdk/platform", - "@angular/material/core": "@angular/material/core", - "moment": "moment", - "moment-es6": "moment-es6", - "moment/src/moment": "moment/src/moment", - "@ngx-translate/core": "@ngx-translate/core" - } + "flatModuleFile": "adf-content-services" } } diff --git a/lib/content-services/package.json b/lib/content-services/package.json index c4dc97e1b9..8705eae23e 100644 --- a/lib/content-services/package.json +++ b/lib/content-services/package.json @@ -1,9 +1,8 @@ { "name": "@alfresco/adf-content-services", "description": "Alfresco ADF content services", - "version": "4.11.0", + "version": "5.0.0-angular.13.2", "author": "Alfresco Software, Ltd.", - "main": "bundles/adf-content-services.js", "repository": { "type": "git", "url": "https://github.com/Alfresco/alfresco-ng2-components.git" @@ -12,18 +11,21 @@ "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" }, "peerDependencies": { - "@angular/animations": ">=10.0.2", - "@angular/cdk": ">=10.0.1", - "@angular/common": ">10.0.2", - "@angular/core": ">=10.0.2", - "@angular/flex-layout": ">=10.0.0-beta.32", - "@angular/forms": ">=10.0.2", - "@angular/material": ">=10.0.1", - "@angular/router": ">=10.0.2", - "@alfresco/js-api": "4.12.0-197", - "@alfresco/adf-core": "4.11.0", + "@angular/animations": ">=13.3.11", + "@angular/cdk": ">=13.3.9", + "@angular/common": ">=13.3.11", + "@angular/compiler": ">=13.3.11", + "@angular/core": ">=13.3.11", + "@angular/flex-layout": ">=13.0.0-beta.38", + "@angular/forms": ">=13.3.11", + "@angular/material": ">=13.3.9", + "@angular/platform-browser": ">=13.3.11", + "@angular/platform-browser-dynamic": ">=13.3.11", + "@angular/router": ">=13.3.11", + "@alfresco/js-api": "4.12.0-244", "@ngx-translate/core": ">=13.0.0", - "moment": ">=2.22.2" + "moment": ">=2.22.2", + "@alfresco/adf-core": "5.0.0-angular.13.2" }, "keywords": [ "content-services", diff --git a/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.spec.ts b/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.spec.ts index a455a4f7a4..e4b26c140d 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.spec.ts +++ b/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.spec.ts @@ -22,10 +22,10 @@ import { TranslateModule } from '@ngx-translate/core'; import { of, Subject } from 'rxjs'; import { ContentTestingModule } from '../testing/content.testing.module'; import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface'; -import { NodesApiService } from 'core'; -import { AspectListService } from './aspect-list.service'; +import { AspectListService } from './services/aspect-list.service'; import { delay } from 'rxjs/operators'; import { AspectEntry, MinimalNode } from '@alfresco/js-api'; +import { NodesApiService } from '@alfresco/adf-core'; const aspectListMock: AspectEntry[] = [{ entry: { diff --git a/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.ts b/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.ts index b2062d3656..aea5423999 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.ts +++ b/lib/content-services/src/lib/aspect-list/aspect-list-dialog.component.ts @@ -18,6 +18,7 @@ import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface'; + @Component({ selector: 'adf-aspect-list-dialog', templateUrl: './aspect-list-dialog.component.html', diff --git a/lib/content-services/src/lib/aspect-list/aspect-list.component.spec.ts b/lib/content-services/src/lib/aspect-list/aspect-list.component.spec.ts index 6a42554b7b..5e79b19a62 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list.component.spec.ts +++ b/lib/content-services/src/lib/aspect-list/aspect-list.component.spec.ts @@ -20,7 +20,7 @@ import { NodesApiService, setupTestBed } from '@alfresco/adf-core'; import { ContentTestingModule } from '../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; import { AspectListComponent } from './aspect-list.component'; -import { AspectListService } from './aspect-list.service'; +import { AspectListService } from './services/aspect-list.service'; import { of } from 'rxjs'; import { AspectEntry } from '@alfresco/js-api'; import { delay } from 'rxjs/operators'; diff --git a/lib/content-services/src/lib/aspect-list/aspect-list.component.ts b/lib/content-services/src/lib/aspect-list/aspect-list.component.ts index 50d7dfb02b..0a6abdc040 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list.component.ts +++ b/lib/content-services/src/lib/aspect-list/aspect-list.component.ts @@ -19,7 +19,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsul import { NodesApiService } from '@alfresco/adf-core'; import { Observable, Subject, zip } from 'rxjs'; import { concatMap, map, takeUntil, tap } from 'rxjs/operators'; -import { AspectListService } from './aspect-list.service'; +import { AspectListService } from './services/aspect-list.service'; import { MatCheckboxChange } from '@angular/material/checkbox'; import { AspectEntry } from '@alfresco/js-api'; @Component({ diff --git a/lib/content-services/src/lib/aspect-list/public-api.ts b/lib/content-services/src/lib/aspect-list/public-api.ts index 3c12160357..e05b2cc7af 100644 --- a/lib/content-services/src/lib/aspect-list/public-api.ts +++ b/lib/content-services/src/lib/aspect-list/public-api.ts @@ -17,8 +17,9 @@ export * from './aspect-list.component'; export * from './aspect-list-dialog.component'; -export * from './aspect-list.service'; -export * from './node-aspect.service'; +export * from './services/aspect-list.service'; +export * from './services/node-aspect.service'; +export * from './services/dialog-aspect-list.service'; export * from './aspect-list-dialog-data.interface'; diff --git a/lib/content-services/src/lib/aspect-list/aspect-list.service.ts b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts similarity index 75% rename from lib/content-services/src/lib/aspect-list/aspect-list.service.ts rename to lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts index cb8655459e..60d63545f9 100644 --- a/lib/content-services/src/lib/aspect-list/aspect-list.service.ts +++ b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts @@ -16,11 +16,8 @@ */ import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf-core'; -import { from, Observable, of, Subject, zip } from 'rxjs'; -import { AspectListDialogComponentData } from './aspect-list-dialog-data.interface'; -import { AspectListDialogComponent } from './aspect-list-dialog.component'; +import { from, Observable, of, zip } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api'; @@ -37,7 +34,6 @@ export class AspectListService { constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService, - private dialog: MatDialog, private logService: LogService) { } @@ -101,34 +97,4 @@ export class AspectListService { return visibleAspectList; } - openAspectListDialog(nodeId?: string): Observable { - const select = new Subject(); - select.subscribe({ - complete: this.close.bind(this) - }); - - const data: AspectListDialogComponentData = { - title: 'ADF-ASPECT-LIST.DIALOG.TITLE', - description: 'ADF-ASPECT-LIST.DIALOG.DESCRIPTION', - overTableMessage: 'ADF-ASPECT-LIST.DIALOG.OVER-TABLE-MESSAGE', - select, - nodeId - }; - - this.openDialog(data, 'adf-aspect-list-dialog', '750px'); - return select; - } - - private openDialog(data: AspectListDialogComponentData, panelClass: string, width: string) { - this.dialog.open(AspectListDialogComponent, { - data, - panelClass, - width, - disableClose: true - }); - } - - close() { - this.dialog.closeAll(); - } } diff --git a/lib/content-services/src/lib/aspect-list/services/dialog-aspect-list.service.ts b/lib/content-services/src/lib/aspect-list/services/dialog-aspect-list.service.ts new file mode 100644 index 0000000000..d0345670d9 --- /dev/null +++ b/lib/content-services/src/lib/aspect-list/services/dialog-aspect-list.service.ts @@ -0,0 +1,62 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Injectable } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { Observable, Subject } from 'rxjs'; +import { AspectListDialogComponentData } from '../aspect-list-dialog-data.interface'; +import { AspectListDialogComponent } from '../aspect-list-dialog.component'; + +@Injectable({ + providedIn: 'root' +}) +export class DialogAspectListService { + + constructor(private dialog: MatDialog) { + } + + openAspectListDialog(nodeId?: string): Observable { + const select = new Subject(); + select.subscribe({ + complete: this.close.bind(this) + }); + + const data: AspectListDialogComponentData = { + title: 'ADF-ASPECT-LIST.DIALOG.TITLE', + description: 'ADF-ASPECT-LIST.DIALOG.DESCRIPTION', + overTableMessage: 'ADF-ASPECT-LIST.DIALOG.OVER-TABLE-MESSAGE', + select, + nodeId + }; + + this.openDialog(data, 'adf-aspect-list-dialog', '750px'); + return select; + } + + private openDialog(data: AspectListDialogComponentData, panelClass: string, width: string) { + this.dialog.open(AspectListDialogComponent, { + data, + panelClass, + width, + disableClose: true + }); + } + + close() { + this.dialog.closeAll(); + } +} diff --git a/lib/content-services/src/lib/aspect-list/node-aspect.service.spec.ts b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts similarity index 80% rename from lib/content-services/src/lib/aspect-list/node-aspect.service.spec.ts rename to lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts index e950ab4fc0..571de395fc 100644 --- a/lib/content-services/src/lib/aspect-list/node-aspect.service.spec.ts +++ b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts @@ -18,15 +18,15 @@ import { MinimalNode } from '@alfresco/js-api'; import { TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; -import { AlfrescoApiService, CardViewUpdateService, NodesApiService, setupTestBed } from 'core'; +import { AlfrescoApiService, CardViewUpdateService, NodesApiService, setupTestBed } from '@alfresco/adf-core'; import { of } from 'rxjs'; -import { ContentTestingModule } from '../testing/content.testing.module'; -import { AspectListService } from './aspect-list.service'; +import { ContentTestingModule } from '../../testing/content.testing.module'; import { NodeAspectService } from './node-aspect.service'; +import { DialogAspectListService } from './dialog-aspect-list.service'; describe('NodeAspectService', () => { - let aspectListService: AspectListService; + let dialogAspectListService: DialogAspectListService; let nodeAspectService: NodeAspectService; let nodeApiService: NodesApiService; let alfrescoApiService: AlfrescoApiService; @@ -40,7 +40,7 @@ describe('NodeAspectService', () => { }); beforeEach(() => { - aspectListService = TestBed.inject(AspectListService); + dialogAspectListService = TestBed.inject(DialogAspectListService); nodeAspectService = TestBed.inject(NodeAspectService); nodeApiService = TestBed.inject(NodesApiService); alfrescoApiService = TestBed.inject(AlfrescoApiService); @@ -48,15 +48,15 @@ describe('NodeAspectService', () => { }); it('should open the aspect list dialog', () => { - spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of([])); + spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of([])); spyOn(nodeApiService, 'updateNode').and.returnValue(of(null)); nodeAspectService.updateNodeAspects('fake-node-id'); - expect(aspectListService.openAspectListDialog).toHaveBeenCalledWith('fake-node-id'); + expect(dialogAspectListService.openAspectListDialog).toHaveBeenCalledWith('fake-node-id'); }); it('should update the node when the aspect dialog apply the changes', () => { const expectedParameters = { aspectNames: ['a', 'b', 'c'] }; - spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); + spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); spyOn(nodeApiService, 'updateNode').and.returnValue(of(null)); nodeAspectService.updateNodeAspects('fake-node-id'); expect(nodeApiService.updateNode).toHaveBeenCalledWith('fake-node-id', expectedParameters); @@ -69,7 +69,7 @@ describe('NodeAspectService', () => { done(); }); const fakeNode = new MinimalNode({ id: 'fake-node-id', aspectNames: ['a', 'b', 'c'] }); - spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); + spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); spyOn(nodeApiService, 'updateNode').and.returnValue(of(fakeNode)); nodeAspectService.updateNodeAspects('fake-node-id'); }); @@ -81,7 +81,7 @@ describe('NodeAspectService', () => { done(); }); const fakeNode = new MinimalNode({ id: 'fake-node-id', aspectNames: ['a', 'b', 'c'] }); - spyOn(aspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); + spyOn(dialogAspectListService, 'openAspectListDialog').and.returnValue(of(['a', 'b', 'c'])); spyOn(nodeApiService, 'updateNode').and.returnValue(of(fakeNode)); nodeAspectService.updateNodeAspects('fake-node-id'); }); diff --git a/lib/content-services/src/lib/aspect-list/node-aspect.service.ts b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.ts similarity index 85% rename from lib/content-services/src/lib/aspect-list/node-aspect.service.ts rename to lib/content-services/src/lib/aspect-list/services/node-aspect.service.ts index cc4a1e9b40..3b4e5c3889 100644 --- a/lib/content-services/src/lib/aspect-list/node-aspect.service.ts +++ b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; import { AlfrescoApiService, CardViewUpdateService, NodesApiService } from '@alfresco/adf-core'; -import { AspectListService } from './aspect-list.service'; +import { DialogAspectListService } from './dialog-aspect-list.service'; @Injectable({ providedIn: 'root' @@ -26,12 +26,12 @@ export class NodeAspectService { constructor(private alfrescoApiService: AlfrescoApiService, private nodesApiService: NodesApiService, - private aspectListService: AspectListService, + private dialogAspectListService: DialogAspectListService, private cardViewUpdateService: CardViewUpdateService) { } updateNodeAspects(nodeId: string) { - this.aspectListService.openAspectListDialog(nodeId).subscribe((aspectList) => { + this.dialogAspectListService.openAspectListDialog(nodeId).subscribe((aspectList) => { this.nodesApiService.updateNode(nodeId, { aspectNames: [...aspectList] }).subscribe((updatedNode) => { this.alfrescoApiService.nodeUpdated.next(updatedNode); this.cardViewUpdateService.updateNodeAspect(updatedNode); diff --git a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts index 037e47f73a..f68274fdeb 100644 --- a/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts +++ b/lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts @@ -28,7 +28,7 @@ import { } from '@angular/core'; import { MatSelect } from '@angular/material/select'; import { Node, PathElementEntity } from '@alfresco/js-api'; -import { DocumentListComponent } from '../document-list'; +import { DocumentListComponent } from '../document-list/components/document-list.component'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.spec.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.spec.ts index c7d6173126..a7834ec858 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.spec.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.spec.ts @@ -24,7 +24,7 @@ import { setupTestBed, AllowableOperationsEnum } from '@alfresco/adf-core'; import { ContentTestingModule } from '../../../testing/content.testing.module'; import { SimpleChange } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; -import { NodeAspectService } from 'content-services/src/lib/aspect-list'; +import { NodeAspectService } from '../../../aspect-list/services/node-aspect.service'; import { ContentMetadataService } from '../../services/content-metadata.service'; import { of } from 'rxjs'; diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.ts index b509548aa1..6446868507 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.ts @@ -18,7 +18,7 @@ import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core'; import { Node } from '@alfresco/js-api'; import { ContentService, AllowableOperationsEnum, VersionCompatibilityService } from '@alfresco/adf-core'; -import { NodeAspectService } from '../../../aspect-list/node-aspect.service'; +import { NodeAspectService } from '../../../aspect-list/services/node-aspect.service'; import { PresetConfig } from '../../interfaces/content-metadata.interfaces'; @Component({ selector: 'adf-content-metadata-card', diff --git a/lib/content-services/src/lib/content-metadata/services/content-type-property.service.spec.ts b/lib/content-services/src/lib/content-metadata/services/content-type-property.service.spec.ts index 07b848359d..f841348748 100644 --- a/lib/content-services/src/lib/content-metadata/services/content-type-property.service.spec.ts +++ b/lib/content-services/src/lib/content-metadata/services/content-type-property.service.spec.ts @@ -17,7 +17,7 @@ import { TestBed } from '@angular/core/testing'; import { ContentTypePropertiesService } from './content-type-property.service'; -import { CardViewItem, CardViewSelectItemModel, CardViewTextItemModel, setupTestBed, VersionCompatibilityService } from 'core'; +import { CardViewItem, CardViewSelectItemModel, CardViewTextItemModel, setupTestBed, VersionCompatibilityService } from '@alfresco/adf-core'; import { ContentTestingModule } from '../../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; import { ContentTypeService } from '../../content-type'; diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component-search.spec.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component-search.spec.ts new file mode 100644 index 0000000000..d91e68a86c --- /dev/null +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component-search.spec.ts @@ -0,0 +1,787 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { + MinimalNode, + Node, + NodeEntry, + NodePaging, + RequestScope, + ResultSetPaging, + SiteEntry, + SitePaging +} from '@alfresco/js-api'; +import { + + NodesApiService, + setupTestBed, + SitesService +} from '@alfresco/adf-core'; +import { of } from 'rxjs'; +import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component'; +import { ContentTestingModule } from '../testing/content.testing.module'; +import { DocumentListService } from '../document-list/services/document-list.service'; +import { DocumentListComponent } from '../document-list/components/document-list.component'; +import { CustomResourcesService } from '../document-list/services/custom-resources.service'; +import { NodeEntryEvent, ShareDataRow } from '../document-list'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchQueryBuilderService } from '../search'; +import { mockQueryBody } from '../mock/search-query.mock'; + +const fakeResultSetPaging: ResultSetPaging = { + list: { + pagination: { + totalItems: 1 + }, + entries: [ + { + entry: { + id: '123', + name: 'MyFolder', + isFile: false, + isFolder: true, + nodeType: 'mock' + } + } + ] + } +}; + +describe('ContentNodeSelectorPanelComponent', () => { + const debounceSearch = 200; + let component: ContentNodeSelectorPanelComponent; + let fixture: ComponentFixture; + let nodeService: NodesApiService; + let sitesService: SitesService; + let searchSpy: jasmine.Spy; + const fakeNodeEntry = new Node({ id: 'fakeId' }); + const nodeEntryEvent = new NodeEntryEvent(fakeNodeEntry); + let searchQueryBuilderService: SearchQueryBuilderService; + + const typeToSearchBox = (searchTerm = 'string-to-search') => { + const searchInput = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-input"]')); + searchInput.nativeElement.value = searchTerm; + component.searchInput.setValue(searchTerm); + fixture.detectChanges(); + }; + + const triggerSearchResults = (searchResults: ResultSetPaging) => { + component.queryBuilderService.executed.next(searchResults); + }; + + setupTestBed({ + imports: [ + TranslateModule.forRoot(), + ContentTestingModule + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }); + + describe('General component features', () => { + + beforeEach(async () => { + fixture = TestBed.createComponent(ContentNodeSelectorPanelComponent); + component = fixture.componentInstance; + component.debounceSearch = 0; + + nodeService = TestBed.inject(NodesApiService); + sitesService = TestBed.inject(SitesService); + + searchQueryBuilderService = component.queryBuilderService; + component.queryBuilderService.resetToDefaults(); + + spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({ + id: 'fake-node', + path: { elements: [{ nodeType: 'st:site', name: 'fake-site' }] } + }))); + searchSpy = spyOn(searchQueryBuilderService, 'execute'); + const fakeSite = new SiteEntry({ + entry: { + id: 'fake-site', + guid: 'fake-site', + title: 'fake-site', + visibility: 'visible' + } + }); + spyOn(sitesService, 'getSite').and.returnValue(of(fakeSite)); + }); + + afterEach(async () => { + fixture.destroy(); + component = null; + }); + + describe('Search functionality', () => { + let getCorrespondingNodeIdsSpy; + let customResourcesService: CustomResourcesService; + const entry: Node = { id: 'fakeid' } as Node; + + beforeEach(() => { + const documentListService = TestBed.inject(DocumentListService); + const expectedDefaultFolderNode = new NodeEntry(); + component.isSelectionValid = (node: Node) => node.isFile; + + spyOn(documentListService, 'getFolderNode').and.returnValue(of(expectedDefaultFolderNode)); + spyOn(documentListService, 'getFolder').and.returnValue(of(new NodePaging({ + list: { + pagination: {}, + entries: [], + source: {} + } + }))); + + spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } }))); + + customResourcesService = TestBed.inject(CustomResourcesService); + getCorrespondingNodeIdsSpy = spyOn(customResourcesService, 'getCorrespondingNodeIds').and + .callFake((id) => { + if (id === '-sites-') { + return of(['123456testId', '09876543testId']); + } + return of([id]); + }); + + component.currentFolderId = 'cat-girl-nuku-nuku'; + component.documentList.ngOnInit(); + + fixture.detectChanges(); + }); + + it('should the user query get updated when the user types in the search input', fakeAsync(() => { + const updateSpy = spyOn(searchQueryBuilderService, 'update'); + typeToSearchBox('search-term'); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(updateSpy).toHaveBeenCalled(); + expect(searchQueryBuilderService.userQuery).toEqual('(search-term*)'); + expect(component.searchTerm).toEqual('search-term'); + })); + + it('should perform a search when the queryBody gets updated and it is defined', fakeAsync(() => { + typeToSearchBox('search-term'); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); + })); + + it('should NOT perform a search and clear the results when the queryBody gets updated and it is NOT defined', async () => { + spyOn(component, 'clearSearch'); + + searchQueryBuilderService.userQuery = ''; + searchQueryBuilderService.update(); + + fixture.detectChanges(); + await fixture.whenStable(); + + expect(searchSpy).not.toHaveBeenCalled(); + expect(component.clearSearch).toHaveBeenCalled(); + }); + + it('should reset the search term when clicking the clear icon', async () => { + component.searchTerm = 'search-term'; + searchQueryBuilderService.userQuery = 'search-term'; + spyOn(component, 'clearSearch'); + + fixture.detectChanges(); + const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); + clearIcon.nativeElement.click(); + + fixture.detectChanges(); + + expect(searchQueryBuilderService.userQuery).toEqual(''); + expect(component.searchTerm).toEqual(''); + expect(component.clearSearch).toHaveBeenCalled(); + }); + + it('should load the results by calling the search api on search change', fakeAsync(() => { + typeToSearchBox('search-term'); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); + })); + + it('should the query include the show files filterQuery', fakeAsync(() => { + component.showFilesInResult = true; + typeToSearchBox('search-term'); + + const expectedQueryBody = mockQueryBody; + expectedQueryBody.filterQueries.push({ + query: `TYPE:'cm:folder' OR TYPE:'cm:content'` + }); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); + })); + + it('should reset the currently chosen node in case of starting a new search', fakeAsync(() => { + component.chosenNode = [entry]; + typeToSearchBox('kakarot'); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(component.chosenNode).toBeNull(); + })); + + it('should update the breadcrumb when changing to a custom site', async () => { + component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node; + + component.siteChanged({ entry: { guid: '-mysites-', title: 'My Sites' } } as SiteEntry); + + expect(component.breadcrumbFolderTitle).toBe('My Sites'); + }); + + it('should perform a search when selecting a site with the correct query', fakeAsync(() => { + typeToSearchBox('search-term'); + + tick(debounceSearch); + + expect(searchSpy.calls.count()).toBe(1, 'Search count should be one after only one search'); + + component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); + + const expectedQueryBody = mockQueryBody; + expectedQueryBody.filterQueries = [{ query: `ANCESTOR:'workspace://SpacesStore/namek'` }]; + + expect(searchSpy.calls.count()).toBe(2, 'Search count should be two after the site change'); + expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); + })); + + it('should create the query with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => { + component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; + component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node; + fixture.detectChanges(); + + typeToSearchBox('search-term'); + + tick(debounceSearch); + + expect(searchSpy.calls.count()).toBe(1); + + component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); + + const expectedQueryBodyWithSiteChange = mockQueryBody; + expectedQueryBodyWithSiteChange.filterQueries = [ + { query: `ANCESTOR:'workspace://SpacesStore/-sites-' OR ANCESTOR:'workspace://SpacesStore/123456testId' OR ANCESTOR:'workspace://SpacesStore/09876543testId'` } + ]; + + expect(searchSpy).toHaveBeenCalled(); + expect(searchSpy.calls.count()).toBe(2); + expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); + expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange); + })); + + it('should get the corresponding node ids on search when a known alias is selected from dropdown', fakeAsync(() => { + component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node; + + typeToSearchBox('vegeta'); + + tick(debounceSearch); + + component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); + expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1, 'getCorrespondingNodeIdsSpy calls count should be one after the site changes to known alias \'-sites\-'); + expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-'); + })); + + it('should get the corresponding node ids on search when a known alias is selected from CUSTOM dropdown', fakeAsync(() => { + component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; + component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node; + + fixture.detectChanges(); + + typeToSearchBox('vegeta'); + + tick(debounceSearch); + + component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); + expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1); + expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-'); + })); + + it('should NOT get the corresponding node ids on search when NOTHING is selected from dropdown', fakeAsync(() => { + component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; + fixture.detectChanges(); + + typeToSearchBox('vegeta'); + + tick(debounceSearch); + + expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy calls count should be 0 when no site is selected'); + })); + + it('should NOT get the corresponding node ids on search when NO known alias is selected from dropdown', fakeAsync(() => { + typeToSearchBox('vegeta'); + tick(debounceSearch); + + expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called'); + + component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); + + expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled(); + })); + + it('should NOT get the corresponding node ids on search when NO known alias is selected from CUSTOM dropdown', fakeAsync(() => { + component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; + fixture.detectChanges(); + + typeToSearchBox('vegeta'); + tick(debounceSearch); + + expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called'); + + component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); + + expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled(); + })); + + it('should show the search icon by default without the X (clear) icon', fakeAsync(() => { + fixture.detectChanges(); + tick(debounceSearch); + + const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]')); + const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); + + expect(searchIcon).not.toBeNull('Search icon should be in the DOM'); + expect(clearIcon).toBeNull('Clear icon should NOT be in the DOM'); + })); + + it('should show the X (clear) icon without the search icon when the search contains at least one character', fakeAsync(() => { + fixture.detectChanges(); + typeToSearchBox('123'); + tick(debounceSearch); + + fixture.detectChanges(); + + const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]')); + const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); + + expect(searchIcon).toBeNull('Search icon should NOT be in the DOM'); + expect(clearIcon).not.toBeNull('Clear icon should be in the DOM'); + })); + + it('should clear the search field, nodes and chosenNode when clicking on the X (clear) icon', async () => { + component.chosenNode = [entry]; + + component.nodePaging = { + list: { + entries: [{ entry }] + } + }; + component.searchTerm = 'piccolo'; + component.showingSearchResults = true; + + component.clear(); + + expect(component.searchTerm).toBe(''); + expect(component.nodePaging).toEqual(null); + expect(component.chosenNode).toBeNull(); + expect(component.showingSearchResults).toBeFalsy(); + }); + + it('should the query restrict the search to the currentFolderId in case is defined', fakeAsync(() => { + component.currentFolderId = 'my-root-id'; + component.restrictRootToCurrentFolderId = true; + component.ngOnInit(); + typeToSearchBox('search-term'); + tick(debounceSearch); + + const expectedQueryBody = mockQueryBody; + expectedQueryBody.filterQueries = [{ query: `ANCESTOR:'workspace://SpacesStore/my-root-id'` }]; + + expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); + })); + + it('should emit showingSearch event with true while searching', async () => { + searchQueryBuilderService.userQuery = 'mock-search-term'; + searchQueryBuilderService.update(); + spyOn(customResourcesService, 'hasCorrespondingNodeIds').and.returnValue(true); + const showingSearchSpy = spyOn(component.showingSearch, 'emit'); + + component.queryBuilderService.execute({ query: { query: 'search' } }); + + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + await fixture.whenStable(); + + expect(component.showingSearchResults).toBe(true); + expect(showingSearchSpy).toHaveBeenCalledWith(true); + }); + + it('should emit showingSearch event with false if you remove search term without clicking on X (icon) icon', fakeAsync(() => { + const showingSearchSpy = spyOn(component.showingSearch, 'emit'); + typeToSearchBox(''); + tick(debounceSearch); + + fixture.detectChanges(); + + expect(component.showingSearchResults).toBe(false); + expect(showingSearchSpy).toHaveBeenCalledWith(false); + })); + + it('should emit showingResults event with false when clicking on the X (clear) icon', async () => { + const showingSearchSpy = spyOn(component.showingSearch, 'emit'); + component.chosenNode = [entry]; + + component.nodePaging = { + list: { + entries: [{ entry }] + } + }; + component.searchTerm = 'piccolo'; + component.showingSearchResults = true; + + component.clear(); + + expect(component.showingSearchResults).toBe(false); + expect(showingSearchSpy).toHaveBeenCalledWith(false); + }); + + it('should emit showingResults event with false if search api fails', async () => { + searchQueryBuilderService.userQuery = 'mock-search-term'; + searchQueryBuilderService.update(); + getCorrespondingNodeIdsSpy.and.throwError('Failed'); + const showingSearchSpy = spyOn(component.showingSearch, 'emit'); + component.queryBuilderService.execute({ query: { query: 'search' } }); + + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + await fixture.whenStable(); + + expect(component.showingSearchResults).toBe(true); + expect(showingSearchSpy).toHaveBeenCalledWith(true); + }); + + it('should the query restrict the search to the site and not to the currentFolderId in case is changed', async () => { + component.queryBuilderService.userQuery = 'search-term*'; + component.currentFolderId = 'my-root-id'; + component.restrictRootToCurrentFolderId = true; + component.siteChanged({ entry: { guid: 'my-site-id' } } as SiteEntry); + + const expectedQueryBodyWithSiteChange = mockQueryBody; + expectedQueryBodyWithSiteChange.filterQueries = [ + { query: `ANCESTOR:'workspace://SpacesStore/my-site-id'` } + ]; + + expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange); + }); + + it('should restrict the breadcrumb to the currentFolderId in case restrictedRoot is true', async () => { + component.currentFolderId = 'my-root-id'; + component.restrictRootToCurrentFolderId = true; + component.ngOnInit(); + expect(component.breadcrumbRootId).toEqual('my-root-id'); + }); + + it('should NOT restrict the breadcrumb to the currentFolderId in case restrictedRoot is false', async () => { + component.currentFolderId = 'my-root-id'; + component.restrictRootToCurrentFolderId = false; + component.ngOnInit(); + expect(component.breadcrumbRootId).toBeUndefined(); + }); + + it('should clear the search field, nodes and chosenNode when deleting the search input', fakeAsync(() => { + spyOn(component, 'clearSearch').and.callThrough(); + typeToSearchBox('a'); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(searchSpy.calls.count()).toBe(1); + + typeToSearchBox(''); + + tick(debounceSearch); + fixture.detectChanges(); + + expect(searchSpy.calls.count()).toBe(1, 'no other search has been performed'); + expect(component.clearSearch).toHaveBeenCalled(); + expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed'); + })); + + it('should folderIdToShow equal the folder node id when navigation changes', async () => { + component.folderIdToShow = null; + const folderChangeEvent: NodeEntryEvent = new NodeEntryEvent(fakeNodeEntry); + component.onFolderChange(folderChangeEvent); + + expect(component.folderIdToShow).toEqual(fakeNodeEntry.id); + }); + + it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => { + spyOn(component, 'clearSearch').and.callThrough(); + triggerSearchResults(fakeResultSetPaging); + + fixture.detectChanges(); + + component.onFolderChange(nodeEntryEvent); + fixture.detectChanges(); + + expect(component.clearSearch).toHaveBeenCalled(); + }); + + it('should show nodes from the same folder as selected in the dropdown on clearing the search input', fakeAsync(() => { + typeToSearchBox('piccolo'); + tick(debounceSearch); + + expect(searchSpy.calls.count()).toBe(1); + + component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); + + expect(searchSpy.calls.count()).toBe(2); + + component.clear(); + + expect(component.searchTerm).toBe(''); + expect(component.folderIdToShow).toBe('namek'); + })); + + it('should show the current folder\'s content instead of search results if search was not performed', async () => { + const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); + }); + + it('should pass through the rowFilter to the documentList', async () => { + const filter = (shareDataRow: ShareDataRow) => + shareDataRow.node.entry.name === 'impossible-name'; + + component.rowFilter = filter; + + fixture.detectChanges(); + + const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(documentList.componentInstance.rowFilter({ + node: { + entry: new Node({ + name: 'impossible-name', + id: 'name' + }) + } + })) + .toBe(filter({ + node: { + entry: new Node({ + name: 'impossible-name', + id: 'name' + }) + } + } as ShareDataRow)); + }); + + it('should pass through the excludeSiteContent to the rowFilter of the documentList', async () => { + component.excludeSiteContent = ['blog']; + + fixture.detectChanges(); + + const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(documentList.componentInstance.rowFilter).toBeTruthy('Document list should have had a rowFilter'); + + const testSiteContent = new Node({ id: 'blog-id', properties: { 'st:componentId': 'blog' } }); + expect(documentList.componentInstance.rowFilter({ node: { entry: testSiteContent } }, null, null)) + .toBe(false); + }); + + it('should pass through the imageResolver to the documentList', async () => { + const resolver = () => 'piccolo'; + component.imageResolver = resolver; + + fixture.detectChanges(); + + const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(documentList.componentInstance.imageResolver).toBe(resolver); + }); + + it('should show the result list when search was performed', (done) => { + typeToSearchBox(); + + setTimeout(() => { + triggerSearchResults(fakeResultSetPaging); + + fixture.detectChanges(); + const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(component.hasValidQuery).toEqual(true); + expect(documentList.componentInstance.currentFolderId).toBeNull(); + done(); + }, 300); + }); + + it('should not show the result list when results are returned but there is no search term typed', (done) => { + searchQueryBuilderService.userQuery = ''; + searchQueryBuilderService.update(); + + setTimeout(() => { + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + + expect(component.hasValidQuery).toEqual(false); + expect(component.showingSearchResults).toEqual(false); + done(); + }, 300); + }); + + it('should highlight the results when search was performed in the next timeframe', (done) => { + typeToSearchBox('My'); + + setTimeout(() => { + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + + fixture.whenStable().then(() => { + expect(fixture.debugElement.nativeElement.querySelector('.adf-highlight').innerHTML).toBe('My'); + + done(); + }); + }, 300); + }); + + it('should show the default text instead of result list if search was cleared', (done) => { + typeToSearchBox(); + + setTimeout(() => { + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + + fixture.whenStable().then(() => { + const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); + expect(clearButton).not.toBeNull('Clear button should be in DOM'); + clearButton.triggerEventHandler('click', {}); + fixture.detectChanges(); + + const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); + expect(documentList).not.toBeNull('Document list should be shown'); + expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); + done(); + }); + }, 300); + }); + + it('should reload the original folderId when clearing the search input', fakeAsync(() => { + typeToSearchBox('search-term'); + tick(debounceSearch); + fixture.detectChanges(); + + expect(component.folderIdToShow).toBe(null); + + typeToSearchBox(''); + tick(debounceSearch); + fixture.detectChanges(); + + expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku'); + })); + + it('should set the folderIdToShow to the default "currentFolderId" if siteId is undefined', (done) => { + component.siteChanged({ entry: { guid: 'Kame-Sennin Muten Roshi' } } as SiteEntry); + fixture.detectChanges(); + + let documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); + expect(documentList.componentInstance.currentFolderId).toBe('Kame-Sennin Muten Roshi'); + + component.siteChanged({ entry: { guid: undefined } } as SiteEntry); + fixture.detectChanges(); + + documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); + expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); + + done(); + }); + + describe('Pagination "Load more" button', () => { + + it('should NOT be shown by default', () => { + fixture.detectChanges(); + const pagination = fixture.debugElement.query(By.css('[data-automation-id="adf-infinite-pagination-button"]')); + expect(pagination).toBeNull(); + }); + + it('button callback should load the next batch of folder results when there is no searchTerm', () => { + component.searchTerm = ''; + fixture.detectChanges(); + + component.getNextPageOfSearch({ + hasMoreItems: false, + skipCount: 10, + maxItems: 45, + totalItems: 0 + }); + + fixture.detectChanges(); + expect(component.searchTerm).toBe(''); + + expect(component.infiniteScroll).toBeTruthy(); + expect(component.queryBuilderService.paging.maxItems).toBe(45); + expect(searchSpy).not.toHaveBeenCalled(); + }); + + it('should set its loading state to true to perform a new search', async () => { + component.prepareDialogForNewSearch(mockQueryBody); + fixture.detectChanges(); + await fixture.whenStable(); + + const spinnerSelector = By.css('[data-automation-id="content-node-selector-search-pagination"] [data-automation-id="adf-infinite-pagination-spinner"]'); + const paginationLoading = fixture.debugElement.query(spinnerSelector); + + expect(paginationLoading).not.toBeNull(); + }); + + it('Should infinite pagination target be null when we use it for search ', fakeAsync(() => { + component.showingSearchResults = true; + typeToSearchBox('shenron'); + tick(debounceSearch); + fixture.detectChanges(); + + expect(component.target).toBeNull(); + })); + + it('Should infinite pagination target be present when search finish', () => { + triggerSearchResults(fakeResultSetPaging); + fixture.detectChanges(); + + expect(component.target).not.toBeNull(); + }); + + it('Should infinite pagination target on init be the document list', fakeAsync(() => { + component.showingSearchResults = true; + + expect(component.target).toEqual(component.documentList); + })); + + it('Should set the scope to nodes when the component inits', () => { + const expectedScope: RequestScope = { locations: 'nodes' }; + const setScopeSpy = spyOn(component.queryBuilderService, 'setScope'); + component.ngOnInit(); + + expect(setScopeSpy).toHaveBeenCalledWith(expectedScope); + }); + }); + }); + + }); +}); diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts index 71849fdde0..c598978799 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.spec.ts @@ -18,20 +18,39 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { MinimalNode, Node, NodeEntry, NodePaging, RequestScope, ResultSetPaging, SiteEntry, SitePaging, UserInfo } from '@alfresco/js-api'; -import { AppConfigService, FileModel, FileUploadStatus, NodesApiService, setupTestBed, SitesService, UploadService, FileUploadCompleteEvent, DataRow, ThumbnailService, ContentService, DataColumn } from '@alfresco/adf-core'; +import { + MinimalNode, + Node, + NodeEntry, + NodePaging, + ResultSetPaging, + SiteEntry, + SitePaging, + UserInfo +} from '@alfresco/js-api'; +import { + AppConfigService, + FileModel, + FileUploadStatus, + NodesApiService, + setupTestBed, + SitesService, + UploadService, + FileUploadCompleteEvent, + DataRow, + ThumbnailService, + ContentService, + DataColumn +} from '@alfresco/adf-core'; import { of, throwError } from 'rxjs'; import { DropdownBreadcrumbComponent } from '../breadcrumb'; import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component'; import { ContentTestingModule } from '../testing/content.testing.module'; import { DocumentListService } from '../document-list/services/document-list.service'; -import { DocumentListComponent } from '../document-list/components/document-list.component'; import { DropdownSitesComponent } from '../site-dropdown/sites-dropdown.component'; -import { CustomResourcesService } from '../document-list/services/custom-resources.service'; import { NodeEntryEvent, ShareDataRow, ShareDataTableAdapter } from '../document-list'; import { TranslateModule } from '@ngx-translate/core'; import { SearchQueryBuilderService } from '../search'; -import { mockQueryBody } from '../mock/search-query.mock'; import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service'; import { mockContentModelTextProperty } from '../mock/content-model.mock'; @@ -55,12 +74,10 @@ const fakeResultSetPaging: ResultSetPaging = { }; describe('ContentNodeSelectorPanelComponent', () => { - const debounceSearch = 200; let component: ContentNodeSelectorPanelComponent; let fixture: ComponentFixture; let nodeService: NodesApiService; let sitesService: SitesService; - let searchSpy: jasmine.Spy; const fakeNodeEntry = new Node({ id: 'fakeId' }); const nodeEntryEvent = new NodeEntryEvent(fakeNodeEntry); let searchQueryBuilderService: SearchQueryBuilderService; @@ -69,13 +86,6 @@ describe('ContentNodeSelectorPanelComponent', () => { let thumbnailService: ThumbnailService; let contentService: ContentService; - const typeToSearchBox = (searchTerm = 'string-to-search') => { - const searchInput = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-input"]')); - searchInput.nativeElement.value = searchTerm; - component.searchInput.setValue(searchTerm); - fixture.detectChanges(); - }; - const triggerSearchResults = (searchResults: ResultSetPaging) => { component.queryBuilderService.executed.next(searchResults); }; @@ -105,9 +115,18 @@ describe('ContentNodeSelectorPanelComponent', () => { searchQueryBuilderService = component.queryBuilderService; component.queryBuilderService.resetToDefaults(); - spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({ id: 'fake-node', path: { elements: [{ nodeType: 'st:site', name: 'fake-site'}] } }))); - searchSpy = spyOn(searchQueryBuilderService, 'execute'); - const fakeSite = new SiteEntry({ entry: { id: 'fake-site', guid: 'fake-site', title: 'fake-site', visibility: 'visible' } }); + spyOn(nodeService, 'getNode').and.returnValue(of(new MinimalNode({ + id: 'fake-node', + path: { elements: [{ nodeType: 'st:site', name: 'fake-site' }] } + }))); + const fakeSite = new SiteEntry({ + entry: { + id: 'fake-site', + guid: 'fake-site', + title: 'fake-site', + visibility: 'visible' + } + }); spyOn(sitesService, 'getSite').and.returnValue(of(fakeSite)); }); @@ -115,6 +134,40 @@ describe('ContentNodeSelectorPanelComponent', () => { fixture.destroy(); }); + describe('Site selection', () => { + + beforeEach(() => { + spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } }))); + component.currentFolderId = 'fake-starting-folder'; + }); + + it('should trigger siteChange event on init with parent site Title of start folder', (done) => { + component.siteChange.subscribe((siteTitle: string) => { + expect(siteTitle).toBe('fake-site'); + done(); + }); + + component.ngOnInit(); + fixture.detectChanges(); + expect(component.startSiteGuid).toBe('fake-site'); + }); + + it('should trigger siteChange event when a site is selected in sites-dropdown', (done) => { + const fakeSiteEntry = new SiteEntry({ entry: { title: 'fake-new-site', guid: 'fake-new-site' } }); + fixture.detectChanges(); + + fixture.whenStable().then(() => { + component.siteChange.subscribe((siteTitle: string) => { + expect(siteTitle).toBe('fake-new-site'); + done(); + }); + + const sitesDropdown = fixture.debugElement.query(By.directive(DropdownSitesComponent)); + sitesDropdown.componentInstance.selectedSite({ value: fakeSiteEntry }); + }); + }); + }); + describe('Parameters', () => { let documentListService: DocumentListService; @@ -122,7 +175,7 @@ describe('ContentNodeSelectorPanelComponent', () => { beforeEach(() => { documentListService = TestBed.inject(DocumentListService); - spyOn(documentListService, 'getFolderNode').and.returnValue(of({ entry: { path: { elements: [] } } })); + spyOn(documentListService, 'getFolderNode').and.returnValue(of(new NodeEntry())); spyOn(documentListService, 'getFolder').and.returnValue(throwError('No results for test')); spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { @@ -142,7 +195,7 @@ describe('ContentNodeSelectorPanelComponent', () => { }); it('should trigger the select event when selection has been made', (done) => { - const expectedNode = { id: 'fakeid'} as Node; + const expectedNode = { id: 'fakeid' } as Node; component.select.subscribe((nodes) => { expect(nodes.length).toBe(1); expect(nodes[0]).toBe(expectedNode); @@ -196,27 +249,27 @@ describe('ContentNodeSelectorPanelComponent', () => { it('should render search input by default', () => { fixture.detectChanges(); expect(fixture.debugElement.nativeElement.querySelector('.adf-content-node-selector-content-input')) - .not.toBe(null); + .not.toBe(null); }); it('should not render search input if `showSearch` is false', () => { component.showSearch = false; fixture.detectChanges(); expect(fixture.debugElement.nativeElement.querySelector('.adf-content-node-selector-content-input')) - .toBe(null); + .toBe(null); }); it('should render sites list dropdown by default', () => { fixture.detectChanges(); expect(fixture.debugElement.nativeElement.querySelector('adf-sites-dropdown')) - .not.toBe(null); + .not.toBe(null); }); it('should not render sites list dropdown if `showDropdownSiteList` is false', () => { component.showDropdownSiteList = false; fixture.detectChanges(); expect(fixture.debugElement.nativeElement.querySelector('adf-sites-dropdown')) - .toBe(null); + .toBe(null); }); }); @@ -227,7 +280,7 @@ describe('ContentNodeSelectorPanelComponent', () => { beforeEach(() => { documentListService = TestBed.inject(DocumentListService); - spyOn(documentListService, 'getFolderNode').and.returnValue(of({ entry: { path: { elements: [] } } })); + spyOn(documentListService, 'getFolderNode').and.returnValue(of(new NodeEntry())); spyOn(documentListService, 'getFolder').and.returnValue(throwError('No results for test')); spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } }))); @@ -275,7 +328,7 @@ describe('ContentNodeSelectorPanelComponent', () => { triggerSearchResults(fakeResultSetPaging); const chosenNode = new Node({ path: { elements: ['one'] } }); - component.onCurrentSelection([ { entry: chosenNode } ]); + component.onCurrentSelection([{ entry: chosenNode }]); fixture.detectChanges(); const breadcrumb = fixture.debugElement.query(By.directive(DropdownBreadcrumbComponent)); @@ -306,7 +359,7 @@ describe('ContentNodeSelectorPanelComponent', () => { fixture.detectChanges(); const chosenNode = { path: { elements: [] } } as Node; - component.onCurrentSelection([ { entry: chosenNode } ]); + component.onCurrentSelection([{ entry: chosenNode }]); fixture.detectChanges(); const breadcrumb = fixture.debugElement.query(By.directive(DropdownBreadcrumbComponent)); @@ -348,692 +401,9 @@ describe('ContentNodeSelectorPanelComponent', () => { }); }); - describe('Site selection', () => { - - beforeEach(() => { - spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } }))); - component.currentFolderId = 'fake-starting-folder'; - }); - - it('should trigger siteChange event on init with parent site Title of start folder', (done) => { - component.siteChange.subscribe((siteTitle: string) => { - expect(siteTitle).toBe('fake-site'); - done(); - }); - - component.ngOnInit(); - fixture.detectChanges(); - expect(component.startSiteGuid).toBe('fake-site'); - }); - - it('should trigger siteChange event when a site is selected in sites-dropdown', (done) => { - const fakeSiteEntry = new SiteEntry({ entry: { title: 'fake-new-site', guid: 'fake-new-site' } }); - fixture.detectChanges(); - - fixture.whenStable().then(() => { - component.siteChange.subscribe((siteTitle: string) => { - expect(siteTitle).toBe('fake-new-site'); - done(); - }); - - const sitesDropdown = fixture.debugElement.query(By.directive(DropdownSitesComponent)); - sitesDropdown.componentInstance.selectedSite({value: fakeSiteEntry}); - }); - }); - }); - - describe('Search functionality', () => { - let getCorrespondingNodeIdsSpy; - let customResourcesService: CustomResourcesService; - const entry: Node = { id: 'fakeid'} as Node; - - beforeEach(() => { - const documentListService = TestBed.inject(DocumentListService); - const expectedDefaultFolderNode = { entry: { path: { elements: [] } } }; - component.isSelectionValid = (node: Node) => node.isFile; - - spyOn(documentListService, 'getFolderNode').and.returnValue(of(expectedDefaultFolderNode)); - spyOn(documentListService, 'getFolder').and.returnValue(of(new NodePaging({ - list: { - pagination: {}, - entries: [], - source: {} - } - }))); - - spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: { entries: [] } }))); - - customResourcesService = TestBed.inject(CustomResourcesService); - getCorrespondingNodeIdsSpy = spyOn(customResourcesService, 'getCorrespondingNodeIds').and - .callFake((id) => { - if (id === '-sites-') { - return of(['123456testId', '09876543testId']); - } - return of([id]); - }); - - component.currentFolderId = 'cat-girl-nuku-nuku'; - component.documentList.ngOnInit(); - - fixture.detectChanges(); - }); - - it('should the user query get updated when the user types in the search input', fakeAsync(() => { - const updateSpy = spyOn(searchQueryBuilderService, 'update'); - typeToSearchBox('search-term'); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(updateSpy).toHaveBeenCalled(); - expect(searchQueryBuilderService.userQuery).toEqual('(search-term*)'); - expect(component.searchTerm).toEqual('search-term'); - })); - - it('should perform a search when the queryBody gets updated and it is defined', async () => { - searchQueryBuilderService.userQuery = 'search-term*'; - searchQueryBuilderService.update(); - - fixture.detectChanges(); - await fixture.whenStable(); - - expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); - }); - - it('should NOT perform a search and clear the results when the queryBody gets updated and it is NOT defined', async () => { - spyOn(component, 'clearSearch'); - - searchQueryBuilderService.userQuery = ''; - searchQueryBuilderService.update(); - - fixture.detectChanges(); - await fixture.whenStable(); - - expect(searchSpy).not.toHaveBeenCalled(); - expect(component.clearSearch).toHaveBeenCalled(); - }); - - it('should reset the search term when clicking the clear icon', () => { - component.searchTerm = 'search-term'; - searchQueryBuilderService.userQuery = 'search-term'; - spyOn(component, 'clearSearch'); - - fixture.detectChanges(); - const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); - clearIcon.nativeElement.click(); - - fixture.detectChanges(); - - expect(searchQueryBuilderService.userQuery).toEqual(''); - expect(component.searchTerm).toEqual(''); - expect(component.clearSearch).toHaveBeenCalled(); - }); - - it('should load the results by calling the search api on search change', fakeAsync(() => { - typeToSearchBox('search-term'); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); - })); - - it('should the query include the show files filterQuery', fakeAsync(() => { - component.showFilesInResult = true; - typeToSearchBox('search-term'); - - const expectedQueryBody = mockQueryBody; - expectedQueryBody.filterQueries.push({ - query: `TYPE:'cm:folder' OR TYPE:'cm:content'` - }); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); - })); - - it('should reset the currently chosen node in case of starting a new search', fakeAsync(() => { - component.chosenNode = [entry]; - typeToSearchBox('kakarot'); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(component.chosenNode).toBeNull(); - })); - - it('should update the breadcrumb when changing to a custom site', async () => { - component.siteChanged({ entry: { guid: '-mysites-', title: 'My Sites' } } as SiteEntry); - - expect(component.breadcrumbFolderTitle).toBe('My Sites'); - }); - - it('should perform a search when selecting a site with the correct query', fakeAsync(() => { - typeToSearchBox('search-term'); - - tick(debounceSearch); - - expect(searchSpy.calls.count()).toBe(1, 'Search count should be one after only one search'); - - component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); - - const expectedQueryBody = mockQueryBody; - expectedQueryBody.filterQueries = [ { query: `ANCESTOR:'workspace://SpacesStore/namek'`} ]; - - expect(searchSpy.calls.count()).toBe(2, 'Search count should be two after the site change'); - expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); - })); - - it('should create the query with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => { - component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; - fixture.detectChanges(); - - typeToSearchBox('search-term'); - - tick(debounceSearch); - - expect(searchSpy.calls.count()).toBe(1); - - component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); - - const expectedQueryBodyWithSiteChange = mockQueryBody; - expectedQueryBodyWithSiteChange.filterQueries = [ - { query: `ANCESTOR:'workspace://SpacesStore/-sites-' OR ANCESTOR:'workspace://SpacesStore/123456testId' OR ANCESTOR:'workspace://SpacesStore/09876543testId'` } - ]; - - expect(searchSpy).toHaveBeenCalled(); - expect(searchSpy.calls.count()).toBe(2); - expect(searchSpy).toHaveBeenCalledWith(mockQueryBody); - expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange); - })); - - it('should get the corresponding node ids on search when a known alias is selected from dropdown', fakeAsync(() => { - typeToSearchBox('vegeta'); - - tick(debounceSearch); - - component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); - expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1, 'getCorrespondingNodeIdsSpy calls count should be one after the site changes to known alias \'-sites\-'); - expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-'); - })); - - it('should get the corresponding node ids on search when a known alias is selected from CUSTOM dropdown', fakeAsync(() => { - component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; - fixture.detectChanges(); - - typeToSearchBox('vegeta'); - - tick(debounceSearch); - - component.siteChanged({ entry: { guid: '-sites-' } } as SiteEntry); - expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(1); - expect(getCorrespondingNodeIdsSpy.calls.mostRecent().args[0]).toEqual('-sites-'); - })); - - it('should NOT get the corresponding node ids on search when NOTHING is selected from dropdown', fakeAsync(() => { - component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; - fixture.detectChanges(); - - typeToSearchBox('vegeta'); - - tick(debounceSearch); - - expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy calls count should be 0 when no site is selected'); - })); - - it('should NOT get the corresponding node ids on search when NO known alias is selected from dropdown', fakeAsync(() => { - typeToSearchBox('vegeta'); - tick(debounceSearch); - - expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called'); - - component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); - - expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled(); - })); - - it('should NOT get the corresponding node ids on search when NO known alias is selected from CUSTOM dropdown', fakeAsync(() => { - component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging; - fixture.detectChanges(); - - typeToSearchBox('vegeta'); - tick(debounceSearch); - - expect(getCorrespondingNodeIdsSpy.calls.count()).toBe(0, 'getCorrespondingNodeIdsSpy should not be called'); - - component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); - - expect(getCorrespondingNodeIdsSpy).not.toHaveBeenCalled(); - })); - - it('should show the search icon by default without the X (clear) icon', fakeAsync(() => { - fixture.detectChanges(); - tick(debounceSearch); - - const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]')); - const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); - - expect(searchIcon).not.toBeNull('Search icon should be in the DOM'); - expect(clearIcon).toBeNull('Clear icon should NOT be in the DOM'); - })); - - it('should show the X (clear) icon without the search icon when the search contains at least one character', fakeAsync(() => { - fixture.detectChanges(); - typeToSearchBox('123'); - tick(debounceSearch); - - fixture.detectChanges(); - - const searchIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-icon"]')); - const clearIcon = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); - - expect(searchIcon).toBeNull('Search icon should NOT be in the DOM'); - expect(clearIcon).not.toBeNull('Clear icon should be in the DOM'); - })); - - it('should clear the search field, nodes and chosenNode when clicking on the X (clear) icon', () => { - component.chosenNode = [entry]; - - component.nodePaging = { - list: { - entries: [{ entry }] - } - }; - component.searchTerm = 'piccolo'; - component.showingSearchResults = true; - - component.clear(); - - expect(component.searchTerm).toBe(''); - expect(component.nodePaging).toEqual(null); - expect(component.chosenNode).toBeNull(); - expect(component.showingSearchResults).toBeFalsy(); - }); - - it('should the query restrict the search to the currentFolderId in case is defined', fakeAsync(() => { - component.currentFolderId = 'my-root-id'; - component.restrictRootToCurrentFolderId = true; - component.ngOnInit(); - typeToSearchBox('search-term'); - tick(debounceSearch); - - const expectedQueryBody = mockQueryBody; - expectedQueryBody.filterQueries = [ { query: `ANCESTOR:'workspace://SpacesStore/my-root-id'`} ]; - - expect(searchSpy).toHaveBeenCalledWith(expectedQueryBody); - })); - - it('should emit showingSearch event with true while searching', async () => { - searchQueryBuilderService.userQuery = 'mock-search-term'; - searchQueryBuilderService.update(); - spyOn(customResourcesService, 'hasCorrespondingNodeIds').and.returnValue(true); - const showingSearchSpy = spyOn(component.showingSearch, 'emit'); - - component.queryBuilderService.execute({ query: { query: 'search' } }); - - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - await fixture.whenStable(); - - expect(component.showingSearchResults).toBe(true); - expect(showingSearchSpy).toHaveBeenCalledWith(true); - }); - - it('should emit showingSearch event with false if you remove search term without clicking on X (icon) icon', fakeAsync(() => { - const showingSearchSpy = spyOn(component.showingSearch, 'emit'); - typeToSearchBox(''); - tick(debounceSearch); - - fixture.detectChanges(); - - expect(component.showingSearchResults).toBe(false); - expect(showingSearchSpy).toHaveBeenCalledWith(false); - })); - - it('should emit showingResults event with false when clicking on the X (clear) icon', () => { - const showingSearchSpy = spyOn(component.showingSearch, 'emit'); - component.chosenNode = [entry]; - - component.nodePaging = { - list: { - entries: [{ entry }] - } - }; - component.searchTerm = 'piccolo'; - component.showingSearchResults = true; - - component.clear(); - - expect(component.showingSearchResults).toBe(false); - expect(showingSearchSpy).toHaveBeenCalledWith(false); - }); - - it('should emit showingResults event with false if search api fails', async () => { - searchQueryBuilderService.userQuery = 'mock-search-term'; - searchQueryBuilderService.update(); - getCorrespondingNodeIdsSpy.and.throwError('Failed'); - const showingSearchSpy = spyOn(component.showingSearch, 'emit'); - component.queryBuilderService.execute({ query: { query: 'search' } }); - - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - await fixture.whenStable(); - - expect(component.showingSearchResults).toBe(true); - expect(showingSearchSpy).toHaveBeenCalledWith(true); - }); - - it('should the query restrict the search to the site and not to the currentFolderId in case is changed', () => { - component.queryBuilderService.userQuery = 'search-term*'; - component.currentFolderId = 'my-root-id'; - component.restrictRootToCurrentFolderId = true; - component.siteChanged({ entry: { guid: 'my-site-id' } } as SiteEntry); - - const expectedQueryBodyWithSiteChange = mockQueryBody; - expectedQueryBodyWithSiteChange.filterQueries = [ - { query: `ANCESTOR:'workspace://SpacesStore/my-site-id'` } - ]; - - expect(searchSpy).toHaveBeenCalledWith(expectedQueryBodyWithSiteChange); - }); - - it('should restrict the breadcrumb to the currentFolderId in case restrictedRoot is true', () => { - component.currentFolderId = 'my-root-id'; - component.restrictRootToCurrentFolderId = true; - component.ngOnInit(); - expect(component.breadcrumbRootId).toEqual('my-root-id'); - }); - - it('should NOT restrict the breadcrumb to the currentFolderId in case restrictedRoot is false', () => { - component.currentFolderId = 'my-root-id'; - component.restrictRootToCurrentFolderId = false; - component.ngOnInit(); - expect(component.breadcrumbRootId).toBeUndefined(); - }); - - it('should clear the search field, nodes and chosenNode when deleting the search input', fakeAsync (() => { - spyOn(component, 'clearSearch').and.callThrough(); - typeToSearchBox('a'); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(searchSpy.calls.count()).toBe(1); - - typeToSearchBox(''); - - tick(debounceSearch); - fixture.detectChanges(); - - expect(searchSpy.calls.count()).toBe(1, 'no other search has been performed'); - expect(component.clearSearch).toHaveBeenCalled(); - expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku', 'back to the folder in which the search was performed'); - })); - - it('should folderIdToShow equal the folder node id when navigation changes', () => { - component.folderIdToShow = null; - const folderChangeEvent: NodeEntryEvent = new NodeEntryEvent(fakeNodeEntry); - component.onFolderChange(folderChangeEvent); - - expect(component.folderIdToShow).toEqual(fakeNodeEntry.id); - }); - - it('should clear the search field, nodes and chosenNode on folder navigation in the results list', async () => { - spyOn(component, 'clearSearch').and.callThrough(); - triggerSearchResults(fakeResultSetPaging); - - fixture.detectChanges(); - - component.onFolderChange(nodeEntryEvent); - fixture.detectChanges(); - - expect(component.clearSearch).toHaveBeenCalled(); - }); - - it('should show nodes from the same folder as selected in the dropdown on clearing the search input', fakeAsync (() => { - typeToSearchBox('piccolo'); - tick(debounceSearch); - - expect(searchSpy.calls.count()).toBe(1); - - component.siteChanged({ entry: { guid: 'namek' } } as SiteEntry); - - expect(searchSpy.calls.count()).toBe(2); - - component.clear(); - - expect(component.searchTerm).toBe(''); - expect(component.folderIdToShow).toBe('namek'); - })); - - it('should show the current folder\'s content instead of search results if search was not performed', () => { - const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); - }); - - it('should pass through the rowFilter to the documentList', () => { - const filter = (shareDataRow: ShareDataRow) => - shareDataRow.node.entry.name === 'impossible-name'; - - component.rowFilter = filter; - - fixture.detectChanges(); - - const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(documentList.componentInstance.rowFilter({ - node: { - entry: new Node({ - name: 'impossible-name', - id: 'name' - }) - } - })) - .toBe(filter({ - node: { - entry: new Node({ - name: 'impossible-name', - id: 'name' - }) - } - } as ShareDataRow)); - }); - - it('should pass through the excludeSiteContent to the rowFilter of the documentList', () => { - component.excludeSiteContent = ['blog']; - - fixture.detectChanges(); - - const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(documentList.componentInstance.rowFilter).toBeTruthy('Document list should have had a rowFilter'); - - const testSiteContent = new Node({ id: 'blog-id', properties: { 'st:componentId': 'blog' } }); - expect(documentList.componentInstance.rowFilter({ node: { entry: testSiteContent } }, null, null)) - .toBe(false); - }); - - it('should pass through the imageResolver to the documentList', () => { - const resolver = () => 'piccolo'; - component.imageResolver = resolver; - - fixture.detectChanges(); - - const documentList = fixture.debugElement.query(By.directive(DocumentListComponent)); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(documentList.componentInstance.imageResolver).toBe(resolver); - }); - - it('should show the result list when search was performed', (done) => { - typeToSearchBox(); - - setTimeout(() => { - triggerSearchResults(fakeResultSetPaging); - - fixture.detectChanges(); - const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(component.hasValidQuery).toEqual(true); - expect(documentList.componentInstance.currentFolderId).toBeNull(); - done(); - }, 300); - }); - - it('should not show the result list when results are returned but there is no search term typed', (done) => { - searchQueryBuilderService.userQuery = ''; - searchQueryBuilderService.update(); - - setTimeout(() => { - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - - expect(component.hasValidQuery).toEqual(false); - expect(component.showingSearchResults).toEqual(false); - done(); - }, 300); - }); - - it('should highlight the results when search was performed in the next timeframe', (done) => { - typeToSearchBox('My'); - - setTimeout(() => { - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - - fixture.whenStable().then(() => { - expect(fixture.debugElement.nativeElement.querySelector('.adf-highlight').innerHTML).toBe('My'); - - done(); - }); - }, 300); - }); - - it('should show the default text instead of result list if search was cleared', (done) => { - typeToSearchBox(); - - setTimeout(() => { - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - - fixture.whenStable().then(() => { - const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]')); - expect(clearButton).not.toBeNull('Clear button should be in DOM'); - clearButton.triggerEventHandler('click', {}); - fixture.detectChanges(); - - const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); - expect(documentList).not.toBeNull('Document list should be shown'); - expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); - done(); - }); - }, 300); - }); - - it('should reload the original folderId when clearing the search input', fakeAsync(() => { - typeToSearchBox('search-term'); - tick(debounceSearch); - fixture.detectChanges(); - - expect(component.folderIdToShow).toBe(null); - - typeToSearchBox(''); - tick(debounceSearch); - fixture.detectChanges(); - - expect(component.folderIdToShow).toBe('cat-girl-nuku-nuku'); - })); - - it('should set the folderIdToShow to the default "currentFolderId" if siteId is undefined', (done) => { - component.siteChanged({ entry: { guid: 'Kame-Sennin Muten Roshi' } } as SiteEntry); - fixture.detectChanges(); - - let documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); - expect(documentList.componentInstance.currentFolderId).toBe('Kame-Sennin Muten Roshi'); - - component.siteChanged({ entry: { guid: undefined } } as SiteEntry); - fixture.detectChanges(); - - documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]')); - expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku'); - - done(); - }); - - describe('Pagination "Load more" button', () => { - - it('should NOT be shown by default', () => { - fixture.detectChanges(); - const pagination = fixture.debugElement.query(By.css('[data-automation-id="adf-infinite-pagination-button"]')); - expect(pagination).toBeNull(); - }); - - it('button callback should load the next batch of folder results when there is no searchTerm', () => { - component.searchTerm = ''; - fixture.detectChanges(); - - component.getNextPageOfSearch({ - hasMoreItems: false, - skipCount: 10, - maxItems: 45, - totalItems: 0 - }); - - fixture.detectChanges(); - expect(component.searchTerm).toBe(''); - - expect(component.infiniteScroll).toBeTruthy(); - expect(component.queryBuilderService.paging.maxItems).toBe(45); - expect(searchSpy).not.toHaveBeenCalled(); - }); - - it('should set its loading state to true to perform a new search', async () => { - component.prepareDialogForNewSearch(mockQueryBody); - fixture.detectChanges(); - await fixture.whenStable(); - - const spinnerSelector = By.css('[data-automation-id="content-node-selector-search-pagination"] [data-automation-id="adf-infinite-pagination-spinner"]'); - const paginationLoading = fixture.debugElement.query(spinnerSelector); - - expect(paginationLoading).not.toBeNull(); - }); - - it('Should infinite pagination target be null when we use it for search ', fakeAsync (() => { - component.showingSearchResults = true; - typeToSearchBox('shenron'); - tick(debounceSearch); - fixture.detectChanges(); - - expect(component.target).toBeNull(); - })); - - it('Should infinite pagination target be present when search finish', () => { - triggerSearchResults(fakeResultSetPaging); - fixture.detectChanges(); - - expect(component.target).not.toBeNull(); - }); - - it('Should infinite pagination target on init be the document list', fakeAsync(() => { - component.showingSearchResults = true; - - expect(component.target).toEqual(component.documentList); - })); - - it('Should set the scope to nodes when the component inits', () => { - const expectedScope: RequestScope = { locations: 'nodes' }; - const setScopeSpy = spyOn(component.queryBuilderService, 'setScope'); - component.ngOnInit(); - - expect(setScopeSpy).toHaveBeenCalledWith(expectedScope); - }); - }); - }); - describe('Chosen node', () => { - const entry: Node = { id: 'fakeid'} as Node; + const entry: Node = { id: 'fakeid' } as Node; const nodePage: NodePaging = { list: { pagination: {} } }; let hasAllowableOperations; const fakeFolderNode = { id: 'fakeNodeId', isFolder: true } as Node; @@ -1145,7 +515,7 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(component.chosenNode[0]).toBe(entry); }); - component.onCurrentSelection([ { entry } ]); + component.onCurrentSelection([{ entry }]); }); it('should remain empty when clicking on a node (with the WRONG permissions) in the list (onNodeSelect)', async () => { @@ -1157,7 +527,7 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(component.chosenNode).toEqual([]); }); - component.onCurrentSelection([ { entry } ]); + component.onCurrentSelection([{ entry }]); }); it('should become empty when clicking on a node (with the WRONG permissions) after previously selecting a right node', async () => { @@ -1299,8 +669,11 @@ describe('ContentNodeSelectorPanelComponent', () => { const isUploadingSpy = spyOn(uploadService, 'isUploading').and.returnValue(true); const documentListReloadSpy = spyOn(component.documentList, 'reloadWithoutResettingSelection'); - const fakeFileModels = [new FileModel({ name: 'fake-name', size: 100 } as File), new FileModel({ name: 'fake-name-2', size: 200 } as File)]; - const fileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[0], 1, fakeFileModels[0], 0); + const fakeFileModels = [new FileModel({ + name: 'fake-name', + size: 100 + } as File), new FileModel({ name: 'fake-name-2', size: 200 } as File)]; + const fileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[0], 1, fakeFileModels[0], 0); uploadService.fileUploadComplete.next(fileUploadCompleteEvent); tick(500); @@ -1312,7 +685,7 @@ describe('ContentNodeSelectorPanelComponent', () => { isUploadingSpy.and.returnValue(false); - const secondFileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[1], 2, fakeFileModels[1], 0); + const secondFileUploadCompleteEvent = new FileUploadCompleteEvent(fakeFileModels[1], 2, fakeFileModels[1], 0); uploadService.fileUploadComplete.next(secondFileUploadCompleteEvent); tick(500); @@ -1371,7 +744,7 @@ describe('ContentNodeSelectorPanelComponent', () => { contentNodeSelectorPanelService.customModels = undefined; }); - it ('should search panel be collapsed by default and expand when clicking the filter button', async () => { + it('should search panel be collapsed by default and expand when clicking the filter button', async () => { contentNodeSelectorPanelService.customModels = [mockContentModelTextProperty]; fixture.detectChanges(); @@ -1386,7 +759,7 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(component.searchPanelExpanded).toEqual(true); }); - it ('should search panel be present when the filter section is expanded', () => { + it('should search panel be present when the filter section is expanded', () => { component.searchPanelExpanded = true; fixture.detectChanges(); @@ -1395,7 +768,7 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(searchPanelContainer).not.toBe(null); }); - it('should filter button be present only when there are custom models', () => { + it('should filter button be present only when there are custom models', () => { contentNodeSelectorPanelService.customModels = [mockContentModelTextProperty]; fixture.detectChanges(); @@ -1404,7 +777,7 @@ describe('ContentNodeSelectorPanelComponent', () => { expect(toggleFiltersPanelButton).not.toEqual(null); }); - it('should filter button not be present when there are no custom models', () => { + it('should filter button not be present when there are no custom models', () => { fixture.detectChanges(); const toggleFiltersPanelButton = fixture.debugElement.query(By.css('[data-automation-id="adf-toggle-search-panel-button"]')); diff --git a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts index 1698bd2f6d..ccfe899825 100644 --- a/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts +++ b/lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts @@ -47,11 +47,12 @@ import { RowFilter } from '../document-list/data/row-filter.model'; import { ImageResolver } from '../document-list/data/image-resolver.model'; import { debounceTime, takeUntil } from 'rxjs/operators'; import { CustomResourcesService } from '../document-list/services/custom-resources.service'; -import { NodeEntryEvent, ShareDataRow } from '../document-list'; +import { ShareDataRow } from '../document-list/data/share-data-row.model'; import { Subject } from 'rxjs'; import { SEARCH_QUERY_SERVICE_TOKEN } from '../search/search-query-service.token'; import { SearchQueryBuilderService } from '../search/services/search-query-builder.service'; import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service'; +import { NodeEntryEvent } from '../document-list/components/node.event'; export type ValidationFunction = (entry: Node) => boolean; diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.spec.ts b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.spec.ts index ac7f667bbf..1e0b87f2e7 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.spec.ts +++ b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.spec.ts @@ -27,7 +27,7 @@ import { AppConfigService } from '@alfresco/adf-core'; import { ShareDialogComponent } from './content-node-share.dialog'; -import moment from 'moment-es6'; +import moment from 'moment'; import { ContentTestingModule } from '../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts index 831cbce4d6..a3093f8221 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts +++ b/lib/content-services/src/lib/content-node-share/content-node-share.dialog.ts @@ -36,7 +36,7 @@ import { } from '@alfresco/adf-core'; import { SharedLinkEntry, Node } from '@alfresco/js-api'; import { ConfirmDialogComponent } from '../dialogs/confirm.dialog'; -import moment from 'moment-es6'; +import moment from 'moment'; import { ContentNodeShareSettings } from './content-node-share.settings'; import { takeUntil, debounceTime } from 'rxjs/operators'; diff --git a/lib/content-services/src/lib/dialogs/node-lock.dialog.spec.ts b/lib/content-services/src/lib/dialogs/node-lock.dialog.spec.ts index a95e7a6483..249f8a663e 100644 --- a/lib/content-services/src/lib/dialogs/node-lock.dialog.spec.ts +++ b/lib/content-services/src/lib/dialogs/node-lock.dialog.spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import moment from 'moment-es6'; +import moment from 'moment'; import { TestBed, fakeAsync, tick, ComponentFixture } from '@angular/core/testing'; import { MatDialogRef } from '@angular/material/dialog'; diff --git a/lib/content-services/src/lib/dialogs/node-lock.dialog.ts b/lib/content-services/src/lib/dialogs/node-lock.dialog.ts index dcbbdd7a2d..604d8e89b3 100644 --- a/lib/content-services/src/lib/dialogs/node-lock.dialog.ts +++ b/lib/content-services/src/lib/dialogs/node-lock.dialog.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import moment from 'moment-es6'; +import moment from 'moment'; import { Component, Inject, OnInit, Optional, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.ts b/lib/content-services/src/lib/document-list/components/document-list.component.ts index 457d5a13ee..8f1bae2c7c 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.ts @@ -19,7 +19,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { - AfterContentInit, Component, ContentChild, ElementRef, EventEmitter, HostListener, Input, NgZone, + AfterContentInit, Component, ContentChild, ElementRef, EventEmitter, HostListener, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core'; @@ -63,11 +63,16 @@ import { RowFilter } from '../data/row-filter.model'; import { DocumentListService } from '../services/document-list.service'; import { DocumentLoaderNode } from '../models/document-folder.model'; import { takeUntil } from 'rxjs/operators'; +import { ADF_DOCUMENT_PARENT_COMPONENT } from './document-list.token'; @Component({ selector: 'adf-document-list', templateUrl: './document-list.component.html', styleUrls: ['./document-list.component.scss'], + providers:[{ + provide: ADF_DOCUMENT_PARENT_COMPONENT, + useExisting: DocumentListComponent + }], encapsulation: ViewEncapsulation.None, host: { class: 'adf-document-list' } }) @@ -352,7 +357,6 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte } constructor(private documentListService: DocumentListService, - private ngZone: NgZone, private elementRef: ElementRef, private appConfig: AppConfigService, private userPreferencesService: UserPreferencesService, @@ -507,10 +511,8 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte } reload() { - this.ngZone.run(() => { - this.resetSelection(); - this.reloadWithoutResettingSelection(); - }); + this.resetSelection(); + this.reloadWithoutResettingSelection(); } reloadWithoutResettingSelection() { diff --git a/lib/content-services/src/lib/document-list/components/document-list.token.ts b/lib/content-services/src/lib/document-list/components/document-list.token.ts new file mode 100644 index 0000000000..b5b8fc3640 --- /dev/null +++ b/lib/content-services/src/lib/document-list/components/document-list.token.ts @@ -0,0 +1,25 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* eslint-disable rxjs/no-subject-value */ +/* eslint-disable @typescript-eslint/naming-convention */ + +import { InjectionToken } from '@angular/core'; + +export const ADF_DOCUMENT_PARENT_COMPONENT = new InjectionToken( + 'ADF_DOCUMENT_PARENT_COMPONENT' +); diff --git a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.spec.ts b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.spec.ts index a9519d090e..bcd7ebfa4c 100644 --- a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.spec.ts +++ b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.spec.ts @@ -26,6 +26,7 @@ import { SEARCH_QUERY_SERVICE_TOKEN } from './../../../search/search-query-servi import { DocumentListComponent } from './../document-list.component'; import { FilterHeaderComponent } from './filter-header.component'; import { Pagination } from '@alfresco/js-api'; +import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token'; describe('FilterHeaderComponent', () => { let fixture: ComponentFixture; @@ -52,6 +53,7 @@ describe('FilterHeaderComponent', () => { ContentTestingModule ], providers: [ + { provide: ADF_DOCUMENT_PARENT_COMPONENT, useExisting: DocumentListComponent }, { provide: SearchService, useValue: searchMock }, { provide: SEARCH_QUERY_SERVICE_TOKEN, useClass: SearchHeaderQueryBuilderService }, { provide: DocumentListComponent, useValue: documentListMock }, @@ -121,7 +123,7 @@ describe('FilterHeaderComponent', () => { await fixture.whenStable(); expect(queryBuilder.getActiveFilters().length).toBe(0); - const initialFilterValue = { name: 'pinocchio'}; + const initialFilterValue = { name: 'pinocchio' }; component.value = initialFilterValue; const currentFolderNodeIdChange = new SimpleChange('current-node-id', 'next-node-id', true); component.ngOnChanges({ currentFolderId: currentFolderNodeIdChange }); diff --git a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts index 07400f90d8..5c2fbb3c5e 100644 --- a/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts +++ b/lib/content-services/src/lib/document-list/components/filter-header/filter-header.component.ts @@ -17,13 +17,13 @@ import { Component, Inject, OnInit, OnChanges, SimpleChanges, Input, Output, EventEmitter, OnDestroy } from '@angular/core'; import { PaginationModel, DataSorting } from '@alfresco/adf-core'; -import { DocumentListComponent } from '../document-list.component'; import { SEARCH_QUERY_SERVICE_TOKEN } from '../../../search/search-query-service.token'; import { SearchHeaderQueryBuilderService } from '../../../search/services/search-header-query-builder.service'; import { FilterSearch } from './../../../search/models/filter-search.interface'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { NodePaging, MinimalNode } from '@alfresco/js-api'; +import { ADF_DOCUMENT_PARENT_COMPONENT } from '../document-list.token'; @Component({ selector: 'adf-filter-header', @@ -47,7 +47,7 @@ export class FilterHeaderComponent implements OnInit, OnChanges, OnDestroy { isFilterServiceActive: boolean; private onDestroy$ = new Subject(); - constructor(@Inject(DocumentListComponent) private documentList: DocumentListComponent, + constructor(@Inject(ADF_DOCUMENT_PARENT_COMPONENT) private documentList: any, @Inject(SEARCH_QUERY_SERVICE_TOKEN) private searchFilterQueryBuilder: SearchHeaderQueryBuilderService) { this.isFilterServiceActive = this.searchFilterQueryBuilder.isFilterServiceActive(); } diff --git a/lib/content-services/src/lib/document-list/document-list.module.ts b/lib/content-services/src/lib/document-list/document-list.module.ts index 785e352082..9c9e032d23 100644 --- a/lib/content-services/src/lib/document-list/document-list.module.ts +++ b/lib/content-services/src/lib/document-list/document-list.module.ts @@ -68,4 +68,5 @@ import { SearchModule } from './../search/search.module'; FilterHeaderComponent ] }) -export class DocumentListModule {} +export class DocumentListModule { +} diff --git a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.spec.ts b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.spec.ts index 8a0be24b00..ac6d01c93c 100644 --- a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.spec.ts +++ b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.spec.ts @@ -101,7 +101,7 @@ describe('NewVersionUploaderService', () => { spyOn(contentService, 'hasAllowableOperations').and.returnValue(true); spyOn(service.versionsApi, 'listVersionHistory').and.returnValue(Promise.resolve({ list: { entries: [{ entry: '2' }] } - })); + } as any)); mockNewVersionUploaderDialogData = { node: mockNode, file: mockFile @@ -115,7 +115,7 @@ describe('NewVersionUploaderService', () => { data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined }, panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'], width: '630px' - }); + } as any); })); it('Should override default dialog panelClass', fakeAsync(() => { @@ -129,7 +129,7 @@ describe('NewVersionUploaderService', () => { data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined }, panelClass: 'adf-custom-class', width: '500px' - }); + } as any); })); it('Should set dialog height', fakeAsync(() => { @@ -143,7 +143,7 @@ describe('NewVersionUploaderService', () => { panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'], width: '630px', height: '600px' - }); + } as any); })); it('Should not override dialog configuration, if dialog configuration is empty', fakeAsync(() => { @@ -154,7 +154,7 @@ describe('NewVersionUploaderService', () => { data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: undefined }, panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-upload'], width: '630px' - }); + } as any); })); it('Should dialog add list css class if showVersionsOnly is true', fakeAsync(() => { @@ -169,7 +169,7 @@ describe('NewVersionUploaderService', () => { data: { file: mockFile, node: mockNode, currentVersion: '2', showComments: true, allowDownload: true, showVersionsOnly: true }, panelClass: ['adf-new-version-uploader-dialog', 'adf-new-version-uploader-dialog-list'], width: '630px' - }); + } as any); })); }); @@ -181,7 +181,7 @@ describe('NewVersionUploaderService', () => { spyOn(contentService, 'hasAllowableOperations').and.returnValue(true); spyOn(service.versionsApi, 'listVersionHistory').and.returnValue(Promise.resolve({ list: { entries: [{ entry: '2' }] } - })); + }) as any); mockNewVersionUploaderDialogData = { node: mockNode, file: mockFile diff --git a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html index b30c7bb449..661a30d5be 100644 --- a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html +++ b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.html @@ -1,5 +1,5 @@ -
+
diff --git a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.spec.ts b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.spec.ts index 0aa7ece7e3..b6e6941c01 100644 --- a/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.spec.ts +++ b/lib/content-services/src/lib/permission-manager/components/permission-list/permission-list.component.spec.ts @@ -16,7 +16,7 @@ */ import { NodesApiService, SearchService, setupTestBed } from '@alfresco/adf-core'; -import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { TranslateModule } from '@ngx-translate/core'; import { of, throwError } from 'rxjs'; @@ -128,7 +128,7 @@ describe('PermissionListComponent', () => { .toBe('PERMISSION_MANAGER.LABELS.INHERITED-SUBTITLE'); }); - it('should toggle the inherited button', fakeAsync(() => { + it('should toggle the inherited button', async () => { getNodeSpy.and.returnValue(of(fakeNodeInheritedOnly)); component.ngOnInit(); @@ -152,7 +152,7 @@ describe('PermissionListComponent', () => { .toBe('PERMISSION_MANAGER.LABELS.INHERITED-PERMISSIONS PERMISSION_MANAGER.LABELS.OFF'); expect(element.querySelector('span[title="total"]').textContent.trim()) .toBe('PERMISSION_MANAGER.LABELS.INHERITED-SUBTITLE'); - })); + }); it('should not toggle inherited button for read only users', async () => { getNodeSpy.and.returnValue(of(fakeReadOnlyNodeInherited)); @@ -186,7 +186,7 @@ describe('PermissionListComponent', () => { }); - describe('locally set permission', () => { + describe('locally set permission', () => { beforeEach(() => { getNodeSpy.and.returnValue(of(fakeLocalPermission)); }); diff --git a/lib/content-services/src/lib/permission-manager/components/user-role-column/user-role-column.component.ts b/lib/content-services/src/lib/permission-manager/components/user-role-column/user-role-column.component.ts index 9902f5d916..589d75af5b 100644 --- a/lib/content-services/src/lib/permission-manager/components/user-role-column/user-role-column.component.ts +++ b/lib/content-services/src/lib/permission-manager/components/user-role-column/user-role-column.component.ts @@ -19,33 +19,35 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { RoleModel } from '../../models/role.model'; @Component({ - selector: 'adf-user-role-column', - template: ` - - - - {{ role.label | adfLocalizedRole }} - - - + selector: 'adf-user-role-column', + template: ` + + + + {{ role.label | adfLocalizedRole }} + + + - + {{value | adfLocalizedRole}} - `, + `, host: { class: 'adf-user-role-column adf-datatable-content-cell adf-expand-cell-4' }, styles: [ `.adf-role-selector-field { width: 100%; - .mat-form-field { - width: 100%; - max-width: 200px; - } } + + .adf-role-selector-field .mat-form-field { + width: 100%; + max-width: 200px; + } + .adf-readonly-role { padding-left: 0 !important; } diff --git a/lib/content-services/src/lib/search/components/search-control.component.scss b/lib/content-services/src/lib/search/components/search-control.component.scss index 5dbfe6eb10..a3115a577e 100644 --- a/lib/content-services/src/lib/search/components/search-control.component.scss +++ b/lib/content-services/src/lib/search/components/search-control.component.scss @@ -1,11 +1,11 @@ -@import '~@angular/material/theming'; +@use '@angular/material' as mat; $mat-menu-overlay-min-width: 112px !default; // 56 * 2 $mat-menu-overlay-max-width: 280px !default; // 56 * 5 .adf { &-search-result-autocomplete { - @include mat-overridable-elevation(2); + @include mat.overridable-elevation(2); min-width: $mat-menu-overlay-min-width; max-width: $mat-menu-overlay-max-width; diff --git a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.scss b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.scss index c5c8ca9bb8..95231da64d 100644 --- a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.scss +++ b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.scss @@ -1,4 +1,4 @@ -@import '~@angular/material/theming'; +@use '@angular/material' as mat; .adf-search-filter-chip { &.mat-chip { @@ -53,6 +53,6 @@ min-width: 320px; border-radius: 12px; - @include mat-elevation(2); + @include mat.elevation(2); } } diff --git a/lib/content-services/src/lib/search/components/search-form/search-form.component.scss b/lib/content-services/src/lib/search/components/search-form/search-form.component.scss index a8b71d9e55..32a6efea66 100644 --- a/lib/content-services/src/lib/search/components/search-form/search-form.component.scss +++ b/lib/content-services/src/lib/search/components/search-form/search-form.component.scss @@ -1,4 +1,4 @@ -@import '~@angular/material/theming'; +@use '@angular/material' as mat; .adf-search-form { &.mat-button { @@ -37,7 +37,7 @@ } &-menu + * .mat-menu-panel { - @include mat-elevation(2); + @include mat.elevation(2); border-radius: 6px; diff --git a/lib/content-services/src/lib/tag/tag-node-list.component.scss b/lib/content-services/src/lib/tag/tag-node-list.component.scss index ab14d76697..edc2a7e19c 100644 --- a/lib/content-services/src/lib/tag/tag-node-list.component.scss +++ b/lib/content-services/src/lib/tag/tag-node-list.component.scss @@ -20,7 +20,7 @@ font-size: var(--theme-title-font-size); background-repeat: no-repeat; display: inline-block; - fill: currentColor; + fill: currentcolor; height: 20px; width: 20px; color: var(--theme-primary-color-default-contrast) !important; diff --git a/lib/content-services/src/lib/version-manager/version-list.component.spec.ts b/lib/content-services/src/lib/version-manager/version-list.component.spec.ts index cbb034d72c..de95b2c45d 100644 --- a/lib/content-services/src/lib/version-manager/version-list.component.spec.ts +++ b/lib/content-services/src/lib/version-manager/version-list.component.spec.ts @@ -22,7 +22,7 @@ import { VersionListComponent } from './version-list.component'; import { setupTestBed } from '@alfresco/adf-core'; import { MatDialog } from '@angular/material/dialog'; import { of } from 'rxjs'; -import { Node, VersionPaging, VersionEntry } from '@alfresco/js-api'; +import { Node, VersionPaging, VersionEntry, NodeEntry } from '@alfresco/js-api'; import { ContentTestingModule } from '../testing/content.testing.module'; import { TranslateModule } from '@ngx-translate/core'; import { ContentVersionService } from './content-version.service'; @@ -63,7 +63,7 @@ describe('VersionListComponent', () => { component.node = { id: nodeId, allowableOperations: ['update'] } as Node; spyOn(component, 'downloadContent').and.stub(); - spyOn(component['nodesApi'], 'getNode').and.returnValue(Promise.resolve({ entry: { id: 'nodeInfoId' } })); + spyOn(component['nodesApi'], 'getNode').and.returnValue(Promise.resolve(new NodeEntry({ entry: { id: 'nodeInfoId' } }))); }); it('should raise confirmation dialog on delete', () => { @@ -299,7 +299,7 @@ describe('VersionListComponent', () => { fixture.detectChanges(); tick(); - expect(component.restored.emit).toHaveBeenCalledWith({ id: 'nodeInfoId' }); + expect(component.restored.emit).toHaveBeenCalledWith(new Node({ id: 'nodeInfoId' })); })); it('should reload the version list after a version restore', fakeAsync(() => { diff --git a/lib/content-services/src/test.ts b/lib/content-services/src/test.ts index 968367ccd9..f65cd98c51 100644 --- a/lib/content-services/src/test.ts +++ b/lib/content-services/src/test.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import 'zone.js/dist/zone'; -import 'zone.js/dist/zone-testing'; +import 'zone.js'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, @@ -28,7 +28,9 @@ declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +} ); declare const pdfjsLib: any; diff --git a/lib/content-services/tsconfig.lib.prod.json b/lib/content-services/tsconfig.lib.prod.json index 04c0e66277..2a2faa884c 100644 --- a/lib/content-services/tsconfig.lib.prod.json +++ b/lib/content-services/tsconfig.lib.prod.json @@ -4,6 +4,6 @@ "declarationMap": false }, "angularCompilerOptions": { - "enableIvy": false + "compilationMode": "partial" } } diff --git a/lib/core/.storybook/main.js b/lib/core/.storybook/main.js index 0ba498c521..15262367e2 100644 --- a/lib/core/.storybook/main.js +++ b/lib/core/.storybook/main.js @@ -4,7 +4,7 @@ const rootMain = require('../../../.storybook/main'); module.exports = { ...rootMain, - core: { ...rootMain.core, builder: 'webpack4' }, + core: { ...rootMain.core, builder: 'webpack5' }, stories: [ ...rootMain.stories, diff --git a/lib/core/api/ng-package.json b/lib/core/api/ng-package.json index b22f819668..ed278942e8 100644 --- a/lib/core/api/ng-package.json +++ b/lib/core/api/ng-package.json @@ -1,9 +1,6 @@ { "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", "lib": { - "entryFile": "public-api.ts", - "umdModuleIds": { - "@alfresco/js-api": "@alfresco/js-api" - } + "entryFile": "public-api.ts" } } diff --git a/lib/core/app-config/app-config.service.spec.ts b/lib/core/app-config/app-config.service.spec.ts index c0f1ae26cf..779eb5566d 100644 --- a/lib/core/app-config/app-config.service.spec.ts +++ b/lib/core/app-config/app-config.service.spec.ts @@ -67,7 +67,6 @@ describe('AppConfigService', () => { spyOn(httpClient, 'get').and.returnValue(of(mockResponse)); extensionService = TestBed.inject(ExtensionService); - appConfigService = TestBed.inject(AppConfigService); appConfigService.load(); }); diff --git a/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts b/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts index e1e2e6bd32..e3c7cd1454 100644 --- a/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts +++ b/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.spec.ts @@ -18,7 +18,7 @@ import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { setupTestBed } from '../../../testing/setup-test-bed'; -import moment from 'moment-es6'; +import moment from 'moment'; import { CardViewDateItemModel } from '../../models/card-view-dateitem.model'; import { CardViewUpdateService } from '../../services/card-view-update.service'; import { CardViewDateItemComponent } from './card-view-dateitem.component'; diff --git a/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts b/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts index 2ea33cf062..78ddbb4627 100644 --- a/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts +++ b/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts @@ -17,10 +17,9 @@ import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; -import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepicker } from '@mat-datetimepicker/core'; +import { DatetimeAdapter, MAT_DATETIME_FORMATS, MatDatetimepickerComponent } from '@mat-datetimepicker/core'; import { MAT_MOMENT_DATETIME_FORMATS, MomentDatetimeAdapter } from '@mat-datetimepicker/moment'; -import moment from 'moment-es6'; -import { Moment } from 'moment'; +import moment, { Moment } from 'moment'; import { CardViewDateItemModel } from '../../models/card-view-dateitem.model'; import { CardViewUpdateService } from '../../services/card-view-update.service'; import { UserPreferencesService, UserPreferenceValues } from '../../../services/user-preferences.service'; @@ -60,7 +59,7 @@ export class CardViewDateItemComponent extends BaseCardView; + public datepicker: MatDatetimepickerComponent; valueDate: Moment; dateFormat: string; diff --git a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.html b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.html index b85643b022..137de56463 100644 --- a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.html +++ b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.html @@ -21,9 +21,9 @@ [attr.data-automation-id]="'card-textitem-value-' + property.key">