From 8f356514367d47a68b4517ecbd5fec46fb6444c7 Mon Sep 17 00:00:00 2001 From: Peter Muessig Date: Tue, 28 May 2024 11:49:15 +0200 Subject: [PATCH] feat(ui5-tooling-modules): improved handling of chunks (#1009) In the previous version the chunks have been sorted into subfolders which are identified as first module importing the chunks. This was done as a follow up of #915 which causes 404s when loading chunks in CDN scenarios. By putting the chunks into the folders with the name of the module requiring the chunk the module could be loaded successfully again when using resourceroots for the module. (implemented in 3.5.x version) With the enhancement to load the chunks with relative path names this feature is not necessary anymore and becomes optional so that it can be re-enabled by providing the config options chunksPath: true. In addition, the chunks are put by default flat into the resources folder. By providing the config option chunksPath: "my/chunk/path" you can provide a subfolder into which the chunks will be clustered into. When using the config option addToNamespace: true the chunksPath will be appended to the %namespace%/thirdparty path so that it is relative to the root where the modules are put into. --- packages/ui5-tooling-modules/README.md | 3 + .../ui5-tooling-modules/lib/middleware.js | 3 +- packages/ui5-tooling-modules/lib/task.js | 1 + packages/ui5-tooling-modules/lib/util.js | 26 ++- packages/ui5-tooling-modules/package.json | 3 +- .../test/__snap__/@supabase/supabase-js.js | 2 +- .../{jspdf => _chunks_}/jspdf.es.min2.js | 4 +- .../test/__snap__/firebase/app.js | 2 +- .../test/__snap__/firebase/firestore/lite.js | 2 +- .../{firebase/app => }/index.esm2017.js | 0 .../test/__snap__/jspdf.js | 2 +- .../ui5-tooling-modules/test/util.test.js | 36 +++-- pnpm-lock.yaml | 150 ++++++++++-------- 13 files changed, 141 insertions(+), 93 deletions(-) rename packages/ui5-tooling-modules/test/__snap__/{jspdf => _chunks_}/jspdf.es.min2.js (95%) rename packages/ui5-tooling-modules/test/__snap__/{firebase/app => }/index.esm2017.js (100%) diff --git a/packages/ui5-tooling-modules/README.md b/packages/ui5-tooling-modules/README.md index d7d79004a..ce22bf1dc 100644 --- a/packages/ui5-tooling-modules/README.md +++ b/packages/ui5-tooling-modules/README.md @@ -94,6 +94,9 @@ The following configuration options are relevant for the `task` and the `middlew - '*' ``` +- *chunksPath*: `boolean|string` + Relative path for the chunks to be stored into (if value is `true`, chunks are put into the closest modules folder which was the default behavior in the `3.5.x` release of the tooling extension) + - *minify*: `boolean` *experimental feature* Flag to indicate that the generated code should be minified (in case of excluding thirdparty resources from minification in general, this option can be used to minify just the generated code) diff --git a/packages/ui5-tooling-modules/lib/middleware.js b/packages/ui5-tooling-modules/lib/middleware.js index c05b503b7..47aa9ee2a 100644 --- a/packages/ui5-tooling-modules/lib/middleware.js +++ b/packages/ui5-tooling-modules/lib/middleware.js @@ -20,7 +20,8 @@ const chokidar = require("chokidar"); * @param {object} parameters.options Options * @param {object} [parameters.options.configuration] Custom server middleware configuration if given in ui5.yaml * @param {boolean} [parameters.options.configuration.skipCache] Flag whether the module cache for the bundles should be skipped - * @param {boolean|string[]} [parameters.options.keepDynamicImports] List of NPM packages for which the dynamic imports should be kept or boolean (defaults to true) + * @param {boolean|string[]} [parameters.options.configuration.keepDynamicImports] List of NPM packages for which the dynamic imports should be kept or boolean (defaults to true) + * @param {boolean|string} [parameters.options.configuration.chunksPath] the relative path for the chunks to be stored (defaults to "chunks", if value is true, chunks are put into the closest modules folder) * @returns {Function} Middleware function to use */ module.exports = async function ({ log, resources, options, middlewareUtil }) { diff --git a/packages/ui5-tooling-modules/lib/task.js b/packages/ui5-tooling-modules/lib/task.js index aa7bfc085..2a36f0afb 100644 --- a/packages/ui5-tooling-modules/lib/task.js +++ b/packages/ui5-tooling-modules/lib/task.js @@ -25,6 +25,7 @@ const parseJS = require("./parseJS"); * @param {boolean|string[]} [parameters.options.configuration.keepDynamicImports] List of NPM packages for which the dynamic imports should be kept or boolean (defaults to true) * @param {boolean|string[]} [parameters.options.configuration.skipTransform] flag or array of globs to verify whether the module transformation should be skipped * @param {boolean} [parameters.options.configuration.minify] minify the generated code + * @param {boolean|string} [parameters.options.configuration.chunksPath] the relative path for the chunks to be stored (defaults to "chunks", if value is true, chunks are put into the closest modules folder) * @returns {Promise} Promise resolving with undefined once data has been written */ module.exports = async function ({ log, workspace, taskUtil, options }) { diff --git a/packages/ui5-tooling-modules/lib/util.js b/packages/ui5-tooling-modules/lib/util.js index 452db13f3..e612dc58c 100755 --- a/packages/ui5-tooling-modules/lib/util.js +++ b/packages/ui5-tooling-modules/lib/util.js @@ -24,6 +24,7 @@ const { XMLParser } = require("fast-xml-parser"); const parseJS = require("./parseJS"); const { createHash } = require("crypto"); +const sanitize = require("sanitize-filename"); /** * helper to check the existence of a resource (case-sensitive) @@ -715,6 +716,7 @@ module.exports = function (log) { * @param {object} [config] configuration * @param {boolean} [config.skipCache] skip the module cache * @param {boolean} [config.debug] debug mode + * @param {boolean|string} [config.chunksPath] the relative path for the chunks to be stored (defaults to "chunks", if value is true, chunks are put into the closest modules folder) * @param {boolean|string[]} [config.skipTransform] flag or array of globs to verify whether the module transformation should be skipped * @param {boolean|string[]} [config.keepDynamicImports] List of NPM packages for which the dynamic imports should be kept or boolean (defaults to true) * @param {string} [config.generatedCode] ES compatibility of the generated code (es5, es2015) @@ -726,7 +728,11 @@ module.exports = function (log) { * @param {boolean} [options.isMiddleware] flag if the getResource is called by the middleware * @returns {object} the output object of the resource (code, chunks?, lastModified) */ - getBundleInfo: async function getBundleInfo(moduleNames, { skipCache, debug, skipTransform, keepDynamicImports, generatedCode, minify, inject } = {}, { cwd, depPaths, isMiddleware } = {}) { + getBundleInfo: async function getBundleInfo( + moduleNames, + { skipCache, debug, chunksPath, skipTransform, keepDynamicImports, generatedCode, minify, inject } = {}, + { cwd, depPaths, isMiddleware } = {} + ) { cwd = cwd || process.cwd(); let bundling = false; @@ -829,11 +835,23 @@ module.exports = function (log) { // chunk module if (module.code) { // find the module to which the chunk primarily belongs - const referencedModuleIndex = output.findIndex((m) => m.isEntry && m.imports?.indexOf(module.fileName) !== -1); - const referencedModule = modules[Math.max(referencedModuleIndex, 0)]; + let filePath = chunksPath || ""; + if (chunksPath === true) { + const referencedModuleIndex = output.findIndex((m) => m.isEntry && m.imports?.indexOf(module.fileName) !== -1); + const referencedModule = modules[Math.max(referencedModuleIndex, 0)]; + filePath = referencedModule.name; + } else if (typeof filePath === "string") { + filePath = filePath + .split(/[\\/]/) + .map(sanitize) + .filter((s) => !/^\.*$/.test(s)) + .join("/"); + } else { + filePath = ""; + } const fileName = module.fileName.substring(0, module.fileName.length - 3); bundleInfo.addChunk({ - name: `${referencedModule.name}/${fileName}`, + name: path.posix.join(filePath, fileName), originalName: fileName, code: module.code, }); diff --git a/packages/ui5-tooling-modules/package.json b/packages/ui5-tooling-modules/package.json index ea4163b44..8332b98f8 100644 --- a/packages/ui5-tooling-modules/package.json +++ b/packages/ui5-tooling-modules/package.json @@ -39,7 +39,8 @@ "ignore-walk": "^6.0.5", "minimatch": "^7.4.6", "rollup": "^4.17.2", - "rollup-plugin-polyfill-node": "^0.13.0" + "rollup-plugin-polyfill-node": "^0.13.0", + "sanitize-filename": "^1.6.3" }, "devDependencies": { "ava": "^6.1.3" diff --git a/packages/ui5-tooling-modules/test/__snap__/@supabase/supabase-js.js b/packages/ui5-tooling-modules/test/__snap__/@supabase/supabase-js.js index 370e0324e..f3089e479 100644 --- a/packages/ui5-tooling-modules/test/__snap__/@supabase/supabase-js.js +++ b/packages/ui5-tooling-modules/test/__snap__/@supabase/supabase-js.js @@ -2608,7 +2608,7 @@ sap.ui.define(['require', 'exports'], (function (require, exports) { 'use strict this.conn = null; }, }); - new Promise(function (resolve, reject) { require(['../@supabase/supabase-js/browser'], resolve, reject); }).then(function (n) { return n.browser; }).then(({ default: WS }) => { + new Promise(function (resolve, reject) { require(['../browser'], resolve, reject); }).then(function (n) { return n.browser; }).then(({ default: WS }) => { this.conn = new WS(this._endPointURL(), undefined, { headers: this.headers, }); diff --git a/packages/ui5-tooling-modules/test/__snap__/jspdf/jspdf.es.min2.js b/packages/ui5-tooling-modules/test/__snap__/_chunks_/jspdf.es.min2.js similarity index 95% rename from packages/ui5-tooling-modules/test/__snap__/jspdf/jspdf.es.min2.js rename to packages/ui5-tooling-modules/test/__snap__/_chunks_/jspdf.es.min2.js index 691db16b1..8fe2afbf1 100644 --- a/packages/ui5-tooling-modules/test/__snap__/jspdf/jspdf.es.min2.js +++ b/packages/ui5-tooling-modules/test/__snap__/_chunks_/jspdf.es.min2.js @@ -824,7 +824,7 @@ sap.ui.define(['require', 'exports'], (function (require, exports) { 'use strict * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ - function(t){t.loadFile=function(t,e,r){return function(t,e,r){e=!1!==e,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,e,r){var n=new XMLHttpRequest,i=0,a=function(t){var e=t.length,r=[],n=String.fromCharCode;for(i=0;iu&&(c=h,h=u,u=c);else {if("l"!==e&&"landscape"!==e)throw "Invalid orientation: "+e;e="l",u>h&&(c=h,h=u,u=c);}return {width:h,height:u,unit:r,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(jt):null;var r=new s(e);return e.worker?r:r.from(t).doCallback()};}(E.API),E.API.addJS=function(t){return Ht=t,this.internal.events.subscribe("postPutResources",(function(){Ut=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ut+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ht+")"),this.internal.out(">>"),this.internal.out("endobj");})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Ut&&void 0!==zt&&this.internal.out("/Names <>");})),this}, + function(t){t.loadFile=function(t,e,r){return function(t,e,r){e=!1!==e,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,e,r){var n=new XMLHttpRequest,i=0,a=function(t){var e=t.length,r=[],n=String.fromCharCode;for(i=0;iu&&(c=h,h=u,u=c);else {if("l"!==e&&"landscape"!==e)throw "Invalid orientation: "+e;e="l",u>h&&(c=h,h=u,u=c);}return {width:h,height:u,unit:r,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(jt):null;var r=new s(e);return e.worker?r:r.from(t).doCallback()};}(E.API),E.API.addJS=function(t){return Ht=t,this.internal.events.subscribe("postPutResources",(function(){Ut=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ut+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ht+")"),this.internal.out(">>"),this.internal.out("endobj");})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Ut&&void 0!==zt&&this.internal.out("/Names <>");})),this}, /** * @license * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv @@ -987,7 +987,7 @@ sap.ui.define(['require', 'exports'], (function (require, exports) { 'use strict * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ==================================================================== */ - function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):new Promise(function (resolve, reject) { require(['../jspdf/index'], resolve, reject); }).then(function (n) { return n.index; })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i1){for(l=0;l>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this}, + function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):new Promise(function (resolve, reject) { require(['../_chunks_/index'], resolve, reject); }).then(function (n) { return n.index; })).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i1){for(l=0;l>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this}, /** ==================================================================== * @license * jsPDF XMP metadata plugin diff --git a/packages/ui5-tooling-modules/test/__snap__/firebase/app.js b/packages/ui5-tooling-modules/test/__snap__/firebase/app.js index 43775cfe2..cc3652b11 100644 --- a/packages/ui5-tooling-modules/test/__snap__/firebase/app.js +++ b/packages/ui5-tooling-modules/test/__snap__/firebase/app.js @@ -1,4 +1,4 @@ -sap.ui.define(['../firebase/app/index.esm2017'], (function (index_esm2017) { 'use strict'; +sap.ui.define(['../index.esm2017'], (function (index_esm2017) { 'use strict'; var index_cjs = {}; diff --git a/packages/ui5-tooling-modules/test/__snap__/firebase/firestore/lite.js b/packages/ui5-tooling-modules/test/__snap__/firebase/firestore/lite.js index 5a2293dcf..51283b316 100644 --- a/packages/ui5-tooling-modules/test/__snap__/firebase/firestore/lite.js +++ b/packages/ui5-tooling-modules/test/__snap__/firebase/firestore/lite.js @@ -1,4 +1,4 @@ -sap.ui.define(['../../firebase/app/index.esm2017'], (function (index_esm2017) { 'use strict'; +sap.ui.define(['../../index.esm2017'], (function (index_esm2017) { 'use strict'; var index_cjs = {}; diff --git a/packages/ui5-tooling-modules/test/__snap__/firebase/app/index.esm2017.js b/packages/ui5-tooling-modules/test/__snap__/index.esm2017.js similarity index 100% rename from packages/ui5-tooling-modules/test/__snap__/firebase/app/index.esm2017.js rename to packages/ui5-tooling-modules/test/__snap__/index.esm2017.js diff --git a/packages/ui5-tooling-modules/test/__snap__/jspdf.js b/packages/ui5-tooling-modules/test/__snap__/jspdf.js index 161eb4de4..fc6c2ddbd 100644 --- a/packages/ui5-tooling-modules/test/__snap__/jspdf.js +++ b/packages/ui5-tooling-modules/test/__snap__/jspdf.js @@ -1,4 +1,4 @@ -sap.ui.define(['exports', './jspdf/jspdf.es.min2'], (function (exports, jspdf_es_min) { 'use strict'; +sap.ui.define(['exports', './_chunks_/jspdf.es.min2'], (function (exports, jspdf_es_min) { 'use strict'; diff --git a/packages/ui5-tooling-modules/test/util.test.js b/packages/ui5-tooling-modules/test/util.test.js index d5f8d1c1b..fa812695d 100644 --- a/packages/ui5-tooling-modules/test/util.test.js +++ b/packages/ui5-tooling-modules/test/util.test.js @@ -111,8 +111,8 @@ async function getModule(resourceName, ctx) { } // eslint-disable-next-line jsdoc/require-jsdoc -async function setupEnv(resourceName, ctx, options = {}) { - const bundleInfo = await ctx.util.getBundleInfo(resourceName, { skipCache: true, debug: true }, options); +async function setupEnv(resourceName, ctx, config = {}, options = {}) { + const bundleInfo = await ctx.util.getBundleInfo(resourceName, Object.assign({ skipCache: true, debug: true }, config), options); if (bundleInfo.error) { throw new Error(bundleInfo.error); } @@ -170,13 +170,19 @@ test.serial("Verify generation of @stomp/stompjs", async (t) => { test.serial("Verify generation of jspdf", async (t) => { process.chdir(path.resolve(cwd, "../../showcases/ui5-tsapp")); - const env = await setupEnv(["jspdf"], { - tmpDir: t.context.tmpDir, - util: t.context.util, - scope: { - navigator: {}, + const env = await setupEnv( + ["jspdf"], + { + tmpDir: t.context.tmpDir, + util: t.context.util, + scope: { + navigator: {}, + }, }, - }); + { + chunksPath: "../_chunks_/../", + } + ); const module = await env.getModule("jspdf"); t.true(module.retVal.__esModule); if (platform() !== "win32") { @@ -388,10 +394,16 @@ test.serial("Verify generation of @js-temporal/polyfill", async (t) => { test.serial("Verify generation of react/reactdom", async (t) => { process.chdir(path.resolve(cwd, "../../showcases/ui5-app")); - const env = await setupEnv(["react", "react-dom/client"], { - tmpDir: t.context.tmpDir, - util: t.context.util, - }); + const env = await setupEnv( + ["react", "react-dom/client"], + { + tmpDir: t.context.tmpDir, + util: t.context.util, + }, + { + chunksPath: true, + } + ); const react = await env.getModule("react"); t.true(react.retVal.__esModule); if (platform() !== "win32") { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2720e472..d1e21f919 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -509,6 +509,9 @@ importers: rollup-plugin-polyfill-node: specifier: ^0.13.0 version: 0.13.0(rollup@4.17.2) + sanitize-filename: + specifier: ^1.6.3 + version: 1.6.3 devDependencies: ava: specifier: ^6.1.3 @@ -7978,6 +7981,9 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + sanitize-filename@1.6.3: + resolution: {integrity: sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==} + sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} @@ -8569,6 +8575,9 @@ packages: resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} engines: {node: '>= 14.0.0'} + truncate-utf8-bytes@1.0.2: + resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} + ts-api-utils@1.3.0: resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} @@ -8836,6 +8845,9 @@ packages: resolution: {integrity: sha512-ayFKY3H+Pwfy4W98yPdtH1VqH4psDeyW8lYYFzfecR9d6hqLpqhecktvYR3SEEXt7vG0S1JEpciI3g94pMErig==} engines: {node: '>= 0.8.0'} + utf8-byte-length@1.0.5: + resolution: {integrity: sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==} + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -9289,7 +9301,7 @@ snapshots: '@babel/traverse': 7.24.5 '@babel/types': 7.24.5 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -9344,7 +9356,7 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.24.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -9994,7 +10006,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.5 '@babel/parser': 7.24.5 '@babel/types': 7.24.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -10151,7 +10163,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -10528,7 +10540,7 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -11028,7 +11040,7 @@ snapshots: '@puppeteer/browsers@1.3.0(typescript@5.4.5)': dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) extract-zip: 2.0.1 http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 @@ -11044,7 +11056,7 @@ snapshots: '@puppeteer/browsers@1.4.6(typescript@5.4.5)': dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) extract-zip: 2.0.1 progress: 2.0.3 proxy-agent: 6.3.0 @@ -11058,7 +11070,7 @@ snapshots: '@puppeteer/browsers@1.9.1': dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) extract-zip: 2.0.1 progress: 2.0.3 proxy-agent: 6.3.1 @@ -11179,7 +11191,7 @@ snapshots: '@sap/xsenv': 4.2.0 '@sap/xssec': 3.6.1 agentkeepalive: 2.0.5 - axios: 1.6.8 + axios: 1.6.8(debug@4.3.2) axios-cookiejar-support: 2.0.3(axios@1.6.8(debug@4.3.2))(tough-cookie@4.1.3) base64-url: 2.3.3 basic-auth: 1.0.3 @@ -11231,7 +11243,7 @@ snapshots: '@sap/audit-logging@6.1.0(encoding@0.1.13)': dependencies: '@sap/xssec': 3.6.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fetch-retry: 4.1.0 lodash: 4.17.21 node-cache: 5.1.2 @@ -11302,7 +11314,7 @@ snapshots: '@sap/xsenv@5.1.0': dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) node-cache: 5.1.2 verror: 1.10.1 transitivePeerDependencies: @@ -11311,7 +11323,7 @@ snapshots: '@sap/xssec@3.6.1': dependencies: axios: 1.6.8(debug@4.3.4) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) jsonwebtoken: 9.0.2 node-rsa: 1.1.1 transitivePeerDependencies: @@ -11643,7 +11655,7 @@ snapshots: '@typescript-eslint/types': 7.9.0 '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) '@typescript-eslint/visitor-keys': 7.9.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 @@ -11659,7 +11671,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) '@typescript-eslint/utils': 7.9.0(eslint@8.57.0)(typescript@5.4.5) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -11673,7 +11685,7 @@ snapshots: dependencies: '@typescript-eslint/types': 7.9.0 '@typescript-eslint/visitor-keys': 7.9.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 @@ -12124,7 +12136,7 @@ snapshots: agent-base@7.1.1: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -12338,7 +12350,7 @@ snapshots: common-path-prefix: 3.0.0 concordance: 5.0.4 currently-unhandled: 0.4.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) emittery: 1.0.3 figures: 6.1.0 globby: 14.0.1 @@ -12377,23 +12389,15 @@ snapshots: axios-cookiejar-support@2.0.3(axios@1.6.8(debug@4.3.2))(tough-cookie@4.1.3): dependencies: - axios: 1.6.8 + axios: 1.6.8(debug@4.3.2) http-cookie-agent: 1.0.6(tough-cookie@4.1.3) tough-cookie: 4.1.3 transitivePeerDependencies: - supports-color - axios@1.6.8: - dependencies: - follow-redirects: 1.15.6 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - axios@1.6.8(debug@4.3.2): dependencies: - follow-redirects: 1.15.6 + follow-redirects: 1.15.6(debug@4.3.2) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -13491,10 +13495,6 @@ snapshots: dependencies: ms: 2.1.2 - debug@4.3.4: - dependencies: - ms: 2.1.2 - debug@4.3.4(supports-color@5.5.0): dependencies: ms: 2.1.2 @@ -13809,7 +13809,7 @@ snapshots: engine.io-client@6.5.3: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) engine.io-parser: 5.2.2 ws: 8.11.0 xmlhttprequest-ssl: 2.0.0 @@ -13829,7 +13829,7 @@ snapshots: base64id: 2.0.0 cookie: 0.4.2 cors: 2.8.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) engine.io-parser: 5.2.2 ws: 8.11.0 transitivePeerDependencies: @@ -13974,7 +13974,7 @@ snapshots: '@es-joy/jsdoccomment': 0.43.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint: 8.57.0 esquery: 1.5.0 @@ -14020,7 +14020,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -14229,7 +14229,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -14461,11 +14461,13 @@ snapshots: flatted@3.3.1: {} - follow-redirects@1.15.6: {} + follow-redirects@1.15.6(debug@4.3.2): + optionalDependencies: + debug: 4.3.2 follow-redirects@1.15.6(debug@4.3.4): optionalDependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) for-each@0.3.3: dependencies: @@ -14668,7 +14670,7 @@ snapshots: dependencies: basic-ftp: 5.0.5 data-uri-to-buffer: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fs-extra: 11.2.0 transitivePeerDependencies: - supports-color @@ -15015,14 +15017,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -15041,7 +15043,7 @@ snapshots: http-proxy@1.18.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.6 + follow-redirects: 1.15.6(debug@4.3.2) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -15068,14 +15070,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -15483,7 +15485,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -15959,7 +15961,7 @@ snapshots: dependencies: chalk: 5.3.0 commander: 11.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) execa: 8.0.1 lilconfig: 3.0.0 listr2: 8.0.1 @@ -16117,7 +16119,7 @@ snapshots: log4js@6.9.1: dependencies: date-format: 4.0.14 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) flatted: 3.3.1 rfdc: 1.3.1 streamroller: 3.1.5 @@ -16544,7 +16546,7 @@ snapshots: nock@13.5.4: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) json-stringify-safe: 5.0.1 propagate: 2.0.1 transitivePeerDependencies: @@ -16831,7 +16833,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.6 - axios: 1.6.8 + axios: 1.6.8(debug@4.3.2) chalk: 4.1.0 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -17055,7 +17057,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) get-uri: 6.0.3 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 @@ -17387,7 +17389,7 @@ snapshots: proxy-agent@6.3.0: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 lru-cache: 7.18.3 @@ -17400,7 +17402,7 @@ snapshots: proxy-agent@6.3.1: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 lru-cache: 7.18.3 @@ -17442,7 +17444,7 @@ snapshots: '@puppeteer/browsers': 1.3.0(typescript@5.4.5) chromium-bidi: 0.4.9(devtools-protocol@0.0.1120988) cross-fetch: 3.1.6(encoding@0.1.13) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) devtools-protocol: 0.0.1120988 ws: 8.13.0 optionalDependencies: @@ -17458,7 +17460,7 @@ snapshots: '@puppeteer/browsers': 1.4.6(typescript@5.4.5) chromium-bidi: 0.4.16(devtools-protocol@0.0.1147663) cross-fetch: 4.0.0(encoding@0.1.13) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) devtools-protocol: 0.0.1147663 ws: 8.13.0 optionalDependencies: @@ -17960,6 +17962,10 @@ snapshots: safer-buffer@2.1.2: {} + sanitize-filename@1.6.3: + dependencies: + truncate-utf8-bytes: 1.0.2 + sax@1.3.0: {} saxes@3.1.11: @@ -18184,7 +18190,7 @@ snapshots: socket.io-adapter@2.5.4: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) ws: 8.11.0 transitivePeerDependencies: - bufferutil @@ -18194,7 +18200,7 @@ snapshots: socket.io-client@4.7.5: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) engine.io-client: 6.5.3 socket.io-parser: 4.2.4 transitivePeerDependencies: @@ -18205,7 +18211,7 @@ snapshots: socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -18214,7 +18220,7 @@ snapshots: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) engine.io: 6.5.4 socket.io-adapter: 2.5.4 socket.io-parser: 4.2.4 @@ -18226,7 +18232,7 @@ snapshots: socks-proxy-agent@6.2.1: dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -18235,7 +18241,7 @@ snapshots: socks-proxy-agent@7.0.0: dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -18243,7 +18249,7 @@ snapshots: socks-proxy-agent@8.0.3: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -18289,7 +18295,7 @@ snapshots: spdy-transport@3.0.0: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -18300,7 +18306,7 @@ snapshots: spdy@4.0.2: dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -18400,7 +18406,7 @@ snapshots: streamroller@3.1.5: dependencies: date-format: 4.0.14 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fs-extra: 8.1.0 transitivePeerDependencies: - supports-color @@ -18504,7 +18510,7 @@ snapshots: dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) fast-safe-stringify: 2.1.1 form-data: 4.0.0 formidable: 3.5.1 @@ -18695,6 +18701,10 @@ snapshots: triple-beam@1.4.1: {} + truncate-utf8-bytes@1.0.2: + dependencies: + utf8-byte-length: 1.0.5 + ts-api-utils@1.3.0(typescript@5.4.5): dependencies: typescript: 5.4.5 @@ -18710,7 +18720,7 @@ snapshots: tuf-js@1.1.7: dependencies: '@tufjs/models': 1.0.4 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) make-fetch-happen: 11.1.1 transitivePeerDependencies: - supports-color @@ -18718,7 +18728,7 @@ snapshots: tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -18966,6 +18976,8 @@ snapshots: userhome@1.0.0: {} + utf8-byte-length@1.0.5: {} + util-deprecate@1.0.2: {} utils-merge@1.0.1: {} @@ -19029,7 +19041,7 @@ snapshots: wait-on@7.2.0: dependencies: - axios: 1.6.8 + axios: 1.6.8(debug@4.3.2) joi: 17.13.1 lodash: 4.17.21 minimist: 1.2.8 @@ -19041,7 +19053,7 @@ snapshots: dependencies: chalk: 4.1.2 commander: 9.5.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color