@intelligentgraphics/ig.gfx.packager 3.0.0-alpha.8 → 3.0.0-alpha.9

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/cli.mjs CHANGED
@@ -24,10 +24,10 @@ const getNodeErrorCode = error => {
24
24
  }
25
25
  };
26
26
 
27
- /**
28
- * No such file or directory: Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.
29
- *
30
- * @param {unknown} error
27
+ /**
28
+ * No such file or directory: Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.
29
+ *
30
+ * @param {unknown} error
31
31
  */
32
32
  const isErrorENOENT = error => getNodeErrorCode(error) === "ENOENT";
33
33
 
@@ -48,11 +48,11 @@ const PACKAGE_FILE = "_Package.json";
48
48
  const INDEX_FILE = "_Index.json";
49
49
  const ANIMATION_FILE_SUFFIX = ".animation.json";
50
50
 
51
- /**
52
- * Describes the location of a single package.
53
- *
54
- * @export
55
- * @interface PackageLocation
51
+ /**
52
+ * Describes the location of a single package.
53
+ *
54
+ * @export
55
+ * @interface PackageLocation
56
56
  */
57
57
 
58
58
  const parseCreatorPackageName = manifest => {
@@ -62,11 +62,11 @@ const parseCreatorPackageName = manifest => {
62
62
  subdomain: subdomainParts.join(".")
63
63
  };
64
64
  };
65
- /**
66
- * Detects the package at the given directory.
67
- *
68
- * @param {string} directory
69
- * @returns {PackageLocation}
65
+ /**
66
+ * Detects the package at the given directory.
67
+ *
68
+ * @param {string} directory
69
+ * @returns {PackageLocation}
70
70
  */
