diff --git a/.travis.yml b/.travis.yml index b1bc721d93..15184c95cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,7 @@ jobs: - stage: Check bundle script: - ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version) - - ./scripts/npm-check-bundles.sh -v ${ADF_VERSION} + - ./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION} - stage: Trigger ADF child build diff --git a/demo-shell/README.md b/demo-shell/README.md index 60237d7b1d..f2aed2eecb 100644 --- a/demo-shell/README.md +++ b/demo-shell/README.md @@ -59,7 +59,7 @@ This script is recommended for development environment and not suited for headle ```sh npm run build -npm run start:dist +npm run start:prod ``` This command builds project in `production` mode. @@ -68,8 +68,8 @@ You should need no additional files outside the `dist` folder. ## Development branch build -If you want to run the demo shell with the latest changes from the development branch, use the following command from the /script folder: +If you want to run the demo shell with the latest changes from the development branch, use the following command : ```sh -npm run start:dev +npm run start ``` diff --git a/lib/core/viewer/components/viewer.component.ts b/lib/core/viewer/components/viewer.component.ts index cc7d0721d7..af5263eee2 100644 --- a/lib/core/viewer/components/viewer.component.ts +++ b/lib/core/viewer/components/viewer.component.ts @@ -243,14 +243,15 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { }; constructor(private apiService: AlfrescoApiService, - private viewUtils: ViewUtilService, + private viewUtilService: ViewUtilService, private logService: LogService, private extensionService: AppExtensionService, private el: ElementRef) { + viewUtilService.maxRetries = this.maxRetries; } isSourceDefined(): boolean { - return (this.urlFile || this.blobFile || this.nodeId || this.sharedLinkId) ? true : false; + return !!(this.urlFile || this.blobFile || this.nodeId || this.sharedLinkId); } ngOnInit() { @@ -261,12 +262,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { ); this.subscriptions.push( - this.viewUtils.viewerTypeChange.subscribe((type: string) => { + this.viewUtilService.viewerTypeChange.subscribe((type: string) => { this.viewerType = type; }) ); this.subscriptions.push( - this.viewUtils.urlFileContentChange.subscribe((content: string) => { + this.viewUtilService.urlFileContentChange.subscribe((content: string) => { this.urlFileContent = content; }) ); @@ -410,9 +411,9 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { if (this.viewerType === 'unknown') { if (versionData) { - setupNode = this.viewUtils.displayNodeRendition(nodeData.id, versionData.id); + setupNode = this.viewUtilService.displayNodeRendition(nodeData.id, versionData.id); } else { - setupNode = this.viewUtils.displayNodeRendition(nodeData.id); + setupNode = this.viewUtilService.displayNodeRendition(nodeData.id); } } @@ -620,7 +621,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { this.print.next(args); if (!args.defaultPrevented) { - this.viewUtils.printFileGeneric(this.nodeId, this.mimeType); + this.viewUtilService.printFileGeneric(this.nodeId, this.mimeType); } } } diff --git a/package-lock.json b/package-lock.json index 0334caab07..9751137732 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "alfresco-ng2-components", - "version": "4.1.0", + "version": "4.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -7110,27 +7110,27 @@ "dev": true }, "browser-sync": { - "version": "2.26.12", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.12.tgz", - "integrity": "sha512-1GjAe+EpZQJgtKhWsxklEjpaMV0DrRylpHRvZWgOphDQt+bfLZjfynl/j1WjSFIx8ozj9j78g6Yk4TqD3gKaMA==", + "version": "2.26.14", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.14.tgz", + "integrity": "sha512-3TtpsheGolJT6UFtM2CZWEcGJmI4ZEvoCKiKE2bvcDnPxRkhQT4nIGVtfiyPcoHKXGM0LwMOZmYJNWfiNfVXWA==", "dev": true, "requires": { - "browser-sync-client": "^2.26.12", - "browser-sync-ui": "^2.26.12", + "browser-sync-client": "^2.26.14", + "browser-sync-ui": "^2.26.14", "bs-recipes": "1.3.4", "bs-snippet-injector": "^2.0.1", - "chokidar": "^3.4.1", + "chokidar": "^3.5.1", "connect": "3.6.6", "connect-history-api-fallback": "^1", "dev-ip": "^1.0.1", "easy-extender": "^2.3.4", - "eazy-logger": "^3", + "eazy-logger": "3.1.0", "etag": "^1.8.1", "fresh": "^0.5.2", "fs-extra": "3.0.1", "http-proxy": "^1.18.1", "immutable": "^3", - "localtunnel": "^2.0.0", + "localtunnel": "^2.0.1", "micromatch": "^4.0.2", "opn": "5.3.0", "portscanner": "2.1.1", @@ -7142,7 +7142,7 @@ "serve-index": "1.9.1", "serve-static": "1.13.2", "server-destroy": "1.0.1", - "socket.io": "2.1.1", + "socket.io": "2.4.0", "ua-parser-js": "^0.7.18", "yargs": "^15.4.1" }, @@ -7154,27 +7154,36 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -7195,12 +7204,6 @@ "color-name": "~1.1.4" } }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, "connect": { "version": "3.6.6", "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", @@ -7214,9 +7217,9 @@ } }, "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", "dev": true }, "debug": { @@ -7235,45 +7238,51 @@ "dev": true }, "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", + "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", "dev": true, "requires": { "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true } } }, "engine.io-client": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.0.tgz", + "integrity": "sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA==", "dev": true, "requires": { - "component-emitter": "1.2.1", + "component-emitter": "~1.3.0", "component-inherit": "0.0.3", "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", + "engine.io-parser": "~2.2.0", "has-cors": "1.1.0", "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", "xmlhttprequest-ssl": "~1.5.4", "yeast": "0.1.2" }, @@ -7289,19 +7298,6 @@ } } }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } - }, "finalhandler": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", @@ -7338,6 +7334,13 @@ "universalify": "^0.1.0" } }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -7430,6 +7433,18 @@ "p-limit": "^2.2.0" } }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -7442,11 +7457,14 @@ "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", "dev": true }, - "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==", - "dev": true + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } }, "send": { "version": "0.16.2", @@ -7496,49 +7514,52 @@ "dev": true }, "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.0.tgz", + "integrity": "sha512-9UPJ1UTvKayuQfVv2IQ3k7tCQC/fboDyIK62i99dAQIyHKaBsNdTpwHLgKJ6guRWxRtC9H+138UwpaGuQO9uWQ==", "dev": true, "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", + "debug": "~4.1.0", + "engine.io": "~3.5.0", "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" + "socket.io-client": "2.4.0", + "socket.io-parser": "~3.4.0" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true } } }, "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", + "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", "dev": true, "requires": { "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", - "component-emitter": "1.2.1", + "component-emitter": "~1.3.0", "debug": "~3.1.0", - "engine.io-client": "~3.2.0", + "engine.io-client": "~3.5.0", "has-binary2": "~1.0.2", - "has-cors": "1.1.0", "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", "to-array": "0.1.4" }, "dependencies": { @@ -7550,27 +7571,16 @@ "requires": { "ms": "2.0.0" } - } - } - }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + }, + "socket.io-parser": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", + "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", "dev": true, "requires": { - "ms": "2.0.0" + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" } } } @@ -7613,20 +7623,15 @@ } }, "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", + "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==", + "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { @@ -7661,9 +7666,9 @@ } }, "browser-sync-client": { - "version": "2.26.12", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.12.tgz", - "integrity": "sha512-bEBDRkufKxrIfjOsIB1FN9itUEXr2oLtz1AySgSSr80K2AWzmtoYnxtVASx/i40qFrSdeI31pNvdCjHivihLVA==", + "version": "2.26.14", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.14.tgz", + "integrity": "sha512-be0m1MchmKv/26r/yyyolxXcBi052aYrmaQep5nm8YNMjFcEyzv0ZoOKn/c3WEXNlEB/KeXWaw70fAOJ+/F1zQ==", "dev": true, "requires": { "etag": "1.8.1", @@ -7690,17 +7695,107 @@ } }, "browser-sync-ui": { - "version": "2.26.12", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.26.12.tgz", - "integrity": "sha512-PkAJNf/TfCFTCkQUfXplR2Kp/+/lbCWFO9lrgLZsmxIhvMLx2pYZFBbTBIaem8qjXhld9ZcESUC8EdU5VWFJgQ==", + "version": "2.26.14", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.26.14.tgz", + "integrity": "sha512-6oT1sboM4KVNnWCCJDMGbRIeTBw97toMFQ+srImvwQ6J5t9KMgizaIX8HcKLiemsUMSJkgGM9RVKIpq2UblgOA==", "dev": true, "requires": { "async-each-series": "0.1.1", "connect-history-api-fallback": "^1", "immutable": "^3", "server-destroy": "1.0.1", - "socket.io-client": "^2.0.4", + "socket.io-client": "^2.4.0", "stream-throttle": "^0.1.3" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "engine.io-client": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.0.tgz", + "integrity": "sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + }, + "socket.io-client": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", + "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + } + }, + "socket.io-parser": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", + "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } + }, + "ws": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", + "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==", + "dev": true + } } }, "browserify-aes": { @@ -10370,6 +10465,12 @@ "path-type": "^4.0.0" } }, + "dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, "dns-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", @@ -10569,12 +10670,12 @@ } }, "eazy-logger": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.0.2.tgz", - "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.1.0.tgz", + "integrity": "sha512-/snsn2JqBtUSSstEl4R0RKjkisGHAhvYj89i7r3ytNUKW12y178KDZwXLXIgwDqLW6E/VRMT9qfld7wvFae8bQ==", "dev": true, "requires": { - "tfunk": "^3.0.1" + "tfunk": "^4.0.0" } }, "ecc-jsbn": { @@ -15549,24 +15650,16 @@ } }, "lite-server": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/lite-server/-/lite-server-2.5.4.tgz", - "integrity": "sha512-57SverS67UqRFiRm0ktdzEG5yZeyzkywRJ9Q8PHVSGuLm9K97Mr6jF43XTu5v9lVe8g0WHJ4eKlIeGSd1Bq/sw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/lite-server/-/lite-server-2.6.1.tgz", + "integrity": "sha512-d3oyB/C8AU4EwYQHlLxcu6vTQDnCaLb81v1KKNYABmFS5oeJ11A+YxlqtpbTclID1AFddJfcB5klf0q98vYIMw==", "dev": true, "requires": { - "browser-sync": "^2.26.7", - "connect-history-api-fallback": "^1.2.0", - "connect-logger": "0.0.1", - "lodash": "^4.17.15", - "minimist": "1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } + "browser-sync": "^2.26.13", + "connect-history-api-fallback": "^1.6.0", + "connect-logger": "^0.0.1", + "lodash": "^4.17.20", + "minimist": "^1.2.5" } }, "load-json-file": { @@ -15607,103 +15700,24 @@ } }, "localtunnel": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.0.tgz", - "integrity": "sha512-g6E0aLgYYDvQDxIjIXkgJo2+pHj3sGg4Wz/XP3h2KtZnRsWPbOQY+hw1H8Z91jep998fkcVE9l+kghO+97vllg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.1.tgz", + "integrity": "sha512-LiaI5wZdz0xFkIQpXbNI62ZnNn8IMsVhwxHmhA+h4vj8R9JG/07bQHWwQlyy7b95/5fVOCHJfIHv+a5XnkvaJA==", "dev": true, "requires": { - "axios": "0.19.0", - "debug": "4.1.1", + "axios": "0.21.1", + "debug": "4.3.1", "openurl": "1.1.1", - "yargs": "13.3.0" + "yargs": "16.2.0" }, "dependencies": { - "axios": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", - "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "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==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "ms": "2.1.2" } } } @@ -25508,13 +25522,13 @@ } }, "tfunk": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", - "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-4.0.0.tgz", + "integrity": "sha512-eJQ0dGfDIzWNiFNYFVjJ+Ezl/GmwHaFTBTjrtqNPW0S7cuVDBrZrmzUz6VkMeCR4DZFqhd4YtLwsw3i2wYHswQ==", "dev": true, "requires": { - "chalk": "^1.1.1", - "object-path": "^0.9.0" + "chalk": "^1.1.3", + "dlv": "^1.1.3" }, "dependencies": { "ansi-regex": { @@ -25542,12 +25556,6 @@ "supports-color": "^2.0.0" } }, - "object-path": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", - "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", - "dev": true - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -26385,9 +26393,9 @@ "dev": true }, "ua-parser-js": { - "version": "0.7.21", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", - "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==", + "version": "0.7.23", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.23.tgz", + "integrity": "sha512-m4hvMLxgGHXG3O3fQVAyyAQpZzDOvwnhOTjYz5Xmr7r/+LpkNy3vJXdVRWgd1TkAb7NGROZuSy96CrlNVjA7KA==", "dev": true }, "uc.micro": { @@ -26403,12 +26411,6 @@ "dev": true, "optional": true }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/package.json b/package.json index 4d3039142f..027c3f2a7e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "alfresco-ng2-components", "commit": "b644b39d17396330d2a67509f58c5b9e890b9b13", "description": "Alfresco Angular components", - "version": "4.1.0", + "version": "4.2.0", "author": "Alfresco Software, Ltd.", "main": "./index.js", "scripts": { @@ -144,7 +144,7 @@ "karma-mocha-reporter": "2.2.5", "license-checker": "^25.0.1", "lint-staged": "^10.5.1", - "lite-server": "^2.5.4", + "lite-server": "^2.6.1", "markdownlint-cli": "^0.26.0", "mdast": "^3.0.0", "mdast-util-compact": "^3.0.0", diff --git a/scripts/README.md b/scripts/README.md index ca1c761fc3..e9c3627967 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,8 +1,6 @@ ## Running a demo project - -- [Quick examples](#quick-examples) -- [start.sh Demo shell script](#start.sh) +- [start demo shell](#Start-Demo-Shell) The Alfresco application development framework comes with a demo project that you can run to get a feel of what's available. @@ -14,110 +12,6 @@ feel of what's available. cd scripts ``` -# Quick examples developed with ADF - -* Start the demo shell using the JS-API from the development branch and the local component in the lib folder - -```sh -./start.sh -dev -gitjsapi development -``` - -# start.sh - -***start.sh*** script provide an easy way to deal with the npm command and the correct sequence to run the task on demo-shell during development phases. - -## Options - -The default behaviour of the ***start.sh*** script always runs the install and the start of the demo shell on the port 3000, but with some of the options below this behaviour can be changed. -All the commands before can be used in combination - -| Option | Description | -| --- | --- | -| -h or --help | show the help | -| -u or --update | run the update of the node_modules packages on the demo shell | -| -c or --clean | clean the demo shell folder before starting it | -| -t or --test | run the tests on the demo-shell | -| --e2e | execute e2e test | -| -r or --registry | Start the demo using an alternative npm registry | -| -v or --version | Use the version defined in the pacakge.json . Download from npm and Install a different version of the lib (this option is not compatible with -dev) | -| -si or --skipinstall | skip the install of the node_modules | -| -ss or --skipstart | skip the start of the demo shell and only build it providing a dist folder in the relative demo-shell folder | -| -dev or --develop | Start the demo in development mode building the relative folder lib with all the components and pointing to those components instead of the lib present in the node_modules folder | -| -dist | Start the demo shell using a light server and the files built in the dist folder, particular useful to test the final result of the project | -| -gitjsapi | Start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API | -| -vjsapi | Use the version defined in the pacakge.json. Download from npm and install a different version of JS-API | - - -## Examples - -* Start the demo and install all the dependencies - -```sh -./start.sh -``` - -* Start the demo, install all the dependencies, and remove the previous version of the npm packages (*Note. do this only after big changes*): - -```sh -./start.sh -c -``` - -* Start the demo using an alternative npm registry - -```sh -./start.sh -registry 'http://npm.local.me:8080/' -``` - -* Start the demo and update the dependencies: - -```sh -./start.sh -update or -u -``` - -* Use instead the version defined in the pacakge.json. Download from npm and install a different version of the lib (this option is not compatible with -dev) | - -```sh -./start.sh -version or -v COMPONENTS_VERSION - -./start.sh -v 1.4.0 -``` - -* Start the demo in development mode building the relative folder lib with all the components and pointing to this component instead of the node_modules one - -```sh -./start.sh -develop or -dev -``` - -* Start the demo shell using a light server using the files built in the dist folder - -```sh -./start.sh -dist -``` - -* Start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API - -```sh -./start.sh -gitjsapi commit-ish - -./start.sh -gitjsapi development - -./start.sh -gitjsapi de92be966e2ce7eca642ca9e9d7647ba4f849356 -``` - -* Start the alfresco-js-api against a commit-ish version of the JS-API - -```sh -./start.sh -vjsapi 1.4.0 - -``` - -* Run the Demo shell tests - -```sh -./start.sh -t - -``` - ***npm-check-bundles.sh*** check the bundles in the package npm are present ## Options diff --git a/scripts/clean-env.js b/scripts/clean-env.js deleted file mode 100644 index 650efc3974..0000000000 --- a/scripts/clean-env.js +++ /dev/null @@ -1,106 +0,0 @@ -let alfrescoApi = require('@alfresco/js-api'); -let program = require('commander'); - -async function main() { - - program - .version('0.1.0') - .option('--host [type]', 'Remote environment host adf.lab.com ') - .option('-p, --password [type]', 'password RANCHER') - .option('-u, --username [type]', 'username RANCHER') - .parse(process.argv); - - const alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({ - provider: 'ECM', - hostEcm: program.host - }); - - try { - await alfrescoJsApi.login(program.username, program.password); - } catch (error) { - console.log(JSON.stringify(error)); - } - - console.log('====== Clean Root ======'); - await cleanRoot(alfrescoJsApi); - - console.log('====== Clean Sites ======'); - await deleteSite(alfrescoJsApi); - - console.log('====== Empty Trash ======'); - await emptyTrashCan(alfrescoJsApi); -} - -async function cleanRoot(alfrescoJsApi) { - - let rootNodes = await alfrescoJsApi.core.nodesApi.getNodeChildren('-root-', { - include: ['properties'] - }); - - for (let i = 0; i < rootNodes.list.entries.length; i++) { - - sleep(200); - - if (rootNodes.list.entries[i].entry.createdByUser.id !== 'System') { - - try { - await alfrescoJsApi.core.nodesApi.deleteNode(rootNodes.list.entries[i].entry.id); - } catch (error) { - console.log('error' + JSON.stringify(error)); - - } - } - } -} - -async function emptyTrashCan(alfrescoJsApi) { - let deletedNodes = await alfrescoJsApi.core.nodesApi.getDeletedNodes(); - - if (deletedNodes.list.entries.length > 0) { - for (let i = 0; i < deletedNodes.list.entries.length; i++) { - - sleep(200); - - console.log(deletedNodes.list.entries[i].entry.id); - - try { - await alfrescoJsApi.core.nodesApi.purgeDeletedNode(deletedNodes.list.entries[i].entry.id); - } catch (error) { - console.log('error' + JSON.stringify(error)); - } - } - - emptyTrashCan(alfrescoJsApi); - } -} - -async function deleteSite(alfrescoJsApi) { - let listSites = alfrescoJsApi.core.sitesApi.getSites(); - - if (listSites.list.pagination.totalItems > 1) { - for (let i = 0; i < listSites.list.entries.length; i++) { - - sleep(200); - - console.log(listSites.list.entries[i].entry.id); - - if (listSites.list.entries[i].entry.id !== 'swsdp') { - try { - await alfrescoJsApi.core.sitesApi.deleteSite(listSites.list.entries[i].entry.id, {options: {permanent: true}}); - } catch (error) { - console.log('error' + JSON.stringify(error)); - - } - } - } - - deleteSite(alfrescoJsApi); - } -} - -function sleep(delay) { - var start = new Date().getTime(); - while (new Date().getTime() < start + delay) ; -} - -main(); diff --git a/scripts/next_version.sh b/scripts/next_version.sh index 64ad3957c4..5b30f5efe1 100755 --- a/scripts/next_version.sh +++ b/scripts/next_version.sh @@ -78,8 +78,7 @@ fi if [[ "${EXEC_ALPHA}" == true ]] then - ISH_KEY=$(git rev-parse HEAD) - NEXT_VERSION=${NEXT_VERSION}-${ISH_KEY} + NEXT_VERSION=${NEXT_VERSION}-${TRAVIS_BUILD_NUMBER} fi if [[ "${EXEC_BETA}" == true ]] diff --git a/scripts/npm-move-tag.sh b/scripts/npm-move-tag.sh deleted file mode 100644 index 0e476fd40f..0000000000 --- a/scripts/npm-move-tag.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -eval projects=( - "@alfresco/adf-cli" - "@alfresco/adf-core" - "@alfresco/adf-content-services" - "@alfresco/adf-insights" - "@alfresco/adf-process-services" - "@alfresco/adf-process-services-cloud" - "@alfresco/adf-testing" - "@alfresco/adf-extensions" ) - -show_help() { - echo "Usage: npm-move-tag.sh" - echo "" - echo "-v version package to apply new tag" - echo "-t new tag name to add" -} - -new_tag(){ - eval TAG=$1 -} - -package_version(){ - eval PACKAGE_VERSION=$1 -} - -while [[ $1 == -* ]]; do - case "$1" in - -h|--help|-\?) show_help; exit 0;; - -t|--tag) new_tag $2; shift 2;; - -v) package_version $2; shift 2;; - -*) echo "invalid option: $1" 1>&2; show_help; exit 0;; - esac -done - -for PACKAGE in ${projects[@]} -do - echo "====== Move ${PACKAGE}@${PACKAGE_VERSION} to tag ${TAG}===== " - echo "====== command npm dist-tag add ${PACKAGE}@${PACKAGE_VERSION} ${TAG}===== " - npm dist-tag add ${PACKAGE}@${PACKAGE_VERSION} ${TAG} -done diff --git a/scripts/start.sh b/scripts/start.sh deleted file mode 100755 index 9968bc13bc..0000000000 --- a/scripts/start.sh +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -eval EXEC_INSTALL=false -eval EXEC_UPDATE=false -eval EXEC_CLEAN=false -eval EXEC_DEVELOP=false -eval EXEC_VERSION=false -eval EXEC_DIST=false -eval EXEC_GIT_NPM_INSTALL_JSAPI=false -eval EXEC_VERSION_JSAPI=false -eval EXEC_START=true -eval EXEC_TEST=false -eval EXEC_E2E=false -eval JSAPI_VERSION="" -eval NG2_COMPONENTS_VERSION="" -eval GIT_ISH="" - -eval projects=( "@alfresco/core" - "@alfresco/content-service" - "@alfresco/process-service" - "@alfresco/process-service-cloud" - "@alfresco/extensions" ) - -show_help() { - echo "Usage: start.sh" - echo "" - echo "-ss or --skipstart build only the demo shell without start" - echo "-si or --skipinstall start the demo shell and skip the install the dependencies" - echo "-dev or --develop start the demo shell using the relative lib folder to link the components" - echo "-dist build or start the demo shell in dist mode" - echo "-t or --test execute test" - echo "--e2e execute e2e test" - echo "-u or --update start the demo shell and update the dependencies" - echo "-c or --clean clean the demo shell and reinstall the dependencies" - echo "-r or --registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' " - echo "-v or --version install different version of ng2_components from npm defined in the package.json this option is not compatible with -d" - echo "-gitjsapi to build all the components against a commit-ish version of the JS-API" - echo "-vjsapi install different version from npm of JS-API defined in the package.json" -} - -install() { - EXEC_INSTALL=false -} - -update() { - EXEC_UPDATE=true -} - -develop() { - EXEC_DEVELOP=true -} - -enable_dist() { - EXEC_DIST=true -} - -disable_start() { - EXEC_START=false -} - -enable_test() { - EXEC_TEST=true -} - -enable_e2e() { - EXEC_E2E=true -} - -enable_js_api_git_link() { - GIT_ISH='git+https://github.com/Alfresco/alfresco-js-api.git#'$1 - EXEC_GIT_NPM_INSTALL_JSAPI=true -} - -version_component() { - NG2_COMPONENTS_VERSION=$1 - - if [[ "${NG2_COMPONENTS_VERSION}" == "" ]] - then - echo "NG2 components version required with -v | -version" - exit 0 - fi - - EXEC_VERSION=true -} - -version_js_api() { - JSAPI_VERSION=$1 - - if [[ "${JSAPI_VERSION}" == "" ]] - then - echo "JSAPI version required with -vJSApi" - exit 0 - fi - - EXEC_VERSION_JSAPI=true -} - -change_registry(){ - NPM_REGISTRY=$1 - - if [[ "${NPM_REGISTRY}" == "" ]] - then - echo "NPM registry required WITH OPTION -r | -registry" - exit 0 - fi - - echo "====== CHANGE REGISTRY: ${NPM_REGISTRY} =====" - npm config set registry ${NPM_REGISTRY} -} - -clean() { - EXEC_CLEAN=true - EXEC_INSTALL=true -} - -while [[ $1 == -* ]]; do - case "$1" in - -h|--help|-\?) show_help; exit 0;; - -u|--update) update; shift;; - -c|--clean) clean; shift;; - -t|--test) enable_test; shift;; - --e2e) enable_e2e; shift;; - -r|--registry) change_registry $2; shift 2;; - -v|--version) version_component $2; shift 2;; - -si|--skipinstall) install; shift;; - -ss|--skipstart) disable_start; shift;; - -dev|--develop) develop; shift;; - -dist) enable_dist; shift;; - -gitjsapi) enable_js_api_git_link $2; shift 2;; - -vjsapi) version_js_api $2; shift 2;; - -*) echo "invalid option: $1" 1>&2; show_help; exit 0;; - esac -done - -cd "$DIR/.." - -if $EXEC_CLEAN == true; then - echo "====== Clean Demo shell =====" - npm install rimraf - npm run clean -fi - -if $EXEC_INSTALL == true; then - echo "====== Install Demo shell =====" - npm install -fi - -if $EXEC_VERSION == true; then - echo "====== Install version "${NG2_COMPONENTS_VERSION}" of components =====" - - if [[ "${EXEC_DEVELOP}" == "" ]] - then - echo "Option -v is not compatible with -d see the help" - exit 0 - fi - - for PACKAGE in ${projects[@]} - do - npm install ${PACKAGE}@${NG2_COMPONENTS_VERSION} - done -fi - -if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then - echo "====== Use the alfresco JS-API '$GIT_ISH'=====" - npm install $GIT_ISH --no-save - cd "$DIR/../demo-shell/node_modules/alfresco-js-api" - npm install -fi - -if $EXEC_VERSION_JSAPI == true; then - echo "====== Use the alfresco JS-API '$JSAPI_VERSION'=====" - npm install alfresco-js-api@${JSAPI_VERSION} -fi - -if [ -f "./.env" ]; then - export $(cat .env | xargs) -fi - -if $EXEC_START == true; then - if $EXEC_DIST == true; then - echo "====== Start Demo shell dist mode =====" - npm run start:prod - else - echo "====== Start Demo shell =====" - npm run start - fi -else - if $EXEC_DEVELOP == true; then - echo "====== Build Demo shell dev mode =====" - npm run build - else - echo "====== Build Demo shell =====" - npm run build:prod - fi -fi - - diff --git a/scripts/test-e2e-lib.sh b/scripts/test-e2e-lib.sh index d6491aa81f..7edb9e26f9 100755 --- a/scripts/test-e2e-lib.sh +++ b/scripts/test-e2e-lib.sh @@ -6,7 +6,6 @@ BROWSER_RUN=false DEVELOPMENT=false LITESERVER=false EXEC_VERSION_JSAPI=false -TIMEOUT=120000 DEBUG=false show_help() { @@ -26,12 +25,10 @@ show_help() { echo "-host or --host URL of the Front end to test" echo "-host_sso the entire path including the name of the realm" echo "-save save the error screenshot and report in the remote env" - echo "-timeout or --timeout override the timeout foe the wait utils" echo "-m --maxInstances max instances parallel for tests" echo "-log or --log print all the browser log" echo "-db or --debug run the debugger" echo "-ud run dist" - echo "-vjsapi install different version from npm of JS-API defined in the package.json" echo "-h or --help" } @@ -82,10 +79,6 @@ set_proxy(){ export PROXY_HOST_ADF=$PROXY } -set_timeout(){ - TIMEOUT=$1 -} - set_save_screenshot(){ mkdir -p ./e2e-output/junit-report export SAVE_SCREENSHOT=true @@ -126,18 +119,6 @@ max_instances(){ export MAXINSTANCES=$1 } -version_js_api() { - JSAPI_VERSION=$1 - - if [[ "${JSAPI_VERSION}" == "" ]] - then - echo "JSAPI version required with -vJSApi" - exit 0 - fi - - EXEC_VERSION_JSAPI=true -} - while [[ $1 == -* ]]; do case "$1" in -h|--help|-\?) show_help; exit 0;; @@ -146,7 +127,6 @@ while [[ $1 == -* ]]; do -identity_admin_email) set_identity_admin_email $2; shift 2;; -identity_admin_password) set_identity_admin_password $2; shift 2;; -f|--folder) set_test_folder $2; shift 2;; - -timeout|--timeout) set_timeout $2; shift 2;; -b|--browser) set_browser; shift;; -env|--env) set_env $2; shift 2;; -dev|--dev) set_development; shift;; @@ -161,7 +141,6 @@ while [[ $1 == -* ]]; do -log|--log) set_log; shift ;; -host_sso|--host_sso) set_host_sso $2; shift 2;; -m|--maxInstances) max_instances $2; shift 2;; - -vjsapi) version_js_api $2; shift 2;; -*) echo "invalid option: $1" 1>&2; show_help; exit 1;; esac done @@ -169,13 +148,6 @@ done rm -rf ./e2e/downloads/ rm -rf ./e2e-output/ -export TIMEOUT=$TIMEOUT - -if $EXEC_VERSION_JSAPI == true; then - echo "====== Use the alfresco JS-API '$JSAPI_VERSION'=====" - npm install alfresco-js-api@${JSAPI_VERSION} -fi - echo "====== Update webdriver-manager =====" if [ "$CI" = "true" ]; then export chrome=$(google-chrome --product-version) diff --git a/scripts/travis/build/build.sh b/scripts/travis/build/build.sh index 92e34cbb06..9804a54bbc 100755 --- a/scripts/travis/build/build.sh +++ b/scripts/travis/build/build.sh @@ -25,11 +25,6 @@ then node ./scripts/pre-publish.js npm install -else - echo "====== Update the package.json with latest JS-API/CLI deps =====" - npx @alfresco/adf-cli@alpha update-version --alpha --pathPackage "$(pwd)" - npm install; -# nx affected --target=build --base=$BASE_HASH --head=$HEAD_HASH --exclude="cli,demoshell" --prod --with-deps || exit 1; TODO comment out when affected is fixe fi; ./scripts/build/build-all-lib.sh diff --git a/scripts/npm-check-bundles.sh b/scripts/travis/build/npm-check-bundles.sh similarity index 100% rename from scripts/npm-check-bundles.sh rename to scripts/travis/build/npm-check-bundles.sh diff --git a/scripts/update-version.sh b/scripts/update-version.sh index b97d0eebca..c1dbf777b0 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -26,9 +26,7 @@ projectslength=${#projects[@]} show_help() { echo "Usage: update-version.sh" echo "" - echo "-sj or -sjsapi don't update js-api version" echo "-vj or -versionjsapi to use a different version of js-api" - echo "-components execute the change version only in the components " echo "-v or -version version to update" echo "-major increase the major number and reset minor and patch" echo "-minor increase the minor number and reset the patch number" @@ -40,22 +38,12 @@ show_help() { echo "-gnu for gnu" } -skip_js() { - echo "====== Skip JS-API change version $1 =====" - JS_API=false -} - last_alpha_mode() { length=`expr $projectslength - 1` echo "====== Auto find last ALPHA version of ${projects[${length}]} =====" VERSION=$(npm view @alfresco/adf-${projects[${length}]}@alpha version) echo "====== version lib ${VERSION} =====" - - DIFFERENT_JS_API=true - VERSION_JS_API=$(npm view @alfresco/js-api@alpha version) - - echo "====== version js-api ${DIFFERENT_JS_API} =====" } next_alpha_mode() { @@ -63,11 +51,7 @@ next_alpha_mode() { VERSION=$(./next_version.sh -${SEMANTIC} -alpha) echo "====== version lib ${VERSION} =====" - - DIFFERENT_JS_API=true - VERSION_JS_API=$(npm view @alfresco/js-api@alpha version) - - echo "====== version js-api ${DIFFERENT_JS_API} =====" + JS_API=false } next_beta_mode() { @@ -75,11 +59,7 @@ next_beta_mode() { VERSION=$(./next_version.sh -${SEMANTIC} -beta) echo "====== version lib ${VERSION} =====" - - DIFFERENT_JS_API=true - VERSION_JS_API=$(npm view @alfresco/js-api@alpha version) - - echo "====== version js-api ${DIFFERENT_JS_API} =====" + JS_API=false } last_beta_mode() { @@ -115,12 +95,6 @@ version_js_change() { DIFFERENT_JS_API=true } -only_components() { - echo "====== UPDATE Only the components =====" - TOTAL_BUILD=false -} - - update_component_version() { echo "====== UPDATE PACKAGE VERSION of ${PACKAGE} to ${VERSION} version in all the package.json ======" DESTDIR="$DIR/../lib/${1}" @@ -201,7 +175,6 @@ while [[ $1 == -* ]]; do -nextalpha) next_alpha_mode; shift;; -beta) last_beta_mode; shift;; -nextbeta) next_beta_mode; shift;; - -components) only_components; shift;; -*) shift;; esac done @@ -240,11 +213,7 @@ do fi done -if $TOTAL_BUILD; then - echo "====== UPDATE TOTAL BUILD======" - - update_total_build_dependency_version -fi +update_total_build_dependency_version if $JS_API == true; then if $DIFFERENT_JS_API == true; then