@intelligentgraphics/ig.gfx.packager 2.3.2 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -4415,16 +4415,9 @@ Packaging without a javascript file is only allowed when animation json files ar
4415
4415
  }
4416
4416
 
4417
4417
  if (animations.size > 0) {
4418
- const [scriptDomain, scriptSubdomain] = data.Scope.split(".");
4419
- const scope = `${scriptDomain}.${scriptSubdomain}`;
4420
- library += `
4421
- var ${scriptDomain};
4422
- (function (${scriptDomain}) {
4423
- var ${scriptSubdomain};
4424
- (function (${scriptSubdomain}) {
4425
- })(${scriptSubdomain} = ${scriptDomain}.${scriptSubdomain} || (${scriptDomain}.${scriptSubdomain} = {}));
4426
- })(${scriptDomain} || (${scriptDomain} = {}));
4427
- `;
4418
+ const scopeParts = data.Scope.split(".");
4419
+ const scope = data.Scope;
4420
+ library += createNamespace(scopeParts);
4428
4421
 
4429
4422
  for (const [name, data] of animations) {
4430
4423
  library += `${scope}.${name} = ` + data + ";";
@@ -4472,6 +4465,17 @@ Packaging without a javascript file is only allowed when animation json files ar
4472
4465
  await pipeline(archive.generateNodeStream(), zipOutputStream);
4473
4466
  };
4474
4467
 
4468
+ const createNamespace = parts => {
4469
+ let code = `var ${parts[0]};`;
4470
+
4471
+ for (let index = 0; index < parts.length; index++) {
4472
+ const path = parts.slice(0, index + 1).join(".");
4473
+ code += `\n(${path} = ${path} || {});`;
4474
+ }
4475
+
4476
+ return code;
4477
+ };
4478
+
4475
4479
  const uploadArchive = async ({
4476
4480
  domain,
4477
4481
  subdomain,
@@ -8342,7 +8346,7 @@ module.exports = require("util");
8342
8346
  /***/ ((module) => {
8343
8347
 
8344
8348
  "use strict";
8345
- module.exports = JSON.parse('{"name":"@intelligentgraphics/ig.gfx.packager","version":"2.3.2","description":"IG.GFX.Packager 2.3.2 (2.3.2.100)","author":"Michael Beier <mb@intelligentgraphics.biz>","main":"build/index.js","private":false,"publishConfig":{"access":"public"},"engines":{"node":">=14.0.0"},"bin":{"packager":"./build/index.js"},"files":["build","locales","scripts"],"scripts":{"dist":"webpack","clean":"rimraf build *.tsbuildinfo","prepublishOnly":"yarn clean && yarn dist","test":"jest","_postinstall":"node scripts/postinstall.js","format":"prettier --write \\"**/*.{ts,tsx,json}\\""},"dependencies":{"ajv":"^8.6.2","axios":"^0.21.1","core-js":"^3.16.0","execa":"^5.1.1","fs-extra":"^10.0.0","glob":"^7.1.4","jszip":"^3.10.0","rimraf":"^3.0.2","source-map-support":"^0.5.19","terser":"^4.8.0","typedoc":"~0.23.2","typescript":"~4.7.4","update-notifier":"^5.1.0","v8-compile-cache":"^2.1.1","y18n":"^5.0.8","yargs":"^17.0.1"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.18.9","@babel/preset-env":"^7.18.9","@intelligentgraphics/ig.tools.core":"^1.5.2","@intelligentgraphics/ig.utilities":"^1.6.6","@types/fs-extra":"^9.0.12","@types/glob":"^7.1.4","@types/node":"^16.4.11","@types/rimraf":"^3.0.1","@types/update-notifier":"^5.1.0","@types/yargs":"^17.0.2","babel-loader":"^8.1.0","ts-loader":"^9.2.5","ts-node":"^10.1.0","webpack":"^5.64.4","webpack-cli":"^4.7.2"}}');
8349
+ module.exports = JSON.parse('{"name":"@intelligentgraphics/ig.gfx.packager","version":"2.3.3","description":"IG.GFX.Packager 2.3.3 (2.3.3.100)","author":"Michael Beier <mb@intelligentgraphics.biz>","main":"build/index.js","private":false,"publishConfig":{"access":"public"},"engines":{"node":">=14.0.0"},"bin":{"packager":"./build/index.js"},"files":["build","locales","scripts"],"scripts":{"dist":"webpack","clean":"rimraf build *.tsbuildinfo","prepublishOnly":"yarn clean && yarn dist","test":"jest","_postinstall":"node scripts/postinstall.js","format":"prettier --write \\"**/*.{ts,tsx,json}\\""},"dependencies":{"ajv":"^8.6.2","axios":"^0.21.1","core-js":"^3.16.0","execa":"^5.1.1","fs-extra":"^10.0.0","glob":"^7.1.4","jszip":"^3.10.0","rimraf":"^3.0.2","source-map-support":"^0.5.19","terser":"^4.8.0","typedoc":"~0.23.2","typescript":"~4.7.4","update-notifier":"^5.1.0","v8-compile-cache":"^2.1.1","y18n":"^5.0.8","yargs":"^17.0.1"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-proposal-object-rest-spread":"^7.18.9","@babel/preset-env":"^7.18.9","@intelligentgraphics/ig.tools.core":"^1.5.2","@intelligentgraphics/ig.utilities":"^1.6.6","@types/fs-extra":"^9.0.12","@types/glob":"^7.1.4","@types/node":"^16.4.11","@types/rimraf":"^3.0.1","@types/update-notifier":"^5.1.0","@types/yargs":"^17.0.2","babel-loader":"^8.1.0","ts-loader":"^9.2.5","ts-node":"^10.1.0","webpack":"^5.64.4","webpack-cli":"^4.7.2"}}');
8346
8350
 
8347
8351
  /***/ })
8348
8352