71
71
  const detectPackage = (workspace, directory) => {
72
72
  directory = path.resolve(workspace.path, directory);
@@ -166,11 +166,11 @@ const getPackageReleasesDirectory = location => path.join(location.path, "Releas
166
166
 
167
167
  // Functionality related to working with a workspace consisting of multiple packages.
168
168
 
169
- /**
170
- * Describe the location of a workspace constining of n packages.
171
- *
172
- * @export
173
- * @interface WorkspaceLocation
169
+ /**
170
+ * Describe the location of a workspace constining of n packages.
171
+ *
172
+ * @export
173
+ * @interface WorkspaceLocation
174
174
  */
175
175
 
176
176
  const detectWorkspace = directory => {
@@ -235,8 +235,8 @@ const createDefaultPrompter = () => {
235
235
  };
236
236
 
237
237
  var name = "@intelligentgraphics/ig.gfx.packager";
238
- var version = "3.0.0-alpha.8";
239
- var description = "IG.GFX.Packager 3.0.0 Alpha 8 (3.0.0.9)";
238
+ var version = "3.0.0-alpha.9";
239
+ var description = "IG.GFX.Packager 3.0.0 Alpha 9 (3.0.0.10)";
240
240
  var author = "Michael Beier <mb@intelligentgraphics.biz>";
241
241
  var main = "build/index.mjs";
242
242
  var type = "module";
@@ -313,7 +313,7 @@ var pjson = {
313
313
  devDependencies: devDependencies
314
314
  };
315
315
 
316
- fileURLToPath(import.meta.url);
316
+ const __filename = fileURLToPath(import.meta.url);
317
317
  const captureError = err => {
318
318
  console.log("");
319
319
  if (process.env.NODE_ENV !== "production") {
@@ -350,62 +350,35 @@ const buildOptions = {
350
350
  }
351
351
  };
352
352
  const preCommandCheck = async () => {
353
- // const executedLocalPackager =
354
- // path.relative(process.cwd(), __filename).indexOf("..") === -1;
355
-
356
- // let repositoryPackage:
357
- // | {
358
- // dependencies?: Record<string, string>;
359
- // devDependencies?: Record<string, string>;
360
- // }
361
- // | undefined;
362
-
363
- // try {
364
- // const repositoryPackageJson = fs.readFileSync(
365
- // path.resolve(process.cwd(), "package.json"),
366
- // "utf8",
367
- // );
368
-
369
- // repositoryPackage = JSON.parse(repositoryPackageJson);
370
- // } catch (err) {}
371
-
372
- // if (
373
- // repositoryPackage?.dependencies?.[
374
- // "@intelligentgraphics/ig.gfx.packager"
375
- // ] ||
376
- // repositoryPackage?.devDependencies?.[
377
- // "@intelligentgraphics/ig.gfx.packager"
378
- // ]
379
- // ) {
380
- // const parts = ["Detected locally installed ig.gfx.packager."];
381
-
382
- // if (executedLocalPackager) {
383
- // parts.push(
384
- // 'Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.',
385
- // );
386
- // }
387
- // parts.push(
388
- // 'Run "npm uninstall @intelligentgraphics/ig.gfx.packager" to remove the local version.',
389
- // );
390
-
391
- // console.error(parts.join("\n"));
392
- // process.exit(1);
393
- // }
394
-
395
- // if (executedLocalPackager) {
396
- // console.error(`Detected locally installed ig.gfx.packager.
397
- // Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.
398
- // Run "npm install" to get rid of the local packager version.`);
399
- // process.exit(1);
400
- // }
401
-
353
+ var _repositoryPackage, _repositoryPackage$de, _repositoryPackage2, _repositoryPackage2$d;
354
+ const executedLocalPackager = path.relative(process.cwd(), __filename).indexOf("..") === -1;
355
+ let repositoryPackage;
356
+ try {
357
+ const repositoryPackageJson = fs.readFileSync(path.resolve(process.cwd(), "package.json"), "utf8");
358
+ repositoryPackage = JSON.parse(repositoryPackageJson);
359
+ } catch (err) {}
360
+ if ((_repositoryPackage = repositoryPackage) !== null && _repositoryPackage !== void 0 && (_repositoryPackage$de = _repositoryPackage.dependencies) !== null && _repositoryPackage$de !== void 0 && _repositoryPackage$de["@intelligentgraphics/ig.gfx.packager"] || (_repositoryPackage2 = repositoryPackage) !== null && _repositoryPackage2 !== void 0 && (_repositoryPackage2$d = _repositoryPackage2.devDependencies) !== null && _repositoryPackage2$d !== void 0 && _repositoryPackage2$d["@intelligentgraphics/ig.gfx.packager"]) {
361
+ const parts = ["Detected locally installed ig.gfx.packager."];
362
+ if (executedLocalPackager) {
363
+ parts.push('Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.');
364
+ }
365
+ parts.push('Run "npm uninstall @intelligentgraphics/ig.gfx.packager" to remove the local version.');
366
+ console.error(parts.join("\n"));
367
+ process.exit(1);
368
+ }
369
+ if (executedLocalPackager) {
370
+ console.error(`Detected locally installed ig.gfx.packager.
371
+ Run "npm install -g @intelligentgraphics/ig.gfx.packager@latest" to install the global version, if it is not yet installed.
372
+ Run "npm install" to get rid of the local packager version.`);
373
+ process.exit(1);
374
+ }
402
375
  const notifier = updateNotifier({
403
376
  pkg: pjson,
404
377
  shouldNotifyInNpmScript: true,
405
378
  updateCheckInterval: 1000 * 60
406
379
  });
407
380
  notifier.notify({
408
- isGlobal: false,
381
+ isGlobal: true,
409
382
  defer: true
410
383
  });
411
384
  const workspaceLocation = detectWorkspace(process.cwd());
@@ -425,7 +398,7 @@ yargsInstance.command("build [directories...]", "Builds the specified directorie
425
398
  await preCommandCheck();
426
399
  const {
427
400
  buildFolders
428
- } = await import('./commands/build.mjs').then(function (n) { return n.i; });
401
+ } = await import('./index2.mjs').then(function (n) { return n.i; });
429
402
  await buildFolders({
430
403
  ...options,
431
404
  directories: directories
@@ -540,7 +513,7 @@ yargsInstance.command("publish [directory]", "Publishes the specified directory"
540
513
  }
541
514
  const {
542
515
  releaseFolder
543
- } = await import('./commands/publish.mjs');
516
+ } = await import('./index3.mjs');
544
517
  const prompter = createDefaultPrompter();
545
518
  const fullOptions = {
546
519
  ...options,
@@ -569,7 +542,7 @@ yargsInstance.command({
569
542
  await preCommandCheck();
570
543
  const {
571
544
  extract
572
- } = await import('./commands/generate.mjs');
545
+ } = await import('./generate.mjs');
573
546
  const workspace = detectWorkspace(process.cwd());
574
547
  const location = detectPackage(workspace, directory);
575
548
  extract(location, ignore);
@@ -581,7 +554,7 @@ yargsInstance.command({
581
554
  handler: async () => {
582
555
  const {
583
556
  executePostInstall
584
- } = await import('./commands/postinstall.mjs');
557
+ } = await import('./postinstall.mjs');
585
558
  executePostInstall(detectWorkspace(process.cwd()));
586
559
  },
587
560
  describe: "Runs postinstall tasks"
@@ -607,7 +580,7 @@ yargsInstance.command({
607
580
  const workspace = detectWorkspace(process.cwd());
608
581
  const {
609
582
  publishToNpm
610
- } = await import('./commands/publishNpm.mjs');
583
+ } = await import('./publishNpm.mjs');
611
584
  await publishToNpm({
612
585
  workspace,
613
586
  location: detectPackage(workspace, directory),
package/build/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","sources":["../src/lib/localization.ts","../src/lib/error.ts","../src/lib/npmPackage.ts","../src/lib/package.ts","../src/lib/workspace.ts","../src/lib/prompter.ts","../src/cli.ts"],"sourcesContent":["import y18n from \"y18n\";\nimport * as path from \"path\";\nimport { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst instance = y18n({\n\tdirectory: path.join(__dirname, \"..\", \"locales\"),\n\tupdateFiles: false,\n\tlocale: \"en\",\n\tfallbackToLanguage: true,\n});\n\nexport const setLocale = (locale: string) => {\n\tinstance.setLocale(locale);\n};\n\nexport const translate = (key: string, ...args: string[]) =>\n\tinstance.__(key, ...args);\n","interface NodeError extends Error {\n\tcode: string;\n}\n\nexport const getNodeErrorCode = (error: unknown) => {\n\tif (\n\t\terror !== null &&\n\t\ttypeof error === \"object\" &&\n\t\t(error as NodeError).code !== undefined\n\t) {\n\t\treturn (error as NodeError).code;\n\t}\n};\n\n/**\n * Permission denied: An attempt was made to access a file in a way forbidden by its file access permissions.\n *\n * @param {unknown} error\n */\nexport const isErrorEACCES = (error: unknown) =>\n\tgetNodeErrorCode(error) === \"EACCES\";\n\n/**\n * No such file or directory: Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.\n *\n * @param {unknown} error\n */\nexport const isErrorENOENT = (error: unknown) =>\n\tgetNodeErrorCode(error) === \"ENOENT\";\n","import * as fs from \"fs\";\nimport * as path from \"path\";\nimport { writePackageSync } from \"write-pkg\";\n\nimport { PackageJSON } from \"./packageJSON\";\n\nexport const readNpmManifest = <T extends PackageJSON>(\n\tdirectory: string,\n): T => {\n\tconst packageJsonPath = path.join(directory, \"package.json\");\n\tconst packageJson = fs.readFileSync(packageJsonPath, {\n\t\tencoding: \"utf8\",\n\t});\n\treturn JSON.parse(packageJson);\n};\n\nexport const writeNpmManifest = <T extends PackageJSON>(\n\tdirectory: string,\n\tpackageJson: T,\n) => {\n\tconst packageJsonPath = path.join(directory, \"package.json\");\n\twritePackageSync(packageJsonPath, packageJson);\n};\n","// Functionality related to working with a single package.\n\nimport * as path from \"path\";\nimport * as fs from \"fs\";\n\nimport { isErrorENOENT } from \"./error\";\nimport { WorkspaceLocation } from \"./workspace\";\nimport { readNpmManifest, writeNpmManifest } from \"./npmPackage\";\nimport { PackageJSON } from \"./packageJSON\";\n\nexport const PACKAGE_FILE = \"_Package.json\";\nexport const INDEX_FILE = \"_Index.json\";\nconst ANIMATION_FILE_SUFFIX = \".animation.json\";\n\n/**\n * Describes the location of a single package.\n *\n * @export\n * @interface PackageLocation\n */\nexport interface PackageLocation {\n\t_kind: \"PackageLocation\";\n\t/**\n\t * Main directory of a package\n\t *\n\t * @type {string}\n\t */\n\tpath: string;\n\t/**\n\t * Directory containing the typescript files\n\t *\n\t * @type {string}\n\t */\n\tscriptsDir: string;\n\t/**\n\t * Diretory containing the _Package.json, _Index.json, package.json and animation.json files\n\t *\n\t * @type {string}\n\t */\n\tmanifestDir: string;\n}\n\nexport interface CreatorPackage {\n\tScope: string;\n\tPackage: string;\n\tRunTime: boolean;\n\tType: \"Interactor\" | \"Mixed\" | \"Core\" | \"Context\" | \"Evaluator\";\n}\n\nexport type CreatorIndex = CreatorIndexEntry[];\n\nexport interface CreatorIndexEntry {\n\tName: string;\n\tDescription?: string;\n\tType: \"Interactor\" | \"Evaluator\";\n\tParameters: CreatorIndexParameter[];\n}\n\nexport interface CreatorIndexParameter {\n\tName: string;\n\tType: CreatorIndexParameterType;\n\tDescription?: string;\n\tDefault?: unknown;\n\tDisplayIndex: number;\n}\n\nexport type CreatorIndexParameterType =\n\t| \"String\"\n\t| \"LengthM\"\n\t| \"Material\"\n\t| \"Boolean\"\n\t| \"Bool\"\n\t| \"ArcDEG\"\n\t| \"Integer\"\n\t| \"Int\"\n\t| \"Float\";\n\nexport const parseCreatorPackageName = (manifest: CreatorPackage) => {\n\tconst [domain, ...subdomainParts] = manifest.Package.split(\".\");\n\treturn {\n\t\tdomain,\n\t\tsubdomain: subdomainParts.join(\".\"),\n\t};\n};\n\nexport interface PackageNpmManifest extends PackageJSON {\n\tig?: {\n\t\tscriptingLibrary?: boolean;\n\t};\n}\n\n/**\n * Detects the package at the given directory.\n *\n * @param {string} directory\n * @returns {PackageLocation}\n */\nexport const detectPackage = (\n\tworkspace: WorkspaceLocation,\n\tdirectory: string,\n): PackageLocation => {\n\tdirectory = path.resolve(workspace.path, directory);\n\n\tconst scriptsPath = path.join(directory, \"Scripts\");\n\tconst tsPath = path.join(directory, \"ts\");\n\n\tlet location: PackageLocation;\n\n\tif (fs.existsSync(scriptsPath)) {\n\t\tlocation = {\n\t\t\t_kind: \"PackageLocation\",\n\t\t\tpath: directory,\n\t\t\tscriptsDir: scriptsPath,\n\t\t\tmanifestDir: scriptsPath,\n\t\t};\n\t} else if (fs.existsSync(tsPath)) {\n\t\tlocation = {\n\t\t\t_kind: \"PackageLocation\",\n\t\t\tpath: directory,\n\t\t\tscriptsDir: tsPath,\n\t\t\tmanifestDir: directory,\n\t\t};\n\t} else {\n\t\tlocation = {\n\t\t\t_kind: \"PackageLocation\",\n\t\t\tpath: directory,\n\t\t\tscriptsDir: directory,\n\t\t\tmanifestDir: directory,\n\t\t};\n\t}\n\n\ttry {\n\t\treadPackageCreatorManifest(location);\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\tthrow new Error(\n\t\t\t\t`No _Package.json found in ${location.manifestDir}`,\n\t\t\t);\n\t\t}\n\t\tthrow err;\n\t}\n\n\treturn location;\n};\n\nexport const readPackageCreatorManifest = (\n\tlocation: PackageLocation,\n): CreatorPackage => {\n\tconst packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\n\tconst packageJson = fs.readFileSync(packageJsonPath, { encoding: \"utf8\" });\n\tconst result: Omit<CreatorPackage, \"Scope\"> & { Scope?: string } =\n\t\tJSON.parse(packageJson);\n\treturn {\n\t\t...result,\n\t\tScope: result.Scope || result.Package,\n\t};\n};\n\nexport const writePackageCreatorManifest = (\n\tlocation: PackageLocation,\n\tcreatorPackage: CreatorPackage,\n) => {\n\tconst packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\n\tfs.writeFileSync(\n\t\tpackageJsonPath,\n\t\tJSON.stringify(creatorPackage, null, \"\\t\") + \"\\n\",\n\t);\n};\n\nexport const readPackageCreatorIndex = (\n\tlocation: PackageLocation,\n): CreatorIndex | undefined => {\n\ttry {\n\t\tconst indexPath = path.join(location.manifestDir, INDEX_FILE);\n\t\tconst index = fs.readFileSync(indexPath, { encoding: \"utf8\" });\n\t\treturn JSON.parse(index);\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthrow err;\n\t}\n};\n\nexport const writePackageCreatorIndex = (\n\tlocation: PackageLocation,\n\tindex: CreatorIndex,\n) => {\n\tconst packageJsonPath = path.join(location.manifestDir, INDEX_FILE);\n\tfs.writeFileSync(packageJsonPath, JSON.stringify(index, null, \"\\t\") + \"\\n\");\n};\n\nexport const readPackageNpmManifest = (\n\tlocation: PackageLocation,\n): PackageNpmManifest | undefined => {\n\ttry {\n\t\treturn readNpmManifest(location.manifestDir);\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthrow err;\n\t}\n};\n\nexport const writePackageNpmManifest = (\n\tlocation: PackageLocation,\n\tpackageJson: PackageNpmManifest,\n) => {\n\twriteNpmManifest(location.manifestDir, packageJson);\n};\n\nexport const readPackageAnimationList = (location: PackageLocation) => {\n\tconst directoryContent = fs.readdirSync(location.manifestDir);\n\tconst animationPathList: string[] = [];\n\n\tfor (const entry of directoryContent) {\n\t\tif (entry.endsWith(ANIMATION_FILE_SUFFIX)) {\n\t\t\tconst animationPath = path.join(location.manifestDir, entry);\n\t\t\tanimationPathList.push(animationPath);\n\t\t}\n\t}\n\n\treturn animationPathList;\n};\n\nexport const getPackageReleasesDirectory = (location: PackageLocation) =>\n\tpath.join(location.path, \"Releases\");\n\nexport const arePackageLocationsEqual = (\n\ta: PackageLocation,\n\tb: PackageLocation,\n) => a.path === b.path;\n","// Functionality related to working with a workspace consisting of multiple packages.\n\nimport * as path from \"path\";\nimport * as fs from \"fs\";\n\nimport { PackageJSON } from \"./packageJSON\";\nimport { isErrorENOENT } from \"./error\";\nimport { readNpmManifest, writeNpmManifest } from \"./npmPackage\";\nimport { detectPackage } from \"./package\";\n\n/**\n * Describe the location of a workspace constining of n packages.\n *\n * @export\n * @interface WorkspaceLocation\n */\nexport interface WorkspaceLocation {\n\t_kind: \"WorkspaceLocation\";\n\tpath: string;\n}\n\nexport interface WorkspacePackageJSON extends PackageJSON {\n\tpackager?: { banner?: string };\n}\n\nexport const detectWorkspace = (directory: string): WorkspaceLocation => {\n\tdirectory = path.resolve(process.cwd(), directory);\n\treturn {\n\t\t_kind: \"WorkspaceLocation\",\n\t\tpath: directory,\n\t};\n};\n\nexport const readWorkspaceNpmManifest = (\n\tworkspace: WorkspaceLocation,\n): WorkspacePackageJSON | undefined => {\n\ttry {\n\t\treturn readNpmManifest<WorkspacePackageJSON>(workspace.path);\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthrow err;\n\t}\n};\n\nexport const writeWorkspaceNpmManifest = <T extends WorkspacePackageJSON>(\n\tworkspace: WorkspaceLocation,\n\tpackageJson: T,\n) => writeNpmManifest(workspace.path, packageJson);\n\nexport const getWorkspaceOutputPath = (workspace: WorkspaceLocation) =>\n\tpath.join(workspace.path, \"bin\");\n\nexport const getWorkspaceLibPath = (workspace: WorkspaceLocation) =>\n\tpath.join(workspace.path, \"lib\");\n\nexport function* iterateWorkspacePackages(workspace: WorkspaceLocation) {\n\tconst entries = fs.readdirSync(workspace.path, { withFileTypes: true });\n\n\tfor (const entry of entries) {\n\t\tif (!entry.isDirectory()) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttry {\n\t\t\tyield detectPackage(workspace, entry.name);\n\t\t} catch {}\n\t}\n}\n","import inquirer from \"inquirer\";\n\nexport interface PrompterQuestion {\n\tmessage: string;\n\toptions: string[];\n\tdefault?: string;\n}\n\nexport interface Prompter {\n\tconfirm(message: string): Promise<boolean>;\n\n\task(question: PrompterQuestion): Promise<string>;\n}\n\nexport const createDefaultPrompter = (): Prompter => {\n\treturn {\n\t\tconfirm: async (message) => {\n\t\t\tconst { confirm } = await inquirer.prompt([\n\t\t\t\t{\n\t\t\t\t\ttype: \"confirm\",\n\t\t\t\t\tmessage,\n\t\t\t\t\tname: \"confirm\",\n\t\t\t\t},\n\t\t\t]);\n\t\t\treturn confirm as boolean;\n\t\t},\n\n\t\task: async (question) => {\n\t\t\tconst { answer } = await inquirer.prompt([\n\t\t\t\t{\n\t\t\t\t\ttype: \"list\",\n\t\t\t\t\tmessage: question.message,\n\t\t\t\t\tname: \"answer\",\n\t\t\t\t\tchoices: question.options,\n\t\t\t\t\tdefault: question.default,\n\t\t\t\t},\n\t\t\t]);\n\t\t\treturn answer as string;\n\t\t},\n\t};\n};\n","import updateNotifier from \"update-notifier\";\nimport * as fs from \"fs\";\nimport * as path from \"path\";\nimport yargs from \"yargs/yargs\";\nimport { fileURLToPath } from \"url\";\n\nimport { translate } from \"./lib/localization\";\nimport { Authentication } from \"./lib/authentication\";\nimport { detectPackage } from \"./lib/package\";\nimport {\n\tdetectWorkspace,\n\treadWorkspaceNpmManifest,\n\twriteWorkspaceNpmManifest,\n} from \"./lib/workspace\";\nimport type { ReleaseFolderOptions } from \"./commands/publish\";\nimport { createDefaultPrompter } from \"./lib/prompter\";\n\nimport pjson from \"../package.json\";\n\nconst __filename = fileURLToPath(import.meta.url);\n\nconst captureError = (err: Error) => {\n\tconsole.log(\"\");\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconsole.error(err);\n\t} else {\n\t\tconsole.error(translate(\"messages.error\", err.message));\n\t}\n};\n\nconst buildOptions = {\n\toutDir: {\n\t\tdescription: translate(\"options.outDir.description\"),\n\t\ttype: \"string\",\n\t\tdefault: \"bin\",\n\t\tcoerce: (input: string | undefined | null) =>\n\t\t\tinput === undefined || input === null\n\t\t\t\t? undefined\n\t\t\t\t: path.resolve(process.cwd(), input),\n\t},\n\tminimize: {\n\t\tdescription: translate(\"options.minimize.description\"),\n\t\ttype: \"boolean\",\n\t\tdefault: true,\n\t},\n\tcwd: {\n\t\tdescription: translate(\"options.cwd.description\"),\n\t\ttype: \"string\",\n\t\tdefault: process.cwd(),\n\t},\n\tclean: {\n\t\tdescription: translate(\"options.clean.description\"),\n\t\ttype: \"boolean\",\n\t\tdefault: false,\n\t},\n\tdocs: {\n\t\ttype: \"boolean\",\n\t\tdefault: false,\n\t},\n} as const;\n\nconst preCommandCheck = async () => {\n\t// \tconst executedLocalPackager =\n\t// \t\tpath.relative(process.cwd(), __filename).indexOf(\"..\") === -1;\n\n\t// \tlet repositoryPackage:\n\t// \t\t| {\n\t// \t\t\t\tdependencies?: Record<string, string>;\n\t// \t\t\t\tdevDependencies?: Record<string, string>;\n\t// \t\t }\n\t// \t\t| undefined;\n\n\t// \ttry {\n\t// \t\tconst repositoryPackageJson = fs.readFileSync(\n\t// \t\t\tpath.resolve(process.cwd(), \"package.json\"),\n\t// \t\t\t\"utf8\",\n\t// \t\t);\n\n\t// \t\trepositoryPackage = JSON.parse(repositoryPackageJson);\n\t// \t} catch (err) {}\n\n\t// \tif (\n\t// \t\trepositoryPackage?.dependencies?.[\n\t// \t\t\t\"@intelligentgraphics/ig.gfx.packager\"\n\t// \t\t] ||\n\t// \t\trepositoryPackage?.devDependencies?.[\n\t// \t\t\t\"@intelligentgraphics/ig.gfx.packager\"\n\t// \t\t]\n\t// \t) {\n\t// \t\tconst parts = [\"Detected locally installed ig.gfx.packager.\"];\n\n\t// \t\tif (executedLocalPackager) {\n\t// \t\t\tparts.push(\n\t// \t\t\t\t'Run \"npm install -g @intelligentgraphics/ig.gfx.packager@latest\" to install the global version, if it is not yet installed.',\n\t// \t\t\t);\n\t// \t\t}\n\t// \t\tparts.push(\n\t// \t\t\t'Run \"npm uninstall @intelligentgraphics/ig.gfx.packager\" to remove the local version.',\n\t// \t\t);\n\n\t// \t\tconsole.error(parts.join(\"\\n\"));\n\t// \t\tprocess.exit(1);\n\t// \t}\n\n\t// \tif (executedLocalPackager) {\n\t// \t\tconsole.error(`Detected locally installed ig.gfx.packager.\n\t// Run \"npm install -g @intelligentgraphics/ig.gfx.packager@latest\" to install the global version, if it is not yet installed.\n\t// Run \"npm install\" to get rid of the local packager version.`);\n\t// \t\tprocess.exit(1);\n\t// \t}\n\n\tconst notifier = updateNotifier({\n\t\tpkg: pjson,\n\t\tshouldNotifyInNpmScript: true,\n\t\tupdateCheckInterval: 1000 * 60,\n\t});\n\n\tnotifier.notify({\n\t\tisGlobal: false,\n\t\tdefer: true,\n\t});\n\n\tconst workspaceLocation = detectWorkspace(process.cwd());\n\n\tconst packageJson = readWorkspaceNpmManifest(workspaceLocation);\n\n\tif (packageJson === undefined) {\n\t\tthrow new Error(\n\t\t\t\"Could not load package.json file in current directory\",\n\t\t);\n\t}\n\n\tpackageJson.scripts ??= {};\n\tpackageJson.scripts.postinstall = \"packager postinstall\";\n\n\twriteWorkspaceNpmManifest(workspaceLocation, packageJson);\n};\n\nconst yargsInstance = yargs(process.argv.slice(2));\n\nyargsInstance.command(\n\t\"build [directories...]\",\n\t\"Builds the specified directories\",\n\t(argv) => argv.options(buildOptions),\n\tasync ({ directories = [], ...options }) => {\n\t\tawait preCommandCheck();\n\n\t\tconst { buildFolders } = await import(\"./commands/build\");\n\n\t\tawait buildFolders({\n\t\t\t...options,\n\t\t\tdirectories: directories as string[],\n\t\t}).catch(captureError);\n\t},\n);\n\nyargsInstance.command(\n\t\"publish [directory]\",\n\t\"Publishes the specified directory\",\n\t(argv) =>\n\t\targv.options({\n\t\t\t...buildOptions,\n\t\t\tnoUpload: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: translate(\"options.noUpload.description\"),\n\t\t\t},\n\t\t\tdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.domain.description\"),\n\t\t\t},\n\t\t\tsubdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.subdomain.description\"),\n\t\t\t},\n\t\t\tnewVersion: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.newVersion.description\"),\n\t\t\t\tdefault: process.env.VERSION,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\taddress: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.address.description\"),\n\t\t\t\tdefault: \"localhost\",\n\t\t\t},\n\t\t\tservice: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.service.description\"),\n\t\t\t\tdefault: process.env.IG_GFX_ASSET_SERVICE,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\tuser: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.user.description\"),\n\t\t\t\tdefault: process.env.IG_GFX_USER,\n\t\t\t},\n\t\t\tpassword: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.password.description\"),\n\t\t\t\tdefault: process.env.IG_GFX_PWD,\n\t\t\t},\n\t\t\tdocs: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: translate(\"options.docs.description\"),\n\t\t\t},\n\t\t\tpushOnly: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: translate(\"options.pushOnly.description\"),\n\t\t\t},\n\t\t\tlicense: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.license.description\"),\n\t\t\t\tdefault: process.env.IG_GFX_LICENSE,\n\t\t\t},\n\t\t}),\n\tasync ({ directory, user, password, service, license, ...options }) => {\n\t\tawait preCommandCheck();\n\n\t\tif (!options.noUpload) {\n\t\t\tif (!service) {\n\t\t\t\tcaptureError(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\ttranslate(\n\t\t\t\t\t\t\t\"options.service.demands\",\n\t\t\t\t\t\t\t\"IG_GFX_ASSET_SERVICE\",\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!license && (!user || !password)) {\n\t\t\t\tcaptureError(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`Expected authentication to be provided through either of the following methods:\n\t - as a path to a license file using the --license option or the IG_GFX_LICENSE environment variable\n\t - as a username and password using the --user and --password options, or the IG_GFX_USER and IG_GFX_PWD environment variables`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (license && !license.endsWith(\".iglic\")) {\n\t\t\t\tcaptureError(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`Expected the license path to end with the extension .iglic. Received the path \"${license}\". You may need to reload your environment variables by restarting the program you're using to execute the packager.`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tlet authentication: Authentication | undefined;\n\n\t\tif (license) {\n\t\t\tconst fullLicensePath = path.resolve(process.cwd(), license);\n\t\t\ttry {\n\t\t\t\tconst content = fs.readFileSync(fullLicensePath);\n\t\t\t\tauthentication = {\n\t\t\t\t\ttype: \"license\",\n\t\t\t\t\tlicense: content.toString(\"base64\"),\n\t\t\t\t};\n\t\t\t} catch (err) {\n\t\t\t\tif (err?.code === \"ENOENT\") {\n\t\t\t\t\tcaptureError(\n\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t`Expected to find a license file at path: ${fullLicensePath}`,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcaptureError(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`Failed to read license file at path: ${fullLicensePath}`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (user && password) {\n\t\t\tconsole.log(\n\t\t\t\t`Detected usage of username and password authentication. Please migrate to the new license file based authentication.`,\n\t\t\t);\n\t\t\tauthentication = {\n\t\t\t\ttype: \"credentials\",\n\t\t\t\tusername: user,\n\t\t\t\tpassword,\n\t\t\t};\n\t\t}\n\n\t\tconst { releaseFolder } = await import(\"./commands/publish\");\n\n\t\tconst prompter = createDefaultPrompter();\n\n\t\tconst fullOptions: ReleaseFolderOptions = {\n\t\t\t...options,\n\t\t\tauthentication,\n\t\t\tservice: service!,\n\t\t\tdirectory: directory as string,\n\t\t\tbanner: true,\n\t\t\tprompter,\n\t\t\tnewVersion: options.newVersion!,\n\t\t};\n\n\t\tawait releaseFolder(fullOptions).catch(captureError);\n\t},\n);\n\nyargsInstance.command({\n\tcommand: \"generateIndex [directory]\",\n\tbuilder: (argv) => {\n\t\treturn argv.option(\"ignore\", {\n\t\t\ttype: \"array\",\n\t\t\tdefault: [],\n\t\t\tdescription: translate(\"options.ignore.description\"),\n\t\t});\n\t},\n\thandler: async ({ directory, ignore }) => {\n\t\tawait preCommandCheck();\n\n\t\tconst { extract } = await import(\"./commands/generate\");\n\n\t\tconst workspace = detectWorkspace(process.cwd());\n\t\tconst location = detectPackage(workspace, directory as string);\n\n\t\textract(location, ignore as string[]);\n\t},\n});\n\nyargsInstance.command({\n\tcommand: \"postinstall\",\n\tbuilder: (argv) => argv,\n\thandler: async () => {\n\t\tconst { executePostInstall } = await import(\"./commands/postinstall\");\n\n\t\texecutePostInstall(detectWorkspace(process.cwd()));\n\t},\n\tdescribe: \"Runs postinstall tasks\",\n});\n\nyargsInstance.command({\n\tcommand: \"publishNpm [directory]\",\n\tbuilder: (argv) =>\n\t\targv.options({\n\t\t\tnewVersion: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: translate(\"options.newVersion.description\"),\n\t\t\t\tdefault: process.env.VERSION,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\tdryRun: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t},\n\t\t}),\n\thandler: async ({ directory, newVersion, dryRun }) => {\n\t\tconst workspace = detectWorkspace(process.cwd());\n\n\t\tconst { publishToNpm } = await import(\"./commands/publishNpm\");\n\n\t\tawait publishToNpm({\n\t\t\tworkspace,\n\t\t\tlocation: detectPackage(workspace, directory as string),\n\t\t\tversion: newVersion,\n\t\t\tdryRun,\n\t\t}).catch(captureError);\n\t},\n\tdescribe: \"Publishes the package to npm\",\n});\n\nyargsInstance\n\t.demandCommand()\n\t.pkgConf(\"packager\")\n\t.showHelpOnFail(false)\n\t.version().argv;\n"],"names":["__dirname","dirname","fileURLToPath","import","meta","url","instance","y18n","directory","path","join","updateFiles","locale","fallbackToLanguage","translate","key","args","__","getNodeErrorCode","error","code","undefined","isErrorENOENT","readNpmManifest","packageJsonPath","packageJson","fs","readFileSync","encoding","JSON","parse","writeNpmManifest","writePackageSync","PACKAGE_FILE","INDEX_FILE","ANIMATION_FILE_SUFFIX","parseCreatorPackageName","manifest","domain","subdomainParts","Package","split","subdomain","detectPackage","workspace","resolve","scriptsPath","tsPath","location","existsSync","_kind","scriptsDir","manifestDir","readPackageCreatorManifest","err","Error","result","Scope","writePackageCreatorManifest","creatorPackage","writeFileSync","stringify","readPackageCreatorIndex","indexPath","index","writePackageCreatorIndex","readPackageNpmManifest","writePackageNpmManifest","readPackageAnimationList","directoryContent","readdirSync","animationPathList","entry","endsWith","animationPath","push","getPackageReleasesDirectory","detectWorkspace","process","cwd","readWorkspaceNpmManifest","writeWorkspaceNpmManifest","getWorkspaceOutputPath","getWorkspaceLibPath","iterateWorkspacePackages","entries","withFileTypes","isDirectory","name","createDefaultPrompter","confirm","message","inquirer","prompt","type","ask","question","answer","choices","options","default","captureError","console","log","env","NODE_ENV","buildOptions","outDir","description","coerce","input","minimize","clean","docs","preCommandCheck","notifier","updateNotifier","pkg","pjson","shouldNotifyInNpmScript","updateCheckInterval","notify","isGlobal","defer","workspaceLocation","scripts","postinstall","yargsInstance","yargs","argv","slice","command","directories","buildFolders","catch","noUpload","newVersion","VERSION","required","address","service","IG_GFX_ASSET_SERVICE","user","IG_GFX_USER","password","IG_GFX_PWD","pushOnly","license","IG_GFX_LICENSE","authentication","fullLicensePath","content","toString","username","releaseFolder","prompter","fullOptions","banner","builder","option","handler","ignore","extract","executePostInstall","describe","dryRun","publishToNpm","version","demandCommand","pkgConf","showHelpOnFail"],"mappings":";;;;;;;;;;;AAKA,MAAMA,SAAS,GAAGC,OAAO,CAACC,aAAa,CAACC,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAA;AAEzD,MAAMC,QAAQ,GAAGC,IAAI,CAAC;EACrBC,SAAS,EAAEC,IAAI,CAACC,IAAI,CAACV,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC;AAChDW,EAAAA,WAAW,EAAE,KAAK;AAClBC,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,kBAAkB,EAAE,IAAA;AACrB,CAAC,CAAC,CAAA;MAMWC,SAAS,GAAG,CAACC,GAAW,EAAE,GAAGC,IAAc,KACvDV,QAAQ,CAACW,EAAE,CAACF,GAAG,EAAE,GAAGC,IAAI;;ACflB,MAAME,gBAAgB,GAAIC,KAAc,IAAK;AACnD,EAAA,IACCA,KAAK,KAAK,IAAI,IACd,OAAOA,KAAK,KAAK,QAAQ,IACxBA,KAAK,CAAeC,IAAI,KAAKC,SAAS,EACtC;IACD,OAAQF,KAAK,CAAeC,IAAI,CAAA;AACjC,GAAA;AACD,CAAC,CAAA;;AAUD;AACA;AACA;AACA;AACA;AACO,MAAME,aAAa,GAAIH,KAAc,IAC3CD,gBAAgB,CAACC,KAAK,CAAC,KAAK;;ACtBhBI,MAAAA,eAAe,GAC3Bf,SAAiB,IACV;EACP,MAAMgB,eAAe,GAAGf,IAAI,CAACC,IAAI,CAACF,SAAS,EAAE,cAAc,CAAC,CAAA;AAC5D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IAAAA,MAAAA;AAAO,GAAC,KAAK;IACrD,MAAMzH,SAAS,GAAGiC,eAAe,CAACC,OAAO,CAACC,GAAG,EAAE,CAAC,CAAA;IAEhD,MAAM;AAAEuF,MAAAA,YAAAA;AAAa,KAAC,GAAG,MAAM,OAAO,2BAAuB,CAAC,CAAA;AAE9D,IAAA,MAAMA,YAAY,CAAC;MAClB1H,SAAS;AACTI,MAAAA,QAAQ,EAAEL,aAAa,CAACC,SAAS,EAAEpC,SAAS,CAAW;AACvD+J,MAAAA,OAAO,EAAE/B,UAAU;AACnB6B,MAAAA,MAAAA;AACD,KAAC,CAAC,CAAC/B,KAAK,CAACjC,YAAY,CAAC,CAAA;GACtB;AACD+D,EAAAA,QAAQ,EAAE,8BAAA;AACX,CAAC,CAAC,CAAA;AAEFrC,aAAa,CACXyC,aAAa,EAAE,CACfC,OAAO,CAAC,UAAU,CAAC,CACnBC,cAAc,CAAC,KAAK,CAAC,CACrBH,OAAO,EAAE,CAACtC,IAAI;;;;;;;;"}
1
+ {"version":3,"file":"cli.mjs","sources":["../src/lib/localization.ts","../src/lib/error.ts","../src/lib/npmPackage.ts","../src/lib/package.ts","../src/lib/workspace.ts","../src/lib/prompter.ts","../src/cli.ts"],"sourcesContent":["import y18n from \"y18n\";\r\nimport * as path from \"path\";\r\nimport { dirname } from \"path\";\r\nimport { fileURLToPath } from \"url\";\r\n\r\nconst __dirname = dirname(fileURLToPath(import.meta.url));\r\n\r\nconst instance = y18n({\r\n\tdirectory: path.join(__dirname, \"..\", \"locales\"),\r\n\tupdateFiles: false,\r\n\tlocale: \"en\",\r\n\tfallbackToLanguage: true,\r\n});\r\n\r\nexport const setLocale = (locale: string) => {\r\n\tinstance.setLocale(locale);\r\n};\r\n\r\nexport const translate = (key: string, ...args: string[]) =>\r\n\tinstance.__(key, ...args);\r\n","interface NodeError extends Error {\r\n\tcode: string;\r\n}\r\n\r\nexport const getNodeErrorCode = (error: unknown) => {\r\n\tif (\r\n\t\terror !== null &&\r\n\t\ttypeof error === \"object\" &&\r\n\t\t(error as NodeError).code !== undefined\r\n\t) {\r\n\t\treturn (error as NodeError).code;\r\n\t}\r\n};\r\n\r\n/**\r\n * Permission denied: An attempt was made to access a file in a way forbidden by its file access permissions.\r\n *\r\n * @param {unknown} error\r\n */\r\nexport const isErrorEACCES = (error: unknown) =>\r\n\tgetNodeErrorCode(error) === \"EACCES\";\r\n\r\n/**\r\n * No such file or directory: Commonly raised by fs operations to indicate that a component of the specified pathname does not exist. No entity (file or directory) could be found by the given path.\r\n *\r\n * @param {unknown} error\r\n */\r\nexport const isErrorENOENT = (error: unknown) =>\r\n\tgetNodeErrorCode(error) === \"ENOENT\";\r\n","import * as fs from \"fs\";\r\nimport * as path from \"path\";\r\nimport { writePackageSync } from \"write-pkg\";\r\n\r\nimport { PackageJSON } from \"./packageJSON\";\r\n\r\nexport const readNpmManifest = <T extends PackageJSON>(\r\n\tdirectory: string,\r\n): T => {\r\n\tconst packageJsonPath = path.join(directory, \"package.json\");\r\n\tconst packageJson = fs.readFileSync(packageJsonPath, {\r\n\t\tencoding: \"utf8\",\r\n\t});\r\n\treturn JSON.parse(packageJson);\r\n};\r\n\r\nexport const writeNpmManifest = <T extends PackageJSON>(\r\n\tdirectory: string,\r\n\tpackageJson: T,\r\n) => {\r\n\tconst packageJsonPath = path.join(directory, \"package.json\");\r\n\twritePackageSync(packageJsonPath, packageJson);\r\n};\r\n","// Functionality related to working with a single package.\r\n\r\nimport * as path from \"path\";\r\nimport * as fs from \"fs\";\r\n\r\nimport { isErrorENOENT } from \"./error\";\r\nimport { WorkspaceLocation } from \"./workspace\";\r\nimport { readNpmManifest, writeNpmManifest } from \"./npmPackage\";\r\nimport { PackageJSON } from \"./packageJSON\";\r\n\r\nexport const PACKAGE_FILE = \"_Package.json\";\r\nexport const INDEX_FILE = \"_Index.json\";\r\nconst ANIMATION_FILE_SUFFIX = \".animation.json\";\r\n\r\n/**\r\n * Describes the location of a single package.\r\n *\r\n * @export\r\n * @interface PackageLocation\r\n */\r\nexport interface PackageLocation {\r\n\t_kind: \"PackageLocation\";\r\n\t/**\r\n\t * Main directory of a package\r\n\t *\r\n\t * @type {string}\r\n\t */\r\n\tpath: string;\r\n\t/**\r\n\t * Directory containing the typescript files\r\n\t *\r\n\t * @type {string}\r\n\t */\r\n\tscriptsDir: string;\r\n\t/**\r\n\t * Diretory containing the _Package.json, _Index.json, package.json and animation.json files\r\n\t *\r\n\t * @type {string}\r\n\t */\r\n\tmanifestDir: string;\r\n}\r\n\r\nexport interface CreatorPackage {\r\n\tScope: string;\r\n\tPackage: string;\r\n\tRunTime: boolean;\r\n\tType: \"Interactor\" | \"Mixed\" | \"Core\" | \"Context\" | \"Evaluator\";\r\n}\r\n\r\nexport type CreatorIndex = CreatorIndexEntry[];\r\n\r\nexport interface CreatorIndexEntry {\r\n\tName: string;\r\n\tDescription?: string;\r\n\tType: \"Interactor\" | \"Evaluator\";\r\n\tParameters: CreatorIndexParameter[];\r\n}\r\n\r\nexport interface CreatorIndexParameter {\r\n\tName: string;\r\n\tType: CreatorIndexParameterType;\r\n\tDescription?: string;\r\n\tDefault?: unknown;\r\n\tDisplayIndex: number;\r\n}\r\n\r\nexport type CreatorIndexParameterType =\r\n\t| \"String\"\r\n\t| \"LengthM\"\r\n\t| \"Material\"\r\n\t| \"Boolean\"\r\n\t| \"Bool\"\r\n\t| \"ArcDEG\"\r\n\t| \"Integer\"\r\n\t| \"Int\"\r\n\t| \"Float\";\r\n\r\nexport const parseCreatorPackageName = (manifest: CreatorPackage) => {\r\n\tconst [domain, ...subdomainParts] = manifest.Package.split(\".\");\r\n\treturn {\r\n\t\tdomain,\r\n\t\tsubdomain: subdomainParts.join(\".\"),\r\n\t};\r\n};\r\n\r\nexport interface PackageNpmManifest extends PackageJSON {\r\n\tig?: {\r\n\t\tscriptingLibrary?: boolean;\r\n\t};\r\n}\r\n\r\n/**\r\n * Detects the package at the given directory.\r\n *\r\n * @param {string} directory\r\n * @returns {PackageLocation}\r\n */\r\nexport const detectPackage = (\r\n\tworkspace: WorkspaceLocation,\r\n\tdirectory: string,\r\n): PackageLocation => {\r\n\tdirectory = path.resolve(workspace.path, directory);\r\n\r\n\tconst scriptsPath = path.join(directory, \"Scripts\");\r\n\tconst tsPath = path.join(directory, \"ts\");\r\n\r\n\tlet location: PackageLocation;\r\n\r\n\tif (fs.existsSync(scriptsPath)) {\r\n\t\tlocation = {\r\n\t\t\t_kind: \"PackageLocation\",\r\n\t\t\tpath: directory,\r\n\t\t\tscriptsDir: scriptsPath,\r\n\t\t\tmanifestDir: scriptsPath,\r\n\t\t};\r\n\t} else if (fs.existsSync(tsPath)) {\r\n\t\tlocation = {\r\n\t\t\t_kind: \"PackageLocation\",\r\n\t\t\tpath: directory,\r\n\t\t\tscriptsDir: tsPath,\r\n\t\t\tmanifestDir: directory,\r\n\t\t};\r\n\t} else {\r\n\t\tlocation = {\r\n\t\t\t_kind: \"PackageLocation\",\r\n\t\t\tpath: directory,\r\n\t\t\tscriptsDir: directory,\r\n\t\t\tmanifestDir: directory,\r\n\t\t};\r\n\t}\r\n\r\n\ttry {\r\n\t\treadPackageCreatorManifest(location);\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`No _Package.json found in ${location.manifestDir}`,\r\n\t\t\t);\r\n\t\t}\r\n\t\tthrow err;\r\n\t}\r\n\r\n\treturn location;\r\n};\r\n\r\nexport const readPackageCreatorManifest = (\r\n\tlocation: PackageLocation,\r\n): CreatorPackage => {\r\n\tconst packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\r\n\tconst packageJson = fs.readFileSync(packageJsonPath, { encoding: \"utf8\" });\r\n\tconst result: Omit<CreatorPackage, \"Scope\"> & { Scope?: string } =\r\n\t\tJSON.parse(packageJson);\r\n\treturn {\r\n\t\t...result,\r\n\t\tScope: result.Scope || result.Package,\r\n\t};\r\n};\r\n\r\nexport const writePackageCreatorManifest = (\r\n\tlocation: PackageLocation,\r\n\tcreatorPackage: CreatorPackage,\r\n) => {\r\n\tconst packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\r\n\tfs.writeFileSync(\r\n\t\tpackageJsonPath,\r\n\t\tJSON.stringify(creatorPackage, null, \"\\t\") + \"\\n\",\r\n\t);\r\n};\r\n\r\nexport const readPackageCreatorIndex = (\r\n\tlocation: PackageLocation,\r\n): CreatorIndex | undefined => {\r\n\ttry {\r\n\t\tconst indexPath = path.join(location.manifestDir, INDEX_FILE);\r\n\t\tconst index = fs.readFileSync(indexPath, { encoding: \"utf8\" });\r\n\t\treturn JSON.parse(index);\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\tthrow err;\r\n\t}\r\n};\r\n\r\nexport const writePackageCreatorIndex = (\r\n\tlocation: PackageLocation,\r\n\tindex: CreatorIndex,\r\n) => {\r\n\tconst packageJsonPath = path.join(location.manifestDir, INDEX_FILE);\r\n\tfs.writeFileSync(packageJsonPath, JSON.stringify(index, null, \"\\t\") + \"\\n\");\r\n};\r\n\r\nexport const readPackageNpmManifest = (\r\n\tlocation: PackageLocation,\r\n): PackageNpmManifest | undefined => {\r\n\ttry {\r\n\t\treturn readNpmManifest(location.manifestDir);\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\tthrow err;\r\n\t}\r\n};\r\n\r\nexport const writePackageNpmManifest = (\r\n\tlocation: PackageLocation,\r\n\tpackageJson: PackageNpmManifest,\r\n) => {\r\n\twriteNpmManifest(location.manifestDir, packageJson);\r\n};\r\n\r\nexport const readPackageAnimationList = (location: PackageLocation) => {\r\n\tconst directoryContent = fs.readdirSync(location.manifestDir);\r\n\tconst animationPathList: string[] = [];\r\n\r\n\tfor (const entry of directoryContent) {\r\n\t\tif (entry.endsWith(ANIMATION_FILE_SUFFIX)) {\r\n\t\t\tconst animationPath = path.join(location.manifestDir, entry);\r\n\t\t\tanimationPathList.push(animationPath);\r\n\t\t}\r\n\t}\r\n\r\n\treturn animationPathList;\r\n};\r\n\r\nexport const getPackageReleasesDirectory = (location: PackageLocation) =>\r\n\tpath.join(location.path, \"Releases\");\r\n\r\nexport const arePackageLocationsEqual = (\r\n\ta: PackageLocation,\r\n\tb: PackageLocation,\r\n) => a.path === b.path;\r\n","// Functionality related to working with a workspace consisting of multiple packages.\r\n\r\nimport * as path from \"path\";\r\nimport * as fs from \"fs\";\r\n\r\nimport { PackageJSON } from \"./packageJSON\";\r\nimport { isErrorENOENT } from \"./error\";\r\nimport { readNpmManifest, writeNpmManifest } from \"./npmPackage\";\r\nimport { detectPackage } from \"./package\";\r\n\r\n/**\r\n * Describe the location of a workspace constining of n packages.\r\n *\r\n * @export\r\n * @interface WorkspaceLocation\r\n */\r\nexport interface WorkspaceLocation {\r\n\t_kind: \"WorkspaceLocation\";\r\n\tpath: string;\r\n}\r\n\r\nexport interface WorkspacePackageJSON extends PackageJSON {\r\n\tpackager?: { banner?: string };\r\n}\r\n\r\nexport const detectWorkspace = (directory: string): WorkspaceLocation => {\r\n\tdirectory = path.resolve(process.cwd(), directory);\r\n\treturn {\r\n\t\t_kind: \"WorkspaceLocation\",\r\n\t\tpath: directory,\r\n\t};\r\n};\r\n\r\nexport const readWorkspaceNpmManifest = (\r\n\tworkspace: WorkspaceLocation,\r\n): WorkspacePackageJSON | undefined => {\r\n\ttry {\r\n\t\treturn readNpmManifest<WorkspacePackageJSON>(workspace.path);\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\t\tthrow err;\r\n\t}\r\n};\r\n\r\nexport const writeWorkspaceNpmManifest = <T extends WorkspacePackageJSON>(\r\n\tworkspace: WorkspaceLocation,\r\n\tpackageJson: T,\r\n) => writeNpmManifest(workspace.path, packageJson);\r\n\r\nexport const getWorkspaceOutputPath = (workspace: WorkspaceLocation) =>\r\n\tpath.join(workspace.path, \"bin\");\r\n\r\nexport const getWorkspaceLibPath = (workspace: WorkspaceLocation) =>\r\n\tpath.join(workspace.path, \"lib\");\r\n\r\nexport function* iterateWorkspacePackages(workspace: WorkspaceLocation) {\r\n\tconst entries = fs.readdirSync(workspace.path, { withFileTypes: true });\r\n\r\n\tfor (const entry of entries) {\r\n\t\tif (!entry.isDirectory()) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tyield detectPackage(workspace, entry.name);\r\n\t\t} catch {}\r\n\t}\r\n}\r\n","import inquirer from \"inquirer\";\r\n\r\nexport interface PrompterQuestion {\r\n\tmessage: string;\r\n\toptions: string[];\r\n\tdefault?: string;\r\n}\r\n\r\nexport interface Prompter {\r\n\tconfirm(message: string): Promise<boolean>;\r\n\r\n\task(question: PrompterQuestion): Promise<string>;\r\n}\r\n\r\nexport const createDefaultPrompter = (): Prompter => {\r\n\treturn {\r\n\t\tconfirm: async (message) => {\r\n\t\t\tconst { confirm } = await inquirer.prompt([\r\n\t\t\t\t{\r\n\t\t\t\t\ttype: \"confirm\",\r\n\t\t\t\t\tmessage,\r\n\t\t\t\t\tname: \"confirm\",\r\n\t\t\t\t},\r\n\t\t\t]);\r\n\t\t\treturn confirm as boolean;\r\n\t\t},\r\n\r\n\t\task: async (question) => {\r\n\t\t\tconst { answer } = await inquirer.prompt([\r\n\t\t\t\t{\r\n\t\t\t\t\ttype: \"list\",\r\n\t\t\t\t\tmessage: question.message,\r\n\t\t\t\t\tname: \"answer\",\r\n\t\t\t\t\tchoices: question.options,\r\n\t\t\t\t\tdefault: question.default,\r\n\t\t\t\t},\r\n\t\t\t]);\r\n\t\t\treturn answer as string;\r\n\t\t},\r\n\t};\r\n};\r\n","import updateNotifier from \"update-notifier\";\r\nimport * as fs from \"fs\";\r\nimport * as path from \"path\";\r\nimport yargs from \"yargs/yargs\";\r\nimport { fileURLToPath } from \"url\";\r\n\r\nimport { translate } from \"./lib/localization\";\r\nimport { Authentication } from \"./lib/authentication\";\r\nimport { detectPackage } from \"./lib/package\";\r\nimport {\r\n\tdetectWorkspace,\r\n\treadWorkspaceNpmManifest,\r\n\twriteWorkspaceNpmManifest,\r\n} from \"./lib/workspace\";\r\nimport type { ReleaseFolderOptions } from \"./commands/publish\";\r\nimport { createDefaultPrompter } from \"./lib/prompter\";\r\n\r\nimport pjson from \"../package.json\";\r\n\r\nconst __filename = fileURLToPath(import.meta.url);\r\n\r\nconst captureError = (err: Error) => {\r\n\tconsole.log(\"\");\r\n\r\n\tif (process.env.NODE_ENV !== \"production\") {\r\n\t\tconsole.error(err);\r\n\t} else {\r\n\t\tconsole.error(translate(\"messages.error\", err.message));\r\n\t}\r\n};\r\n\r\nconst buildOptions = {\r\n\toutDir: {\r\n\t\tdescription: translate(\"options.outDir.description\"),\r\n\t\ttype: \"string\",\r\n\t\tdefault: \"bin\",\r\n\t\tcoerce: (input: string | undefined | null) =>\r\n\t\t\tinput === undefined || input === null\r\n\t\t\t\t? undefined\r\n\t\t\t\t: path.resolve(process.cwd(), input),\r\n\t},\r\n\tminimize: {\r\n\t\tdescription: translate(\"options.minimize.description\"),\r\n\t\ttype: \"boolean\",\r\n\t\tdefault: true,\r\n\t},\r\n\tcwd: {\r\n\t\tdescription: translate(\"options.cwd.description\"),\r\n\t\ttype: \"string\",\r\n\t\tdefault: process.cwd(),\r\n\t},\r\n\tclean: {\r\n\t\tdescription: translate(\"options.clean.description\"),\r\n\t\ttype: \"boolean\",\r\n\t\tdefault: false,\r\n\t},\r\n\tdocs: {\r\n\t\ttype: \"boolean\",\r\n\t\tdefault: false,\r\n\t},\r\n} as const;\r\n\r\nconst preCommandCheck = async () => {\r\n\tconst executedLocalPackager =\r\n\t\tpath.relative(process.cwd(), __filename).indexOf(\"..\") === -1;\r\n\r\n\tlet repositoryPackage:\r\n\t\t| {\r\n\t\t\t\tdependencies?: Record<string, string>;\r\n\t\t\t\tdevDependencies?: Record<string, string>;\r\n\t\t }\r\n\t\t| undefined;\r\n\r\n\ttry {\r\n\t\tconst repositoryPackageJson = fs.readFileSync(\r\n\t\t\tpath.resolve(process.cwd(), \"package.json\"),\r\n\t\t\t\"utf8\",\r\n\t\t);\r\n\r\n\t\trepositoryPackage = JSON.parse(repositoryPackageJson);\r\n\t} catch (err) {}\r\n\r\n\tif (\r\n\t\trepositoryPackage?.dependencies?.[\r\n\t\t\t\"@intelligentgraphics/ig.gfx.packager\"\r\n\t\t] ||\r\n\t\trepositoryPackage?.devDependencies?.[\r\n\t\t\t\"@intelligentgraphics/ig.gfx.packager\"\r\n\t\t]\r\n\t) {\r\n\t\tconst parts = [\"Detected locally installed ig.gfx.packager.\"];\r\n\r\n\t\tif (executedLocalPackager) {\r\n\t\t\tparts.push(\r\n\t\t\t\t'Run \"npm install -g @intelligentgraphics/ig.gfx.packager@latest\" to install the global version, if it is not yet installed.',\r\n\t\t\t);\r\n\t\t}\r\n\t\tparts.push(\r\n\t\t\t'Run \"npm uninstall @intelligentgraphics/ig.gfx.packager\" to remove the local version.',\r\n\t\t);\r\n\r\n\t\tconsole.error(parts.join(\"\\n\"));\r\n\t\tprocess.exit(1);\r\n\t}\r\n\r\n\tif (executedLocalPackager) {\r\n\t\tconsole.error(`Detected locally installed ig.gfx.packager.\r\nRun \"npm install -g @intelligentgraphics/ig.gfx.packager@latest\" to install the global version, if it is not yet installed.\r\nRun \"npm install\" to get rid of the local packager version.`);\r\n\t\tprocess.exit(1);\r\n\t}\r\n\r\n\tconst notifier = updateNotifier({\r\n\t\tpkg: pjson,\r\n\t\tshouldNotifyInNpmScript: true,\r\n\t\tupdateCheckInterval: 1000 * 60,\r\n\t});\r\n\r\n\tnotifier.notify({\r\n\t\tisGlobal: true,\r\n\t\tdefer: true,\r\n\t});\r\n\r\n\tconst workspaceLocation = detectWorkspace(process.cwd());\r\n\r\n\tconst packageJson = readWorkspaceNpmManifest(workspaceLocation);\r\n\r\n\tif (packageJson === undefined) {\r\n\t\tthrow new Error(\r\n\t\t\t\"Could not load package.json file in current directory\",\r\n\t\t);\r\n\t}\r\n\r\n\tpackageJson.scripts ??= {};\r\n\tpackageJson.scripts.postinstall = \"packager postinstall\";\r\n\r\n\twriteWorkspaceNpmManifest(workspaceLocation, packageJson);\r\n};\r\n\r\nconst yargsInstance = yargs(process.argv.slice(2));\r\n\r\nyargsInstance.command(\r\n\t\"build [directories...]\",\r\n\t\"Builds the specified directories\",\r\n\t(argv) => argv.options(buildOptions),\r\n\tasync ({ directories = [], ...options }) => {\r\n\t\tawait preCommandCheck();\r\n\r\n\t\tconst { buildFolders } = await import(\"./commands/build\");\r\n\r\n\t\tawait buildFolders({\r\n\t\t\t...options,\r\n\t\t\tdirectories: directories as string[],\r\n\t\t}).catch(captureError);\r\n\t},\r\n);\r\n\r\nyargsInstance.command(\r\n\t\"publish [directory]\",\r\n\t\"Publishes the specified directory\",\r\n\t(argv) =>\r\n\t\targv.options({\r\n\t\t\t...buildOptions,\r\n\t\t\tnoUpload: {\r\n\t\t\t\ttype: \"boolean\",\r\n\t\t\t\tdefault: false,\r\n\t\t\t\tdescription: translate(\"options.noUpload.description\"),\r\n\t\t\t},\r\n\t\t\tdomain: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.domain.description\"),\r\n\t\t\t},\r\n\t\t\tsubdomain: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.subdomain.description\"),\r\n\t\t\t},\r\n\t\t\tnewVersion: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.newVersion.description\"),\r\n\t\t\t\tdefault: process.env.VERSION,\r\n\t\t\t\trequired: true,\r\n\t\t\t},\r\n\t\t\taddress: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.address.description\"),\r\n\t\t\t\tdefault: \"localhost\",\r\n\t\t\t},\r\n\t\t\tservice: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.service.description\"),\r\n\t\t\t\tdefault: process.env.IG_GFX_ASSET_SERVICE,\r\n\t\t\t\trequired: true,\r\n\t\t\t},\r\n\t\t\tuser: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.user.description\"),\r\n\t\t\t\tdefault: process.env.IG_GFX_USER,\r\n\t\t\t},\r\n\t\t\tpassword: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.password.description\"),\r\n\t\t\t\tdefault: process.env.IG_GFX_PWD,\r\n\t\t\t},\r\n\t\t\tdocs: {\r\n\t\t\t\ttype: \"boolean\",\r\n\t\t\t\tdefault: false,\r\n\t\t\t\tdescription: translate(\"options.docs.description\"),\r\n\t\t\t},\r\n\t\t\tpushOnly: {\r\n\t\t\t\ttype: \"boolean\",\r\n\t\t\t\tdefault: false,\r\n\t\t\t\tdescription: translate(\"options.pushOnly.description\"),\r\n\t\t\t},\r\n\t\t\tlicense: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.license.description\"),\r\n\t\t\t\tdefault: process.env.IG_GFX_LICENSE,\r\n\t\t\t},\r\n\t\t}),\r\n\tasync ({ directory, user, password, service, license, ...options }) => {\r\n\t\tawait preCommandCheck();\r\n\r\n\t\tif (!options.noUpload) {\r\n\t\t\tif (!service) {\r\n\t\t\t\tcaptureError(\r\n\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\ttranslate(\r\n\t\t\t\t\t\t\t\"options.service.demands\",\r\n\t\t\t\t\t\t\t\"IG_GFX_ASSET_SERVICE\",\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!license && (!user || !password)) {\r\n\t\t\t\tcaptureError(\r\n\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\t`Expected authentication to be provided through either of the following methods:\r\n\t - as a path to a license file using the --license option or the IG_GFX_LICENSE environment variable\r\n\t - as a username and password using the --user and --password options, or the IG_GFX_USER and IG_GFX_PWD environment variables`,\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (license && !license.endsWith(\".iglic\")) {\r\n\t\t\t\tcaptureError(\r\n\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\t`Expected the license path to end with the extension .iglic. Received the path \"${license}\". You may need to reload your environment variables by restarting the program you're using to execute the packager.`,\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet authentication: Authentication | undefined;\r\n\r\n\t\tif (license) {\r\n\t\t\tconst fullLicensePath = path.resolve(process.cwd(), license);\r\n\t\t\ttry {\r\n\t\t\t\tconst content = fs.readFileSync(fullLicensePath);\r\n\t\t\t\tauthentication = {\r\n\t\t\t\t\ttype: \"license\",\r\n\t\t\t\t\tlicense: content.toString(\"base64\"),\r\n\t\t\t\t};\r\n\t\t\t} catch (err) {\r\n\t\t\t\tif (err?.code === \"ENOENT\") {\r\n\t\t\t\t\tcaptureError(\r\n\t\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\t\t`Expected to find a license file at path: ${fullLicensePath}`,\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcaptureError(\r\n\t\t\t\t\tnew Error(\r\n\t\t\t\t\t\t`Failed to read license file at path: ${fullLicensePath}`,\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} else if (user && password) {\r\n\t\t\tconsole.log(\r\n\t\t\t\t`Detected usage of username and password authentication. Please migrate to the new license file based authentication.`,\r\n\t\t\t);\r\n\t\t\tauthentication = {\r\n\t\t\t\ttype: \"credentials\",\r\n\t\t\t\tusername: user,\r\n\t\t\t\tpassword,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tconst { releaseFolder } = await import(\"./commands/publish\");\r\n\r\n\t\tconst prompter = createDefaultPrompter();\r\n\r\n\t\tconst fullOptions: ReleaseFolderOptions = {\r\n\t\t\t...options,\r\n\t\t\tauthentication,\r\n\t\t\tservice: service!,\r\n\t\t\tdirectory: directory as string,\r\n\t\t\tbanner: true,\r\n\t\t\tprompter,\r\n\t\t\tnewVersion: options.newVersion!,\r\n\t\t};\r\n\r\n\t\tawait releaseFolder(fullOptions).catch(captureError);\r\n\t},\r\n);\r\n\r\nyargsInstance.command({\r\n\tcommand: \"generateIndex [directory]\",\r\n\tbuilder: (argv) => {\r\n\t\treturn argv.option(\"ignore\", {\r\n\t\t\ttype: \"array\",\r\n\t\t\tdefault: [],\r\n\t\t\tdescription: translate(\"options.ignore.description\"),\r\n\t\t});\r\n\t},\r\n\thandler: async ({ directory, ignore }) => {\r\n\t\tawait preCommandCheck();\r\n\r\n\t\tconst { extract } = await import(\"./commands/generate\");\r\n\r\n\t\tconst workspace = detectWorkspace(process.cwd());\r\n\t\tconst location = detectPackage(workspace, directory as string);\r\n\r\n\t\textract(location, ignore as string[]);\r\n\t},\r\n});\r\n\r\nyargsInstance.command({\r\n\tcommand: \"postinstall\",\r\n\tbuilder: (argv) => argv,\r\n\thandler: async () => {\r\n\t\tconst { executePostInstall } = await import(\"./commands/postinstall\");\r\n\r\n\t\texecutePostInstall(detectWorkspace(process.cwd()));\r\n\t},\r\n\tdescribe: \"Runs postinstall tasks\",\r\n});\r\n\r\nyargsInstance.command({\r\n\tcommand: \"publishNpm [directory]\",\r\n\tbuilder: (argv) =>\r\n\t\targv.options({\r\n\t\t\tnewVersion: {\r\n\t\t\t\ttype: \"string\",\r\n\t\t\t\tdescription: translate(\"options.newVersion.description\"),\r\n\t\t\t\tdefault: process.env.VERSION,\r\n\t\t\t\trequired: true,\r\n\t\t\t},\r\n\t\t\tdryRun: {\r\n\t\t\t\ttype: \"boolean\",\r\n\t\t\t},\r\n\t\t}),\r\n\thandler: async ({ directory, newVersion, dryRun }) => {\r\n\t\tconst workspace = detectWorkspace(process.cwd());\r\n\r\n\t\tconst { publishToNpm } = await import(\"./commands/publishNpm\");\r\n\r\n\t\tawait publishToNpm({\r\n\t\t\tworkspace,\r\n\t\t\tlocation: detectPackage(workspace, directory as string),\r\n\t\t\tversion: newVersion,\r\n\t\t\tdryRun,\r\n\t\t}).catch(captureError);\r\n\t},\r\n\tdescribe: \"Publishes the package to npm\",\r\n});\r\n\r\nyargsInstance\r\n\t.demandCommand()\r\n\t.pkgConf(\"packager\")\r\n\t.showHelpOnFail(false)\r\n\t.version().argv;\r\n"],"names":["__dirname","dirname","fileURLToPath","import","meta","url","instance","y18n","directory","path","join","updateFiles","locale","fallbackToLanguage","translate","key","args","__","getNodeErrorCode","error","code","undefined","isErrorENOENT","readNpmManifest","packageJsonPath","packageJson","fs","readFileSync","encoding","JSON","parse","writeNpmManifest","writePackageSync","PACKAGE_FILE","INDEX_FILE","ANIMATION_FILE_SUFFIX","parseCreatorPackageName","manifest","domain","subdomainParts","Package","split","subdomain","detectPackage","workspace","resolve","scriptsPath","tsPath","location","existsSync","_kind","scriptsDir","manifestDir","readPackageCreatorManifest","err","Error","result","Scope","writePackageCreatorManifest","creatorPackage","writeFileSync","stringify","readPackageCreatorIndex","indexPath","index","writePackageCreatorIndex","readPackageNpmManifest","writePackageNpmManifest","readPackageAnimationList","directoryContent","readdirSync","animationPathList","entry","endsWith","animationPath","push","getPackageReleasesDirectory","detectWorkspace","process","cwd","readWorkspaceNpmManifest","writeWorkspaceNpmManifest","getWorkspaceOutputPath","getWorkspaceLibPath","iterateWorkspacePackages","entries","withFileTypes","isDirectory","name","createDefaultPrompter","confirm","message","inquirer","prompt","type","ask","question","answer","choices","options","default","__filename","captureError","console","log","env","NODE_ENV","buildOptions","outDir","description","coerce","input","minimize","clean","docs","preCommandCheck","executedLocalPackager","relative","indexOf","repositoryPackage","repositoryPackageJson","dependencies","devDependencies","parts","exit","notifier","updateNotifier","pkg","pjson","shouldNotifyInNpmScript","updateCheckInterval","notify","isGlobal","defer","workspaceLocation","scripts","postinstall","yargsInstance","yargs","argv","slice","command","directories","buildFolders","catch","noUpload","newVersion","VERSION","required","address","service","IG_GFX_ASSET_SERVICE","user","IG_GFX_USER","password","IG_GFX_PWD","pushOnly","license","IG_GFX_LICENSE","authentication","fullLicensePath","content","toString","username","releaseFolder","prompter","fullOptions","banner","builder","option","handler","ignore","extract","executePostInstall","describe","dryRun","publishToNpm","version","demandCommand","pkgConf","showHelpOnFail"],"mappings":";;;;;;;;;;;AAKA,MAAMA,SAAS,GAAGC,OAAO,CAACC,aAAa,CAACC,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAA;AAEzD,MAAMC,QAAQ,GAAGC,IAAI,CAAC;EACrBC,SAAS,EAAEC,IAAI,CAACC,IAAI,CAACV,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC;AAChDW,EAAAA,WAAW,EAAE,KAAK;AAClBC,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,kBAAkB,EAAE,IAAA;AACrB,CAAC,CAAC,CAAA;MAMWC,SAAS,GAAG,CAACC,GAAW,EAAE,GAAGC,IAAc,KACvDV,QAAQ,CAACW,EAAE,CAACF,GAAG,EAAE,GAAGC,IAAI;;ACflB,MAAME,gBAAgB,GAAIC,KAAc,IAAK;AACnD,EAAA,IACCA,KAAK,KAAK,IAAI,IACd,OAAOA,KAAK,KAAK,QAAQ,IACxBA,KAAK,CAAeC,IAAI,KAAKC,SAAS,EACtC;IACD,OAAQF,KAAK,CAAeC,IAAI,CAAA;AACjC,GAAA;AACD,CAAC,CAAA;;AAUD;AACA;AACA;AACA;AACA;AACO,MAAME,aAAa,GAAIH,KAAc,IAC3CD,gBAAgB,CAACC,KAAK,CAAC,KAAK;;ACtBhBI,MAAAA,eAAe,GAC3Bf,SAAiB,IACV;EACP,MAAMgB,eAAe,GAAGf,IAAI,CAACC,IAAI,CAACF,SAAS,EAAE,cAAc,CAAC,CAAA;AAC5D,EAAA,MAAMiB,WAAW,GAAGC,EA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ACrD,MAAMnI,SAAS,GAAGiC,eAAe,CAACC,OAAO,CAACC,GAAG,EAAE,CAAC,CAAA;IAEhD,MAAM;AAAEiG,MAAAA,YAAAA;AAAa,KAAC,GAAG,MAAM,OAAO,kBAAuB,CAAC,CAAA;AAE9D,IAAA,MAAMA,YAAY,CAAC;MAClBpI,SAAS;AACTI,MAAAA,QAAQ,EAAEL,aAAa,CAACC,SAAS,EAAEpC,SAAS,CAAW;AACvDyK,MAAAA,OAAO,EAAE/B,UAAU;AACnB6B,MAAAA,MAAAA;AACD,KAAC,CAAC,CAAC/B,KAAK,CAAC1C,YAAY,CAAC,CAAA;GACtB;AACDwE,EAAAA,QAAQ,EAAE,8BAAA;AACX,CAAC,CAAC,CAAA;AAEFrC,aAAa,CACXyC,aAAa,EAAE,CACfC,OAAO,CAAC,UAAU,CAAC,CACnBC,cAAc,CAAC,KAAK,CAAC,CACrBH,OAAO,EAAE,CAACtC,IAAI;;;;;;;;"}
@@ -84,11 +84,11 @@ const readPublishedPackageCreatorIndex = location => {
84
84
  // return results;
85
85
  // };
86
86
 
87
- /**
88
- * Recursively determines all installed ig libraries for a workspace.
89
- *
90
- * @param {WorkspaceLocation} workspace
91
- * @returns {PublishedPackageLocation[]}
87
+ /**
88
+ * Recursively determines all installed ig libraries for a workspace.
89
+ *
90
+ * @param {WorkspaceLocation} workspace
91
+ * @returns {PublishedPackageLocation[]}
92
92
  */
93
93
  const determineWorkspaceIGLibraries = workspace => {
94
94
  const manifest = readWorkspaceNpmManifest(workspace);
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.mjs","sources":["../src/lib/publishedPackage.ts","../src/lib/dependencies.ts"],"sourcesContent":["import * as path from \"path\";\nimport * as fs from \"fs\";\nimport resolve from \"resolve\";\n\nimport { readNpmManifest } from \"./npmPackage\";\nimport {\n\tCreatorPackage,\n\tINDEX_FILE,\n\tPackageNpmManifest,\n\tPACKAGE_FILE,\n} from \"./package\";\nimport { isErrorENOENT } from \"./error\";\nimport { WorkspaceLocation } from \"./workspace\";\n\n/**\n * Describes the location of a single published package.\n *\n * I.e. node_modules/@intelligentgraphics/3d.ig.gfx.core\n *\n * @export\n * @interface PublishedPackageLocation\n */\nexport interface PublishedPackageLocation {\n\t_kind: \"PublishedPackageLocation\";\n\tpath: string;\n}\n\nexport const detectPublishedPackageByModuleName = (\n\tworkspace: WorkspaceLocation,\n\tname: string,\n) => {\n\tconst manifestPath = resolve.sync(name + \"/package.json\", {\n\t\tbasedir: workspace.path,\n\t});\n\tconst dir = path.dirname(manifestPath);\n\treturn detectPublishedPackage(dir);\n};\n\nexport const detectPublishedPackage = (\n\tpath: string,\n): PublishedPackageLocation => ({\n\t_kind: \"PublishedPackageLocation\",\n\tpath,\n});\n\nexport const readPublishedPackageNpmManifest = (\n\tlocation: PublishedPackageLocation,\n): PackageNpmManifest => {\n\treturn readNpmManifest<PackageNpmManifest>(location.path);\n};\n\nexport const readPublishedPackageCreatorManifest = (\n\tlocation: PublishedPackageLocation,\n): CreatorPackage | undefined => {\n\ttry {\n\t\tconst packageJsonPath = path.join(location.path, PACKAGE_FILE);\n\t\tconst packageJson = fs.readFileSync(packageJsonPath, {\n\t\t\tencoding: \"utf8\",\n\t\t});\n\t\tconst result: Omit<CreatorPackage, \"Scope\"> & { Scope?: string } =\n\t\t\tJSON.parse(packageJson);\n\t\treturn {\n\t\t\t...result,\n\t\t\tScope: result.Scope || result.Package,\n\t\t};\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow err;\n\t}\n};\n\nexport const readPublishedPackageCreatorIndex = (\n\tlocation: PublishedPackageLocation,\n) => {\n\ttry {\n\t\tconst packageJsonPath = path.join(location.path, INDEX_FILE);\n\t\tconst packageJson = fs.readFileSync(packageJsonPath, {\n\t\t\tencoding: \"utf8\",\n\t\t});\n\t\tconst result: object = JSON.parse(packageJson);\n\t\treturn result;\n\t} catch (err) {\n\t\tif (isErrorENOENT(err)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow err;\n\t}\n};\n","import { CreatorPackage } from \"./package\";\nimport { PackageJSON } from \"./packageJSON\";\nimport {\n\tdetectPublishedPackageByModuleName,\n\tPublishedPackageLocation,\n\treadPublishedPackageCreatorManifest,\n\treadPublishedPackageNpmManifest,\n} from \"./publishedPackage\";\nimport { readWorkspaceNpmManifest, WorkspaceLocation } from \"./workspace\";\n\n// /**\n// * Determines the implicit dependencies of a an actual data workspace package.\n// *\n// * An implicit dependency is a dependency that is installed for the workspace and has the same runtime environment (evaluator, interactor) as the package.\n// *\n// * @param {WorkspaceLocation} workspace\n// * @param {CreatorPackage} creatorPackage\n// * @returns {PublishedPackageLocation[]}\n// */\n// export const determinePackageImplicitDependencies = (\n// \tworkspace: WorkspaceLocation,\n// \tcreatorPackage: CreatorPackage,\n// ): PublishedPackageLocation[] => {\n// \tconst libraries = determineWorkspaceIGLibraries(workspace);\n\n// \tconst results: PublishedPackageLocation[] = [];\n// \tfor (const librarylocation of libraries) {\n// \t\tconst libraryManifest =\n// \t\t\treadPublishedPackageCreatorManifest(librarylocation);\n\n// \t\tif (\n// \t\t\tlibraryManifest !== undefined &&\n// \t\t\t(libraryManifest.Type === \"Mixed\" ||\n// \t\t\t\tlibraryManifest.RunTime === creatorPackage.RunTime)\n// \t\t) {\n// \t\t\tresults.push(librarylocation);\n// \t\t}\n// \t}\n\n// \treturn results;\n// };\n\n/**\n * Recursively determines all installed ig libraries for a workspace.\n *\n * @param {WorkspaceLocation} workspace\n * @returns {PublishedPackageLocation[]}\n */\nexport const determineWorkspaceIGLibraries = (\n\tworkspace: WorkspaceLocation,\n): PublishedPackageLocation[] => {\n\tconst manifest = readWorkspaceNpmManifest(workspace);\n\n\tif (manifest === undefined) {\n\t\treturn [];\n\t}\n\n\tconst libraries = collectIGLibraries(workspace, manifest);\n\tconst results = new Map<string, PublishedPackageLocation>();\n\n\tfor (const location of libraries) {\n\t\tconst manifest = readPublishedPackageNpmManifest(location);\n\t\tif (!results.has(manifest.name)) {\n\t\t\tresults.set(manifest.name, location);\n\t\t}\n\t}\n\n\treturn Array.from(results.values());\n};\n\nconst collectIGLibraries = (\n\tworkspace: WorkspaceLocation,\n\tmanifest: PackageJSON,\n): PublishedPackageLocation[] => {\n\tif (!manifest.dependencies) {\n\t\treturn [];\n\t}\n\n\tconst runtimeDependencies = Object.getOwnPropertyNames(\n\t\tmanifest.dependencies,\n\t);\n\n\tconst result: PublishedPackageLocation[] = [];\n\n\tfor (const runtimeDependency of runtimeDependencies) {\n\t\tconst location = detectPublishedPackageByModuleName(\n\t\t\tworkspace,\n\t\t\truntimeDependency,\n\t\t);\n\n\t\tconst runtimeManifest = readPublishedPackageNpmManifest(location);\n\n\t\t// packages need to explicitly be marked as ig scriptingLibraries\n\t\tif (runtimeManifest.ig?.scriptingLibrary) {\n\t\t\tresult.push(location);\n\t\t\tresult.push(...collectIGLibraries(workspace, runtimeManifest));\n\t\t}\n\t}\n\n\treturn result;\n};\n"],"names":["detectPublishedPackageByModuleName","workspace","name","manifestPath","resolve","sync","basedir","path","dir","dirname","detectPublishedPackage","_kind","readPublishedPackageNpmManifest","location","readNpmManifest","readPublishedPackageCreatorManifest","packageJsonPath","join","PACKAGE_FILE","packageJson","fs","readFileSync","encoding","result","JSON","parse","Scope","Package","err","isErrorENOENT","undefined","readPublishedPackageCreatorIndex","INDEX_FILE","determineWorkspaceIGLibraries","manifest","readWorkspaceNpmManifest","libraries","collectIGLibraries","results","Map","has","set","Array","from","values","dependencies","runtimeDependencies","Object","getOwnPropertyNames","runtimeDependency","runtimeManifest","ig","scriptingLibrary","push"],"mappings":";;;;;;AA2BO,MAAMA,kCAAkC,GAAG,CACjDC,SAA4B,EAC5BC,IAAY,KACR;EACJ,MAAMC,YAAY,GAAGC,OAAO,CAACC,IAAI,CAACH,IAAI,GAAG,eAAe,EAAE;IACzDI,OAAO,EAAEL,SAAS,CAACM,IAAAA;AACpB,GAAC,CAAC,CAAA;AACF,EAAA,MAAMC,GAA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AAED,MAAMP,kBAAkB,GAAG,CAC1BpC,SAA4B,EAC5BiC,QAAqB,KACW;AAChC,EAAA,IAAI,CAACA,QAAQ,CAACW,YAAY,EAAE;AAC3B,IAAA,OAAO,EAAE,CAAA;AACV,GAAA;EAEA,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,mBAAmB,CACrDd,QAAQ,CAACW,YAAY,CACrB,CAAA;EAED,MAAMtB,MAAkC,GAAG,EAAE,CAAA;AAE7C,EAAA,KAAK,MAAM0B,iBAAiB,IAAIH,mBAAmB,EAAE;AAAA,IAAA,IAAA,mBAAA,CAAA;AACpD,IAAA,MAAMjC,QAAQ,GAAGb,kCAAkC,CAClDC,SAAS,EACTgD,iBAAiB,CACjB,CAAA;AAED,IAAA,MAAMC,eAAe,GAAGtC,+BAA+B,CAACC,QAAQ,CAAC,CAAA;;AAEjE;AACA,IAAA,IAAA,CAAA,mBAAA,GAAIqC,eAAe,CAACC,EAAE,MAAlB,IAAA,IAAA,mBAAA,KAAA,KAAA,CAAA,IAAA,mBAAA,CAAoBC,gBAAgB,EAAE;AACzC7B,MAAAA,MAAM,CAAC8B,IAAI,CAACxC,QAAQ,CAAC,CAAA;MACrBU,MAAM,CAAC8B,IAAI,CAAC,GAAGhB,kBAAkB,CAACpC,SAAS,EAAEiD,eAAe,CAAC,CAAC,CAAA;AAC/D,KAAA;AACD,GAAA;AAEA,EAAA,OAAO3B,MAAM,CAAA;AACd,CAAC;;;;"}
1
+ {"version":3,"file":"dependencies.mjs","sources":["../src/lib/publishedPackage.ts","../src/lib/dependencies.ts"],"sourcesContent":["import * as path from \"path\";\r\nimport * as fs from \"fs\";\r\nimport resolve from \"resolve\";\r\n\r\nimport { readNpmManifest } from \"./npmPackage\";\r\nimport {\r\n\tCreatorPackage,\r\n\tINDEX_FILE,\r\n\tPackageNpmManifest,\r\n\tPACKAGE_FILE,\r\n} from \"./package\";\r\nimport { isErrorENOENT } from \"./error\";\r\nimport { WorkspaceLocation } from \"./workspace\";\r\n\r\n/**\r\n * Describes the location of a single published package.\r\n *\r\n * I.e. node_modules/@intelligentgraphics/3d.ig.gfx.core\r\n *\r\n * @export\r\n * @interface PublishedPackageLocation\r\n */\r\nexport interface PublishedPackageLocation {\r\n\t_kind: \"PublishedPackageLocation\";\r\n\tpath: string;\r\n}\r\n\r\nexport const detectPublishedPackageByModuleName = (\r\n\tworkspace: WorkspaceLocation,\r\n\tname: string,\r\n) => {\r\n\tconst manifestPath = resolve.sync(name + \"/package.json\", {\r\n\t\tbasedir: workspace.path,\r\n\t});\r\n\tconst dir = path.dirname(manifestPath);\r\n\treturn detectPublishedPackage(dir);\r\n};\r\n\r\nexport const detectPublishedPackage = (\r\n\tpath: string,\r\n): PublishedPackageLocation => ({\r\n\t_kind: \"PublishedPackageLocation\",\r\n\tpath,\r\n});\r\n\r\nexport const readPublishedPackageNpmManifest = (\r\n\tlocation: PublishedPackageLocation,\r\n): PackageNpmManifest => {\r\n\treturn readNpmManifest<PackageNpmManifest>(location.path);\r\n};\r\n\r\nexport const readPublishedPackageCreatorManifest = (\r\n\tlocation: PublishedPackageLocation,\r\n): CreatorPackage | undefined => {\r\n\ttry {\r\n\t\tconst packageJsonPath = path.join(location.path, PACKAGE_FILE);\r\n\t\tconst packageJson = fs.readFileSync(packageJsonPath, {\r\n\t\t\tencoding: \"utf8\",\r\n\t\t});\r\n\t\tconst result: Omit<CreatorPackage, \"Scope\"> & { Scope?: string } =\r\n\t\t\tJSON.parse(packageJson);\r\n\t\treturn {\r\n\t\t\t...result,\r\n\t\t\tScope: result.Scope || result.Package,\r\n\t\t};\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tthrow err;\r\n\t}\r\n};\r\n\r\nexport const readPublishedPackageCreatorIndex = (\r\n\tlocation: PublishedPackageLocation,\r\n) => {\r\n\ttry {\r\n\t\tconst packageJsonPath = path.join(location.path, INDEX_FILE);\r\n\t\tconst packageJson = fs.readFileSync(packageJsonPath, {\r\n\t\t\tencoding: \"utf8\",\r\n\t\t});\r\n\t\tconst result: object = JSON.parse(packageJson);\r\n\t\treturn result;\r\n\t} catch (err) {\r\n\t\tif (isErrorENOENT(err)) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tthrow err;\r\n\t}\r\n};\r\n","import { CreatorPackage } from \"./package\";\r\nimport { PackageJSON } from \"./packageJSON\";\r\nimport {\r\n\tdetectPublishedPackageByModuleName,\r\n\tPublishedPackageLocation,\r\n\treadPublishedPackageCreatorManifest,\r\n\treadPublishedPackageNpmManifest,\r\n} from \"./publishedPackage\";\r\nimport { readWorkspaceNpmManifest, WorkspaceLocation } from \"./workspace\";\r\n\r\n// /**\r\n// * Determines the implicit dependencies of a an actual data workspace package.\r\n// *\r\n// * An implicit dependency is a dependency that is installed for the workspace and has the same runtime environment (evaluator, interactor) as the package.\r\n// *\r\n// * @param {WorkspaceLocation} workspace\r\n// * @param {CreatorPackage} creatorPackage\r\n// * @returns {PublishedPackageLocation[]}\r\n// */\r\n// export const determinePackageImplicitDependencies = (\r\n// \tworkspace: WorkspaceLocation,\r\n// \tcreatorPackage: CreatorPackage,\r\n// ): PublishedPackageLocation[] => {\r\n// \tconst libraries = determineWorkspaceIGLibraries(workspace);\r\n\r\n// \tconst results: PublishedPackageLocation[] = [];\r\n// \tfor (const librarylocation of libraries) {\r\n// \t\tconst libraryManifest =\r\n// \t\t\treadPublishedPackageCreatorManifest(librarylocation);\r\n\r\n// \t\tif (\r\n// \t\t\tlibraryManifest !== undefined &&\r\n// \t\t\t(libraryManifest.Type === \"Mixed\" ||\r\n// \t\t\t\tlibraryManifest.RunTime === creatorPackage.RunTime)\r\n// \t\t) {\r\n// \t\t\tresults.push(librarylocation);\r\n// \t\t}\r\n// \t}\r\n\r\n// \treturn results;\r\n// };\r\n\r\n/**\r\n * Recursively determines all installed ig libraries for a workspace.\r\n *\r\n * @param {WorkspaceLocation} workspace\r\n * @returns {PublishedPackageLocation[]}\r\n */\r\nexport const determineWorkspaceIGLibraries = (\r\n\tworkspace: WorkspaceLocation,\r\n): PublishedPackageLocation[] => {\r\n\tconst manifest = readWorkspaceNpmManifest(workspace);\r\n\r\n\tif (manifest === undefined) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tconst libraries = collectIGLibraries(workspace, manifest);\r\n\tconst results = new Map<string, PublishedPackageLocation>();\r\n\r\n\tfor (const location of libraries) {\r\n\t\tconst manifest = readPublishedPackageNpmManifest(location);\r\n\t\tif (!results.has(manifest.name)) {\r\n\t\t\tresults.set(manifest.name, location);\r\n\t\t}\r\n\t}\r\n\r\n\treturn Array.from(results.values());\r\n};\r\n\r\nconst collectIGLibraries = (\r\n\tworkspace: WorkspaceLocation,\r\n\tmanifest: PackageJSON,\r\n): PublishedPackageLocation[] => {\r\n\tif (!manifest.dependencies) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tconst runtimeDependencies = Object.getOwnPropertyNames(\r\n\t\tmanifest.dependencies,\r\n\t);\r\n\r\n\tconst result: PublishedPackageLocation[] = [];\r\n\r\n\tfor (const runtimeDependency of runtimeDependencies) {\r\n\t\tconst location = detectPublishedPackageByModuleName(\r\n\t\t\tworkspace,\r\n\t\t\truntimeDependency,\r\n\t\t);\r\n\r\n\t\tconst runtimeManifest = readPublishedPackageNpmManifest(location);\r\n\r\n\t\t// packages need to explicitly be marked as ig scriptingLibraries\r\n\t\tif (runtimeManifest.ig?.scriptingLibrary) {\r\n\t\t\tresult.push(location);\r\n\t\t\tresult.push(...collectIGLibraries(workspace, runtimeManifest));\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\n"],"names":["detectPublishedPackageByModuleName","workspace","name","manifestPath","resolve","sync","basedir","path","dir","dirname","detectPublishedPackage","_kind","readPublishedPackageNpmManifest","location","readNpmManifest","readPublishedPackageCreatorManifest","packageJsonPath","join","PACKAGE_FILE","packageJson","fs","readFileSync","encoding","result","JSON","parse","Scope","Package","err","isErrorENOENT","undefined","readPublishedPackageCreatorIndex","INDEX_FILE","determineWorkspaceIGLibraries","manifest","readWorkspaceNpmManifest","libraries","collectIGLibraries","results","Map","has","set","Array","from","values","dependencies","runtimeDependencies","Object","getOwnPropertyNames","runtimeDependency","runtimeManifest","ig","scriptingLibrary","push"],"mappings":";;;;;;AA2BO,MAAMA,kCAAkC,GAAG,CACjDC,SAA4B,EAC5BC,IAAY,KACR;EACJ,MAAMC,YAAY,GAAGC,OAAO,CAACC,IAAI,CAACH,IAAI,GAAG,eAAe,EAAE;IACzDI,OAAO,EAAEL,SAAS,CAACM,IAAAA;AACpB,GAAC,CAAC,CAAA;AACF,EAAA,MAAMC,GAAG,GAAGD,IAAI,CAACE,OAAO,CAACN,YAAY,CAAC,CAAA;EACtC,OAAOO,sBAAsB,CAACF,GAAG,CAAC,CAAA;AACnC,CAAC,CAAA;AAEM,MAAME,sBAAsB,GAClCH,IAAY,KACmB;AAC/BI,EAAAA,KAAK,EAAE,0BAA0B;AACjCJ,EAAAA,IAAAA;AACD,CAAC,CAAC,CAAA;AAEWK,MAAAA,+BAA+B,GAC3CC,QAAkC,IACV;AACxB,EAAA,OAAOC,eAAe,CAAqBD,QAAQ,CAACN,IAAI,CAAC,CAAA;AAC1D,EAAC;AAEYQ,MAAAA,mCAAmC,GAC/CF,QAAkC,IACF;EAChC,IAAI;IACH,MAAMG,eAAe,GAAGT,IAAI,CAACU,IAAI,CAACJ,QAAQ,CAACN,IAAI,EAAEW,YAAY,CAAC,CAAA;AAC9D,IAAA,MAAMC,WAAW,GAAGC,EAAE,CAACC,YAAY,CAACL,eAAe,EAAE;AACpDM,MAAAA,QAAQ,EAAE,MAAA;AACX,KAAC,CAAC,CAAA;AACF,IAAA,MAAMC,MAA0D,GAC/DC,IAAI,CAACC,KAAK,CAACN,WAAW,CAAC,CAAA;IACxB,OAAO;AACN,MAAA,GAAGI,MAAM;AACTG,MAAAA,KAAK,EAAEH,MAAM,CAACG,KAAK,IAAIH,MAAM,CAACI,OAAAA;K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CAAA;AAC/D,KAAA;AACD,GAAA;AAEA,EAAA,OAAO3B,MAAM,CAAA;AACd,CAAC;;;;"}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import ts from 'typescript';
3
- import { k as writePackageCreatorIndex } from '../cli.mjs';
4
- import { g as getPackageTypescriptFiles } from '../scripts.mjs';
3
+ import { k as writePackageCreatorIndex } from './cli.mjs';
4
+ import { g as getPackageTypescriptFiles } from './scripts.mjs';
5
5
  import 'update-notifier';
6
6
  import 'fs';
7
7
  import 'path';
@@ -132,10 +132,10 @@ function findParametersInterfaceInFiles(program, fileList, name) {
132
132
  return undefined;
133
133
  }
134
134
 
135
- /**
136
- * Extracts and returns script array for _Index.json from a src folder
137
- *
138
- * @param folderPath path to a src folder
135
+ /**
136
+ * Extracts and returns script array for _Index.json from a src folder
137
+ *
138
+ * @param folderPath path to a src folder
139
139
  */
140
140
  function extract(location, ignore = []) {
141
141
  const files = getPackageTypescriptFiles(location);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.mjs","sources":["../src/commands/generate.ts"],"sourcesContent":["import ts from \"typescript\";\r\n\r\nimport {\r\n\tPackageLocation,\r\n\twritePackageCreatorIndex,\r\n\treadPackageCreatorIndex,\r\n} from \"../lib/package\";\r\nimport { getPackageTypescriptFiles } from \"../lib/scripts\";\r\nimport {\r\n\tCreatorIndexEntry,\r\n\tCreatorIndexParameter,\r\n\tCreatorIndexParameterType,\r\n} from \"../lib/package\";\r\n\r\nfunction findTsNode<T extends ts.Node>(\r\n\tnode: ts.Node,\r\n\tcallback: (node: ts.Node) => node is T,\r\n): T | undefined;\r\nfunction findTsNode(\r\n\tnode: ts.Node,\r\n\tcallback: (node: ts.Node) => boolean,\r\n): ts.Node | undefined;\r\nfunction findTsNode(\r\n\tnode: ts.Node,\r\n\tcallback: (node: ts.Node) => boolean,\r\n): ts.Node | undefined {\r\n\tlet result: ts.Node | undefined;\r\n\r\n\tts.forEachChild(node, (child) => {\r\n\t\tif (callback(child)) {\r\n\t\t\tresult = child;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t});\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction capitalizeFirstLetter(string) {\r\n\treturn string?.charAt(0).toUpperCase() + string?.slice(1);\r\n}\r\n\r\nfunction parseDefault(value: string, type: string) {\r\n\tconst uType: CreatorIndexParameterType = capitalizeFirstLetter(type);\r\n\tif (value === \"null\") return null;\r\n\tswitch (uType) {\r\n\t\tcase \"LengthM\":\r\n\t\tcase \"ArcDEG\":\r\n\t\tcase \"Float\":\r\n\t\t\treturn parseFloat(value);\r\n\t\tcase \"Integer\":\r\n\t\tcase \"Int\":\r\n\t\t\treturn parseInt(value);\r\n\t\tcase \"Boolean\":\r\n\t\tcase \"Bool\":\r\n\t\t\treturn value === \"true\";\r\n\t\tcase \"Material\":\r\n\t\tcase \"String\":\r\n\t\tdefault:\r\n\t\t\treturn value.replace(/^\"/, \"\").replace(/\"$/, \"\");\r\n\t}\r\n}\r\n\r\nfunction findEvaluatorNode(node: ts.Node): ts.ClassDeclaration | undefined {\r\n\tif (\r\n\t\tts.isModuleDeclaration(node) &&\r\n\t\tnode.body &&\r\n\t\tts.isModuleDeclaration(node.body) &&\r\n\t\tnode.body.body\r\n\t) {\r\n\t\tconst classDeclaration = findTsNode(\r\n\t\t\tnode.body.body,\r\n\t\t\t(child): child is ts.ClassDeclaration => {\r\n\t\t\t\tif (!ts.isClassDeclaration(child)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst isEvaluator = child.heritageClauses?.some((clause) => {\r\n\t\t\t\t\tif (clause.token !== ts.SyntaxKind.ExtendsKeyword) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn clause.types.some((type) =>\r\n\t\t\t\t\t\ttype.getText().includes(\"Evaluator\"),\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn isEvaluator ?? false;\r\n\t\t\t},\r\n\t\t);\r\n\r\n\t\treturn classDeclaration;\r\n\t}\r\n}\r\n\r\nfunction getParameter(evaluatorNode: ts.ClassDeclaration) {\r\n\tlet memb = evaluatorNode.members?.find(\r\n\t\t(member) => member?.name?.getText().toLowerCase() == \"create\",\r\n\t);\r\n\tif (ts.isMethodDeclaration(memb!)) {\r\n\t\treturn memb.parameters.find(\r\n\t\t\t(para) => para.name.getText().toLowerCase() == \"parameters\",\r\n\t\t);\r\n\t}\r\n}\r\n\r\nfunction findParametersInterface(\r\n\tnode: ts.Node,\r\n\tinterfaceName: string,\r\n): ts.InterfaceDeclaration | undefined {\r\n\tif (\r\n\t\tts.isModuleDeclaration(node) &&\r\n\t\tnode.body &&\r\n\t\tts.isModuleDeclaration(node.body) &&\r\n\t\tnode.body.body\r\n\t) {\r\n\t\tconst interfaceDeclaration = findTsNode(\r\n\t\t\tnode.body.body,\r\n\t\t\t(child): child is ts.InterfaceDeclaration =>\r\n\t\t\t\tts.isInterfaceDeclaration(child) &&\r\n\t\t\t\tchild.name.getText() == interfaceName,\r\n\t\t);\r\n\r\n\t\treturn interfaceDeclaration;\r\n\t}\r\n\r\n\treturn undefined;\r\n}\r\n\r\nfunction getModuleName(sourceFile: ts.Node): string {\r\n\tlet fullName = \"\";\r\n\tif (ts.isModuleDeclaration(sourceFile)) {\r\n\t\tfullName += sourceFile.name.getText();\r\n\r\n\t\tlet packageB = sourceFile.body!;\r\n\t\tif (ts.isModuleDeclaration(packageB)) {\r\n\t\t\tfullName += \".\" + packageB.name.getText();\r\n\t\t}\r\n\t}\r\n\treturn fullName;\r\n}\r\n\r\nfunction genParameters(\r\n\tinterfac: ts.InterfaceDeclaration,\r\n): CreatorIndexParameter[] {\r\n\treturn interfac.members.map((member, i) => {\r\n\t\tlet para = {} as CreatorIndexParameter;\r\n\r\n\t\tpara.Name = member.name!.getText();\r\n\t\tif (para.Name.length > 45)\r\n\t\t\tthrow new Error(`Parameter name length >45 '${para.Name}'`);\r\n\r\n\t\tlet rawDocTags = ts.getJSDocTags(member);\r\n\t\tif (rawDocTags.length) {\r\n\t\t\tlet dict = getTagDict(rawDocTags);\r\n\t\t\tif (dict.summary) para.Description = dict.summary;\r\n\t\t\tif (dict.creatorType)\r\n\t\t\t\tpara.Type = dict.creatorType as CreatorIndexParameterType;\r\n\t\t\tif (dict.default && dict.creatorType)\r\n\t\t\t\tpara.Default = parseDefault(dict.default, dict.creatorType);\r\n\t\t\tpara.DisplayIndex = i + 1;\r\n\t\t}\r\n\t\treturn para;\r\n\t});\r\n}\r\n\r\ninterface IDocTags {\r\n\tdefault?: string;\r\n\tcreatorType?: string;\r\n\tsummary?: string;\r\n}\r\n\r\nfunction getTagDict(tags: any): IDocTags {\r\n\tlet dict = {};\r\n\ttags.forEach((tag) => {\r\n\t\tdict[tag.tagName.text] = tag.comment;\r\n\t});\r\n\treturn dict;\r\n}\r\n\r\nfunction findParametersInterfaceInFiles(\r\n\tprogram: ts.Program,\r\n\tfileList: string[],\r\n\tname: string,\r\n): ts.InterfaceDeclaration | undefined {\r\n\tfor (const file of fileList) {\r\n\t\tconst sourceFile = program.getSourceFile(file);\r\n\r\n\t\tif (sourceFile === undefined) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Expected a source file to exist for file name \"${file}\"`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tlet interfaceDeclaration: ts.InterfaceDeclaration | undefined;\r\n\r\n\t\tts.forEachChild(sourceFile, (node) => {\r\n\t\t\tinterfaceDeclaration = findParametersInterface(node, name);\r\n\r\n\t\t\treturn interfaceDeclaration !== undefined;\r\n\t\t});\r\n\r\n\t\tif (interfaceDeclaration !== undefined) {\r\n\t\t\treturn interfaceDeclaration;\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n}\r\n\r\n/**\r\n * Extracts and returns script array for _Index.json from a src folder\r\n *\r\n * @param folderPath path to a src folder\r\n */\r\nexport function extract(location: PackageLocation, ignore: string[] = []) {\r\n\tconst files = getPackageTypescriptFiles(location);\r\n\tconst filtered = files.filter((path) => {\r\n\t\treturn !ignore.some((suffix) => path.endsWith(suffix));\r\n\t});\r\n\tlet arr = new Array<CreatorIndexEntry>();\r\n\r\n\tlet program = ts.createProgram(filtered, { allowJs: true });\r\n\tprogram.getTypeChecker();\r\n\tfiltered.forEach((file) => {\r\n\t\t// Create a Program to represent the project, then pull out the\r\n\t\t// source file to parse its AST.\r\n\t\tconst sourceFile = program.getSourceFile(file);\r\n\r\n\t\t// Loop through the root AST nodes of the file\r\n\t\tts.forEachChild(sourceFile!, (node) => {\r\n\t\t\tconst evalNode = findEvaluatorNode(node);\r\n\r\n\t\t\tif (evalNode === undefined) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlet moduleName = getModuleName(node);\r\n\r\n\t\t\tif (evalNode.name === undefined) {\r\n\t\t\t\tthrow new Error(`Expected evaluator class to have a name`);\r\n\t\t\t}\r\n\r\n\t\t\tconst name = moduleName + \".\" + evalNode.name.getText();\r\n\r\n\t\t\tif (name.length > 45)\r\n\t\t\t\tthrow new Error(`Package name length >45 '${name}'`);\r\n\r\n\t\t\tlet para = getParameter(evalNode);\r\n\t\t\tlet paraName = (para?.type as any).typeName.getText();\r\n\t\t\tlet interfac = findParametersInterfaceInFiles(\r\n\t\t\t\tprogram,\r\n\t\t\t\tfiltered,\r\n\t\t\t\tparaName,\r\n\t\t\t);\r\n\r\n\t\t\tif (interfac === undefined) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`Failed to find parameters type declaration for evaluator ${evalNode.name.getText()}`,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tconst obj: CreatorIndexEntry = {\r\n\t\t\t\tName: name,\r\n\t\t\t\tParameters: [],\r\n\t\t\t\tType: \"Evaluator\",\r\n\t\t\t};\r\n\r\n\t\t\tlet rawDocTags = ts.getJSDocTags(evalNode);\r\n\t\t\tif (rawDocTags.length) {\r\n\t\t\t\tlet dict = getTagDict(rawDocTags);\r\n\t\t\t\tif (dict.summary) obj.Description = dict.summary;\r\n\t\t\t\tif (dict.creatorType)\r\n\t\t\t\t\tobj.Type = dict.creatorType as \"Interactor\" | \"Evaluator\";\r\n\t\t\t}\r\n\r\n\t\t\tobj.Parameters = genParameters(interfac);\r\n\r\n\t\t\tarr.push(obj);\r\n\t\t});\r\n\t});\r\n\r\n\twritePackageCreatorIndex(location, arr);\r\n}\r\n"],"names":["findTsNode","node","callback","result","ts","forEachChild","child","capitalizeFirstLetter","string","charAt","toUpperCase","slice","parseDefault","value","type","uType","parseFloat","parseInt","replace","findEvaluatorNode","isModuleDeclaration","body","classDeclaration","isClassDeclaration","isEvaluator","heritageClauses","some","clause","token","SyntaxKind","ExtendsKeyword","types","getText","includes","getParameter","evaluatorNode","memb","members","find","member","name","toLowerCase","isMethodDeclaration","parameters","para","findParametersInterface","interfaceName","interfaceDeclaration","isInterfaceDeclaration","undefined","getModuleName","sourceFile","fullName","packageB","genParameters","interfac","map","i","Name","length","Error","rawDocTags","getJSDocTags","dict","getTagDict","summary","Description","creatorType","Type","default","Default","DisplayIndex","tags","forEach","tag","tagName","text","comment","findParametersInterfaceInFiles","program","fileList","file","getSourceFile","extract","location","ignore","files","getPackageTypescriptFiles","filtered","filter","path","suffix","endsWith","arr","Array","createProgram","allowJs","getTypeChecker","evalNode","moduleName","paraName","typeName","obj","Parameters","push","writePackageCreatorIndex"],"mappings":";;;;;;;;;;;;;;AAsBA,SAASA,UAAU,CAClBC,IAAa,EACbC,QAAoC,EACd;AACtB,EAAA,IAAIC,MAA2B,CAAA;AAE/BC,EAAAA,EAAE,CAACC,YAAY,CAACJ,IAAI,EAAGK,KAAK,IAAK;AAChC,IAAA,IAAIJ,QAAQ,CAACI,KAAK,CAAC,EAAE;AACpBH,MAAAA,MAAM,GAAGG,KAAK,CAAA;AACd,MAAA,OAAO,IAAI,CAAA;AACZ,KAAA;AACD,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOH,MAAM,CAAA;AACd,CAAA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index.ts"],"sourcesContent":["import \"source-map-support/register.js\";\nimport \"v8-compile-cache\";\n\nimport(\"./cli\");\n"],"names":[],"mappings":";;;;AAGA,OAAO,WAAO,oCAAC"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import \"source-map-support/register.js\";\r\nimport \"v8-compile-cache\";\r\n\r\nimport(\"./cli\");\r\n"],"names":[],"mappings":";;;;AAGA,OAAO,WAAO,oCAAC"}
@@ -3,9 +3,9 @@ import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import glob from 'glob';
5
5
  import * as terser from 'terser';
6
- import { d as detectWorkspace, t as translate, r as readPackageCreatorManifest, a as detectPackage, b as readPackageNpmManifest } from '../cli.mjs';
6
+ import { d as detectWorkspace, t as translate, r as readPackageCreatorManifest, a as detectPackage, b as readPackageNpmManifest } from './cli.mjs';
7
7
  import ts from 'typescript';
8
- import { g as getPackageTypescriptFiles } from '../scripts.mjs';
8
+ import { g as getPackageTypescriptFiles } from './scripts.mjs';
9
9
  import typedoc from 'typedoc';
10
10
 
11
11
  const logPackageMessage = (name, step, index, total) => {
@@ -323,4 +323,4 @@ var index = /*#__PURE__*/Object.freeze({
323
323
  });
324
324
 
325
325
  export { buildFolders as b, index as i, logPackageMessage as l };
326
- //# sourceMappingURL=build.mjs.map
326
+ //# sourceMappingURL=index2.mjs.map