diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d688119..8a3da73 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -124,7 +124,10 @@ jobs: - name: '[Prep 1] Checkout' uses: actions/checkout@v2 - - name: '[Prep 2] Cache node modules' + - name: '[Prep 2] Validate package.json' + uses: zowe-actions/shared-actions/validate-package-json@main + + - name: '[Prep 3] Cache node modules' uses: actions/cache@v4 with: # npm cache files are stored in `~/.npm` on Linux/macOS @@ -135,17 +138,17 @@ jobs: key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-build-cache-node-modules- - - name: '[Prep 3] Setup Node' + - name: '[Prep 4] Setup Node' uses: actions/setup-node@v2 with: node-version: 22 - - name: '[Prep 4] Setup jFrog CLI' + - name: '[Prep 5] Setup jFrog CLI' uses: jfrog/setup-jfrog-cli@v2 env: JF_ARTIFACTORY_1: ${{ secrets.JF_ARTIFACTORY_TOKEN }} - - name: '[Prep 5] Prepare Workflow' + - name: '[Prep 6] Prepare Workflow' uses: zowe-actions/zlux-builds/plugins/prepare-workflow@v3.x/main with: github-user: ${{ secrets.ZOWE_ROBOT_USER }} @@ -155,28 +158,28 @@ jobs: release: ${{ github.event.inputs.PERFORM_RELEASE }} plugin-version: ${{ github.event.inputs.BUILD_VERSION }} - - name: '[Prep 6] Build' + - name: '[Prep 7] Build' uses: zowe-actions/zlux-builds/plugins/zlux-plugins@v3.x/main with: build-zss: true - - name: '[Prep 7] Packaging' + - name: '[Prep 8] Packaging' uses: zowe-actions/zlux-builds/plugins/make-pax@v3.x/main with: pax-ssh-username: ${{ secrets.SSH_MARIST_USERNAME }} pax-ssh-password: ${{ secrets.SSH_MARIST_RACF_PASSWORD }} pax-name: sample-angular-app - - name: '[Prep 8] Deploy ' + - name: '[Prep 9] Deploy ' uses: zowe-actions/zlux-builds/plugins/deploy-pax@v3.x/main - - name: '[Prep 9] Bump Staging Version ' + - name: '[Prep 10] Bump Staging Version ' if: ${{ github.event.inputs.PERFORM_RELEASE == 'true' && env.RELEASE == 'true' }} uses: zowe-actions/zlux-builds/plugins/bump-version@v3.x/main env: GITHUB_TOKEN: ${{ secrets.ZOWE_ROBOT_TOKEN }} - - name: '[Prep 10] NodeJS project setup' + - name: '[Prep 11] NodeJS project setup' if: ${{ github.event.inputs.PERFORM_RELEASE == 'true' && env.RELEASE == 'true' }} uses: zowe-actions/zlux-builds/plugins/npm-setup@v3.x/main with: @@ -189,6 +192,6 @@ jobs: publish-registry-username: ${{ secrets.NPM_PRIVATE_REGISTRY_USERNAME }} publish-registry-password: ${{ secrets.NPM_PRIVATE_REGISTRY_PASSWORD }} - - name: '[Prep 11] Publish NPM Package ' + - name: '[Prep 12] Publish NPM Package ' if: ${{ github.event.inputs.PERFORM_RELEASE == 'true' && env.RELEASE == 'true' }} uses: zowe-actions/zlux-builds/plugins/npm-publish@v3.x/main diff --git a/build/component/package-lock.json b/build/component/package-lock.json new file mode 100644 index 0000000..f65e3d0 --- /dev/null +++ b/build/component/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "angular-sample", + "version": "3.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "angular-sample", + "version": "3.0.0", + "license": "EPL-2.0" + } + } +} diff --git a/nodeServer/package.json b/nodeServer/package.json index 7ad4f6b..e64153e 100644 --- a/nodeServer/package.json +++ b/nodeServer/package.json @@ -9,8 +9,8 @@ }, "dependencies": {}, "devDependencies": { - "@types/express": "~4.16.0", - "@types/node": "~8.10.23", - "typescript": "~2.9.0" + "@types/express": "4.16.1", + "@types/node": "8.10.49", + "typescript": "2.9.2" } } diff --git a/sample-angular-app.ppf b/sample-angular-app.ppf deleted file mode 100644 index 8e9dd80..0000000 --- a/sample-angular-app.ppf +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/webClient/package-lock.json b/webClient/package-lock.json index 5b19b53..37a4e43 100644 --- a/webClient/package-lock.json +++ b/webClient/package-lock.json @@ -8,36 +8,36 @@ "name": "org.zowe.zlux.sample.angular.webclient", "version": "3.0.1", "devDependencies": { - "@angular-devkit/build-angular": "~18.2.14", - "@angular/animations": "~18.2.14", - "@angular/cli": "~18.2.14", - "@angular/common": "~18.2.14", - "@angular/compiler": "~18.2.14", - "@angular/compiler-cli": "~18.2.14", - "@angular/core": "~18.2.14", - "@angular/forms": "~18.2.14", - "@angular/language-service": "~18.2.14", - "@angular/platform-browser": "~18.2.14", - "@angular/platform-browser-dynamic": "~18.2.14", - "@angular/router": "~18.2.14", - "@ngtools/webpack": "^18.2.14", + "@angular-devkit/build-angular": "18.2.21", + "@angular/animations": "18.2.14", + "@angular/cli": "18.2.21", + "@angular/common": "18.2.14", + "@angular/compiler": "18.2.14", + "@angular/compiler-cli": "18.2.14", + "@angular/core": "18.2.14", + "@angular/forms": "18.2.14", + "@angular/language-service": "18.2.14", + "@angular/platform-browser": "18.2.14", + "@angular/platform-browser-dynamic": "18.2.14", + "@angular/router": "18.2.14", + "@ngtools/webpack": "18.2.21", "@zlux/widgets": "github:zowe/zlux-widgets#v3.x/master", - "angular-l10n": "~17.0.1", - "codelyzer": "~6.0.2", - "compression-webpack-plugin": "~11.0.0", - "copy-webpack-plugin": "~11.0.0", - "core-js": "~3.19.0", - "css-loader": "~6.8.1", - "ngx-i18nsupport": "~0.17.1", - "rxjs": "~7.8.1", - "source-map-loader": "~3.0.0", - "tslib": "~2.6.3", - "tslint": "~6.1.0", - "typescript": "~5.4.5", - "webpack": "~5.92.0", - "webpack-cli": "~5.1.4", - "webpack-config": "~7.5.0", - "zone.js": "~0.14.4" + "angular-l10n": "17.0.1", + "codelyzer": "6.0.2", + "compression-webpack-plugin": "11.0.0", + "copy-webpack-plugin": "11.0.0", + "core-js": "3.19.3", + "css-loader": "6.8.1", + "ngx-i18nsupport": "0.17.1", + "rxjs": "7.8.2", + "source-map-loader": "3.0.2", + "tslib": "2.6.3", + "tslint": "6.1.3", + "typescript": "5.4.5", + "webpack": "5.92.1", + "webpack-cli": "5.1.4", + "webpack-config": "7.5.0", + "zone.js": "0.14.10" } }, "node_modules/@ampproject/remapping": { diff --git a/webClient/package.json b/webClient/package.json index c64d50c..df23694 100644 --- a/webClient/package.json +++ b/webClient/package.json @@ -10,35 +10,35 @@ }, "private": true, "devDependencies": { - "@angular-devkit/build-angular": "~18.2.14", - "@angular/animations": "~18.2.14", - "@angular/cli": "~18.2.14", - "@angular/common": "~18.2.14", - "@angular/compiler": "~18.2.14", - "@angular/compiler-cli": "~18.2.14", - "@angular/core": "~18.2.14", - "@angular/forms": "~18.2.14", - "@angular/language-service": "~18.2.14", - "@angular/platform-browser": "~18.2.14", - "@angular/platform-browser-dynamic": "~18.2.14", - "@angular/router": "~18.2.14", - "@ngtools/webpack": "^18.2.14", + "@angular-devkit/build-angular": "18.2.21", + "@angular/animations": "18.2.14", + "@angular/cli": "18.2.21", + "@angular/common": "18.2.14", + "@angular/compiler": "18.2.14", + "@angular/compiler-cli": "18.2.14", + "@angular/core": "18.2.14", + "@angular/forms": "18.2.14", + "@angular/language-service": "18.2.14", + "@angular/platform-browser": "18.2.14", + "@angular/platform-browser-dynamic": "18.2.14", + "@angular/router": "18.2.14", + "@ngtools/webpack": "18.2.21", "@zlux/widgets": "github:zowe/zlux-widgets#v3.x/master", - "angular-l10n": "~17.0.1", - "codelyzer": "~6.0.2", - "compression-webpack-plugin": "~11.0.0", - "copy-webpack-plugin": "~11.0.0", - "core-js": "~3.19.0", - "css-loader": "~6.8.1", - "ngx-i18nsupport": "~0.17.1", - "rxjs": "~7.8.1", - "source-map-loader": "~3.0.0", - "tslib": "~2.6.3", - "tslint": "~6.1.0", - "typescript": "~5.4.5", - "webpack": "~5.92.0", - "webpack-cli": "~5.1.4", - "webpack-config": "~7.5.0", - "zone.js": "~0.14.4" + "angular-l10n": "17.0.1", + "codelyzer": "6.0.2", + "compression-webpack-plugin": "11.0.0", + "copy-webpack-plugin": "11.0.0", + "core-js": "3.19.3", + "css-loader": "6.8.1", + "ngx-i18nsupport": "0.17.1", + "rxjs": "7.8.2", + "source-map-loader": "3.0.2", + "tslib": "2.6.3", + "tslint": "6.1.3", + "typescript": "5.4.5", + "webpack": "5.92.1", + "webpack-cli": "5.1.4", + "webpack-config": "7.5.0", + "zone.js": "0.14.10" } } diff --git a/webClient/webpack.config.js b/webClient/webpack.config.js index 5c3debe..90be7a3 100644 --- a/webClient/webpack.config.js +++ b/webClient/webpack.config.js @@ -14,6 +14,7 @@ var path = require('path'); var webpackConfig = require('webpack-config'); var CopyWebpackPlugin = require('copy-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); const { AngularWebpackPlugin } = require('@ngtools/webpack'); if (process.env.MVD_DESKTOP_DIR == null) { @@ -46,7 +47,8 @@ var config = { }), new CompressionPlugin({ threshold: 100000, - minRatio: 0.8 + minRatio: 0.8, + deleteOriginalAssets: true }), new AngularWebpackPlugin({ tsConfigPath: './tsconfig.json', @@ -55,6 +57,18 @@ var config = { ] }; +config.optimization = { + minimizer: [ + new TerserPlugin({ + extractComments: { + condition: /^\**!|@preserve|@license|@cc_on/i, + filename: 'ATTRIBUTION.txt', + banner: false + } + }) + ] +}; + module.exports = new webpackConfig.Config() .extend(path.resolve(process.env.MVD_DESKTOP_DIR, 'plugin-config/webpack5.base.js')) .merge(config); diff --git a/zssServer/build/build31.sh b/zssServer/build/build31.sh index dfff825..2d9db6b 100755 --- a/zssServer/build/build31.sh +++ b/zssServer/build/build31.sh @@ -10,7 +10,7 @@ ################################################################################ export _C89_ACCEPTABLE_RC=0 WORKDIR=$(dirname "$0") -TMP="${WORKDIR}/tmp" +TMP="${WORKDIR}/tmp-sample-angular" mkdir "${TMP}" 2>/dev/null cd "${TMP}" || exit 8 @@ -42,6 +42,7 @@ then echo "${TARGET_ABS} - build failed" RC=8 else + rm -rf "${TMP}" echo "${TARGET_ABS} - build successful" extattr +p "${TARGET}" RC=0 diff --git a/zssServer/build/build64.sh b/zssServer/build/build64.sh index 5843978..500241d 100755 --- a/zssServer/build/build64.sh +++ b/zssServer/build/build64.sh @@ -10,7 +10,7 @@ ################################################################################ export _C89_ACCEPTABLE_RC=0 WORKDIR=$(dirname "$0") -TMP="${WORKDIR}/tmp" +TMP="${WORKDIR}/tmp-sample-angular" mkdir "${TMP}" 2>/dev/null cd "${TMP}" || exit 8 @@ -42,6 +42,7 @@ then echo "${TARGET_ABS} - build failed" RC=8 else + rm -rf "${TMP}" echo "${TARGET_ABS} - build successful" extattr +p "${TARGET}" RC=0