diff --git a/package.json b/package.json index 0c168077a3..93361b23b4 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "rimraf": "^3.0.2", "terser-webpack-plugin": "^5.3.10", "ts-jest": "^29.0.3", - "tsconfig-paths-webpack-plugin": "^4.1.0", "tsx": "^4.9.3", "typescript": "^5.3.3", "webpack": "^5.89.0", diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index 39f9afafbc..afaa3f30ff 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -12,6 +12,12 @@ "provenance": true }, "main": "lib/index.js", + "exports": { + ".": { + "@zowe:bundler": "./src/index.ts", + "default": "./lib/index.js" + } + }, "files": [ "lib" ], diff --git a/packages/zowe-explorer-ftp-extension/webpack.config.js b/packages/zowe-explorer-ftp-extension/webpack.config.js index 1c933bb49a..eda7e505b5 100644 --- a/packages/zowe-explorer-ftp-extension/webpack.config.js +++ b/packages/zowe-explorer-ftp-extension/webpack.config.js @@ -17,8 +17,6 @@ const path = require("path"); const webpack = require("webpack"); const fs = require("fs"); const TerserPlugin = require("terser-webpack-plugin"); - -const { TsconfigPathsPlugin } = require("tsconfig-paths-webpack-plugin"); const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); /**@type {webpack.Configuration}*/ @@ -39,11 +37,7 @@ const config = { alias: { "@zowe/zowe-explorer-api$": path.resolve(__dirname, "..", "zowe-explorer-api/src"), }, - plugins: [ - new TsconfigPathsPlugin({ - references: ["../zowe-explorer-api"], - }), - ], + conditionNames: ["@zowe:bundler", "..."], }, watchOptions: { ignored: /node_modules/, diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index b92f165610..80e263c7b4 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -1746,7 +1746,7 @@ ] }, "scripts": { - "build": "pnpm clean:bundle && pnpm license && webpack --mode development && pnpm madge", + "build": "pnpm copy-secrets && pnpm clean:bundle && pnpm license && webpack --mode development && pnpm madge", "test": "pnpm test:unit", "test:e2e": "cd __tests__/__e2e__/ && wdio run ./wdio.conf.ts", "test:integration": "cd __tests__/__integration__/bdd && wdio run ./wdio.conf.ts", @@ -1772,7 +1772,8 @@ "pretty": "prettier --write .", "createTestProfileData": "tsx ./scripts/createTestProfileData.ts", "createDemoNodes": "tsx ./scripts/createDemoNodes.ts", - "generateLocalization": "pnpm dlx @vscode/l10n-dev export --o ./l10n ./src && node ./scripts/generatePoeditorJson.js" + "generateLocalization": "pnpm dlx @vscode/l10n-dev export --o ./l10n ./src && node ./scripts/generatePoeditorJson.js", + "copy-secrets": "tsx ./scripts/getSecretsPrebuilds.ts" }, "engines": { "vscode": "^1.79.0" @@ -1796,7 +1797,6 @@ "chai": "^4.1.2", "chai-as-promised": "^7.1.1", "chalk": "^2.4.1", - "copy-webpack-plugin": "^12.0.2", "eslint-plugin-zowe-explorer": "3.0.0-next-SNAPSHOT", "expect": "^24.8.0", "expect-webdriverio": "^4.13.0", diff --git a/packages/zowe-explorer/webpack.config.js b/packages/zowe-explorer/webpack.config.js index 3d3de050b3..e83d03e00a 100644 --- a/packages/zowe-explorer/webpack.config.js +++ b/packages/zowe-explorer/webpack.config.js @@ -16,10 +16,7 @@ const path = require("path"); const webpack = require("webpack"); const fs = require("fs"); -const CopyPlugin = require("copy-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin"); - -const { TsconfigPathsPlugin } = require("tsconfig-paths-webpack-plugin"); const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); /**@type {webpack.Configuration}*/ @@ -39,11 +36,7 @@ const config = { alias: { "@zowe/zowe-explorer-api$": path.resolve(__dirname, "..", "zowe-explorer-api/src"), }, - plugins: [ - new TsconfigPathsPlugin({ - references: ["../zowe-explorer-api"], - }), - ], + conditionNames: ["@zowe:bundler", "..."], }, watchOptions: { ignored: /node_modules/, @@ -94,9 +87,6 @@ const config = { }, plugins: [ new webpack.BannerPlugin(fs.readFileSync("../../scripts/LICENSE_HEADER", "utf-8")), - new CopyPlugin({ - patterns: [{ from: "../../node_modules/@zowe/secrets-for-zowe-sdk/prebuilds", to: "../../prebuilds/" }], - }), new ForkTsCheckerWebpackPlugin({ typescript: { build: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9aa6e3ec1..1ec7925159 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,9 +108,6 @@ importers: ts-jest: specifier: ^29.0.3 version: 29.1.2(@babel/core@7.24.7)(jest@29.7.0)(typescript@5.4.5) - tsconfig-paths-webpack-plugin: - specifier: ^4.1.0 - version: 4.1.0 tsx: specifier: ^4.9.3 version: 4.10.4 @@ -220,9 +217,6 @@ importers: chalk: specifier: ^2.4.1 version: 2.4.2 - copy-webpack-plugin: - specifier: ^12.0.2 - version: 12.0.2(webpack@5.92.1) eslint-plugin-zowe-explorer: specifier: 3.0.0-next-SNAPSHOT version: link:../eslint-plugin-zowe-explorer @@ -2519,11 +2513,6 @@ packages: engines: {node: '>=14.16'} dev: true - /@sindresorhus/merge-streams@2.3.0: - resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} - engines: {node: '>=18'} - dev: true - /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: @@ -3773,14 +3762,6 @@ packages: acorn: 8.11.3 dev: true - /acorn-import-attributes@1.9.5(acorn@8.12.1): - resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} - peerDependencies: - acorn: ^8 - dependencies: - acorn: 8.12.1 - dev: true - /acorn-jsx@5.3.2(acorn@7.4.1): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -3814,12 +3795,6 @@ packages: hasBin: true dev: true - /acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /agent-base@6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -3875,15 +3850,6 @@ packages: ajv: 6.12.6 dev: true - /ajv-keywords@5.1.0(ajv@8.13.0): - resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} - peerDependencies: - ajv: ^8.8.2 - dependencies: - ajv: 8.13.0 - fast-deep-equal: 3.1.3 - dev: true - /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -4768,11 +4734,6 @@ packages: engines: {node: '>=6.0'} dev: true - /chrome-trace-event@1.0.4: - resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} - engines: {node: '>=6.0'} - dev: true - /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} peerDependencies: @@ -5062,21 +5023,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /copy-webpack-plugin@12.0.2(webpack@5.92.1): - resolution: {integrity: sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==} - engines: {node: '>= 18.12.0'} - peerDependencies: - webpack: ^5.1.0 - dependencies: - fast-glob: 3.3.2 - glob-parent: 6.0.2 - globby: 14.0.1 - normalize-path: 3.0.0 - schema-utils: 4.2.0 - serialize-javascript: 6.0.2 - webpack: 5.92.1(webpack-cli@5.1.4) - dev: true - /copyfiles@2.4.1: resolution: {integrity: sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==} hasBin: true @@ -5839,14 +5785,6 @@ packages: tapable: 2.2.1 dev: true - /enhanced-resolve@5.17.0: - resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==} - engines: {node: '>=10.13.0'} - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - dev: true - /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -5961,10 +5899,6 @@ packages: resolution: {integrity: sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA==} dev: true - /es-module-lexer@1.5.4: - resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} - dev: true - /es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -7290,18 +7224,6 @@ packages: slash: 3.0.0 dev: true - /globby@14.0.1: - resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} - engines: {node: '>=18'} - dependencies: - '@sindresorhus/merge-streams': 2.3.0 - fast-glob: 3.3.2 - ignore: 5.3.1 - path-type: 5.0.0 - slash: 5.1.0 - unicorn-magic: 0.1.0 - dev: true - /globule@1.3.4: resolution: {integrity: sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==} engines: {node: '>= 0.10'} @@ -10564,11 +10486,6 @@ packages: engines: {node: '>=8'} dev: true - /path-type@5.0.0: - resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} - engines: {node: '>=12'} - dev: true - /pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: true @@ -11496,16 +11413,6 @@ packages: ajv-keywords: 3.5.2(ajv@6.12.6) dev: true - /schema-utils@4.2.0: - resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} - engines: {node: '>= 12.13.0'} - dependencies: - '@types/json-schema': 7.0.15 - ajv: 8.13.0 - ajv-formats: 2.1.1(ajv@8.13.0) - ajv-keywords: 5.1.0(ajv@8.13.0) - dev: true - /secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} dev: true @@ -12321,30 +12228,6 @@ packages: webpack: 5.91.0(webpack-cli@5.1.4) dev: true - /terser-webpack-plugin@5.3.10(webpack@5.92.1): - resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@swc/core': '*' - esbuild: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.2 - terser: 5.31.0 - webpack: 5.92.1(webpack-cli@5.1.4) - dev: true - /terser@5.31.0: resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} engines: {node: '>=10'} @@ -12592,15 +12475,6 @@ packages: yn: 3.1.1 dev: true - /tsconfig-paths-webpack-plugin@4.1.0: - resolution: {integrity: sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==} - engines: {node: '>=10.13.0'} - dependencies: - chalk: 4.1.2 - enhanced-resolve: 5.16.1 - tsconfig-paths: 4.2.0 - dev: true - /tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} @@ -12814,11 +12688,6 @@ packages: '@fastify/busboy': 2.1.1 dev: true - /unicorn-magic@0.1.0: - resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} - engines: {node: '>=18'} - dev: true - /union-value@1.0.1: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} @@ -13444,47 +13313,6 @@ packages: - uglify-js dev: true - /webpack@5.92.1(webpack-cli@5.1.4): - resolution: {integrity: sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - dependencies: - '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/wasm-edit': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) - browserslist: 4.23.1 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.17.0 - es-module-lexer: 1.5.4 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.92.1) - watchpack: 2.4.1 - webpack-cli: 5.1.4(webpack@5.91.0) - webpack-sources: 3.2.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - dev: true - /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: