diff --git a/package.json b/package.json index 01b040deaacc..474544b6e48c 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "@commitlint/config-conventional": "^16.2.1", "@semantic-release/github": "^11.0.0", "command-line-args": "^5.1.1", - "copy-and-watch": "^0.1.5", "globby": "^13.1.1", "husky": "^7.0.4", "lerna": "^7.4.1", diff --git a/packages/ai/package.json b/packages/ai/package.json index e36ae840f643..e102822d94be 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -58,7 +58,6 @@ "chokidar-cli": "^3.0.0", "cypress": "^15.3.0", "eslint": "^7.22.0", - "rimraf": "^6.0.1", "vite": "5.4.8" } } diff --git a/packages/base/lib/css-processors/css-processor-font-face.mjs b/packages/base/lib/css-processors/css-processor-font-face.mjs index 4c5b234a33f2..37c121034ee2 100644 --- a/packages/base/lib/css-processors/css-processor-font-face.mjs +++ b/packages/base/lib/css-processors/css-processor-font-face.mjs @@ -3,62 +3,72 @@ import * as path from "path"; import { readFile, writeFile } from "fs/promises"; import { fileURLToPath } from "url"; -const themeBasePackage = JSON.parse(await readFile(fileURLToPath(import.meta.resolve("@sap-theming/theming-base-content/package.json", "utf-8")))); +const generate = async () => { + const themeBasePackage = JSON.parse(await readFile(fileURLToPath(import.meta.resolve("@sap-theming/theming-base-content/package.json", "utf-8")))); -const processFontFace = (text) => { - const declarationExpr = /@font-face\s*{[^}]*}/g; + const processFontFace = (text) => { + const declarationExpr = /@font-face\s*{[^}]*}/g; - // change font-face src - text = text.replaceAll("../baseTheme/fonts", `https://cdn.jsdelivr.net/npm/@sap-theming/theming-base-content@${themeBasePackage.version}/content/Base/baseLib/baseTheme/fonts`); + // change font-face src + text = text.replaceAll("../baseTheme/fonts", `https://cdn.jsdelivr.net/npm/@sap-theming/theming-base-content@${themeBasePackage.version}/content/Base/baseLib/baseTheme/fonts`); - // extract declarations for separate usage - let fontFaceDeclarations = [...text.matchAll(declarationExpr)].map(x => x[0]); + // extract declarations for separate usage + let fontFaceDeclarations = [...text.matchAll(declarationExpr)].map(x => x[0]); - // remove SAP-icons - fontFaceDeclarations = fontFaceDeclarations.filter(decl => !decl.includes("SAP-icons")); + // remove SAP-icons + fontFaceDeclarations = fontFaceDeclarations.filter(decl => !decl.includes("SAP-icons")); - // remove woff urls - fontFaceDeclarations = fontFaceDeclarations.map(decl => { - // @font-face { - // src: url(../baseTheme/fonts/72-Semibold.woff2) format("woff2"), url(../baseTheme/fonts/72-Semibold.woff) format("woff"), local("72-Semibold"); - return decl.replace(/,url\(([^)]+)\.woff\)\ format\("woff"\)/, ''); - }); + // remove woff urls + fontFaceDeclarations = fontFaceDeclarations.map(decl => { + // @font-face { + // src: url(../baseTheme/fonts/72-Semibold.woff2) format("woff2"), url(../baseTheme/fonts/72-Semibold.woff) format("woff"), local("72-Semibold"); + return decl.replace(/,url\(([^)]+)\.woff\)\ format\("woff"\)/, ''); + }); - return fontFaceDeclarations.join("\n"); -} + return fontFaceDeclarations.join("\n"); + } -let fontfacePlugin = { - name: 'fontface', - setup(build) { - build.initialOptions.write = false; + let fontfacePlugin = { + name: 'fontface', + setup(build) { + build.initialOptions.write = false; - build.onEnd(result => { - result.outputFiles.forEach(async f => { - let newText = processFontFace(f.text); - const tsPath = path.join(process.cwd(), "src/generated/css/FontFace.css.ts"); - const tsContent = `export default \`${newText}\``; - await writeFile(tsPath, tsContent); - }); - }) - }, -} + build.onEnd(result => { + result.outputFiles.forEach(async f => { + let newText = processFontFace(f.text); + const tsPath = path.join(process.cwd(), "src/generated/css/FontFace.css.ts"); + const tsContent = `export default \`${newText}\``; + await writeFile(tsPath, tsContent); + }); + }) + }, + } + + // esbuild cannot resolve the node module format when passed as stdin, so resolve the actual file via node resolve + const themeBaseFile = fileURLToPath(import.meta.resolve("@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/css_variables.css")); -// esbuild cannot resolve the node module format when passed as stdin, so resolve the actual file via node resolve -const themeBaseFile = fileURLToPath(import.meta.resolve("@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/css_variables.css")); + const config = { + stdin: { + contents: `@import ${JSON.stringify(themeBaseFile)};`, // windows paths contain a backslash which has to be escaped because this will be treated as a string + resolveDir: './', + sourcefile: 'virtual-font-face.css', + loader: 'css', + }, + bundle: true, + minify: true, + plugins: [ + fontfacePlugin, + ], + external: ["*.ttf", "*.woff", "*.woff2"], + }; -const config = { - stdin: { - contents: `@import ${JSON.stringify(themeBaseFile)};`, // windows paths contain a backslash which has to be escaped because this will be treated as a string - resolveDir: './', - sourcefile: 'virtual-font-face.css', - loader: 'css', - }, - bundle: true, - minify: true, - plugins: [ - fontfacePlugin, - ], - external: ["*.ttf", "*.woff", "*.woff2"], + const result = await esbuild.build(config); }; -const result = await esbuild.build(config); +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} + +export default { + _ui5mainFn: generate +} diff --git a/packages/base/lib/generate-asset-parameters/index.js b/packages/base/lib/generate-asset-parameters/index.js index d51d4784a021..a0ddb2fe3076 100644 --- a/packages/base/lib/generate-asset-parameters/index.js +++ b/packages/base/lib/generate-asset-parameters/index.js @@ -19,9 +19,15 @@ export { const generate = async () => { await fs.mkdir("src/generated/", { recursive: true }); - return fs.writeFile("src/generated/AssetParameters.ts", fileContent); -} + await fs.writeFile("src/generated/AssetParameters.ts", fileContent); -generate().then(() => { console.log("Assets parameters generated."); -}); +} + +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} + +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/base/lib/generate-styles/index.js b/packages/base/lib/generate-styles/index.js index 60cd1639cb95..6c00d978ba7a 100644 --- a/packages/base/lib/generate-styles/index.js +++ b/packages/base/lib/generate-styles/index.js @@ -3,7 +3,7 @@ import path from "path"; import CleanCSS from "clean-css"; const generate = async () => { - await fs.mkdir("src/generated/css/", {recursive: true}); + await fs.mkdir("src/generated/css/", { recursive: true }); const files = (await fs.readdir("src/css/")).filter(file => file.endsWith(".css")); const filesPromises = files.map(async file => { @@ -13,9 +13,16 @@ const generate = async () => { return fs.writeFile(path.join("src/generated/css/", `${file}.ts`), content); }); - return Promise.all(filesPromises); + return Promise.all(filesPromises) + .then(() => { + console.log("Styles files generated."); + }); }; -generate().then(() => { - console.log("Styles files generated."); -}); +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} + +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/base/lib/generate-version-info/index.js b/packages/base/lib/generate-version-info/index.js index df86c5d3e966..b11bf727c30e 100644 --- a/packages/base/lib/generate-version-info/index.js +++ b/packages/base/lib/generate-version-info/index.js @@ -25,8 +25,14 @@ export default VersionInfo;`; await fs.mkdir("src/generated/", { recursive: true }); await fs.writeFile("src/generated/VersionInfo.ts", fileContent); -} -generate().then(() => { console.log("Version info file generated."); -}); +} + +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} + +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/base/package-scripts.cjs b/packages/base/package-scripts.cjs index 3487009b8fe4..48d60a4d69fe 100644 --- a/packages/base/package-scripts.cjs +++ b/packages/base/package-scripts.cjs @@ -15,23 +15,27 @@ const viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-p const scripts = { __ui5envs: { - UI5_TS: true, + UI5_TS: "true", UI5_BASE: true, UI5_CEM_MODE: "dev", }, - clean: "rimraf src/generated && rimraf dist", + clean: { + default: "ui5nps clean.generated clean.dist", + "generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`, + "dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`, + }, lint: `eslint .`, generate: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace build.jsonImports", prepare: "ui5nps clean build.i18n integrate copy generateAssetParameters generateVersionInfo generateStyles generateFontFace typescript integrate.no-remaining-require build.jsonImports", typescript: "tsc -b", integrate: { default: "ui5nps integrate.copy-used-modules integrate.amd-to-es6 integrate.third-party", - "copy-used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`, - "amd-to-es6": `node "${amdToES6}" dist/`, - "no-remaining-require": `node "${noRequire}" dist/`, + "copy-used-modules": `ui5nps-script "${copyUsedModules}" ./used-modules.txt dist/`, + "amd-to-es6": `ui5nps-script "${amdToES6}" dist/`, + "no-remaining-require": `ui5nps-script "${noRequire}" dist/`, "third-party": { default: "ui5nps integrate.third-party.copy integrate.third-party.fix", - copy: "copy-and-watch ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty/", + copy: `ui5nps-script "${LIB}copy-and-watch/index.js" ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty/`, fix: "replace-in-file 240 xA0 dist/sap/ui/thirdparty/caja-html-sanitizer.js" }, }, @@ -40,39 +44,44 @@ const scripts = { bundle: `vite build ${viteConfig}`, i18n: { default: "ui5nps build.i18n.defaultsjs build.i18n.json", - defaultsjs: `node "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`, - json: `node "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`, + defaultsjs: `ui5nps-script "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`, + json: `ui5nps-script "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`, }, jsonImports: { default: "ui5nps build.jsonImports.i18n", - i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`, + i18n: `ui5nps-script "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n src/generated/json-imports`, }, }, copy: { default: "ui5nps copy.src", - src: `copy-and-watch "src/**/*.{js,css,d.ts}" dist/`, - srcWithWatch: `copy-and-watch "src/**/*.{js,css,d.ts}" dist/ --watch --skip-initial-copy`, + src: `ui5nps-script "${LIB}copy-and-watch/index.js" "src/**/*.{js,css,d.ts}" dist/`, + srcWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" "src/**/*.{js,css,d.ts}" dist/ --watch --skip-initial-copy`, }, - generateAssetParameters: `node "${assetParametersScript}"`, - generateVersionInfo: `node "${versionScript}"`, - generateStyles: `node "${stylesScript}"`, - generateFontFace: `node "${fontFaceScript}"`, + generateAssetParameters: `ui5nps-script "${assetParametersScript}"`, + generateVersionInfo: `ui5nps-script "${versionScript}"`, + generateStyles: `ui5nps-script "${stylesScript}"`, + generateFontFace: `ui5nps-script "${fontFaceScript}"`, generateTestTemplates: `node "${LIB}/hbs2ui5/index.js" -d test/test-elements -o test/test-elements/generated/templates`, generateProd: { "default": "ui5nps generateProd.remove-dev-mode generateProd.copy-prod", - "remove-dev-mode": `node "${LIB}/remove-dev-mode/remove-dev-mode.mjs"`, - "copy-prod": `copy-and-watch "dist/sap/**/*" dist/prod/sap/ && copy-and-watch "dist/thirdparty/preact/**/*.js" dist/prod/thirdparty/preact/ && copy-and-watch "dist/generated/assets/**/*.json" dist/prod/generated/assets/`, - }, + "remove-dev-mode": `ui5nps-script "${LIB}/remove-dev-mode/remove-dev-mode.mjs"`, + "copy-prod": { + default: "ui5nps-p generateProd.copy-prod.ui5 generateProd.copy-prod.preact generateProd.copy-prod.assets", + "ui5": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/sap/**/*" dist/prod/sap/`, + "preact": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/thirdparty/preact/**/*.js" dist/prod/thirdparty/preact/`, + "assets": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/generated/assets/**/*.json" dist/prod/generated/assets/`, + } +}, generateAPI: { default: "ui5nps generateAPI.generateCEM generateAPI.validateCEM", - generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`, - validateCEM: `node "${LIB}/cem/validate.js"`, + generateCEM: `ui5nps-script "${LIB}/cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`, + validateCEM: `ui5nps-script "${LIB}/cem/validate.js"`, }, watch: { default: 'ui5nps-p watch.src watch.styles', // concurently withBundle: 'ui5nps-p watch.src watch.bundle watch.styles', // concurently src: 'ui5nps copy.srcWithWatch', - bundle: `node ${LIB}/dev-server/dev-server.mjs ${viteConfig}`, + bundle: `ui5nps-script ${LIB}/dev-server/dev-server.mjs ${viteConfig}`, styles: 'chokidar "src/css/*.css" -c "ui5nps generateStyles"' }, test: { diff --git a/packages/base/package.json b/packages/base/package.json index bc436b1307b2..8672a8ac595e 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -67,17 +67,12 @@ "@ui5/cypress-internal": "0.1.0", "@ui5/webcomponents-tools": "2.15.0-rc.2", "clean-css": "^5.2.2", - "concurrently": "^9.2.1", - "copy-and-watch": "^0.1.5", - "cross-env": "^7.0.3", "cypress": "^15.3.0", "eslint": "^7.22.0", "mkdirp": "^1.0.4", "mocha": "^11.7.2", - "nps": "^5.10.0", "replace-in-file": "^6.3.5", "resolve": "^1.20.0", - "rimraf": "^6.0.1", "touch": "^3.1.0", "typescript": "^5.6.2", "vite": "5.4.8" diff --git a/packages/compat/package.json b/packages/compat/package.json index 34aa413b849c..0f64141cf7f0 100644 --- a/packages/compat/package.json +++ b/packages/compat/package.json @@ -58,7 +58,6 @@ "chokidar-cli": "^3.0.0", "cypress": "^15.3.0", "eslint": "^7.22.0", - "rimraf": "^6.0.1", "vite": "5.4.8" } } diff --git a/packages/fiori/package.json b/packages/fiori/package.json index dda46897d444..574068e52bca 100644 --- a/packages/fiori/package.json +++ b/packages/fiori/package.json @@ -60,15 +60,12 @@ }, "devDependencies": { "@custom-elements-manifest/analyzer": "patch:@custom-elements-manifest/analyzer@npm%3A0.10.6#~/.yarn/patches/@custom-elements-manifest-analyzer-npm-0.10.6-9b5ff0c50b.patch", - "@types/add": "^2", "@ui5/cypress-internal": "0.1.0", "@ui5/webcomponents-tools": "2.15.0-rc.2", - "add": "^2.0.6", "chokidar-cli": "^3.0.0", "cypress": "^15.3.0", "eslint": "^7.22.0", "lit": "^2.0.0", - "rimraf": "^6.0.1", "vite": "5.4.8", "yarn": "^1.22.22" } diff --git a/packages/icons-business-suite/package.json b/packages/icons-business-suite/package.json index a612117bd5e6..ccd6adc97eee 100644 --- a/packages/icons-business-suite/package.json +++ b/packages/icons-business-suite/package.json @@ -30,7 +30,6 @@ "@ui5/webcomponents-base": "2.15.0-rc.2" }, "devDependencies": { - "@ui5/webcomponents-tools": "2.15.0-rc.2", - "rimraf": "^6.0.1" + "@ui5/webcomponents-tools": "2.15.0-rc.2" } } diff --git a/packages/icons-tnt/package.json b/packages/icons-tnt/package.json index f57965dd6a05..dd0d06c6a705 100644 --- a/packages/icons-tnt/package.json +++ b/packages/icons-tnt/package.json @@ -30,7 +30,6 @@ "@ui5/webcomponents-base": "2.15.0-rc.2" }, "devDependencies": { - "@ui5/webcomponents-tools": "2.15.0-rc.2", - "rimraf": "^6.0.1" + "@ui5/webcomponents-tools": "2.15.0-rc.2" } } diff --git a/packages/icons/package.json b/packages/icons/package.json index 976a07f1be5a..ded84a12731d 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -30,7 +30,6 @@ "@ui5/webcomponents-base": "2.15.0-rc.2" }, "devDependencies": { - "@ui5/webcomponents-tools": "2.15.0-rc.2", - "rimraf": "^6.0.1" + "@ui5/webcomponents-tools": "2.15.0-rc.2" } } diff --git a/packages/localization/lib/generate-json-imports/cldr.js b/packages/localization/lib/generate-json-imports/cldr.js index 39d528a68f8e..08a6af16463c 100644 --- a/packages/localization/lib/generate-json-imports/cldr.js +++ b/packages/localization/lib/generate-json-imports/cldr.js @@ -39,9 +39,16 @@ const generate = async () => { fs.writeFile("src/generated/json-imports/LocaleData.ts", contentDynamic(caseDynamicImports)), fs.writeFile("src/generated/json-imports/LocaleData-fetch.ts", contentDynamic(caseFetchMetaResolve)), fs.writeFile("src/generated/json-imports/LocaleData-node.ts", contentDynamic(caseDynamicImportJSONAttr)), - ]); + ]) + .then(() => { + console.log("CLDR files generated."); + }); } -generate().then(() => { - console.log("CLDR files generated."); -}); +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} + +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/localization/package-scripts.cjs b/packages/localization/package-scripts.cjs index 77fbb7d2923c..b9448c39ae73 100644 --- a/packages/localization/package-scripts.cjs +++ b/packages/localization/package-scripts.cjs @@ -1,25 +1,32 @@ const resolve = require("resolve"); +const path = require("path"); +const LIB = path.join(__dirname, `../tools/lib/`); const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js"); const amdToES6 = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/index.js"); const noRequire = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/no-remaining-require.js"); +const generateCLDR = resolve.sync("@ui5/webcomponents-localization/lib/generate-json-imports/cldr.js"); const scripts = { - clean: "rimraf src/generated && rimraf dist", + clean: { + "default": "ui5nps clean.generated clean.dist", + "generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`, + "dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`, + }, lint: "eslint .", generate: "ui5nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports", build: { "default": "ui5nps clean copy.used-modules copy.cldr copy.overlay build.amd-to-es6 build.jsonImports build.typescript build.no-remaining-require", - "amd-to-es6": `node "${amdToES6}" dist/`, - "no-remaining-require": `node "${noRequire}" dist/`, + "amd-to-es6": `ui5nps-script "${amdToES6}" dist/`, + "no-remaining-require": `ui5nps-script "${noRequire}" dist/`, typescript: "tsc --build", - jsonImports: "node ./lib/generate-json-imports/cldr.js", + jsonImports: `ui5nps-script ${generateCLDR}`, }, typescript: "tsc --build", copy: { - "used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`, - cldr: `copy-and-watch "../../node_modules/@openui5/sap.ui.core/src/sap/ui/core/cldr/*" dist/generated/assets/cldr/`, - overlay: `copy-and-watch "overlay/**/*.js" dist/`, + "used-modules": `ui5nps-script "${copyUsedModules}" ./used-modules.txt dist/`, + cldr: `ui5nps-script "${LIB}copy-and-watch/index.js" "../../node_modules/@openui5/sap.ui.core/src/sap/ui/core/cldr/*" dist/generated/assets/cldr/`, + overlay: `ui5nps-script "${LIB}copy-and-watch/index.js" "overlay/**/*.js" dist/`, }, }; diff --git a/packages/localization/package.json b/packages/localization/package.json index e6564c163d49..78b96293933d 100644 --- a/packages/localization/package.json +++ b/packages/localization/package.json @@ -38,8 +38,7 @@ "eslint": "^7.22.0", "estree-walk": "^2.2.0", "mkdirp": "^1.0.4", - "resolve": "^1.20.0", - "rimraf": "^6.0.1" + "resolve": "^1.20.0" }, "dependencies": { "@types/openui5": "^1.113.0", diff --git a/packages/main/package.json b/packages/main/package.json index 3e724fccbf45..dbb674e64e6a 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -68,7 +68,6 @@ "eslint": "^7.22.0", "jsdom": "^26.0.0", "lit": "^2.0.0", - "rimraf": "^6.0.1", "vite": "5.4.8", "vitest": "^3.0.2" } diff --git a/packages/theming/package-scripts.cjs b/packages/theming/package-scripts.cjs index d2e866c23482..41afd71c7137 100644 --- a/packages/theming/package-scripts.cjs +++ b/packages/theming/package-scripts.cjs @@ -11,17 +11,21 @@ const generateReportScript = path.join(CURRENT_LIB, "./generate-css-vars-usage-r module.exports = { scripts: { __ui5envs: { - UI5_TS: true, + UI5_TS: "true", + }, + clean: { + "default": "ui5nps clean.generated clean.dist", + "generated": `ui5nps-script "${TOOLS_LIB}/rimraf/rimraf.js src/generated`, + "dist": `ui5nps-script "${TOOLS_LIB}/rimraf/rimraf.js dist`, }, - clean: "rimraf dist && rimraf src/generated", generate: `ui5nps build.postcss build.jsonImports`, build: { default: `ui5nps clean build.src build.postcss build.jsonImports build.typescript generateReport`, - src: `copy-and-watch "src/**/*.{json}" dist/`, + src: `ui5nps-script "${TOOLS_LIB}copy-and-watch/index.js" "src/**/*.{json}" dist/`, typescript: "tsc", - postcss: `node "${TOOLS_LIB}/css-processors/css-processor-themes.mjs"`, - jsonImports: `node "${jsonImportsScript}" dist/generated/assets/themes src/generated/json-imports`, + postcss: `ui5nps-script "${TOOLS_LIB}/css-processors/css-processor-themes.mjs"`, + jsonImports: `ui5nps-script "${jsonImportsScript}" src/themes src/generated/json-imports`, }, - generateReport: `node "${generateReportScript}"`, + generateReport: `ui5nps-script "${generateReportScript}"`, }, }; diff --git a/packages/theming/package.json b/packages/theming/package.json index e8104afd4297..1eba4f57f63c 100644 --- a/packages/theming/package.json +++ b/packages/theming/package.json @@ -37,7 +37,6 @@ "globby": "^13.1.1", "json-beautify": "^1.1.1", "postcss": "^8.4.5", - "postcss-import": "^14.0.2", - "rimraf": "^6.0.1" + "postcss-import": "^14.0.2" } } diff --git a/packages/tools/bin/ui5nps.js b/packages/tools/bin/ui5nps.js index b334696b8090..c946d48674da 100755 --- a/packages/tools/bin/ui5nps.js +++ b/packages/tools/bin/ui5nps.js @@ -5,6 +5,7 @@ const fs = require("fs"); const path = require("path"); const { exec } = require("child_process"); +var { parseArgsStringToArgv } = require('string-argv'); const SCRIPT_NAMES = [ "package-scripts.js", @@ -75,7 +76,7 @@ class Parser { throw new Error(`Command "${commandName}" not found in scripts`); } - if (!executableCommand.startsWith("ui5nps") && !executableCommand.startsWith("ui5nps-p")) { + if (!executableCommand.startsWith("ui5nps") || executableCommand.startsWith("ui5nps-script")) { this.resolvedScripts.set(commandName, { commandName, commands: [executableCommand], parallel: false }); return this.resolvedScripts.get(commandName); } @@ -93,7 +94,7 @@ class Parser { this.resolveScripts(part); } - commands.push(this.resolvedScripts.get(part) || parsedScript); + commands.push(this.resolvedScripts.get(part) || { commandName: part, commands: [parsedScript], parallel: parsedScript.startsWith("ui5nps-p") }); } @@ -155,10 +156,31 @@ class Parser { * @param {string|Object} command - Command string or command object with commands array * @returns {Promise} Promise that resolves when command(s) complete */ - async executeCommand(command) { + async executeCommand(command, commandName = "unknown") { if (typeof command === "string" && command) { - return new Promise((resolve, reject) => { - console.log(`= Executing command: ${command}`); + return new Promise(async (resolve, reject) => { + if (command.trim().startsWith("ui5nps-script")) { + const argv = parseArgsStringToArgv(command); + const importedContent = require(argv[1]); + let _ui5mainFn; + + if (importedContent.__esModule) { + _ui5mainFn = importedContent.default._ui5mainFn; + } else { + _ui5mainFn = importedContent._ui5mainFn; + } + + console.log(` | Executing command ${commandName} as module.`); + const result = _ui5mainFn(argv); + + if (result instanceof Promise) { + return result.then(resolve).catch(reject); + } else { + return resolve(); + } + } + + console.log(` | Executing command ${commandName} as command.\n Running: ${command}`); const child = exec(command, { stdio: "inherit", env: { ...process.env, ...this.envs } }); child.stdout.on("data", (data) => { @@ -181,12 +203,12 @@ class Parser { } else if (typeof command === "object" && command.commands) { if (command.parallel) { // Execute commands in parallel - const promises = command.commands.filter(Boolean).map(cmd => this.executeCommand(cmd)); + const promises = command.commands.filter(Boolean).map(cmd => this.executeCommand(cmd, cmd.commandName || commandName)); await Promise.all(promises); } else { // Execute commands sequentially for (const cmd of command.commands) { - await this.executeCommand(cmd); + await this.executeCommand(cmd, cmd.commandName || commandName); } } } @@ -204,7 +226,7 @@ class Parser { throw new Error(`Command "${commandName}" not found in scripts`); } - return this.executeCommand(this.resolvedScripts.get(commandName)); + return this.executeCommand(this.resolvedScripts.get(commandName), commandName); } } @@ -218,7 +240,18 @@ if (commands.length === 0) { process.exit(1); } +if (commands.includes("--help") || commands.includes("-h")) { + console.log("Usage: ui5nps [command2] [command3] ..."); + console.log("Available commands:"); + for (const [key, value] of parser.parsedScripts.entries()) { + console.log(` - ${key}: ${value}`); + } + process.exit(0); +} + (async () => { + process.env = { ...process.env, ...parser.envs }; + for (const commandName of commands) { await parser.execute(commandName); } diff --git a/packages/tools/components-package/nps.js b/packages/tools/components-package/nps.js index 391a48b7fc7a..b0178e62a4c8 100644 --- a/packages/tools/components-package/nps.js +++ b/packages/tools/components-package/nps.js @@ -20,16 +20,24 @@ if (process.env.DEPLOY) { } const getScripts = (options) => { - // The script creates all JS modules (dist/illustrations/{illustrationName}.js) out of the existing SVGs const illustrationsData = options.illustrationsData || []; - const illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath} ${illustration.collection}`); - const createIllustrationsJSImportsScript = illustrations.join(" && "); - + const createIllustrationsJSImportsScript = { + default: `ui5nps-p ${illustrationsData.map(illustrations => `build.illustrations.build-${illustrations.set}-${illustrations.collection}`).join(" ")}` // concurently, + } + illustrationsData.forEach((illustration) => { + createIllustrationsJSImportsScript[`build-${illustration.set}-${illustration.collection}`] = `ui5nps-script "${LIB}create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath} ${illustration.collection}` + }); // The script creates the "src/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration - const createIllustrationsLoadersScript = illustrationsData.map(illustrations => `node ${LIB}/generate-js-imports/illustrations.js ${illustrations.path} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(",")}`).join(" && "); + const createIllustrationsLoadersScript = { + default: `ui5nps-p ${illustrationsData.map(illustrations => `build.jsImports.illustrationsLoaders.generate-${illustrations.set}-${illustrations.collection}`).join(" ")}` // concurently, + } + illustrationsData.forEach((illustrations) => { + createIllustrationsLoadersScript[`generate-${illustrations.set}-${illustrations.collection}`] = `ui5nps-script ${LIB}generate-js-imports/illustrations.js ${illustrations.path} ${illustrations.dynamicImports.outputFile} ${illustrations.set} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.filterOut.join(",")}` + }); + - const tsOption = !options.legacy || options.jsx; + const tsOption = !!(!options.legacy || options.jsx); const tsCommandOld = tsOption ? "tsc" : ""; let tsWatchCommandStandalone = tsOption ? "tsc --watch" : ""; // this command is only used for standalone projects. monorepo projects get their watch from vite, so opt-out here @@ -70,13 +78,14 @@ const getScripts = (options) => { const scripts = { __ui5envs: { UI5_CEM_MODE: options.dev, - UI5_TS: !!tsOption, + UI5_TS: `${tsOption}`, CYPRESS_COVERAGE: !!(options.internal?.cypress_code_coverage), CYPRESS_UI5_ACC: !!(options.internal?.cypress_acc_tests), }, clean: { - default: 'ui5nps clean.generated scope.testPages.clean', - generated: 'rimraf src/generated && rimraf dist', + "default": "ui5nps clean.generated clean.dist scope.testPages.clean", + "generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`, + "dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`, }, lint: `eslint . ${eslintConfig}`, lintfix: `eslint . ${eslintConfig} --fix`, @@ -93,23 +102,23 @@ const getScripts = (options) => { }, build: { default: "ui5nps prepare lint build.bundle", // build.bundle2 - templates: options.legacy ? `mkdirp src/generated/templates && node "${LIB}/hbs2ui5/index.js" -d src/ -o src/generated/templates` : "", + templates: options.legacy ? `mkdirp src/generated/templates && node "${LIB}hbs2ui5/index.js" -d src/ -o src/generated/templates` : "", styles: { default: `ui5nps-p build.styles.themes build.styles.components`, // concurently - themes: `node "${LIB}/css-processors/css-processor-themes.mjs"`, - themesWithWatch: `node "${LIB}/css-processors/css-processor-themes.mjs" -w`, - components: `node "${LIB}/css-processors/css-processor-components.mjs"`, - componentsWithWatch: `node "${LIB}/css-processors/css-processor-components.mjs" -w`, + themes: `ui5nps-script "${LIB}css-processors/css-processor-themes.mjs"`, + themesWithWatch: `ui5nps-script "${LIB}css-processors/css-processor-themes.mjs" -w`, + components: `ui5nps-script "${LIB}css-processors/css-processor-components.mjs"`, + componentsWithWatch: `ui5nps-script "${LIB}css-processors/css-processor-components.mjs" -w`, }, i18n: { default: "ui5nps build.i18n.defaultsjs build.i18n.json", - defaultsjs: `node "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`, - json: `node "${LIB}/i18n/toJSON.js" src/i18n dist/generated/assets/i18n`, + defaultsjs: `ui5nps-script "${LIB}i18n/defaults.js" src/i18n src/generated/i18n`, + json: `ui5nps-script "${LIB}i18n/toJSON.js" src/i18n dist/generated/assets/i18n`, }, jsonImports: { default: "ui5nps build.jsonImports.themes build.jsonImports.i18n", - themes: `node "${LIB}/generate-json-imports/themes.js" src/themes src/generated/json-imports`, - i18n: `node "${LIB}/generate-json-imports/i18n.js" src/i18n src/generated/json-imports`, + themes: `ui5nps-script "${LIB}generate-json-imports/themes.js" src/themes src/generated/json-imports`, + i18n: `ui5nps-script "${LIB}generate-json-imports/i18n.js" src/i18n src/generated/json-imports`, }, jsImports: { default: "ui5nps build.jsImports.illustrationsLoaders", @@ -119,12 +128,12 @@ const getScripts = (options) => { bundle2: ``, illustrations: createIllustrationsJSImportsScript, }, - copyProps: `node "${LIB}/copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`, - copyPropsWithWatch: `node "${LIB}/copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/ --watch --safe --skip-initial-copy`, + copyProps: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/`, + copyPropsWithWatch: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/ --watch --safe --skip-initial-copy`, copy: { default: options.legacy ? "ui5nps copy.src copy.props" : "", - src: options.legacy ? `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/` : "", - props: options.legacy ? `node "${LIB}/copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/` : "", + src: options.legacy ? `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/**/*.{js,json}" dist/` : "", + props: options.legacy ? `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "src/i18n/*.properties" dist/` : "", }, watch: { default: `ui5nps-p watch.templates watch.typescript watch.src watch.styles watch.i18n watch.props`, // concurently @@ -132,7 +141,7 @@ const getScripts = (options) => { src: options.legacy ? 'ui5nps "copy.src --watch --safe --skip-initial-copy"' : "", typescript: tsWatchCommandStandalone, props: 'ui5nps copyPropsWithWatch', - bundle: `node ${LIB}/dev-server/dev-server.mjs ${viteConfig}`, + bundle: `ui5nps-script ${LIB}dev-server/dev-server.mjs ${viteConfig}`, styles: { default: 'ui5nps-p watch.styles.themes watch.styles.components', // concurently themes: 'ui5nps build.styles.themesWithWatch', @@ -142,7 +151,7 @@ const getScripts = (options) => { i18n: 'chokidar "src/i18n/messagebundle.properties" -c "ui5nps build.i18n.defaultsjs"' }, start: "ui5nps prepare watch.devServer", - test: `node "${LIB}/test-runner/test-runner.js"`, + test: `ui5nps-script "${LIB}/test-runner/test-runner.js"`, "test-cy-ci": `cypress run --component --browser chrome`, "test-cy-ci-suite-1": `cypress run --component --browser chrome --spec "**/specs/[A-C]*.cy.{js,jsx,ts,tsx},**/specs/[^D-Z]*.cy.{js,jsx,ts,tsx}"`, "test-cy-ci-suite-2": `cypress run --component --browser chrome --spec "**/specs/[D-L]*.cy.{js,jsx,ts,tsx}"`, @@ -152,21 +161,21 @@ const getScripts = (options) => { startWithScope: "ui5nps scope.prepare scope.watchWithBundle", scope: { prepare: "ui5nps scope.lint scope.testPages", - lint: `node "${LIB}/scoping/lint-src.js"`, + lint: `ui5nps-script "${LIB}scoping/lint-src.js"`, testPages: { default: "ui5nps scope.testPages.clean scope.testPages.copy scope.testPages.replace", - clean: "rimraf test/pages/scoped", - copy: `node "${LIB}/copy-and-watch/index.js" --silent "test/pages/**/*" test/pages/scoped`, - replace: `node "${LIB}/scoping/scope-test-pages.js" test/pages/scoped demo`, + "clean": `ui5nps-script "${LIB}/rimraf/rimraf.js test/pages/scoped`, + copy: `ui5nps-script "${LIB}copy-and-watch/index.js" --silent "test/pages/**/*" test/pages/scoped`, + replace: `ui5nps-script "${LIB}scoping/scope-test-pages.js" test/pages/scoped demo`, }, watchWithBundle: 'ui5nps-p scope.watch scope.bundle', // concurently watch: 'ui5nps-p watch.templates watch.props watch.styles', // concurently - bundle: `node ${LIB}/dev-server/dev-server.mjs ${viteConfig}`, + bundle: `ui5nps-script ${LIB}dev-server/dev-server.mjs ${viteConfig}`, }, generateAPI: { default: tsOption ? "ui5nps generateAPI.generateCEM generateAPI.validateCEM" : "", - generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`, - validateCEM: `node "${LIB}/cem/validate.js"`, + generateCEM: `ui5nps-script "${LIB}cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`, + validateCEM: `ui5nps-script "${LIB}cem/validate.js"`, }, }; diff --git a/packages/tools/icons-collection/nps.js b/packages/tools/icons-collection/nps.js index 921ed823bfe5..679aae424e70 100644 --- a/packages/tools/icons-collection/nps.js +++ b/packages/tools/icons-collection/nps.js @@ -4,13 +4,13 @@ const LIB = path.join(__dirname, `../lib/`); const createIconImportsCommand = (options) => { if (!options.versions) { - return `node "${LIB}/create-icons/index.js" "${options.collectionName}"`; + return `ui5nps-script "${LIB}/create-icons/index.js" "${options.collectionName}"`; } const command = { default: "ui5nps" }; options.versions.forEach((v) => { command.default += ` build.icons.create${v}`; - command[`create${v}`] = `node "${LIB}/create-icons/index.js" "${options.collectionName}" "${v}"`; + command[`create${v}`] = `ui5nps-script "${LIB}/create-icons/index.js" "${options.collectionName}" "${v}"`; }); return command; @@ -22,19 +22,19 @@ const copyIconAssetsCommand = (options) => { if (!options.versions) { return { default: "ui5nps copy.json-imports copy.icon-collection", - "json-imports": `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`, - "icon-collection": `node "${LIB}/copy-and-watch/index.js" --silent "src/*.json" src/generated/assets/`, + "json-imports": `ui5nps-script "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`, + "icon-collection": `ui5nps-script "${LIB}/copy-and-watch/index.js" --silent "src/*.json" src/generated/assets/`, } } const command = { default: "ui5nps copy.json-imports ", - "json-imports": `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`, + "json-imports": `ui5nps-script "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`, }; options.versions.forEach((v) => { command.default += ` copy.icon-collection${v}`; - command[`icon-collection${v}`] = `node "${LIB}/copy-and-watch/index.js" --silent "src/${v}/*.json" src/generated/assets/${v}/`; + command[`icon-collection${v}`] = `ui5nps-script "${LIB}/copy-and-watch/index.js" --silent "src/${v}/*.json" src/generated/assets/${v}/`; }); return command; @@ -47,23 +47,27 @@ const getScripts = (options) => { const tsOption = !options.legacy; const scripts = { - __ui5envs:{ - UI5_TS: tsOption, + __ui5envs: { + UI5_TS: `${tsOption}`, + }, + clean: { + default: "ui5nps clean.generated clean.dist", + "generated": `ui5nps-script "${LIB}/rimraf/rimraf.js src/generated`, + "dist": `ui5nps-script "${LIB}/rimraf/rimraf.js dist`, }, - clean: "rimraf dist && rimraf src/generated", copy: copyAssetsCmd, generate: hashesCheck(`ui5nps clean copy build.i18n build.icons build.jsonImports copyjson`), - copyjson: "copy-and-watch \"src/generated/**/*.json\" dist/generated/", + copyjson: `ui5nps-script "${LIB}copy-and-watch/index.js" "src/generated/**/*.json" dist/generated`, build: { default: hashesCheck(`ui5nps clean copy build.i18n typescript build.icons build.jsonImports`), i18n: { default: "ui5nps build.i18n.defaultsjs build.i18n.json", - defaultsjs: `node "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`, - json: `node "${LIB}/i18n/toJSON.js" src/i18n src/generated/assets/i18n`, + defaultsjs: `ui5nps-script "${LIB}/i18n/defaults.js" src/i18n src/generated/i18n`, + json: `ui5nps-script "${LIB}/i18n/toJSON.js" src/i18n src/generated/assets/i18n`, }, jsonImports: { default: "ui5nps build.jsonImports.i18n", - i18n: `node "${LIB}/generate-json-imports/i18n.js" src/generated/assets/i18n src/generated/json-imports`, + i18n: `ui5nps-script "${LIB}/generate-json-imports/i18n.js" src/generated/assets/i18n src/generated/json-imports`, }, icons: createJSImportsCmd, }, diff --git a/packages/tools/lib/amd-to-es6/index.js b/packages/tools/lib/amd-to-es6/index.js index 3ddd7930f412..7306670cf5cd 100644 --- a/packages/tools/lib/amd-to-es6/index.js +++ b/packages/tools/lib/amd-to-es6/index.js @@ -1,6 +1,5 @@ const fs = require("fs").promises; const path = require("path"); -const basePath = process.argv[2]; const babelCore = require("@babel/core"); const babelParser = require("@babel/parser"); const babelGenerator = require("@babel/generator").default; @@ -21,7 +20,7 @@ const convertAmdToEs6 = async (code) => { })).code; } -const convertAbsImportsToRelative = (filePath, code) => { +const convertAbsImportsToRelative = (filePath, code, basePath) => { let changed = false; // console.log("File processing started: ", srcPath); @@ -69,7 +68,7 @@ const convertAbsImportsToRelative = (filePath, code) => { } const replaceGlobalCoreUsage = (filePath, code) => { - if (!filePath.includes("Configuration")) { + if (!filePath.includes("Configuration")) { const replaced = code.replace(/sap\.ui\.getCore\(\)/g, `Core`); return code !== replaced ? `import Core from 'sap/ui/core/Core';${replaced}` : code; } @@ -77,7 +76,7 @@ const replaceGlobalCoreUsage = (filePath, code) => { return code; }; -const transformAmdToES6Module = async (filePath) => { +const transformAmdToES6Module = async (filePath, basePath) => { await convertSAPUIDefineToDefine(filePath); let code = (await fs.readFile(filePath)).toString(); @@ -86,17 +85,23 @@ const transformAmdToES6Module = async (filePath) => { code = replaceGlobalCoreUsage(filePath, code); - code = convertAbsImportsToRelative(filePath, code); + code = convertAbsImportsToRelative(filePath, code, basePath); return fs.writeFile(filePath, code); } -const transformAmdToES6Modules = async () => { +const transformAmdToES6Modules = async (argv) => { + const basePath = argv[2]; const { globby } = await import("globby"); const fileNames = await globby(basePath.replace(/\\/g, "/") + "**/*.js"); - return Promise.all(fileNames.map(transformAmdToES6Module).filter(x => !!x)); + return Promise.all(fileNames.map(fileName => transformAmdToES6Module(fileName, basePath)).filter(x => !!x)) + .then(() => { + console.log("Success: all amd modules are transformed to es6!"); + }); }; -transformAmdToES6Modules().then(() => { - console.log("Success: all amd modules are transformed to es6!"); -}); \ No newline at end of file +if (require.main === module) { + transformAmdToES6Modules(process.argv) +} + +exports._ui5mainFn = transformAmdToES6Modules; \ No newline at end of file diff --git a/packages/tools/lib/cem/cem.js b/packages/tools/lib/cem/cem.js new file mode 100644 index 000000000000..cb2c748fc48f --- /dev/null +++ b/packages/tools/lib/cem/cem.js @@ -0,0 +1,12 @@ +const cemCLI = require("@custom-elements-manifest/analyzer/cli") + +const main = async argv => { + const patchedArgv = argv.slice(2); + await cemCLI.cli({ argv: patchedArgv, cwd: process.cwd(), noWrite: false }); +} + +if (require.main === module) { + main(process.argv) +} + +exports._ui5mainFn = main; \ No newline at end of file diff --git a/packages/tools/lib/cem/validate.js b/packages/tools/lib/cem/validate.js index 1da039400ebd..4a97b8806603 100644 --- a/packages/tools/lib/cem/validate.js +++ b/packages/tools/lib/cem/validate.js @@ -5,63 +5,72 @@ const path = require('path'); const extenalSchema = require('./schema.json'); const internalSchema = require('./schema-internal.json'); -// Load your JSON data from the input file -const inputFilePath = path.join(process.cwd(), "dist/custom-elements.json"); // Update with your file path -const customManifest = fs.readFileSync(inputFilePath, 'utf8'); -const inputDataInternal = JSON.parse(customManifest); -const devMode = process.env.UI5_CEM_MODE === "dev"; -inputDataInternal.modules.forEach(moduleDoc => { - moduleDoc.exports = moduleDoc.exports. - filter(e => moduleDoc.declarations.find(d => d.name === e.declaration.name && ["class", "function", "variable", "enum"].includes(d.kind)) || e.name === "default"); -}) +const validateFn = async () => { + // Load your JSON data from the input file + const inputFilePath = path.join(process.cwd(), "dist/custom-elements.json"); // Update with your file path + const customManifest = fs.readFileSync(inputFilePath, 'utf8'); + const inputDataInternal = JSON.parse(customManifest); + const devMode = process.env.UI5_CEM_MODE === "dev"; -const clearProps = (data) => { - if (Array.isArray(data)) { - for (let i = 0; i < data.length; i++) { - if (typeof data[i] === "object") { - if (["enum", "interface"].includes(data[i].kind)) { - data.splice(i, 1); - i--; - } else { - clearProps(data[i]); + inputDataInternal.modules.forEach(moduleDoc => { + moduleDoc.exports = moduleDoc.exports. + filter(e => moduleDoc.declarations.find(d => d.name === e.declaration.name && ["class", "function", "variable", "enum"].includes(d.kind)) || e.name === "default"); + }) + + const clearProps = (data) => { + if (Array.isArray(data)) { + for (let i = 0; i < data.length; i++) { + if (typeof data[i] === "object") { + if (["enum", "interface"].includes(data[i].kind)) { + data.splice(i, 1); + i--; + } else { + clearProps(data[i]); + } } } + } else if (typeof data === "object") { + Object.keys(data).forEach(prop => { + if (prop.startsWith("_ui5")) { + delete data[prop]; + } else if (typeof data[prop] === "object") { + clearProps(data[prop]); + } + }); } - } else if (typeof data === "object") { - Object.keys(data).forEach(prop => { - if (prop.startsWith("_ui5")) { - delete data[prop]; - } else if (typeof data[prop] === "object") { - clearProps(data[prop]); - } - }); + + return data; } - return data; -} + const ajv = new Ajv({ allowUnionTypes: true, allError: true }) + let validate = ajv.compile(internalSchema) -const ajv = new Ajv({ allowUnionTypes: true, allError: true }) -let validate = ajv.compile(internalSchema) + // Validate the JSON data against the schema + if (devMode) { + if (validate(inputDataInternal)) { + console.log('Internal custom element manifest is validated successfully'); + } else { + console.log(validate.errors) + throw new Error(`Validation of internal custom elements manifest failed: ${validate.errors}`); + } + } -// Validate the JSON data against the schema -if (devMode) { - if (validate(inputDataInternal)) { - console.log('Internal custom element manifest is validated successfully'); - } else { - console.log(validate.errors) - throw new Error(`Validation of internal custom elements manifest failed: ${validate.errors}`); + const inputDataExternal = clearProps(JSON.parse(JSON.stringify(inputDataInternal))); + validate = ajv.compile(extenalSchema) + + // Validate the JSON data against the schema + if (validate(inputDataExternal)) { + console.log('Custom element manifest is validated successfully'); + fs.writeFileSync(inputFilePath, JSON.stringify(inputDataExternal, null, 2), 'utf8'); + fs.writeFileSync(inputFilePath.replace("custom-elements", "custom-elements-internal"), JSON.stringify(inputDataInternal, null, 2), 'utf8'); + } else if (devMode) { + throw new Error(`Validation of public custom elements manifest failed: ${validate.errors}`); } } -const inputDataExternal = clearProps(JSON.parse(JSON.stringify(inputDataInternal))); -validate = ajv.compile(extenalSchema) +if (require.main === module) { + validateFn() +} -// Validate the JSON data against the schema -if (validate(inputDataExternal)) { - console.log('Custom element manifest is validated successfully'); - fs.writeFileSync(inputFilePath, JSON.stringify(inputDataExternal, null, 2), 'utf8'); - fs.writeFileSync(inputFilePath.replace("custom-elements", "custom-elements-internal"), JSON.stringify(inputDataInternal, null, 2), 'utf8'); -} else if (devMode) { - throw new Error(`Validation of public custom elements manifest failed: ${validate.errors}`); -} \ No newline at end of file +exports._ui5mainFn = validateFn; \ No newline at end of file diff --git a/packages/tools/lib/copy-and-watch/index.js b/packages/tools/lib/copy-and-watch/index.js index ae974f511b95..334963f54811 100644 --- a/packages/tools/lib/copy-and-watch/index.js +++ b/packages/tools/lib/copy-and-watch/index.js @@ -30,116 +30,124 @@ const globParent = require('glob-parent'); /* CODE */ -const args = process.argv.slice(2); -const options = {}; - -['watch', 'clean', 'skip-initial-copy', 'safe', 'silent'].forEach(key => { - const index = args.indexOf(`--${key}`); - if (index >= 0) { - options[key] = true; - args.splice(index, 1); +const copyAndWatchFn = async (argv) => { + const args = argv.slice(2); + const options = {}; + + ['watch', 'clean', 'skip-initial-copy', 'safe', 'silent'].forEach(key => { + const index = args.indexOf(`--${key}`); + if (index >= 0) { + options[key] = true; + args.splice(index, 1); + } + }); + + if (args.length < 2) { + console.error('Not enough arguments: copy-and-watch [options] '); + process.exit(1); } -}); -if (args.length < 2) { - console.error('Not enough arguments: copy-and-watch [options] '.red); - process.exit(1); -} + if (options['skip-initial-copy'] && !options['watch']) { + console.error('--skip-initial-copy argument is meant to be used with --watch, otherwise no files will be copied'); + process.exit(1); + } -if (options['skip-initial-copy'] && !options['watch']) { - console.error('--skip-initial-copy argument is meant to be used with --watch, otherwise no files will be copied'.red); - process.exit(1); -} + const target = args.pop(); + const sources = args; + const parents = [...new Set(sources.map(globParent))]; -const target = args.pop(); -const sources = args; -const parents = [...new Set(sources.map(globParent))]; - -const findTarget = from => { - const parent = parents - .filter(p => from.indexOf(p) >= 0) - .sort() - .reverse()[0]; - return path.join(target, path.relative(parent, from)); -}; -const createDirIfNotExist = to => { - 'use strict'; - - const dirs = []; - let dir = path.dirname(to); - - while (dir !== path.dirname(dir)) { - dirs.unshift(dir); - dir = path.dirname(dir); - } + const findTarget = from => { + const parent = parents + .filter(p => from.indexOf(p) >= 0) + .sort() + .reverse()[0]; + return path.join(target, path.relative(parent, from)); + }; + const createDirIfNotExist = to => { + 'use strict'; + + const dirs = []; + let dir = path.dirname(to); - dirs.forEach(dir => { - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); + while (dir !== path.dirname(dir)) { + dirs.unshift(dir); + dir = path.dirname(dir); } - }); -}; -const copy = from => { - const to = findTarget(from); - createDirIfNotExist(to); - const stats = fs.statSync(from); - if (stats.isDirectory()) { - return; - } - fs.writeFileSync(to, fs.readFileSync(from)); - options.silent || console.log('[COPY]'.yellow, from, 'to'.yellow, to); -}; -const remove = from => { - const to = findTarget(from); - fs.unlinkSync(to); - options.silent || console.log('[DELETE]'.yellow, to); -}; -const rimraf = dir => { - if (fs.existsSync(dir)) { - fs.readdirSync(dir).forEach(entry => { - const entryPath = path.join(dir, entry); - if (fs.lstatSync(entryPath).isDirectory()) { - rimraf(entryPath); - } else { - fs.unlinkSync(entryPath); + + dirs.forEach(dir => { + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir); } }); - fs.rmdirSync(dir); + }; + const copy = from => { + const to = findTarget(from); + createDirIfNotExist(to); + const stats = fs.statSync(from); + if (stats.isDirectory()) { + return; + } + fs.writeFileSync(to, fs.readFileSync(from)); + options.silent || console.log('[COPY]', from, 'to', to); + }; + const remove = from => { + const to = findTarget(from); + fs.unlinkSync(to); + options.silent || console.log('[DELETE]', to); + }; + const rimraf = dir => { + if (fs.existsSync(dir)) { + fs.readdirSync(dir).forEach(entry => { + const entryPath = path.join(dir, entry); + if (fs.lstatSync(entryPath).isDirectory()) { + rimraf(entryPath); + } else { + fs.unlinkSync(entryPath); + } + }); + fs.rmdirSync(dir); + } + }; + + // clean + if (options.clean) { + rimraf(target); } -}; -// clean -if (options.clean) { - rimraf(target); -} + // initial copy + if (!options['skip-initial-copy']) { + sources.forEach(s => glob.sync(s).forEach(copy)); + } -// initial copy -if (!options['skip-initial-copy']) { - sources.forEach(s => glob.sync(s).forEach(copy)); -} + // watch + if (options.watch) { + const chokidarOptions = { + ignoreInitial: true + }; -// watch -if (options.watch) { - const chokidarOptions = { - ignoreInitial: true - }; + if (options.safe) { + chokidarOptions.awaitWriteFinish = { + stabilityThreshold: 500, + pollInterval: 100 + }; + } - if (options.safe) { - chokidarOptions.awaitWriteFinish = { - stabilityThreshold: 500, - pollInterval: 100 - }; + chokidar + .watch(sources, chokidarOptions) + .on('ready', () => sources.forEach(s => { + options.silent || console.log('[WATCH]', s); + })) + .on('add', copy) + .on('addDir', copy) + .on('change', copy) + .on('unlink', remove) + .on('unlinkDir', remove) + .on('error', e => console.log('[ERROR]', e)); } +} - chokidar - .watch(sources, chokidarOptions) - .on('ready', () => sources.forEach(s => { - options.silent || console.log('[WATCH]'.yellow, s); - })) - .on('add', copy) - .on('addDir', copy) - .on('change', copy) - .on('unlink', remove) - .on('unlinkDir', remove) - .on('error', e => console.log('[ERROR]'.red, e)); +if (require.main === module) { + copyAndWatchFn(process.argv) } + +exports._ui5mainFn = copyAndWatchFn; \ No newline at end of file diff --git a/packages/tools/lib/copy-list/index.js b/packages/tools/lib/copy-list/index.js index b999c7b749c0..bbeea47981b0 100644 --- a/packages/tools/lib/copy-list/index.js +++ b/packages/tools/lib/copy-list/index.js @@ -1,11 +1,10 @@ const fs = require("fs").promises; const path = require("path"); -const fileList = process.argv[2]; -const dest = process.argv[3]; -const src = "@openui5/sap.ui.core/src/"; - -const generate = async () => { +const generate = async (argv) => { + const fileList = argv[2]; + const dest = argv[3]; + const src = "@openui5/sap.ui.core/src/"; const filesToCopy = (await fs.readFile(fileList)).toString(); // console.log(filesToCopy); @@ -14,15 +13,22 @@ const generate = async () => { const trimFile = file => file.trim(); - return filesToCopy.split("\n").map(trimFile).filter(shouldCopy).map(async moduleName => { - const srcPath = require.resolve(path.join(src, moduleName), {paths: [process.cwd()]}); + const promises = filesToCopy.split("\n").map(trimFile).filter(shouldCopy).map(async moduleName => { + const srcPath = require.resolve(path.join(src, moduleName), { paths: [process.cwd()] }); const destPath = path.join(dest, moduleName); await fs.mkdir(path.dirname(destPath), { recursive: true }); return fs.copyFile(srcPath, destPath); }); + + return Promise.all(promises).then(() => { + console.log("Files copied."); + }); }; -generate().then(() => { - console.log("Files copied."); -}); + +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/create-icons/index.js b/packages/tools/lib/create-icons/index.js index a51bc5a6f429..e57e043611ac 100644 --- a/packages/tools/lib/create-icons/index.js +++ b/packages/tools/lib/create-icons/index.js @@ -1,11 +1,6 @@ const fs = require("fs").promises; const path = require("path"); -const collectionName = process.argv[2] || "SAP-icons-v4"; -const collectionVersion = process.argv[3]; -const srcFile = collectionVersion ? path.normalize(`src/${collectionVersion}/${collectionName}.json`) : path.normalize(`src/${collectionName}.json`); -const destDir = collectionVersion ? path.normalize(`dist/${collectionVersion}/`) : path.normalize("dist/"); - const iconTemplate = (name, pathData, ltr, collection, packageName) => `import { registerIcon } from "@ui5/webcomponents-base/dist/asset-registries/Icons.js"; const name = "${name}"; @@ -71,10 +66,14 @@ const svgTemplate = (pathData) => ` `; -const createIcons = async (file) => { +const createIcons = async (argv) => { + const collectionName = argv[2] || "SAP-icons-v4"; + const collectionVersion = argv[3]; + const srcFile = collectionVersion ? path.normalize(`src/${collectionVersion}/${collectionName}.json`) : path.normalize(`src/${collectionName}.json`); + const destDir = collectionVersion ? path.normalize(`dist/${collectionVersion}/`) : path.normalize("dist/"); await fs.mkdir(destDir, { recursive: true }); - const json = JSON.parse(await fs.readFile(file)); + const json = JSON.parse(await fs.readFile(srcFile)); const promises = []; for (let name in json.data) { @@ -82,8 +81,8 @@ const createIcons = async (file) => { const pathData = iconData.path; const ltr = !!iconData.ltr; const acc = iconData.acc; - const packageName = json.packageName; - const collection = json.collection; + const packageName = json.packageName; + const collection = json.collection; const versioned = json.version; const content = acc ? iconAccTemplate(name, pathData, ltr, acc, collection, packageName, versioned) : iconTemplate(name, pathData, ltr, collection, packageName); @@ -104,14 +103,17 @@ const createIcons = async (file) => { // For non-default collections (SAPTNTIcons and SAPBSIcons) we export the full name - "export default { 'tnt/actor' }" const effectiveName = isDefaultCollection(collection) ? name : getUnversionedFullIconName(name, collection); promises.push(fs.writeFile(path.join(path.normalize("dist/"), `${name}.js`), collectionTemplate(name, json.versions, effectiveName))); - promises.push(fs.writeFile(path.join(path.normalize("dist/"), `${name}.d.ts`), collectionTypeDefinitionTemplate(effectiveName, acc))); + promises.push(fs.writeFile(path.join(path.normalize("dist/"), `${name}.d.ts`), collectionTypeDefinitionTemplate(effectiveName, acc))); } } - return Promise.all(promises); + return Promise.all(promises) + .then(() => { + console.log("Icons created."); + }); }; -const isDefaultCollection = collectionName => collectionName === "SAP-icons-v4" || collectionName === "SAP-icons-v5"; +const isDefaultCollection = collectionName => collectionName === "SAP-icons-v4" || collectionName === "SAP-icons-v5"; const getUnversionedFullIconName = (name, collection) => `${getUnversionedCollectionName(collection)}/${name}`; const getUnversionedCollectionName = collectionName => CollectionVersionedToUnversionedMap[collectionName] || collectionName; @@ -122,6 +124,8 @@ const CollectionVersionedToUnversionedMap = { "business-suite-v2": "business-suite", }; -createIcons(srcFile).then(() => { - console.log("Icons created."); -}); +if (require.main === module) { + createIcons(process.argv) +} + +exports._ui5mainFn = createIcons; \ No newline at end of file diff --git a/packages/tools/lib/create-illustrations/index.js b/packages/tools/lib/create-illustrations/index.js index e15bbfe1487a..a058c0b744de 100644 --- a/packages/tools/lib/create-illustrations/index.js +++ b/packages/tools/lib/create-illustrations/index.js @@ -1,11 +1,10 @@ const fs = require("fs").promises; const path = require("path"); -if (process.argv.length < 7) { - throw new Error("Not enough arguments"); -} - -const generate = async () => { +const generate = async (argv) => { + if (argv.length < 7) { + throw new Error("Not enough arguments"); + } const ORIGINAL_TEXTS = { UnableToLoad: "UnableToLoad", @@ -70,12 +69,12 @@ const generate = async () => { SuccessHighFive: ORIGINAL_TEXTS.BalloonSky }; - const srcPath = process.argv[2]; - const defaultText = process.argv[3] === "true"; - const illustrationsPrefix = process.argv[4]; - const illustrationSet = process.argv[5]; - const destPath = process.argv[6]; - const collection = process.argv[7]; + const srcPath = argv[2]; + const defaultText = argv[3] === "true"; + const illustrationsPrefix = argv[4]; + const illustrationSet = argv[5]; + const destPath = argv[6]; + const collection = argv[7]; const fileNamePattern = new RegExp(`${illustrationsPrefix}-.+-(.+).svg`); // collect each illustration name because each one should have Sample.js file const fileNames = new Set(); @@ -126,8 +125,7 @@ const generate = async () => { import dialogSvg from "./${illustrationsPrefix}-Dialog-${illustrationName}.js"; import sceneSvg from "./${illustrationsPrefix}-Scene-${illustrationName}.js"; import spotSvg from "./${illustrationsPrefix}-Spot-${illustrationName}.js"; -import dotSvg from "./${illustrationsPrefix}-${hasDot}-${illustrationName}.js";${ - defaultText ? `import { +import dotSvg from "./${illustrationsPrefix}-${hasDot}-${illustrationName}.js";${defaultText ? `import { IM_TITLE_${illustrationNameUpperCase}, IM_SUBTITLE_${illustrationNameUpperCase}, } from "../generated/i18n/i18n-defaults.js";` : ``} @@ -184,17 +182,23 @@ export { dialogSvg, sceneSvg, spotSvg, dotSvg };` } }); - return Promise.all(promises).then(() => { - const nestedPromises = []; - for (let illustrationName of fileNames) { - nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.js`), illustrationImportTemplate(illustrationName))); - nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.d.ts`), illustrationTypeDefinition(illustrationName))); - } + return Promise.all(promises) + .then(() => { + const nestedPromises = []; + for (let illustrationName of fileNames) { + nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.js`), illustrationImportTemplate(illustrationName))); + nestedPromises.push(fs.writeFile(path.join(destPath, `${illustrationName}.d.ts`), illustrationTypeDefinition(illustrationName))); + } - return Promise.all(nestedPromises); - }); + return Promise.all(nestedPromises); + }) + .then(() => { + console.log("Illustrations generated."); + }); }; -generate().then(() => { - console.log("Illustrations generated."); -}); +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/css-processors/css-processor-components.mjs b/packages/tools/lib/css-processors/css-processor-components.mjs index 8ec38052dff5..8315259e4499 100644 --- a/packages/tools/lib/css-processors/css-processor-components.mjs +++ b/packages/tools/lib/css-processors/css-processor-components.mjs @@ -7,72 +7,82 @@ import chokidar from "chokidar"; import scopeVariables from "./scope-variables.mjs"; import { writeFileIfChanged, getFileContent } from "./shared.mjs"; -const tsMode = process.env.UI5_TS === "true"; -const extension = tsMode ? ".css.ts" : ".css.js"; +const generate = async (argv) => { + const tsMode = process.env.UI5_TS === "true"; + const extension = tsMode ? ".css.ts" : ".css.js"; -const packageJSON = JSON.parse(fs.readFileSync("./package.json")) -const inputFilesGlob = "src/themes/*.css"; -const restArgs = process.argv.slice(2); + const packageJSON = JSON.parse(fs.readFileSync("./package.json")) + const inputFilesGlob = "src/themes/*.css"; + const restArgs = argv.slice(2); -let customPlugin = { - name: 'ui5-tools', - setup(build) { - build.initialOptions.write = false; + let customPlugin = { + name: 'ui5-tools', + setup(build) { + build.initialOptions.write = false; - build.onEnd(result => { - result.outputFiles.forEach(async f => { - // scoping - let newText = scopeVariables(f.text, packageJSON); - newText = newText.replaceAll(/\\/g, "\\\\"); // Escape backslashes as they might appear in css rules - await mkdir(path.dirname(f.path), {recursive: true}); - writeFile(f.path, newText); + build.onEnd(result => { + result.outputFiles.forEach(async f => { + // scoping + let newText = scopeVariables(f.text, packageJSON); + newText = newText.replaceAll(/\\/g, "\\\\"); // Escape backslashes as they might appear in css rules + await mkdir(path.dirname(f.path), { recursive: true }); + writeFile(f.path, newText); - // JS/TS - const jsPath = f.path.replace(/dist[\/\\]css/, "src/generated/").replace(".css", extension); - const jsContent = getFileContent(packageJSON.name, "\`" + newText + "\`", true); - writeFileIfChanged(jsPath, jsContent); - }); - }) - }, -} + // JS/TS + const jsPath = f.path.replace(/dist[\/\\]css/, "src/generated/").replace(".css", extension); + const jsContent = getFileContent(packageJSON.name, "\`" + newText + "\`", true); + writeFileIfChanged(jsPath, jsContent); + }); + }) + }, + } -const getConfig = async () => { - const config = { - entryPoints: await globby(inputFilesGlob), - bundle: true, - minify: true, - outdir: 'dist/css', - outbase: 'src', - plugins: [ - customPlugin, - ] - }; - return config; -} + const getConfig = async () => { + const config = { + entryPoints: await globby(inputFilesGlob), + bundle: true, + minify: true, + outdir: 'dist/css', + outbase: 'src', + plugins: [ + customPlugin, + ] + }; + return config; + } -if (restArgs.includes("-w")) { - let ready; - let config = await getConfig(); - let ctx = await esbuild.context(config); - await ctx.watch() - console.log('watching...') + if (restArgs.includes("-w")) { + let ready; + let config = await getConfig(); + let ctx = await esbuild.context(config); + await ctx.watch() + console.log('watching...') - // when new component css files are added, they do not trigger a build as no one directly imports them - // restart the watch mode with the new entry points if a css file is added. - const watcher = chokidar.watch(inputFilesGlob); - watcher.on("ready", () => { - ready = true; // Initial scan is over -> waiting for new files - }); - watcher.on("add", async path => { - if (ready) { - // new file - ctx.dispose(); - config = await getConfig(); - ctx = await esbuild.context(config); - ctx.watch(); - } - }); -} else { - const config = await getConfig(); - const result = await esbuild.build(config); + // when new component css files are added, they do not trigger a build as no one directly imports them + // restart the watch mode with the new entry points if a css file is added. + const watcher = chokidar.watch(inputFilesGlob); + watcher.on("ready", () => { + ready = true; // Initial scan is over -> waiting for new files + }); + watcher.on("add", async path => { + if (ready) { + // new file + ctx.dispose(); + config = await getConfig(); + ctx = await esbuild.context(config); + ctx.watch(); + } + }); + } else { + const config = await getConfig(); + const result = await esbuild.build(config); + } } + +if (import.meta.url === `file://${process.argv[1]}`) { + generate(process.argv) +} + +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/tools/lib/css-processors/css-processor-themes.mjs b/packages/tools/lib/css-processors/css-processor-themes.mjs index 927552c5ee65..7fd4f818470b 100644 --- a/packages/tools/lib/css-processors/css-processor-themes.mjs +++ b/packages/tools/lib/css-processors/css-processor-themes.mjs @@ -8,81 +8,91 @@ import combineDuplicatedSelectors from "../postcss-combine-duplicated-selectors/ import { writeFileIfChanged, getFileContent } from "./shared.mjs"; import scopeVariables from "./scope-variables.mjs"; -const tsMode = process.env.UI5_TS === "true"; -const extension = tsMode ? ".css.ts" : ".css.js"; +const generate = async (argv) => { + const tsMode = process.env.UI5_TS === "true"; + const extension = tsMode ? ".css.ts" : ".css.js"; -const packageJSON = JSON.parse(fs.readFileSync("./package.json")) + const packageJSON = JSON.parse(fs.readFileSync("./package.json")) -const inputFiles = await globby([ - "src/**/parameters-bundle.css", -]); -const restArgs = process.argv.slice(2); + const inputFiles = await globby([ + "src/**/parameters-bundle.css", + ]); + const restArgs = argv.slice(2); -const processThemingPackageFile = async (f) => { - const selector = ':root'; - const result = await postcss().process(f.text); + const processThemingPackageFile = async (f) => { + const selector = ':root'; + const result = await postcss().process(f.text); - const newRule = postcss.rule({ selector }); + const newRule = postcss.rule({ selector }); - result.root.walkRules(selector, rule => { - rule.walkDecls(decl => { - if (!decl.prop.startsWith('--sapFontUrl')) { - newRule.append(decl.clone()); - } + result.root.walkRules(selector, rule => { + rule.walkDecls(decl => { + if (!decl.prop.startsWith('--sapFontUrl')) { + newRule.append(decl.clone()); + } + }); }); - }); - - return newRule.toString(); -}; -const processComponentPackageFile = async (f) => { - const result = await postcss(combineDuplicatedSelectors).process(f.text); - - return scopeVariables(result.css, packageJSON, f.path); + return newRule.toString(); + }; + + const processComponentPackageFile = async (f) => { + const result = await postcss(combineDuplicatedSelectors).process(f.text); + + return scopeVariables(result.css, packageJSON, f.path); + } + + let scopingPlugin = { + name: 'scoping', + setup(build) { + build.initialOptions.write = false; + + build.onEnd(result => { + result.outputFiles.forEach(async f => { + let newText = f.path.includes("packages/theming") ? await processThemingPackageFile(f) : await processComponentPackageFile(f); + + await mkdir(path.dirname(f.path), { recursive: true }); + writeFile(f.path, newText); + + // JSON + const jsonPath = f.path.replace(/dist[\/\\]css/, "dist/generated/assets").replace(".css", ".css.json"); + await mkdir(path.dirname(jsonPath), { recursive: true }); + writeFileIfChanged(jsonPath, JSON.stringify(newText)); + + // JS/TS + const jsPath = f.path.replace(/dist[\/\\]css/, "src/generated/").replace(".css", extension); + const jsContent = getFileContent(packageJSON.name, "\`" + newText + "\`"); + writeFileIfChanged(jsPath, jsContent); + }); + }) + }, + } + + const config = { + entryPoints: inputFiles, + bundle: true, + minify: true, + outdir: 'dist/css', + outbase: 'src', + plugins: [ + scopingPlugin, + ], + external: ["*.ttf", "*.woff", "*.woff2"], + }; + + if (restArgs.includes("-w")) { + let ctx = await esbuild.context(config); + console.log('watching...') + await ctx.watch() + } else { + await esbuild.build(config); + } } -let scopingPlugin = { - name: 'scoping', - setup(build) { - build.initialOptions.write = false; - - build.onEnd(result => { - result.outputFiles.forEach(async f => { - let newText = f.path.includes("packages/theming") ? await processThemingPackageFile(f) : await processComponentPackageFile(f); - - await mkdir(path.dirname(f.path), { recursive: true }); - writeFile(f.path, newText); - - // JSON - const jsonPath = f.path.replace(/dist[\/\\]css/, "dist/generated/assets").replace(".css", ".css.json"); - await mkdir(path.dirname(jsonPath), { recursive: true }); - writeFileIfChanged(jsonPath, JSON.stringify(newText)); - - // JS/TS - const jsPath = f.path.replace(/dist[\/\\]css/, "src/generated/").replace(".css", extension); - const jsContent = getFileContent(packageJSON.name, "\`" + newText + "\`"); - writeFileIfChanged(jsPath, jsContent); - }); - }) - }, +if (import.meta.url === `file://${process.argv[1]}`) { + generate(process.argv) } -const config = { - entryPoints: inputFiles, - bundle: true, - minify: true, - outdir: 'dist/css', - outbase: 'src', - plugins: [ - scopingPlugin, - ], - external: ["*.ttf", "*.woff", "*.woff2"], -}; - -if (restArgs.includes("-w")) { - let ctx = await esbuild.context(config); - await ctx.watch() - console.log('watching...') -} else { - const result = await esbuild.build(config); +export default { + _ui5mainFn: generate } \ No newline at end of file diff --git a/packages/tools/lib/generate-js-imports/illustrations.js b/packages/tools/lib/generate-js-imports/illustrations.js index 2de88f5eccc0..d5083cc64809 100644 --- a/packages/tools/lib/generate-js-imports/illustrations.js +++ b/packages/tools/lib/generate-js-imports/illustrations.js @@ -43,7 +43,17 @@ const getMatchingFiles = async (folder, pattern) => { return dir.filter((fileName) => fileName.match(pattern)); }; -const generateIllustrations = async (config) => { +const generateIllustrations = async (argv) => { + const config = { + inputFolder: argv[2], + outputFile: argv[3], + set: argv[4], + collection: argv[5], + location: argv[6], + filterOut: argv[7].slice().split(","), + }; + + const { inputFolder, outputFile, collection, location, prefix, filterOut, set } = config; const normalizedInputFolder = path.normalize(inputFolder); @@ -64,19 +74,12 @@ const generateIllustrations = async (config) => { await fs.mkdir(path.dirname(normalizedOutputFile), { recursive: true }); await fs.writeFile(normalizedOutputFile, contentDynamic); -}; -// Parse configuration from command-line arguments -const config = { - inputFolder: process.argv[2], - outputFile: process.argv[3], - set: process.argv[4], - collection: process.argv[5], - location: process.argv[6], - filterOut: process.argv[7].slice().split(","), + console.log("Generated illustration imports."); }; -// Run the generation process -generateIllustrations(config).catch((error) => { - console.error("Error generating illustrations:", error); -}); +if (require.main === module) { + generateIllustrations(process.argv) +} + +exports._ui5mainFn = generateIllustrations; \ No newline at end of file diff --git a/packages/tools/lib/generate-json-imports/i18n.js b/packages/tools/lib/generate-json-imports/i18n.js index e3e93ba3f16e..436237051e49 100644 --- a/packages/tools/lib/generate-json-imports/i18n.js +++ b/packages/tools/lib/generate-json-imports/i18n.js @@ -32,14 +32,14 @@ localeIds.forEach(localeId => { `; } -const generate = async () => { +const generate = async (argv) => { const packageName = JSON.parse(await fs.readFile("package.json")).name; - const inputFolder = path.normalize(process.argv[2]); - const outputFileDynamic = path.normalize(`${process.argv[3]}/i18n.${ext}`); - const outputFileFetchMetaResolve = path.normalize(`${process.argv[3]}/i18n-fetch.${ext}`); - const outputFileDynamicImportJSONImport = path.normalize(`${process.argv[3]}/i18n-node.${ext}`); + const inputFolder = path.normalize(argv[2]); + const outputFileDynamic = path.normalize(`${argv[3]}/i18n.${ext}`); + const outputFileFetchMetaResolve = path.normalize(`${argv[3]}/i18n-fetch.${ext}`); + const outputFileDynamicImportJSONImport = path.normalize(`${argv[3]}/i18n-node.${ext}`); // All languages present in the file system const files = await fs.readdir(inputFolder); @@ -79,9 +79,13 @@ const generate = async () => { fs.writeFile(outputFileDynamic, contentDynamic), fs.writeFile(outputFileFetchMetaResolve, contentFetchMetaResolve), fs.writeFile(outputFileDynamicImportJSONImport, contentDynamicImportJSONAttr), - ]); + ]).then(() => { + console.log("Generated i18n JSON imports."); + }); } -generate().then(() => { - console.log("Generated i18n JSON imports."); -}); +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/generate-json-imports/themes.js b/packages/tools/lib/generate-json-imports/themes.js index a3fc84f1f39a..b61d28a7226a 100644 --- a/packages/tools/lib/generate-json-imports/themes.js +++ b/packages/tools/lib/generate-json-imports/themes.js @@ -5,11 +5,11 @@ const assets = require("../../assets-meta.js"); const isTypeScript = process.env.UI5_TS; const ext = isTypeScript ? 'ts' : 'js'; -const generate = async () => { - const inputFolder = path.normalize(process.argv[2]); - const outputFileDynamic = path.normalize(`${process.argv[3]}/Themes.${ext}`); - const outputFileDynamicImportJSONAttr = path.normalize(`${process.argv[3]}/Themes-node.${ext}`); - const outputFileFetchMetaResolve = path.normalize(`${process.argv[3]}/Themes-fetch.${ext}`); +const generate = async (argv) => { + const inputFolder = path.normalize(argv[2]); + const outputFileDynamic = path.normalize(`${argv[3]}/Themes.${ext}`); + const outputFileDynamicImportJSONAttr = path.normalize(`${argv[3]}/Themes-node.${ext}`); + const outputFileFetchMetaResolve = path.normalize(`${argv[3]}/Themes-fetch.${ext}`); // All supported optional themes const allThemes = assets.themes.all; @@ -49,7 +49,7 @@ const loadAndCheck = async (themeName) => { }; ${availableThemesArray} - .forEach(themeName => registerThemePropertiesLoader(${ packageName.split("").map(c => `"${c}"`).join (" + ") }, themeName, loadAndCheck)); + .forEach(themeName => registerThemePropertiesLoader(${packageName.split("").map(c => `"${c}"`).join(" + ")}, themeName, loadAndCheck)); `; } @@ -58,9 +58,14 @@ ${availableThemesArray} fs.writeFile(outputFileDynamic, contentDynamic(dynamicImportLines)), fs.writeFile(outputFileDynamicImportJSONAttr, contentDynamic(dynamicImportJSONAttrLines)), fs.writeFile(outputFileFetchMetaResolve, contentDynamic(fetchMetaResolveLines)), - ]); + ]). + then(() => { + console.log("Generated themes JSON imports."); + }) }; -generate().then(() => { - console.log("Generated themes JSON imports."); -}); +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/i18n/defaults.js b/packages/tools/lib/i18n/defaults.js index dc909a12b713..8bac7a4a82f4 100644 --- a/packages/tools/lib/i18n/defaults.js +++ b/packages/tools/lib/i18n/defaults.js @@ -3,14 +3,14 @@ const path = require('path'); const PropertiesReader = require('properties-reader'); const assets = require('../../assets-meta.js'); -const generate = async () => { +const generate = async (argv) => { const defaultLanguage = assets.languages.default; - const messageBundle = path.normalize(`${process.argv[2]}/messagebundle.properties`); - const messageBundleDefaultLanguage = path.normalize(`${process.argv[2]}/messagebundle_${defaultLanguage}.properties`); + const messageBundle = path.normalize(`${argv[2]}/messagebundle.properties`); + const messageBundleDefaultLanguage = path.normalize(`${argv[2]}/messagebundle_${defaultLanguage}.properties`); const tsMode = process.env.UI5_TS === "true"; // In Typescript mode, we output .ts files and set the required types, otherwise - output pure .js files - const outputFile = path.normalize(`${process.argv[3]}/i18n-defaults.${tsMode ? "ts": "js"}`); + const outputFile = path.normalize(`${argv[3]}/i18n-defaults.${tsMode ? "ts" : "js"}`); if (!messageBundle || !outputFile) { return; @@ -76,8 +76,13 @@ export {${textKeys.join()}};`; await fs.mkdir(path.dirname(outputFile), { recursive: true }); await fs.writeFile(outputFile, getOutputFileContent(properties, defaultLanguageProperties)); + + + console.log("i18n default file generated.") }; -generate().then(() => { - console.log("i18n default file generated."); -}); +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/i18n/toJSON.js b/packages/tools/lib/i18n/toJSON.js index 80ff49856475..88776bb4747d 100644 --- a/packages/tools/lib/i18n/toJSON.js +++ b/packages/tools/lib/i18n/toJSON.js @@ -14,10 +14,7 @@ const assets = require('../../assets-meta.js'); const allLanguages = assets.languages.all; -const messagesBundles = path.normalize(`${process.argv[2]}/messagebundle_*.properties`); -const messagesJSONDist = path.normalize(`${process.argv[3]}`); - -const convertToJSON = async (file) => { +const convertToJSON = async (file, distPath) => { const properties = PropertiesReader(file)._properties; const filename = path.basename(file, path.extname(file)); const language = filename.match(/^messagebundle_(.*?)$/)[1]; @@ -25,19 +22,26 @@ const convertToJSON = async (file) => { console.log("Not supported language: ", language); return; } - const outputFile = path.normalize(`${messagesJSONDist}/${filename}.json`); + const outputFile = path.normalize(`${distPath}/${filename}.json`); return fs.writeFile(outputFile, JSON.stringify(properties)); // console.log(`[i18n]: "${filename}.json" has been generated!`); }; -const generate = async () => { +const generate = async (agrv) => { const { globby } = await import("globby"); + const messagesBundles = path.normalize(`${agrv[2]}/messagebundle_*.properties`); + const messagesJSONDist = path.normalize(`${agrv[3]}`); await fs.mkdir(messagesJSONDist, { recursive: true }); const files = await globby(messagesBundles.replace(/\\/g, "/")); - return Promise.all(files.map(convertToJSON)); + return Promise.all(files.map(file => convertToJSON(file, messagesJSONDist))) + .then(() => { + console.log("Message bundle JSON files generated."); + }); }; -generate().then(() => { - console.log("Message bundle JSON files generated."); -}); +if (require.main === module) { + generate(process.argv) +} + +exports._ui5mainFn = generate; \ No newline at end of file diff --git a/packages/tools/lib/remove-dev-mode/remove-dev-mode.mjs b/packages/tools/lib/remove-dev-mode/remove-dev-mode.mjs index d46f2ae7360a..79d1079f0e29 100644 --- a/packages/tools/lib/remove-dev-mode/remove-dev-mode.mjs +++ b/packages/tools/lib/remove-dev-mode/remove-dev-mode.mjs @@ -2,36 +2,46 @@ import { globby } from "globby"; import * as esbuild from 'esbuild' import * as fs from "fs"; -let customPlugin = { +const generate = async () => { + let customPlugin = { name: 'ui5-tools', setup(build) { - build.onLoad({ filter: /UI5Element.ts$/ }, async (args) => { - let text = await fs.promises.readFile(args.path, 'utf8'); - text = text.replaceAll(/const DEV_MODE = true/g, ""); - text = text.replaceAll(/if \(DEV_MODE\)/g, "if (false)"); - return { - contents: text, - loader: 'ts', - } - }) - }, -} + build.onLoad({ filter: /UI5Element.ts$/ }, async (args) => { + let text = await fs.promises.readFile(args.path, 'utf8'); + text = text.replaceAll(/const DEV_MODE = true/g, ""); + text = text.replaceAll(/if \(DEV_MODE\)/g, "if (false)"); + return { + contents: text, + loader: 'ts', + } + }) + }, + } -const getConfig = async () => { + const getConfig = async () => { const config = { - entryPoints: await globby("src/**/*.ts"), - bundle: false, - minify: true, - sourcemap: true, - outdir: 'dist/prod', - outbase: 'src', - plugins: [ - customPlugin, - ] + entryPoints: await globby("src/**/*.ts"), + bundle: false, + minify: true, + sourcemap: true, + outdir: 'dist/prod', + outbase: 'src', + plugins: [ + customPlugin, + ] }; return config; + } + + + const config = await getConfig(); + const result = await esbuild.build(config); } +if (import.meta.url === `file://${process.argv[1]}`) { + generate() +} -const config = await getConfig(); -const result = await esbuild.build(config); \ No newline at end of file +export default { + _ui5mainFn: generate +} \ No newline at end of file diff --git a/packages/tools/lib/rimraf/rimraf.js b/packages/tools/lib/rimraf/rimraf.js new file mode 100644 index 000000000000..99303d768698 --- /dev/null +++ b/packages/tools/lib/rimraf/rimraf.js @@ -0,0 +1,31 @@ +const fs = require('fs'); +const path = require('path'); + +const rimraf = dir => { + if (fs.existsSync(dir)) { + fs.readdirSync(dir).forEach(entry => { + const entryPath = path.join(dir, entry); + if (fs.lstatSync(entryPath).isDirectory()) { + rimraf(entryPath); + } else { + fs.unlinkSync(entryPath); + } + }); + fs.rmdirSync(dir); + } +}; + +const main = argv => { + if (argv.length < 3) { + console.error("rimraf "); + process.exit(1); + } + const dir = argv[2]; + rimraf(dir); +}; + +if (require.main === module) { + main(process.argv) +} + +exports._ui5mainFn = main; \ No newline at end of file diff --git a/packages/tools/package.json b/packages/tools/package.json index b763f8284d91..c791dfb14267 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -37,7 +37,6 @@ "chokidar-cli": "^3.0.0", "command-line-args": "^5.1.1", "comment-parser": "^1.4.0", - "concurrently": "^6.0.0", "cross-env": "^7.0.3", "custom-element-jet-brains-integration": "^1.4.4", "dotenv": "^16.5.0", @@ -63,8 +62,8 @@ "properties-reader": "^2.2.0", "recursive-readdir": "^2.2.2", "resolve": "^1.20.0", - "rimraf": "^3.0.2", "slash": "3.0.0", + "string-argv": "^0.3.2", "vite": "^5.4.8", "vite-plugin-istanbul": "^6.0.2", "wdio-chromedriver-service": "^7.3.2" diff --git a/yarn.lock b/yarn.lock index 14f5c9a5b6e3..a61f2844b1ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1978,7 +1978,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.8.4": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.8.4": version: 7.26.10 resolution: "@babel/runtime@npm:7.26.10" dependencies: @@ -2530,7 +2530,33 @@ __metadata: languageName: node linkType: hard -"@cypress/request@npm:^3.0.6, @cypress/request@npm:^3.0.9": +"@cypress/request@npm:^3.0.0": + version: 3.0.1 + resolution: "@cypress/request@npm:3.0.1" + dependencies: + aws-sign2: "npm:~0.7.0" + aws4: "npm:^1.8.0" + caseless: "npm:~0.12.0" + combined-stream: "npm:~1.0.6" + extend: "npm:~3.0.2" + forever-agent: "npm:~0.6.1" + form-data: "npm:~2.3.2" + http-signature: "npm:~1.3.6" + is-typedarray: "npm:~1.0.0" + isstream: "npm:~0.1.2" + json-stringify-safe: "npm:~5.0.1" + mime-types: "npm:~2.1.19" + performance-now: "npm:^2.1.0" + qs: "npm:6.10.4" + safe-buffer: "npm:^5.1.2" + tough-cookie: "npm:^4.1.3" + tunnel-agent: "npm:^0.6.0" + uuid: "npm:^8.3.2" + checksum: 10c0/8eb92a665e6549e2533f5169431addcaad0307f51a8c7f3b6b169eb79b4d673373784a527590a47b0a2905ad5f601b24ab2d1b31d184243235aba470ffc9c1f7 + languageName: node + linkType: hard + +"@cypress/request@npm:^3.0.9": version: 3.0.9 resolution: "@cypress/request@npm:3.0.9" dependencies: @@ -3762,22 +3788,6 @@ __metadata: languageName: node linkType: hard -"@isaacs/balanced-match@npm:^4.0.1": - version: 4.0.1 - resolution: "@isaacs/balanced-match@npm:4.0.1" - checksum: 10c0/7da011805b259ec5c955f01cee903da72ad97c5e6f01ca96197267d3f33103d5b2f8a1af192140f3aa64526c593c8d098ae366c2b11f7f17645d12387c2fd420 - languageName: node - linkType: hard - -"@isaacs/brace-expansion@npm:^5.0.0": - version: 5.0.0 - resolution: "@isaacs/brace-expansion@npm:5.0.0" - dependencies: - "@isaacs/balanced-match": "npm:^4.0.1" - checksum: 10c0/b4d4812f4be53afc2c5b6c545001ff7a4659af68d4484804e9d514e183d20269bb81def8682c01a22b17c4d6aed14292c8494f7d2ac664e547101c1a905aa977 - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -5742,13 +5752,6 @@ __metadata: languageName: node linkType: hard -"@types/add@npm:^2": - version: 2.0.3 - resolution: "@types/add@npm:2.0.3" - checksum: 10c0/d18841b43d3799f69db0bdae380d19d05f43b716315c5bfd4d6c1b3467bada2644eab8c04bb5afdb94bba87604da06d466f22fe30df6bcf0518c373593bb474a - languageName: node - linkType: hard - "@types/aria-query@npm:^5.0.0": version: 5.0.1 resolution: "@types/aria-query@npm:5.0.1" @@ -6871,7 +6874,6 @@ __metadata: chokidar-cli: "npm:^3.0.0" cypress: "npm:^15.3.0" eslint: "npm:^7.22.0" - rimraf: "npm:^6.0.1" vite: "npm:5.4.8" languageName: unknown linkType: soft @@ -6888,18 +6890,13 @@ __metadata: "@ui5/webcomponents-tools": "npm:2.15.0-rc.2" chokidar-cli: "npm:^3.0.0" clean-css: "npm:^5.2.2" - concurrently: "npm:^9.2.1" - copy-and-watch: "npm:^0.1.5" - cross-env: "npm:^7.0.3" cypress: "npm:^15.3.0" eslint: "npm:^7.22.0" lit-html: "npm:^2.0.1" mkdirp: "npm:^1.0.4" mocha: "npm:^11.7.2" - nps: "npm:^5.10.0" replace-in-file: "npm:^6.3.5" resolve: "npm:^1.20.0" - rimraf: "npm:^6.0.1" touch: "npm:^3.1.0" typescript: "npm:^5.6.2" vite: "npm:5.4.8" @@ -6920,7 +6917,6 @@ __metadata: chokidar-cli: "npm:^3.0.0" cypress: "npm:^15.3.0" eslint: "npm:^7.22.0" - rimraf: "npm:^6.0.1" vite: "npm:5.4.8" languageName: unknown linkType: soft @@ -6930,7 +6926,6 @@ __metadata: resolution: "@ui5/webcomponents-fiori@workspace:packages/fiori" dependencies: "@custom-elements-manifest/analyzer": "patch:@custom-elements-manifest/analyzer@npm%3A0.10.6#~/.yarn/patches/@custom-elements-manifest-analyzer-npm-0.10.6-9b5ff0c50b.patch" - "@types/add": "npm:^2" "@ui5/cypress-internal": "npm:0.1.0" "@ui5/webcomponents": "npm:2.15.0-rc.2" "@ui5/webcomponents-base": "npm:2.15.0-rc.2" @@ -6938,12 +6933,10 @@ __metadata: "@ui5/webcomponents-theming": "npm:2.15.0-rc.2" "@ui5/webcomponents-tools": "npm:2.15.0-rc.2" "@zxing/library": "npm:^0.21.3" - add: "npm:^2.0.6" chokidar-cli: "npm:^3.0.0" cypress: "npm:^15.3.0" eslint: "npm:^7.22.0" lit: "npm:^2.0.0" - rimraf: "npm:^6.0.1" vite: "npm:5.4.8" yarn: "npm:^1.22.22" languageName: unknown @@ -6955,7 +6948,6 @@ __metadata: dependencies: "@ui5/webcomponents-base": "npm:2.15.0-rc.2" "@ui5/webcomponents-tools": "npm:2.15.0-rc.2" - rimraf: "npm:^6.0.1" languageName: unknown linkType: soft @@ -6965,7 +6957,6 @@ __metadata: dependencies: "@ui5/webcomponents-base": "npm:2.15.0-rc.2" "@ui5/webcomponents-tools": "npm:2.15.0-rc.2" - rimraf: "npm:^6.0.1" languageName: unknown linkType: soft @@ -6975,7 +6966,6 @@ __metadata: dependencies: "@ui5/webcomponents-base": "npm:2.15.0-rc.2" "@ui5/webcomponents-tools": "npm:2.15.0-rc.2" - rimraf: "npm:^6.0.1" languageName: unknown linkType: soft @@ -6995,7 +6985,6 @@ __metadata: estree-walk: "npm:^2.2.0" mkdirp: "npm:^1.0.4" resolve: "npm:^1.20.0" - rimraf: "npm:^6.0.1" languageName: unknown linkType: soft @@ -7010,7 +6999,6 @@ __metadata: json-beautify: "npm:^1.1.1" postcss: "npm:^8.4.5" postcss-import: "npm:^14.0.2" - rimraf: "npm:^6.0.1" languageName: unknown linkType: soft @@ -7035,7 +7023,6 @@ __metadata: chokidar-cli: "npm:^3.0.0" command-line-args: "npm:^5.1.1" comment-parser: "npm:^1.4.0" - concurrently: "npm:^6.0.0" cross-env: "npm:^7.0.3" custom-element-jet-brains-integration: "npm:^1.4.4" dotenv: "npm:^16.5.0" @@ -7062,8 +7049,8 @@ __metadata: properties-reader: "npm:^2.2.0" recursive-readdir: "npm:^2.2.2" resolve: "npm:^1.20.0" - rimraf: "npm:^3.0.2" slash: "npm:3.0.0" + string-argv: "npm:^0.3.2" vite: "npm:^5.4.8" vite-plugin-istanbul: "npm:^6.0.2" wdio-chromedriver-service: "npm:^7.3.2" @@ -7126,7 +7113,6 @@ __metadata: eslint: "npm:^7.22.0" jsdom: "npm:^26.0.0" lit: "npm:^2.0.0" - rimraf: "npm:^6.0.1" vite: "npm:5.4.8" vitest: "npm:^3.0.2" languageName: unknown @@ -7833,13 +7819,6 @@ __metadata: languageName: node linkType: hard -"add@npm:^2.0.6": - version: 2.0.6 - resolution: "add@npm:2.0.6" - checksum: 10c0/6b21d5f2e58cf5e15d56cc6f9ebce04f04f4c33ae25f09d600ddacf8df00036ba521f17feb1b3f81307b7c6d2ef0bed8b511a0f86f062eb90c2f909b48b588ae - languageName: node - linkType: hard - "address@npm:^1.0.1, address@npm:^1.1.2": version: 1.2.2 resolution: "address@npm:1.2.2" @@ -8442,9 +8421,9 @@ __metadata: linkType: hard "async@npm:^3.2.0": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 + version: 3.2.5 + resolution: "async@npm:3.2.5" + checksum: 10c0/1408287b26c6db67d45cb346e34892cee555b8b59e6c68e6f8c3e495cad5ca13b4f218180e871f3c2ca30df4ab52693b66f2f6ff43644760cab0b2198bda79c1 languageName: node linkType: hard @@ -9327,7 +9306,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.0, chalk@npm:^2.0.1, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.0.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -9573,7 +9552,7 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^4.0.0, ci-info@npm:^4.1.0": +"ci-info@npm:^4.1.0": version: 4.3.0 resolution: "ci-info@npm:4.3.0" checksum: 10c0/60d3dfe95d75c01454ec1cfd5108617dd598a28a2a3e148bd7e1523c1c208b5f5a3007cafcbe293e6fd0a5a310cc32217c5dc54743eeabc0a2bec80072fc055c @@ -9671,15 +9650,15 @@ __metadata: linkType: hard "cli-table3@npm:~0.6.1": - version: 0.6.5 - resolution: "cli-table3@npm:0.6.5" + version: 0.6.4 + resolution: "cli-table3@npm:0.6.4" dependencies: "@colors/colors": "npm:1.5.0" string-width: "npm:^4.2.0" dependenciesMeta: "@colors/colors": optional: true - checksum: 10c0/d7cc9ed12212ae68241cc7a3133c52b844113b17856e11f4f81308acc3febcea7cc9fd298e70933e294dd642866b29fd5d113c2c098948701d0c35f09455de78 + checksum: 10c0/8233c3d588db19122ed62a64256c7f0208232d2cece89a6cd7732481887fd9dcef69d976c4719149e77ccbf0a68f637bd5923536adccf6cdea051eeffa0ef1c2 languageName: node linkType: hard @@ -9878,7 +9857,7 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": +"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" dependencies: @@ -9995,7 +9974,7 @@ __metadata: languageName: node linkType: hard -"common-tags@npm:^1.4.0, common-tags@npm:^1.8.0": +"common-tags@npm:^1.8.0": version: 1.8.2 resolution: "common-tags@npm:1.8.2" checksum: 10c0/23efe47ff0a1a7c91489271b3a1e1d2a171c12ec7f9b35b29b2fce51270124aff0ec890087e2bc2182c1cb746e232ab7561aaafe05f1e7452aea733d2bfe3f63 @@ -10074,41 +10053,6 @@ __metadata: languageName: node linkType: hard -"concurrently@npm:^6.0.0": - version: 6.5.1 - resolution: "concurrently@npm:6.5.1" - dependencies: - chalk: "npm:^4.1.0" - date-fns: "npm:^2.16.1" - lodash: "npm:^4.17.21" - rxjs: "npm:^6.6.3" - spawn-command: "npm:^0.0.2-1" - supports-color: "npm:^8.1.0" - tree-kill: "npm:^1.2.2" - yargs: "npm:^16.2.0" - bin: - concurrently: bin/concurrently.js - checksum: 10c0/4bc2eb5d8fa9a87d2241bc1f7830f5432fd52593944eed162567188f36d1f4219f336f72b5e6afee265547e8be1e54c8c893e5693d3874666a9ce5a7ffe4cc81 - languageName: node - linkType: hard - -"concurrently@npm:^9.2.1": - version: 9.2.1 - resolution: "concurrently@npm:9.2.1" - dependencies: - chalk: "npm:4.1.2" - rxjs: "npm:7.8.2" - shell-quote: "npm:1.8.3" - supports-color: "npm:8.1.1" - tree-kill: "npm:1.2.2" - yargs: "npm:17.7.2" - bin: - conc: dist/bin/concurrently.js - concurrently: dist/bin/concurrently.js - checksum: 10c0/da37f239f82eb7ac24f5ddb56259861e5f1d6da2ade7602b6ea7ad3101b13b5ccec02a77b7001402d1028ff2fdc38eed55644b32853ad5abf30e057002a963aa - languageName: node - linkType: hard - "config-chain@npm:^1.1.11": version: 1.1.13 resolution: "config-chain@npm:1.1.13" @@ -10562,17 +10506,6 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - "crypto-random-string@npm:^4.0.0": version: 4.0.0 resolution: "crypto-random-string@npm:4.0.0" @@ -10856,10 +10789,10 @@ __metadata: linkType: hard "cypress@npm:^13.11.0": - version: 13.17.0 - resolution: "cypress@npm:13.17.0" + version: 13.11.0 + resolution: "cypress@npm:13.11.0" dependencies: - "@cypress/request": "npm:^3.0.6" + "@cypress/request": "npm:^3.0.0" "@cypress/xvfb": "npm:^1.2.4" "@types/sinonjs__fake-timers": "npm:8.1.1" "@types/sizzle": "npm:^2.3.2" @@ -10870,7 +10803,6 @@ __metadata: cachedir: "npm:^2.3.0" chalk: "npm:^4.1.0" check-more-types: "npm:^2.24.0" - ci-info: "npm:^4.0.0" cli-cursor: "npm:^3.1.0" cli-table3: "npm:~0.6.1" commander: "npm:^6.2.1" @@ -10885,6 +10817,7 @@ __metadata: figures: "npm:^3.2.0" fs-extra: "npm:^9.1.0" getos: "npm:^3.2.1" + is-ci: "npm:^3.0.1" is-installed-globally: "npm:~0.4.0" lazy-ass: "npm:^1.6.0" listr2: "npm:^3.8.3" @@ -10898,13 +10831,12 @@ __metadata: request-progress: "npm:^3.0.0" semver: "npm:^7.5.3" supports-color: "npm:^8.1.1" - tmp: "npm:~0.2.3" - tree-kill: "npm:1.2.2" + tmp: "npm:~0.2.1" untildify: "npm:^4.0.0" yauzl: "npm:^2.10.0" bin: cypress: bin/cypress - checksum: 10c0/159ce620e32d2785082aaa1f4f30f203dcec466df4a8e80dfa299035358772fd513c35820070ba8db52e2bf58078a372ff7009068e26967f993656e7da62e221 + checksum: 10c0/a78eca7c26279928a86110d136a8ffcb339e81a04345eff155b0bc1b58f39bcce669f72f9d4e8303d038daf477525e727be2e1814ae04c100a3700c5f6f922f2 languageName: node linkType: hard @@ -11020,15 +10952,6 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:^2.16.1": - version: 2.30.0 - resolution: "date-fns@npm:2.30.0" - dependencies: - "@babel/runtime": "npm:^7.21.0" - checksum: 10c0/e4b521fbf22bc8c3db332bbfb7b094fd3e7627de0259a9d17c7551e2d2702608a7307a449206065916538e384f37b181565447ce2637ae09828427aed9cb5581 - languageName: node - linkType: hard - "dateformat@npm:^3.0.3": version: 3.0.3 resolution: "dateformat@npm:3.0.3" @@ -11736,7 +11659,7 @@ __metadata: languageName: node linkType: hard -"duplexer@npm:^0.1.1, duplexer@npm:^0.1.2, duplexer@npm:~0.1.1": +"duplexer@npm:^0.1.1, duplexer@npm:^0.1.2": version: 0.1.2 resolution: "duplexer@npm:0.1.2" checksum: 10c0/c57bcd4bdf7e623abab2df43a7b5b23d18152154529d166c1e0da6bee341d84c432d157d7e97b32fecb1bf3a8b8857dd85ed81a915789f550637ed25b8e64fc2 @@ -12898,21 +12821,6 @@ __metadata: languageName: node linkType: hard -"event-stream@npm:=3.3.4": - version: 3.3.4 - resolution: "event-stream@npm:3.3.4" - dependencies: - duplexer: "npm:~0.1.1" - from: "npm:~0" - map-stream: "npm:~0.1.0" - pause-stream: "npm:0.0.11" - split: "npm:0.3" - stream-combiner: "npm:~0.0.4" - through: "npm:~2.3.1" - checksum: 10c0/c3ec4e1efc27ab3e73a98923f0a2fa9a19051b87068fea2f3d53d2e4e8c5cfdadf8c8a115b17f3d90b16a46432d396bad91b6e8d0cceb3e449be717a03b75209 - languageName: node - linkType: hard - "eventemitter2@npm:6.4.7": version: 6.4.7 resolution: "eventemitter2@npm:6.4.7" @@ -13388,7 +13296,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^2.0.0, find-up@npm:^2.1.0": +"find-up@npm:^2.0.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" dependencies: @@ -13491,16 +13399,6 @@ __metadata: languageName: node linkType: hard -"foreground-child@npm:^3.3.1": - version: 3.3.1 - resolution: "foreground-child@npm:3.3.1" - dependencies: - cross-spawn: "npm:^7.0.6" - signal-exit: "npm:^4.0.1" - checksum: 10c0/8986e4af2430896e65bc2788d6679067294d6aee9545daefc84923a0a4b399ad9c7a3ea7bd8c0b2b80fdf4a92de4c69df3f628233ff3224260e9c1541a9e9ed3 - languageName: node - linkType: hard - "forever-agent@npm:~0.6.1": version: 0.6.1 resolution: "forever-agent@npm:0.6.1" @@ -13568,6 +13466,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:~2.3.2": + version: 2.3.3 + resolution: "form-data@npm:2.3.3" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.6" + mime-types: "npm:^2.1.12" + checksum: 10c0/706ef1e5649286b6a61e5bb87993a9842807fd8f149cd2548ee807ea4fb882247bdf7f6e64ac4720029c0cd5c80343de0e22eee1dc9e9882e12db9cc7bc016a4 + languageName: node + linkType: hard + "form-data@npm:~4.0.4": version: 4.0.4 resolution: "form-data@npm:4.0.4" @@ -13609,13 +13518,6 @@ __metadata: languageName: node linkType: hard -"from@npm:~0": - version: 0.1.7 - resolution: "from@npm:0.1.7" - checksum: 10c0/3aab5aea8fe8e1f12a5dee7f390d46a93431ce691b6222dcd5701c5d34378e51ca59b44967da1105a0f90fcdf5d7629d963d51e7ccd79827d19693bdcfb688d4 - languageName: node - linkType: hard - "fromentries@npm:^1.2.0": version: 1.3.2 resolution: "fromentries@npm:1.3.2" @@ -14180,22 +14082,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^11.0.0": - version: 11.0.3 - resolution: "glob@npm:11.0.3" - dependencies: - foreground-child: "npm:^3.3.1" - jackspeak: "npm:^4.1.1" - minimatch: "npm:^10.0.3" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^2.0.0" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/7d24457549ec2903920dfa3d8e76850e7c02aa709122f0164b240c712f5455c0b457e6f2a1eee39344c6148e39895be8094ae8cfef7ccc3296ed30bce250c661 - languageName: node - linkType: hard - "glob@npm:^7.0.0, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -15227,6 +15113,17 @@ __metadata: languageName: node linkType: hard +"http-signature@npm:~1.3.6": + version: 1.3.6 + resolution: "http-signature@npm:1.3.6" + dependencies: + assert-plus: "npm:^1.0.0" + jsprim: "npm:^2.0.2" + sshpk: "npm:^1.14.1" + checksum: 10c0/f8d15d8c91a5a80805530e2f401a3f83ed55162058651d86ad00df294b159a54e001b5d00e04983f7542a55865aee02d2d83d68c8499137ff2bc142553d8dfc2 + languageName: node + linkType: hard + "http-signature@npm:~1.4.0": version: 1.4.0 resolution: "http-signature@npm:1.4.0" @@ -16031,13 +15928,6 @@ __metadata: languageName: node linkType: hard -"is-object@npm:^1.0.1": - version: 1.0.2 - resolution: "is-object@npm:1.0.2" - checksum: 10c0/9cfb80c3a850f453d4a77297e0556bc2040ac6bea5b6e418aee208654938b36bab768169bef3945ccfac7a9bb460edd8034e7c6d8973bcf147d7571e1b53e764 - languageName: node - linkType: hard - "is-path-cwd@npm:^2.2.0": version: 2.2.0 resolution: "is-path-cwd@npm:2.2.0" @@ -16545,15 +16435,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^4.1.1": - version: 4.1.1 - resolution: "jackspeak@npm:4.1.1" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - checksum: 10c0/84ec4f8e21d6514db24737d9caf65361511f75e5e424980eebca4199f400874f45e562ac20fa8aeb1dd20ca2f3f81f0788b6e9c3e64d216a5794fd6f30e0e042 - languageName: node - linkType: hard - "jake@npm:^10.8.5": version: 10.8.7 resolution: "jake@npm:10.8.7" @@ -16726,7 +16607,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.1, js-yaml@npm:^3.9.0": +"js-yaml@npm:^3.10.0, js-yaml@npm:^3.13.1": version: 3.14.1 resolution: "js-yaml@npm:3.14.1" dependencies: @@ -17508,7 +17389,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4": +"lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -17615,13 +17496,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^11.0.0": - version: 11.2.2 - resolution: "lru-cache@npm:11.2.2" - checksum: 10c0/72d7831bbebc85e2bdefe01047ee5584db69d641c48d7a509e86f66f6ee111b30af7ec3bd68a967d47b69a4b1fa8bbf3872630bd06a63b6735e6f0a5f1c8e83d - languageName: node - linkType: hard - "lru-cache@npm:^4.0.1": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -17764,13 +17638,6 @@ __metadata: languageName: node linkType: hard -"manage-path@npm:^2.0.0": - version: 2.0.0 - resolution: "manage-path@npm:2.0.0" - checksum: 10c0/3e99cd7f1c3c35b893da6304ee75e2150de59ab1162588593ba8a9f3f5f019a7b83fa059b27aea61bb017cf82aa996e17afd80072660d1f45100a6a82e732071 - languageName: node - linkType: hard - "map-obj@npm:^1.0.0": version: 1.0.1 resolution: "map-obj@npm:1.0.1" @@ -17785,13 +17652,6 @@ __metadata: languageName: node linkType: hard -"map-stream@npm:~0.1.0": - version: 0.1.0 - resolution: "map-stream@npm:0.1.0" - checksum: 10c0/7dd6debe511c1b55d9da75e1efa65a28b1252a2d8357938d2e49b412713c478efbaefb0cdf0ee0533540c3bf733e8f9f71e1a15aa0fe74bf71b64e75bf1576bd - languageName: node - linkType: hard - "mark.js@npm:^8.11.1": version: 8.11.1 resolution: "mark.js@npm:8.11.1" @@ -18796,15 +18656,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^10.0.3": - version: 10.0.3 - resolution: "minimatch@npm:10.0.3" - dependencies: - "@isaacs/brace-expansion": "npm:^5.0.0" - checksum: 10c0/e43e4a905c5d70ac4cec8530ceaeccb9c544b1ba8ac45238e2a78121a01c17ff0c373346472d221872563204eabe929ad02669bb575cb1f0cc30facab369f70f - languageName: node - linkType: hard - "minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -19696,28 +19547,6 @@ __metadata: languageName: node linkType: hard -"nps@npm:^5.10.0": - version: 5.10.0 - resolution: "nps@npm:5.10.0" - dependencies: - arrify: "npm:^1.0.1" - chalk: "npm:^2.0.1" - common-tags: "npm:^1.4.0" - find-up: "npm:^2.1.0" - js-yaml: "npm:^3.9.0" - lodash: "npm:^4.17.4" - manage-path: "npm:^2.0.0" - prefix-matches: "npm:^1.0.1" - readline-sync: "npm:^1.4.7" - spawn-command-with-kill: "npm:^1.0.0" - type-detect: "npm:^4.0.3" - yargs: "npm:14.2.0" - bin: - nps: dist/bin/nps.js - checksum: 10c0/402d3bf4450bdee062fcbbcc9d2b212f07850ca252403f72bc052e104f894bcc49c0516b1227fef1819eda3d98a0f28c65df9debf99db42edba0b2f807627c8c - languageName: node - linkType: hard - "nth-check@npm:^2.0.0, nth-check@npm:^2.0.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" @@ -20606,16 +20435,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^2.0.0": - version: 2.0.0 - resolution: "path-scurry@npm:2.0.0" - dependencies: - lru-cache: "npm:^11.0.0" - minipass: "npm:^7.1.2" - checksum: 10c0/3da4adedaa8e7ef8d6dc4f35a0ff8f05a9b4d8365f2b28047752b62d4c1ad73eec21e37b1579ef2d075920157856a3b52ae8309c480a6f1a8bbe06ff8e52b33c - languageName: node - linkType: hard - "path-to-regexp@npm:0.1.10": version: 0.1.10 resolution: "path-to-regexp@npm:0.1.10" @@ -20694,15 +20513,6 @@ __metadata: languageName: node linkType: hard -"pause-stream@npm:0.0.11": - version: 0.0.11 - resolution: "pause-stream@npm:0.0.11" - dependencies: - through: "npm:~2.3" - checksum: 10c0/86f12c64cdaaa8e45ebaca4e39a478e1442db8b4beabc280b545bfaf79c0e2f33c51efb554aace5c069cc441c7b924ba484837b345eaa4ba6fc940d62f826802 - languageName: node - linkType: hard - "pend@npm:~1.2.0": version: 1.2.0 resolution: "pend@npm:1.2.0" @@ -21412,16 +21222,6 @@ __metadata: languageName: node linkType: hard -"prefix-matches@npm:^1.0.1": - version: 1.0.1 - resolution: "prefix-matches@npm:1.0.1" - dependencies: - is-object: "npm:^1.0.1" - starts-with: "npm:^1.0.2" - checksum: 10c0/0031e50fa9622d952da1b7ad11e217ca2866810a169ccd127b4fbfe187d9111d65af834c9ba446598cb35269efa71b38b9c720eea593300113e08cfd77cb2885 - languageName: node - linkType: hard - "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -21683,17 +21483,6 @@ __metadata: languageName: node linkType: hard -"ps-tree@npm:^1.2.0": - version: 1.2.0 - resolution: "ps-tree@npm:1.2.0" - dependencies: - event-stream: "npm:=3.3.4" - bin: - ps-tree: ./bin/ps-tree.js - checksum: 10c0/9d1c159e0890db5aa05f84d125193c2190a6c4ecd457596fd25e7611f8f747292a846459dcc0244e27d45529d4cea6d1010c3a2a087fad02624d12fdb7d97c22 - languageName: node - linkType: hard - "pseudomap@npm:^1.0.2": version: 1.0.2 resolution: "pseudomap@npm:1.0.2" @@ -21701,6 +21490,13 @@ __metadata: languageName: node linkType: hard +"psl@npm:^1.1.33": + version: 1.9.0 + resolution: "psl@npm:1.9.0" + checksum: 10c0/6a3f805fdab9442f44de4ba23880c4eba26b20c8e8e0830eff1cb31007f6825dace61d17203c58bfe36946842140c97a1ba7f67bc63ca2d88a7ee052b65d97ab + languageName: node + linkType: hard + "pump@npm:^3.0.0": version: 3.0.0 resolution: "pump@npm:3.0.0" @@ -21725,7 +21521,7 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.3.1": +"punycode@npm:^2.1.1, punycode@npm:^2.3.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 @@ -21788,6 +21584,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:6.10.4": + version: 6.10.4 + resolution: "qs@npm:6.10.4" + dependencies: + side-channel: "npm:^1.0.4" + checksum: 10c0/7a8c9d77968aeccb769aedd7e047c0e0109dad0cfa57cab1ad906f4069fd58f361b80abd2de5854ba9a09b4c5d06d6a2c82108766f1f1527572fe6130deaa471 + languageName: node + linkType: hard + "qs@npm:6.13.0": version: 6.13.0 resolution: "qs@npm:6.13.0" @@ -21813,6 +21618,13 @@ __metadata: languageName: node linkType: hard +"querystringify@npm:^2.1.1": + version: 2.2.0 + resolution: "querystringify@npm:2.2.0" + checksum: 10c0/3258bc3dbdf322ff2663619afe5947c7926a6ef5fb78ad7d384602974c467fadfc8272af44f5eb8cddd0d011aae8fabf3a929a8eee4b86edcc0a21e6bd10f9aa + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -22263,13 +22075,6 @@ __metadata: languageName: node linkType: hard -"readline-sync@npm:^1.4.7": - version: 1.4.10 - resolution: "readline-sync@npm:1.4.10" - checksum: 10c0/0a4d0fe4ad501f8f005a3c9cbf3cc0ae6ca2ced93e9a1c7c46f226bdfcb6ef5d3f437ae7e9d2e1098ee13524a3739c830e4c8dbc7f543a693eecd293e41093a3 - languageName: node - linkType: hard - "rechoir@npm:^0.6.2": version: 0.6.2 resolution: "rechoir@npm:0.6.2" @@ -22848,18 +22653,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^6.0.1": - version: 6.0.1 - resolution: "rimraf@npm:6.0.1" - dependencies: - glob: "npm:^11.0.0" - package-json-from-dist: "npm:^1.0.0" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/b30b6b072771f0d1e73b4ca5f37bb2944ee09375be9db5f558fcd3310000d29dfcfa93cf7734d75295ad5a7486dc8e40f63089ced1722a664539ffc0c3ece8c6 - languageName: node - linkType: hard - "rollup@npm:^4.20.0, rollup@npm:^4.23.0": version: 4.31.0 resolution: "rollup@npm:4.31.0" @@ -22940,7 +22733,6 @@ __metadata: "@commitlint/config-conventional": "npm:^16.2.1" "@semantic-release/github": "npm:^11.0.0" command-line-args: "npm:^5.1.1" - copy-and-watch: "npm:^0.1.5" globby: "npm:^13.1.1" husky: "npm:^7.0.4" lerna: "npm:^7.4.1" @@ -23033,24 +22825,6 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:7.8.2": - version: 7.8.2 - resolution: "rxjs@npm:7.8.2" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10c0/1fcd33d2066ada98ba8f21fcbbcaee9f0b271de1d38dc7f4e256bfbc6ffcdde68c8bfb69093de7eeb46f24b1fb820620bf0223706cff26b4ab99a7ff7b2e2c45 - languageName: node - linkType: hard - -"rxjs@npm:^6.6.3": - version: 6.6.7 - resolution: "rxjs@npm:6.6.7" - dependencies: - tslib: "npm:^1.9.0" - checksum: 10c0/e556a13a9aa89395e5c9d825eabcfa325568d9c9990af720f3f29f04a888a3b854f25845c2b55875d875381abcae2d8100af9cacdc57576e7ed6be030a01d2fe - languageName: node - linkType: hard - "rxjs@npm:^7.2.0, rxjs@npm:^7.5.1, rxjs@npm:^7.5.5": version: 7.8.1 resolution: "rxjs@npm:7.8.1" @@ -23494,13 +23268,6 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:1.8.3": - version: 1.8.3 - resolution: "shell-quote@npm:1.8.3" - checksum: 10c0/bee87c34e1e986cfb4c30846b8e6327d18874f10b535699866f368ade11ea4ee45433d97bf5eada22c4320c27df79c3a6a7eb1bf3ecfc47f2c997d9e5e2672fd - languageName: node - linkType: hard - "shell-quote@npm:^1.6.1, shell-quote@npm:^1.7.3, shell-quote@npm:^1.8.1": version: 1.8.1 resolution: "shell-quote@npm:1.8.1" @@ -23831,23 +23598,6 @@ __metadata: languageName: node linkType: hard -"spawn-command-with-kill@npm:^1.0.0": - version: 1.0.2 - resolution: "spawn-command-with-kill@npm:1.0.2" - dependencies: - ps-tree: "npm:^1.2.0" - spawn-command: "npm:^0.0.2-1" - checksum: 10c0/851e473b9f6dab8e1aced606b4e6515a2e1e4d7917f9d908487cbc009a77a1e47a489ebaefabe947b1e58f9aea22035feecf4fd13951ccb0c93210b5e463f23d - languageName: node - linkType: hard - -"spawn-command@npm:^0.0.2-1": - version: 0.0.2-1 - resolution: "spawn-command@npm:0.0.2-1" - checksum: 10c0/4e1fae2db43a7e7159b7fc4cd813bab56c0a5c0bc04c152749f7ef68170ccbe9014a35f444e19e5c095afec780bc5bca1ac73ec16eb1ab0f9a2f881c180e6b70 - languageName: node - linkType: hard - "spawn-wrap@npm:^2.0.0": version: 2.0.0 resolution: "spawn-wrap@npm:2.0.0" @@ -23939,15 +23689,6 @@ __metadata: languageName: node linkType: hard -"split@npm:0.3": - version: 0.3.3 - resolution: "split@npm:0.3.3" - dependencies: - through: "npm:2" - checksum: 10c0/88c09b1b4de84953bf5d6c153123a1fbb20addfea9381f70d27b4eb6b2bfbadf25d313f8f5d3fd727d5679b97bfe54da04766b91010f131635bf49e51d5db3fc - languageName: node - linkType: hard - "split@npm:^1.0.1": version: 1.0.1 resolution: "split@npm:1.0.1" @@ -23971,7 +23712,7 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.18.0": +"sshpk@npm:^1.14.1, sshpk@npm:^1.18.0": version: 1.18.0 resolution: "sshpk@npm:1.18.0" dependencies: @@ -24042,13 +23783,6 @@ __metadata: languageName: node linkType: hard -"starts-with@npm:^1.0.2": - version: 1.0.2 - resolution: "starts-with@npm:1.0.2" - checksum: 10c0/24bc1ba2ab40e2d3dc0a9caa163a0c9bb9076b9e4381ba29e4421263d465f8124d18ec7309655c604d40ebc14636508d4d12c86ec1d0aa6c97ef8ee9e3c4446e - languageName: node - linkType: hard - "statuses@npm:2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" @@ -24077,12 +23811,10 @@ __metadata: languageName: node linkType: hard -"stream-combiner@npm:~0.0.4": - version: 0.0.4 - resolution: "stream-combiner@npm:0.0.4" - dependencies: - duplexer: "npm:~0.1.1" - checksum: 10c0/8075a94c0eb0f20450a8236cb99d4ce3ea6e6a4b36d8baa7440b1a08cde6ffd227debadffaecd80993bd334282875d0e927ab5b88484625e01970dd251004ff5 +"string-argv@npm:^0.3.2": + version: 0.3.2 + resolution: "string-argv@npm:0.3.2" + checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 languageName: node linkType: hard @@ -24386,7 +24118,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.0, supports-color@npm:^8.1.1": +"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.1": version: 8.1.1 resolution: "supports-color@npm:8.1.1" dependencies: @@ -24690,7 +24422,7 @@ __metadata: languageName: node linkType: hard -"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8, through@npm:~2.3, through@npm:~2.3.1": +"through@npm:2, through@npm:>=2.2.7 <3, through@npm:^2.3.4, through@npm:^2.3.6, through@npm:^2.3.8": version: 2.3.8 resolution: "through@npm:2.3.8" checksum: 10c0/4b09f3774099de0d4df26d95c5821a62faee32c7e96fb1f4ebd54a2d7c11c57fe88b0a0d49cf375de5fee5ae6bf4eb56dbbf29d07366864e2ee805349970d3cc @@ -24799,7 +24531,7 @@ __metadata: languageName: node linkType: hard -"tmp@npm:~0.2.3, tmp@npm:~0.2.4": +"tmp@npm:~0.2.4": version: 0.2.5 resolution: "tmp@npm:0.2.5" checksum: 10c0/cee5bb7d674bb4ba3ab3f3841c2ca7e46daeb2109eec395c1ec7329a91d52fcb21032b79ac25161a37b2565c4858fefab927af9735926a113ef7bac9091a6e0e @@ -24857,6 +24589,18 @@ __metadata: languageName: node linkType: hard +"tough-cookie@npm:^4.1.3": + version: 4.1.4 + resolution: "tough-cookie@npm:4.1.4" + dependencies: + psl: "npm:^1.1.33" + punycode: "npm:^2.1.1" + universalify: "npm:^0.2.0" + url-parse: "npm:^1.5.3" + checksum: 10c0/aca7ff96054f367d53d1e813e62ceb7dd2eda25d7752058a74d64b7266fd07be75908f3753a32ccf866a2f997604b414cfb1916d6e7f69bc64d9d9939b0d6c45 + languageName: node + linkType: hard + "tough-cookie@npm:^5.0.0": version: 5.1.0 resolution: "tough-cookie@npm:5.1.0" @@ -24882,7 +24626,7 @@ __metadata: languageName: node linkType: hard -"tree-kill@npm:1.2.2, tree-kill@npm:^1.2.2": +"tree-kill@npm:1.2.2": version: 1.2.2 resolution: "tree-kill@npm:1.2.2" bin: @@ -25017,7 +24761,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.8.1, tslib@npm:^1.9.0": +"tslib@npm:^1.8.1": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 @@ -25092,13 +24836,6 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:^4.0.3": - version: 4.1.0 - resolution: "type-detect@npm:4.1.0" - checksum: 10c0/df8157ca3f5d311edc22885abc134e18ff8ffbc93d6a9848af5b682730ca6a5a44499259750197250479c5331a8a75b5537529df5ec410622041650a7f293e2a - languageName: node - linkType: hard - "type-fest@npm:^0.18.0": version: 0.18.1 resolution: "type-fest@npm:0.18.1" @@ -25659,6 +25396,13 @@ __metadata: languageName: node linkType: hard +"universalify@npm:^0.2.0": + version: 0.2.0 + resolution: "universalify@npm:0.2.0" + checksum: 10c0/cedbe4d4ca3967edf24c0800cfc161c5a15e240dac28e3ce575c689abc11f2c81ccc6532c8752af3b40f9120fb5e454abecd359e164f4f6aa44c29cd37e194fe + languageName: node + linkType: hard + "universalify@npm:^2.0.0": version: 2.0.0 resolution: "universalify@npm:2.0.0" @@ -25784,6 +25528,16 @@ __metadata: languageName: node linkType: hard +"url-parse@npm:^1.5.3": + version: 1.5.10 + resolution: "url-parse@npm:1.5.10" + dependencies: + querystringify: "npm:^2.1.1" + requires-port: "npm:^1.0.0" + checksum: 10c0/bd5aa9389f896974beb851c112f63b466505a04b4807cea2e5a3b7092f6fbb75316f0491ea84e44f66fed55f1b440df5195d7e3a8203f64fcefa19d182f5be87 + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -27180,16 +26934,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^15.0.0": - version: 15.0.3 - resolution: "yargs-parser@npm:15.0.3" - dependencies: - camelcase: "npm:^5.0.0" - decamelize: "npm:^1.2.0" - checksum: 10c0/396bba6fd8cbe568ea64c85583c6814d886719980ebadce03f34dd5f6b339e0260a364ab65a3e3b97db93ba2ecf0f544aac13b389f682b16170fabbfd2a20b1b - languageName: node - linkType: hard - "yargs-parser@npm:^18.1.2": version: 18.1.3 resolution: "yargs-parser@npm:18.1.3" @@ -27219,25 +26963,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:14.2.0": - version: 14.2.0 - resolution: "yargs@npm:14.2.0" - dependencies: - cliui: "npm:^5.0.0" - decamelize: "npm:^1.2.0" - find-up: "npm:^3.0.0" - get-caller-file: "npm:^2.0.1" - require-directory: "npm:^2.1.1" - require-main-filename: "npm:^2.0.0" - set-blocking: "npm:^2.0.0" - string-width: "npm:^3.0.0" - which-module: "npm:^2.0.0" - y18n: "npm:^4.0.0" - yargs-parser: "npm:^15.0.0" - checksum: 10c0/5face3efc0db85f60b258a05cfd4f61bc4dc7107ef6d539c02fcd9fc6c358f8ba22b7a21e6f1f64ac5a8d95f22179ae7c4b27a287d626e50e9a534ba22d48def - languageName: node - linkType: hard - "yargs@npm:16.2.0, yargs@npm:^16.2.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" @@ -27253,21 +26978,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.0.0, yargs@npm:^17.2.1, yargs@npm:^17.5.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 - languageName: node - linkType: hard - "yargs@npm:^13.3.0": version: 13.3.2 resolution: "yargs@npm:13.3.2" @@ -27305,6 +27015,21 @@ __metadata: languageName: node linkType: hard +"yargs@npm:^17.0.0, yargs@npm:^17.2.1, yargs@npm:^17.5.1, yargs@npm:^17.6.2, yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 + languageName: node + linkType: hard + "yarn-install@npm:^1.0.0": version: 1.0.0 resolution: "yarn-install@npm:1.0.0"