@intelligentgraphics/ig.gfx.packager 3.0.21 → 3.0.23
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/bin.mjs +1 -1
- package/build/{cli-91fabb36.mjs → cli-t3HbtHpD.mjs} +40 -70
- package/build/cli-t3HbtHpD.mjs.map +1 -0
- package/build/{dependencies-7711a9db.mjs → dependencies-DevWjwri.mjs} +2 -2
- package/build/{dependencies-7711a9db.mjs.map → dependencies-DevWjwri.mjs.map} +1 -1
- package/build/{generateIndex-47c082d0.mjs → generateIndex-BtHP1bP3.mjs} +4 -4
- package/build/{generateIndex-47c082d0.mjs.map → generateIndex-BtHP1bP3.mjs.map} +1 -1
- package/build/{generateParameterType-10d124a6.mjs → generateParameterType-DyylDiF2.mjs} +3 -3
- package/build/{generateParameterType-10d124a6.mjs.map → generateParameterType-DyylDiF2.mjs.map} +1 -1
- package/build/{index-e6ead55c.mjs → index-C3Hd8xoM.mjs} +57 -42
- package/build/index-C3Hd8xoM.mjs.map +1 -0
- package/build/{index-ca04836f.mjs → index-CNupsFSp.mjs} +187 -182
- package/build/index-CNupsFSp.mjs.map +1 -0
- package/build/{postinstall-0ea76778.mjs → postinstall-D2hLZlaK.mjs} +3 -3
- package/build/{postinstall-0ea76778.mjs.map → postinstall-D2hLZlaK.mjs.map} +1 -1
- package/build/{publishNpm-aadd7dc2.mjs → publishNpm-h9T6BVws.mjs} +13 -7
- package/build/publishNpm-h9T6BVws.mjs.map +1 -0
- package/build/{scripts-7ed8dff6.mjs → scripts-EvIjiH6G.mjs} +1 -1
- package/build/{scripts-7ed8dff6.mjs.map → scripts-EvIjiH6G.mjs.map} +1 -1
- package/build/{versionFile-ad981e93.mjs → versionFile-7rrD5z3c.mjs} +7 -11
- package/build/{versionFile-ad981e93.mjs.map → versionFile-7rrD5z3c.mjs.map} +1 -1
- package/lib/lib.mjs +243 -228
- package/package.json +12 -12
- package/readme.md +28 -0
- package/build/cli-91fabb36.mjs.map +0 -1
- package/build/index-ca04836f.mjs.map +0 -1
- package/build/index-e6ead55c.mjs.map +0 -1
- package/build/publishNpm-aadd7dc2.mjs.map +0 -1
package/build/bin.mjs
CHANGED
|
@@ -220,25 +220,11 @@ function* iterateWorkspacePackages(workspace) {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
var
|
|
224
|
-
var writeFileAtomic = {
|
|
225
|
-
get exports () {
|
|
226
|
-
return writeFileAtomicExports;
|
|
227
|
-
},
|
|
228
|
-
set exports (v){
|
|
229
|
-
writeFileAtomicExports = v;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
223
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
232
224
|
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
return imurmurhashExports;
|
|
237
|
-
},
|
|
238
|
-
set exports (v){
|
|
239
|
-
imurmurhashExports = v;
|
|
240
|
-
}
|
|
241
|
-
};
|
|
225
|
+
var writeFileAtomic = {exports: {}};
|
|
226
|
+
|
|
227
|
+
var imurmurhash = {exports: {}};
|
|
242
228
|
|
|
243
229
|
(function(module) {
|
|
244
230
|
(function() {
|
|
@@ -349,32 +335,15 @@ var imurmurhash = {
|
|
|
349
335
|
}
|
|
350
336
|
})();
|
|
351
337
|
})(imurmurhash);
|
|
338
|
+
var imurmurhashExports = imurmurhash.exports;
|
|
352
339
|
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
var signalExitExports = {};
|
|
356
|
-
var signalExit = {
|
|
357
|
-
get exports () {
|
|
358
|
-
return signalExitExports;
|
|
359
|
-
},
|
|
360
|
-
set exports (v){
|
|
361
|
-
signalExitExports = v;
|
|
362
|
-
}
|
|
363
|
-
};
|
|
340
|
+
var signalExit = {exports: {}};
|
|
364
341
|
|
|
365
|
-
var
|
|
366
|
-
var signals$1 = {
|
|
367
|
-
get exports () {
|
|
368
|
-
return signalsExports;
|
|
369
|
-
},
|
|
370
|
-
set exports (v){
|
|
371
|
-
signalsExports = v;
|
|
372
|
-
}
|
|
373
|
-
};
|
|
342
|
+
var signals$1 = {exports: {}};
|
|
374
343
|
|
|
375
344
|
var hasRequiredSignals;
|
|
376
345
|
function requireSignals() {
|
|
377
|
-
if (hasRequiredSignals) return
|
|
346
|
+
if (hasRequiredSignals) return signals$1.exports;
|
|
378
347
|
hasRequiredSignals = 1;
|
|
379
348
|
(function(module) {
|
|
380
349
|
// This is not the set of all possible signals.
|
|
@@ -411,7 +380,7 @@ function requireSignals() {
|
|
|
411
380
|
module.exports.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT', 'SIGUNUSED');
|
|
412
381
|
}
|
|
413
382
|
})(signals$1);
|
|
414
|
-
return
|
|
383
|
+
return signals$1.exports;
|
|
415
384
|
}
|
|
416
385
|
|
|
417
386
|
// Note: since nyc uses this module to output coverage, any lines
|
|
@@ -486,7 +455,7 @@ const processOk = function(process) {
|
|
|
486
455
|
process$1.reallyExit = originalProcessReallyExit;
|
|
487
456
|
emitter.count -= 1;
|
|
488
457
|
};
|
|
489
|
-
|
|
458
|
+
signalExit.exports.unload = unload;
|
|
490
459
|
var emit = function emit(event, code, signal) {
|
|
491
460
|
/* istanbul ignore if */ if (emitter.emitted[event]) {
|
|
492
461
|
return;
|
|
@@ -519,7 +488,7 @@ const processOk = function(process) {
|
|
|
519
488
|
}
|
|
520
489
|
};
|
|
521
490
|
});
|
|
522
|
-
|
|
491
|
+
signalExit.exports.signals = function() {
|
|
523
492
|
return signals;
|
|
524
493
|
};
|
|
525
494
|
var loaded = false;
|
|
@@ -544,7 +513,7 @@ const processOk = function(process) {
|
|
|
544
513
|
process$1.emit = processEmit;
|
|
545
514
|
process$1.reallyExit = processReallyExit;
|
|
546
515
|
};
|
|
547
|
-
|
|
516
|
+
signalExit.exports.load = load;
|
|
548
517
|
var originalProcessReallyExit = process$1.reallyExit;
|
|
549
518
|
var processReallyExit = function processReallyExit(code) {
|
|
550
519
|
/* istanbul ignore if */ if (!processOk(commonjsGlobal.process)) {
|
|
@@ -570,6 +539,7 @@ const processOk = function(process) {
|
|
|
570
539
|
}
|
|
571
540
|
};
|
|
572
541
|
}
|
|
542
|
+
var signalExitExports = signalExit.exports;
|
|
573
543
|
|
|
574
544
|
var isTypedarray = isTypedArray$2;
|
|
575
545
|
isTypedArray$2.strict = isStrictTypedArray;
|
|
@@ -613,17 +583,17 @@ var typedarrayToBuffer = function typedarrayToBuffer(arr) {
|
|
|
613
583
|
};
|
|
614
584
|
|
|
615
585
|
writeFileAtomic.exports = writeFile;
|
|
616
|
-
|
|
617
|
-
|
|
586
|
+
writeFileAtomic.exports.sync = writeFileSync;
|
|
587
|
+
writeFileAtomic.exports._getTmpname = getTmpname // for testing
|
|
618
588
|
;
|
|
619
|
-
|
|
589
|
+
writeFileAtomic.exports._cleanupOnExit = cleanupOnExit;
|
|
620
590
|
const fs = fs__default;
|
|
621
591
|
const MurmurHash3 = imurmurhashExports;
|
|
622
592
|
const onExit = signalExitExports;
|
|
623
593
|
const path = path__default;
|
|
624
594
|
const isTypedArray = isTypedarray;
|
|
625
595
|
const typedArrayToBuffer = typedarrayToBuffer;
|
|
626
|
-
const { promisify
|
|
596
|
+
const { promisify } = require$$6;
|
|
627
597
|
const activeFiles = {};
|
|
628
598
|
// if we run inside of a worker_thread, `process.pid` is not unique
|
|
629
599
|
/* istanbul ignore next */ const threadId = function getId() {
|
|
@@ -792,7 +762,7 @@ function writeFileSync(filename, data, options) {
|
|
|
792
762
|
const removeOnExitHandler = onExit(cleanup);
|
|
793
763
|
let threw = true;
|
|
794
764
|
try {
|
|
795
|
-
fd = fs.openSync(tmpfile, 'w', options.mode ||
|
|
765
|
+
fd = fs.openSync(tmpfile, 'w', options.mode || 438);
|
|
796
766
|
if (options.tmpfileCreated) {
|
|
797
767
|
options.tmpfileCreated(tmpfile);
|
|
798
768
|
}
|
|
@@ -850,7 +820,7 @@ const PLUGIN_ID = "0feba3a0-b6d1-11e6-9598-0800200c9a66";
|
|
|
850
820
|
*
|
|
851
821
|
* @param {SessionStartParams} params
|
|
852
822
|
* @returns
|
|
853
|
-
*/ const startSession = async ({ url
|
|
823
|
+
*/ const startSession = async ({ url, authentication, ...params })=>{
|
|
854
824
|
const payload = {
|
|
855
825
|
...params,
|
|
856
826
|
user: undefined,
|
|
@@ -864,7 +834,7 @@ const PLUGIN_ID = "0feba3a0-b6d1-11e6-9598-0800200c9a66";
|
|
|
864
834
|
} else if (authentication.type === "license") {
|
|
865
835
|
payload.license = authentication.license;
|
|
866
836
|
}
|
|
867
|
-
const { data: { session: sessionId
|
|
837
|
+
const { data: { session: sessionId, state, response } } = await axios.post(`Session/Start2`, JSON.stringify(payload), {
|
|
868
838
|
baseURL: url
|
|
869
839
|
});
|
|
870
840
|
if (state !== "SUCCESS") {
|
|
@@ -887,11 +857,11 @@ const closeSession = async (session)=>{
|
|
|
887
857
|
baseURL: session.url
|
|
888
858
|
});
|
|
889
859
|
};
|
|
890
|
-
const uploadPackageFromStream = async (session, { name
|
|
891
|
-
await uploadPackageToUrl(session.url, `UploadPackage/${session.sessionId}/${name}_${version}
|
|
860
|
+
const uploadPackageFromStream = async (session, { name, version }, stream)=>{
|
|
861
|
+
await uploadPackageToUrl(session.url, `UploadPackage/${session.sessionId}/${name}_${version}`, stream);
|
|
892
862
|
};
|
|
893
863
|
const uploadPackageToUrl = async (url, path, stream)=>{
|
|
894
|
-
const { data
|
|
864
|
+
const { data, status } = await axios.post(path, stream, {
|
|
895
865
|
baseURL: url
|
|
896
866
|
});
|
|
897
867
|
let objectBody;
|
|
@@ -926,7 +896,7 @@ const uploadPackageToUrl = async (url, path, stream)=>{
|
|
|
926
896
|
return data;
|
|
927
897
|
};
|
|
928
898
|
const getExistingPackages = async (session)=>{
|
|
929
|
-
const { data
|
|
899
|
+
const { data } = await axios.get(`Script/GetInformation/${session.sessionId}`, {
|
|
930
900
|
baseURL: session.url,
|
|
931
901
|
validateStatus: (status)=>status === 404 || status === 200
|
|
932
902
|
}).catch((err)=>{
|
|
@@ -938,7 +908,7 @@ const getExistingPackages = async (session)=>{
|
|
|
938
908
|
const createDefaultPrompter = ()=>{
|
|
939
909
|
return {
|
|
940
910
|
confirm: async (message)=>{
|
|
941
|
-
const { confirm
|
|
911
|
+
const { confirm } = await inquirer.prompt([
|
|
942
912
|
{
|
|
943
913
|
type: "confirm",
|
|
944
914
|
message,
|
|
@@ -948,7 +918,7 @@ const createDefaultPrompter = ()=>{
|
|
|
948
918
|
return confirm;
|
|
949
919
|
},
|
|
950
920
|
ask: async (question)=>{
|
|
951
|
-
const { answer
|
|
921
|
+
const { answer } = await inquirer.prompt([
|
|
952
922
|
{
|
|
953
923
|
type: "list",
|
|
954
924
|
message: question.message,
|
|
@@ -1060,14 +1030,14 @@ yargsInstance.command("build [directories...]", "Builds the specified directorie
|
|
|
1060
1030
|
type: "boolean",
|
|
1061
1031
|
default: false
|
|
1062
1032
|
}
|
|
1063
|
-
}), async ({ directories =[]
|
|
1033
|
+
}), async ({ directories = [], watch, ...options })=>{
|
|
1064
1034
|
const workspace = detectWorkspace(options.cwd);
|
|
1065
1035
|
const folders = resolvePackagesFromMaybePatterns(directories, workspace);
|
|
1066
1036
|
await preCommandCheck(workspace);
|
|
1067
1037
|
if (folders.length === 0) {
|
|
1068
1038
|
return console.log("No build targets found. Please check wether a folder with the provided name exists and wether it has _Package.json.");
|
|
1069
1039
|
}
|
|
1070
|
-
const { buildFolders
|
|
1040
|
+
const { buildFolders, buildFoldersWatch } = await import('./index-C3Hd8xoM.mjs').then(function (n) { return n.i; });
|
|
1071
1041
|
if (watch) {
|
|
1072
1042
|
await buildFoldersWatch({
|
|
1073
1043
|
...options,
|
|
@@ -1144,7 +1114,7 @@ yargsInstance.command("publish [directory]", "Publishes the specified directory"
|
|
|
1144
1114
|
default: false,
|
|
1145
1115
|
description: "Skip dependency checks"
|
|
1146
1116
|
}
|
|
1147
|
-
}), async ({ directory
|
|
1117
|
+
}), async ({ directory, user, password, service, license, ...options })=>{
|
|
1148
1118
|
const workspace = detectWorkspace(options.cwd);
|
|
1149
1119
|
const folder = detectPackage(workspace, directory);
|
|
1150
1120
|
await preCommandCheck(workspace);
|
|
@@ -1189,7 +1159,7 @@ yargsInstance.command("publish [directory]", "Publishes the specified directory"
|
|
|
1189
1159
|
password
|
|
1190
1160
|
};
|
|
1191
1161
|
}
|
|
1192
|
-
const { releaseFolder
|
|
1162
|
+
const { releaseFolder } = await import('./index-CNupsFSp.mjs');
|
|
1193
1163
|
const prompter = createDefaultPrompter();
|
|
1194
1164
|
const fullOptions = {
|
|
1195
1165
|
...options,
|
|
@@ -1238,7 +1208,7 @@ yargsInstance.command("testConnection [directory]", "Tests connection to asset s
|
|
|
1238
1208
|
description: "Path to a license file",
|
|
1239
1209
|
default: process.env.IG_GFX_LICENSE
|
|
1240
1210
|
}
|
|
1241
|
-
}), async ({ user
|
|
1211
|
+
}), async ({ user, password, service, license, subdomain, domain, address, directory })=>{
|
|
1242
1212
|
if (!service) {
|
|
1243
1213
|
captureError(new Error('The IG.Asset.Server url has to either be provided using the option --service or through the "IG_GFX_ASSET_SERVICE" environment variable'));
|
|
1244
1214
|
return;
|
|
@@ -1317,10 +1287,10 @@ yargsInstance.command({
|
|
|
1317
1287
|
default: false,
|
|
1318
1288
|
description: "Marks non optional parameter object properties as required"
|
|
1319
1289
|
}),
|
|
1320
|
-
handler: async ({ directory
|
|
1290
|
+
handler: async ({ directory, ignore, strictOptional })=>{
|
|
1321
1291
|
const workspace = detectWorkspace(process.cwd());
|
|
1322
1292
|
await preCommandCheck(workspace);
|
|
1323
|
-
const { generateIndex
|
|
1293
|
+
const { generateIndex } = await import('./generateIndex-BtHP1bP3.mjs');
|
|
1324
1294
|
const location = detectPackage(workspace, directory);
|
|
1325
1295
|
generateIndex({
|
|
1326
1296
|
location,
|
|
@@ -1332,10 +1302,10 @@ yargsInstance.command({
|
|
|
1332
1302
|
});
|
|
1333
1303
|
yargsInstance.command({
|
|
1334
1304
|
command: "generateParameterType [directory] [name]",
|
|
1335
|
-
handler: async ({ directory
|
|
1305
|
+
handler: async ({ directory, name })=>{
|
|
1336
1306
|
const workspace = detectWorkspace(process.cwd());
|
|
1337
1307
|
await preCommandCheck(workspace);
|
|
1338
|
-
const { generateParameterType
|
|
1308
|
+
const { generateParameterType } = await import('./generateParameterType-DyylDiF2.mjs');
|
|
1339
1309
|
const location = detectPackage(workspace, directory);
|
|
1340
1310
|
generateParameterType({
|
|
1341
1311
|
location,
|
|
@@ -1348,7 +1318,7 @@ yargsInstance.command({
|
|
|
1348
1318
|
command: "postinstall",
|
|
1349
1319
|
builder: (argv)=>argv,
|
|
1350
1320
|
handler: async ()=>{
|
|
1351
|
-
const { executePostInstall
|
|
1321
|
+
const { executePostInstall } = await import('./postinstall-D2hLZlaK.mjs');
|
|
1352
1322
|
executePostInstall(detectWorkspace(process.cwd()));
|
|
1353
1323
|
},
|
|
1354
1324
|
describe: "Runs postinstall tasks"
|
|
@@ -1366,9 +1336,9 @@ yargsInstance.command({
|
|
|
1366
1336
|
type: "boolean"
|
|
1367
1337
|
}
|
|
1368
1338
|
}),
|
|
1369
|
-
handler: async ({ directory
|
|
1339
|
+
handler: async ({ directory, newVersion, dryRun })=>{
|
|
1370
1340
|
const workspace = detectWorkspace(process.cwd());
|
|
1371
|
-
const { publishToNpm
|
|
1341
|
+
const { publishToNpm } = await import('./publishNpm-h9T6BVws.mjs');
|
|
1372
1342
|
await publishToNpm({
|
|
1373
1343
|
workspace,
|
|
1374
1344
|
location: detectPackage(workspace, directory),
|
|
@@ -1384,5 +1354,5 @@ var cli = /*#__PURE__*/Object.freeze({
|
|
|
1384
1354
|
__proto__: null
|
|
1385
1355
|
});
|
|
1386
1356
|
|
|
1387
|
-
export { INDEX_FILE as I, PACKAGE_FILE as P, readPackageCreatorIndex as a, readWorkspaceNpmManifest as b,
|
|
1388
|
-
//# sourceMappingURL=cli-
|
|
1357
|
+
export { INDEX_FILE as I, PACKAGE_FILE as P, readPackageCreatorIndex as a, readWorkspaceNpmManifest as b, closeSession as c, getWorkspaceOutputPath as d, readPackageAnimationList as e, isErrorEACCES as f, getExistingPackages as g, isErrorEPERM as h, isErrorENOENT as i, getPackageReleasesDirectory as j, writePackageCreatorIndex as k, getCreatorIndexParameterPrimaryJSType as l, getWorkspaceLibPath as m, readNpmManifest as n, stripUtf8Bom as o, parseCreatorPackageName as p, readPackageNpmManifest as q, readPackageCreatorManifest as r, startSession as s, writePackageNpmManifest as t, uploadPackageFromStream as u, iterateWorkspacePackages as v, writePackageCreatorManifest as w, cli as x };
|
|
1358
|
+
//# sourceMappingURL=cli-t3HbtHpD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-t3HbtHpD.mjs","sources":["../../tools.core/build/stripUtf8Bom.mjs","../../tools.core/build/npmPackage.mjs","../../tools.core/build/error.mjs","../../tools.core/build/package.mjs","../../tools.core/build/workspace.mjs","../../node_modules/imurmurhash/imurmurhash.js","../../node_modules/signal-exit/signals.js","../../node_modules/signal-exit/index.js","../../node_modules/is-typedarray/index.js","../../node_modules/typedarray-to-buffer/index.js","../../node_modules/write-file-atomic/index.js","../../tools.core/build/assetService.mjs","../src/lib/prompter.ts","../src/cli.ts"],"sourcesContent":["const stripUtf8Bom = (text)=>{\n // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string\n // conversion translates it to FEFF (UTF-16 BOM).\n if (text.charCodeAt(0) === 0xfeff) {\n return text.slice(1);\n }\n return text;\n};\n\nexport { stripUtf8Bom };\n//# sourceMappingURL=stripUtf8Bom.mjs.map\n","import * as fs from 'fs';\nimport * as path from 'path';\nimport { writePackageSync } from 'write-pkg';\nimport { stripUtf8Bom } from './stripUtf8Bom.mjs';\n\nconst readNpmManifest = (directory)=>{\n const packageJsonPath = path.join(directory, \"package.json\");\n const packageJson = stripUtf8Bom(fs.readFileSync(packageJsonPath, {\n encoding: \"utf8\"\n }));\n return JSON.parse(packageJson);\n};\nconst writeNpmManifest = (directory, packageJson)=>{\n const packageJsonPath = path.join(directory, \"package.json\");\n writePackageSync(packageJsonPath, packageJson);\n};\n\nexport { readNpmManifest, writeNpmManifest };\n//# sourceMappingURL=npmPackage.mjs.map\n","const getNodeErrorCode = (error)=>{\n if (error !== null && typeof error === \"object\" && error.code !== undefined) {\n return error.code;\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 */ const isErrorEACCES = (error)=>getNodeErrorCode(error) === \"EACCES\";\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 */ const isErrorENOENT = (error)=>getNodeErrorCode(error) === \"ENOENT\";\nconst isErrorEPERM = (error)=>getNodeErrorCode(error) === \"EPERM\";\n\nexport { getNodeErrorCode, isErrorEACCES, isErrorENOENT, isErrorEPERM };\n//# sourceMappingURL=error.mjs.map\n","import * as path from 'path';\nimport * as fs from 'fs';\nimport { isErrorENOENT } from './error.mjs';\nimport { readNpmManifest, writeNpmManifest } from './npmPackage.mjs';\nimport { stripUtf8Bom } from './stripUtf8Bom.mjs';\n\n// Functionality related to working with a single package.\nconst PACKAGE_FILE = \"_Package.json\";\nconst INDEX_FILE = \"_Index.json\";\nconst ANIMATION_FILE_SUFFIX = \".animation.json\";\nconst getCreatorIndexParameterPrimaryJSType = (type)=>{\n switch(type){\n case \"LengthM\":\n case \"ArcDEG\":\n case \"Integer\":\n case \"Int\":\n case \"Float\":\n return \"number\";\n case \"Boolean\":\n case \"Bool\":\n return \"boolean\";\n case \"String\":\n case \"Material\":\n case \"Geometry\":\n case \"Animation\":\n case \"Interactor\":\n case \"Evaluator\":\n default:\n return \"string\";\n }\n};\nconst parseCreatorPackageName = (manifest)=>{\n const [domain, subdomain] = manifest.Package.split(\".\");\n return {\n domain,\n subdomain\n };\n};\n/**\n * Detects the package at the given directory.\n *\n * @param {string} directory\n * @returns {PackageLocation}\n */ const detectPackage = (workspace, directory)=>{\n directory = path.resolve(workspace.path, directory);\n const scriptsPath = path.join(directory, \"Scripts\");\n const tsPath = path.join(directory, \"ts\");\n let location;\n if (fs.existsSync(scriptsPath)) {\n location = {\n _kind: \"PackageLocation\",\n path: directory,\n scriptsDir: scriptsPath,\n manifestDir: scriptsPath\n };\n } else if (fs.existsSync(tsPath)) {\n location = {\n _kind: \"PackageLocation\",\n path: directory,\n scriptsDir: tsPath,\n manifestDir: directory\n };\n } else {\n location = {\n _kind: \"PackageLocation\",\n path: directory,\n scriptsDir: directory,\n manifestDir: directory\n };\n }\n try {\n readPackageCreatorManifest(location);\n } catch (err) {\n if (isErrorENOENT(err)) {\n throw new Error(`No _Package.json found in ${location.manifestDir}`);\n }\n throw err;\n }\n return location;\n};\nconst detectPackageLocationFromCreatorWorkspaceLocation = (location)=>{\n const packageLocation = {\n _kind: \"PackageLocation\",\n path: location.path,\n scriptsDir: path.join(location.path, \"Scripts\"),\n manifestDir: path.join(location.path, \"Scripts\")\n };\n try {\n readPackageCreatorManifest(packageLocation);\n } catch (err) {\n if (isErrorENOENT(err)) {\n throw new Error(`No _Package.json found in ${packageLocation.manifestDir}`);\n }\n throw err;\n }\n return packageLocation;\n};\nconst detectPackageAsParentDirectory = (directory)=>{\n let directoryToCheck = directory;\n while(directoryToCheck !== path.dirname(directoryToCheck)){\n if (fs.existsSync(path.join(directoryToCheck, \"Scripts\"))) {\n return {\n _kind: \"PackageLocation\",\n path: directoryToCheck,\n scriptsDir: path.join(directoryToCheck, \"Scripts\"),\n manifestDir: path.join(directoryToCheck, \"Scripts\")\n };\n }\n directoryToCheck = path.dirname(directoryToCheck);\n }\n return undefined;\n};\nconst readPackageCreatorManifest = (location)=>{\n const packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\n const packageJson = stripUtf8Bom(fs.readFileSync(packageJsonPath, {\n encoding: \"utf8\"\n }));\n return JSON.parse(packageJson);\n};\nconst writePackageCreatorManifest = (location, creatorPackage)=>{\n const packageJsonPath = path.join(location.manifestDir, PACKAGE_FILE);\n fs.writeFileSync(packageJsonPath, JSON.stringify(creatorPackage, null, \"\\t\") + \"\\n\");\n};\nconst getPackageCreatorIndexPath = (location)=>path.join(location.manifestDir, INDEX_FILE);\nconst readPackageCreatorIndex = (location)=>{\n try {\n const indexPath = getPackageCreatorIndexPath(location);\n const index = stripUtf8Bom(fs.readFileSync(indexPath, {\n encoding: \"utf8\"\n }));\n return JSON.parse(index);\n } catch (err) {\n if (isErrorENOENT(err)) {\n return undefined;\n }\n throw err;\n }\n};\nconst writePackageCreatorIndex = (location, index)=>{\n const indexPath = getPackageCreatorIndexPath(location);\n fs.writeFileSync(indexPath, JSON.stringify(index, null, \"\\t\") + \"\\n\");\n};\nconst readPackageNpmManifest = (location)=>{\n try {\n return readNpmManifest(location.manifestDir);\n } catch (err) {\n if (isErrorENOENT(err)) {\n return undefined;\n }\n throw err;\n }\n};\nconst writePackageNpmManifest = (location, packageJson)=>{\n writeNpmManifest(location.manifestDir, packageJson);\n};\nconst readPackageAnimationList = (location)=>{\n const directoryContent = fs.readdirSync(location.manifestDir);\n const animationPathList = [];\n for (const entry of directoryContent){\n if (entry.endsWith(ANIMATION_FILE_SUFFIX)) {\n const animationPath = path.join(location.manifestDir, entry);\n animationPathList.push(animationPath);\n }\n }\n return animationPathList;\n};\nconst getPackageReleasesDirectory = (location)=>path.join(location.path, \"Releases\");\nconst arePackageLocationsEqual = (a, b)=>a.path === b.path;\n\nexport { INDEX_FILE, PACKAGE_FILE, arePackageLocationsEqual, detectPackage, detectPackageAsParentDirectory, detectPackageLocationFromCreatorWorkspaceLocation, getCreatorIndexParameterPrimaryJSType, getPackageCreatorIndexPath, getPackageReleasesDirectory, parseCreatorPackageName, readPackageAnimationList, readPackageCreatorIndex, readPackageCreatorManifest, readPackageNpmManifest, writePackageCreatorIndex, writePackageCreatorManifest, writePackageNpmManifest };\n//# sourceMappingURL=package.mjs.map\n","import * as path from 'path';\nimport * as fs from 'fs';\nimport { isErrorENOENT } from './error.mjs';\nimport { readNpmManifest, writeNpmManifest } from './npmPackage.mjs';\nimport { detectPackage } from './package.mjs';\nimport { detectCreatorWorkspaceAsParentDirectory } from './creatorWorkspace.mjs';\n\n// Functionality related to working with a workspace consisting of multiple packages.\nconst detectWorkspace = (directory)=>{\n directory = path.resolve(process.cwd(), directory);\n return {\n _kind: \"WorkspaceLocation\",\n path: directory\n };\n};\nconst detectWorkspaceByPackageJsonLocation = (directory)=>{\n while(directory !== path.dirname(directory)){\n if (fs.existsSync(path.join(directory, \"package.json\"))) {\n return detectWorkspace(directory);\n }\n directory = path.dirname(directory);\n }\n return undefined;\n};\nconst readWorkspaceNpmManifest = (workspace)=>{\n try {\n return readNpmManifest(workspace.path);\n } catch (err) {\n if (isErrorENOENT(err)) {\n throw new Error(`Expected a package.json file to exist in ${workspace.path}. See packager readme for instructions on how to create the package.json.`);\n }\n throw err;\n }\n};\nconst writeWorkspaceNpmManifest = (workspace, packageJson)=>writeNpmManifest(workspace.path, packageJson);\nconst getWorkspaceOutputPath = (workspace)=>path.join(workspace.path, \"bin\");\nconst getWorkspaceLibPath = (workspace)=>path.join(workspace.path, \"lib\");\nfunction* iterateWorkspacePackages(workspace) {\n const entries = fs.readdirSync(workspace.path, {\n withFileTypes: true\n });\n for (const entry of entries){\n if (!entry.isDirectory()) {\n continue;\n }\n try {\n yield detectPackage(workspace, entry.name);\n } catch {}\n }\n}\nfunction* iterateWorkspaceCreatorWorkspaces(workspace) {\n const entries = fs.readdirSync(workspace.path, {\n withFileTypes: true\n });\n for (const entry of entries){\n if (!entry.isDirectory()) {\n continue;\n }\n const detected = detectCreatorWorkspaceAsParentDirectory(path.join(workspace.path, entry.name));\n if (detected !== undefined) {\n yield detected;\n }\n }\n}\n\nexport { detectWorkspace, detectWorkspaceByPackageJsonLocation, getWorkspaceLibPath, getWorkspaceOutputPath, iterateWorkspaceCreatorWorkspaces, iterateWorkspacePackages, readWorkspaceNpmManifest, writeWorkspaceNpmManifest };\n//# sourceMappingURL=workspace.mjs.map\n","/**\n * @preserve\n * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)\n *\n * @author <a href=\"mailto:jensyt@gmail.com\">Jens Taylor</a>\n * @see http://github.com/homebrewing/brauhaus-diff\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n */\n(function(){\n var cache;\n\n // Call this function without `new` to use the cached object (good for\n // single-threaded environments), or with `new` to create a new object.\n //\n // @param {string} key A UTF-16 or ASCII string\n // @param {number} seed An optional positive integer\n // @return {object} A MurmurHash3 object for incremental hashing\n function MurmurHash3(key, seed) {\n var m = this instanceof MurmurHash3 ? this : cache;\n m.reset(seed)\n if (typeof key === 'string' && key.length > 0) {\n m.hash(key);\n }\n\n if (m !== this) {\n return m;\n }\n };\n\n // Incrementally add a string to this hash\n //\n // @param {string} key A UTF-16 or ASCII string\n // @return {object} this\n MurmurHash3.prototype.hash = function(key) {\n var h1, k1, i, top, len;\n\n len = key.length;\n this.len += len;\n\n k1 = this.k1;\n i = 0;\n switch (this.rem) {\n case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0;\n case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0;\n case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0;\n case 3:\n k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0;\n k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0;\n }\n\n this.rem = (len + this.rem) & 3; // & 3 is same as % 4\n len -= this.rem;\n if (len > 0) {\n h1 = this.h1;\n while (1) {\n k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff;\n\n if (i >= len) {\n break;\n }\n\n k1 = ((key.charCodeAt(i++) & 0xffff)) ^\n ((key.charCodeAt(i++) & 0xffff) << 8) ^\n ((key.charCodeAt(i++) & 0xffff) << 16);\n top = key.charCodeAt(i++);\n k1 ^= ((top & 0xff) << 24) ^\n ((top & 0xff00) >> 8);\n }\n\n k1 = 0;\n switch (this.rem) {\n case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16;\n case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8;\n case 1: k1 ^= (key.charCodeAt(i) & 0xffff);\n }\n\n this.h1 = h1;\n }\n\n this.k1 = k1;\n return this;\n };\n\n // Get the result of this hash\n //\n // @return {number} The 32-bit hash\n MurmurHash3.prototype.result = function() {\n var k1, h1;\n \n k1 = this.k1;\n h1 = this.h1;\n\n if (k1 > 0) {\n k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= this.len;\n\n h1 ^= h1 >>> 16;\n h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n };\n\n // Reset the hash object for reuse\n //\n // @param {number} seed An optional positive integer\n MurmurHash3.prototype.reset = function(seed) {\n this.h1 = typeof seed === 'number' ? seed : 0;\n this.rem = this.k1 = this.len = 0;\n return this;\n };\n\n // A cached object to use. This can be safely used if you're in a single-\n // threaded environment, otherwise you need to create new hashes to use.\n cache = new MurmurHash3();\n\n if (typeof(module) != 'undefined') {\n module.exports = MurmurHash3;\n } else {\n this.MurmurHash3 = MurmurHash3;\n }\n}());\n","// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nvar process = global.process\n\nconst processOk = function (process) {\n return process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { <signal>: <listener fn>, ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\n}\n","module.exports = isTypedArray\nisTypedArray.strict = isStrictTypedArray\nisTypedArray.loose = isLooseTypedArray\n\nvar toString = Object.prototype.toString\nvar names = {\n '[object Int8Array]': true\n , '[object Int16Array]': true\n , '[object Int32Array]': true\n , '[object Uint8Array]': true\n , '[object Uint8ClampedArray]': true\n , '[object Uint16Array]': true\n , '[object Uint32Array]': true\n , '[object Float32Array]': true\n , '[object Float64Array]': true\n}\n\nfunction isTypedArray(arr) {\n return (\n isStrictTypedArray(arr)\n || isLooseTypedArray(arr)\n )\n}\n\nfunction isStrictTypedArray(arr) {\n return (\n arr instanceof Int8Array\n || arr instanceof Int16Array\n || arr instanceof Int32Array\n || arr instanceof Uint8Array\n || arr instanceof Uint8ClampedArray\n || arr instanceof Uint16Array\n || arr instanceof Uint32Array\n || arr instanceof Float32Array\n || arr instanceof Float64Array\n )\n}\n\nfunction isLooseTypedArray(arr) {\n return names[toString.call(arr)]\n}\n","/**\n * Convert a typed array to a Buffer without a copy\n *\n * Author: Feross Aboukhadijeh <https://feross.org>\n * License: MIT\n *\n * `npm install typedarray-to-buffer`\n */\n\nvar isTypedArray = require('is-typedarray').strict\n\nmodule.exports = function typedarrayToBuffer (arr) {\n if (isTypedArray(arr)) {\n // To avoid a copy, use the typed array's underlying ArrayBuffer to back new Buffer\n var buf = Buffer.from(arr.buffer)\n if (arr.byteLength !== arr.buffer.byteLength) {\n // Respect the \"view\", i.e. byteOffset and byteLength, without doing a copy\n buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength)\n }\n return buf\n } else {\n // Pass through all other types to `Buffer.from`\n return Buffer.from(arr)\n }\n}\n","'use strict'\nmodule.exports = writeFile\nmodule.exports.sync = writeFileSync\nmodule.exports._getTmpname = getTmpname // for testing\nmodule.exports._cleanupOnExit = cleanupOnExit\n\nconst fs = require('fs')\nconst MurmurHash3 = require('imurmurhash')\nconst onExit = require('signal-exit')\nconst path = require('path')\nconst isTypedArray = require('is-typedarray')\nconst typedArrayToBuffer = require('typedarray-to-buffer')\nconst { promisify } = require('util')\nconst activeFiles = {}\n\n// if we run inside of a worker_thread, `process.pid` is not unique\n/* istanbul ignore next */\nconst threadId = (function getId () {\n try {\n const workerThreads = require('worker_threads')\n\n /// if we are in main thread, this is set to `0`\n return workerThreads.threadId\n } catch (e) {\n // worker_threads are not available, fallback to 0\n return 0\n }\n})()\n\nlet invocations = 0\nfunction getTmpname (filename) {\n return filename + '.' +\n MurmurHash3(__filename)\n .hash(String(process.pid))\n .hash(String(threadId))\n .hash(String(++invocations))\n .result()\n}\n\nfunction cleanupOnExit (tmpfile) {\n return () => {\n try {\n fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile)\n } catch (_) {}\n }\n}\n\nfunction serializeActiveFile (absoluteName) {\n return new Promise(resolve => {\n // make a queue if it doesn't already exist\n if (!activeFiles[absoluteName]) activeFiles[absoluteName] = []\n\n activeFiles[absoluteName].push(resolve) // add this job to the queue\n if (activeFiles[absoluteName].length === 1) resolve() // kick off the first one\n })\n}\n\n// https://github.com/isaacs/node-graceful-fs/blob/master/polyfills.js#L315-L342\nfunction isChownErrOk (err) {\n if (err.code === 'ENOSYS') {\n return true\n }\n\n const nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (err.code === 'EINVAL' || err.code === 'EPERM') {\n return true\n }\n }\n\n return false\n}\n\nasync function writeFileAsync (filename, data, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n let fd\n let tmpfile\n /* istanbul ignore next -- The closure only gets called when onExit triggers */\n const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile))\n const absoluteName = path.resolve(filename)\n\n try {\n await serializeActiveFile(absoluteName)\n const truename = await promisify(fs.realpath)(filename).catch(() => filename)\n tmpfile = getTmpname(truename)\n\n if (!options.mode || !options.chown) {\n // Either mode or chown is not explicitly set\n // Default behavior is to copy it from original file\n const stats = await promisify(fs.stat)(truename).catch(() => {})\n if (stats) {\n if (options.mode == null) {\n options.mode = stats.mode\n }\n\n if (options.chown == null && process.getuid) {\n options.chown = { uid: stats.uid, gid: stats.gid }\n }\n }\n }\n\n fd = await promisify(fs.open)(tmpfile, 'w', options.mode)\n if (options.tmpfileCreated) {\n await options.tmpfileCreated(tmpfile)\n }\n if (isTypedArray(data)) {\n data = typedArrayToBuffer(data)\n }\n if (Buffer.isBuffer(data)) {\n await promisify(fs.write)(fd, data, 0, data.length, 0)\n } else if (data != null) {\n await promisify(fs.write)(fd, String(data), 0, String(options.encoding || 'utf8'))\n }\n\n if (options.fsync !== false) {\n await promisify(fs.fsync)(fd)\n }\n\n await promisify(fs.close)(fd)\n fd = null\n\n if (options.chown) {\n await promisify(fs.chown)(tmpfile, options.chown.uid, options.chown.gid).catch(err => {\n if (!isChownErrOk(err)) {\n throw err\n }\n })\n }\n\n if (options.mode) {\n await promisify(fs.chmod)(tmpfile, options.mode).catch(err => {\n if (!isChownErrOk(err)) {\n throw err\n }\n })\n }\n\n await promisify(fs.rename)(tmpfile, truename)\n } finally {\n if (fd) {\n await promisify(fs.close)(fd).catch(\n /* istanbul ignore next */\n () => {}\n )\n }\n removeOnExitHandler()\n await promisify(fs.unlink)(tmpfile).catch(() => {})\n activeFiles[absoluteName].shift() // remove the element added by serializeSameFile\n if (activeFiles[absoluteName].length > 0) {\n activeFiles[absoluteName][0]() // start next job if one is pending\n } else delete activeFiles[absoluteName]\n }\n}\n\nfunction writeFile (filename, data, options, callback) {\n if (options instanceof Function) {\n callback = options\n options = {}\n }\n\n const promise = writeFileAsync(filename, data, options)\n if (callback) {\n promise.then(callback, callback)\n }\n\n return promise\n}\n\nfunction writeFileSync (filename, data, options) {\n if (typeof options === 'string') options = { encoding: options }\n else if (!options) options = {}\n try {\n filename = fs.realpathSync(filename)\n } catch (ex) {\n // it's ok, it'll happen on a not yet existing file\n }\n const tmpfile = getTmpname(filename)\n\n if (!options.mode || !options.chown) {\n // Either mode or chown is not explicitly set\n // Default behavior is to copy it from original file\n try {\n const stats = fs.statSync(filename)\n options = Object.assign({}, options)\n if (!options.mode) {\n options.mode = stats.mode\n }\n if (!options.chown && process.getuid) {\n options.chown = { uid: stats.uid, gid: stats.gid }\n }\n } catch (ex) {\n // ignore stat errors\n }\n }\n\n let fd\n const cleanup = cleanupOnExit(tmpfile)\n const removeOnExitHandler = onExit(cleanup)\n\n let threw = true\n try {\n fd = fs.openSync(tmpfile, 'w', options.mode || 0o666)\n if (options.tmpfileCreated) {\n options.tmpfileCreated(tmpfile)\n }\n if (isTypedArray(data)) {\n data = typedArrayToBuffer(data)\n }\n if (Buffer.isBuffer(data)) {\n fs.writeSync(fd, data, 0, data.length, 0)\n } else if (data != null) {\n fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8'))\n }\n if (options.fsync !== false) {\n fs.fsyncSync(fd)\n }\n\n fs.closeSync(fd)\n fd = null\n\n if (options.chown) {\n try {\n fs.chownSync(tmpfile, options.chown.uid, options.chown.gid)\n } catch (err) {\n if (!isChownErrOk(err)) {\n throw err\n }\n }\n }\n\n if (options.mode) {\n try {\n fs.chmodSync(tmpfile, options.mode)\n } catch (err) {\n if (!isChownErrOk(err)) {\n throw err\n }\n }\n }\n\n fs.renameSync(tmpfile, filename)\n threw = false\n } finally {\n if (fd) {\n try {\n fs.closeSync(fd)\n } catch (ex) {\n // ignore close errors at this stage, error may have closed fd already.\n }\n }\n removeOnExitHandler()\n if (threw) {\n cleanup()\n }\n }\n}\n","import axios from 'axios';\n\nconst PLUGIN_ID = \"0feba3a0-b6d1-11e6-9598-0800200c9a66\";\n/**\n * Starts an IG.Asset.Server session and returns the sessionId\n *\n * @param {SessionStartParams} params\n * @returns\n */ const startSession = async ({ url, authentication, ...params })=>{\n const payload = {\n ...params,\n user: undefined,\n password: undefined,\n license: undefined,\n plugin: PLUGIN_ID\n };\n if (authentication.type === \"credentials\") {\n payload.user = authentication.username;\n payload.password = authentication.password;\n } else if (authentication.type === \"license\") {\n payload.license = authentication.license;\n }\n const { data: { session: sessionId, state, response } } = await axios.post(`Session/Start2`, JSON.stringify(payload), {\n baseURL: url\n });\n if (state !== \"SUCCESS\") {\n let message = `Could not start session. IG.Asset.Server responded with ${state}`;\n if (response) {\n message += `: ${response}`;\n }\n throw new Error(message);\n }\n return {\n _kind: \"AssetService\",\n url,\n sessionId,\n domain: params.domain,\n subDomain: params.subDomain\n };\n};\nconst closeSession = async (session)=>{\n await axios.get(`Session/Close/${session.sessionId}`, {\n baseURL: session.url\n });\n};\nconst uploadPackageFromStream = async (session, { name, version }, stream)=>{\n await uploadPackageToUrl(session.url, `UploadPackage/${session.sessionId}/${name}_${version}`, stream);\n};\nconst uploadPackageToUrl = async (url, path, stream)=>{\n const { data, status } = await axios.post(path, stream, {\n baseURL: url\n });\n let objectBody;\n if (typeof data === \"string\") {\n try {\n objectBody = JSON.parse(data);\n } catch (err) {}\n } else if (typeof data === \"object\") {\n objectBody = data;\n }\n if (objectBody !== undefined) {\n if (\"state\" in objectBody && objectBody.state !== \"SUCCESS\") {\n throw new Error(objectBody.response ?? objectBody.state);\n }\n }\n if (status >= 400) {\n if (objectBody !== undefined) {\n let text_1 = \"\";\n for(const key in objectBody){\n text_1 += key + \": \\n\";\n if (typeof objectBody[key] === \"object\") {\n text_1 += JSON.stringify(objectBody[key], undefined, 2);\n } else {\n text_1 += objectBody[key];\n }\n text_1 += \"\\n\\n\";\n }\n throw new Error(text_1);\n }\n throw new Error(data);\n }\n return data;\n};\nconst getExistingPackages = async (session)=>{\n const { data } = await axios.get(`Script/GetInformation/${session.sessionId}`, {\n baseURL: session.url,\n validateStatus: (status)=>status === 404 || status === 200\n }).catch((err)=>{\n throw new Error(`Failed to get existing packages: ${err.message}`);\n });\n return data;\n};\nconst getMaterials = async (session)=>{\n const response = await axios.get(`Material/Get/${session.sessionId}`, {\n baseURL: session.url\n });\n const data = response.data;\n return data.materials;\n};\nconst getGeometries = async (session)=>{\n const response = await axios.get(`Geometry/Get/${session.sessionId}`, {\n baseURL: session.url\n });\n const data = response.data;\n return data.geometries;\n};\n\nexport { closeSession, getExistingPackages, getGeometries, getMaterials, startSession, uploadPackageFromStream };\n//# sourceMappingURL=assetService.mjs.map\n","import inquirer from \"inquirer\";\n\nexport interface PrompterOption {\n\tname: string;\n\tvalue: string;\n}\n\nexport interface PrompterQuestion {\n\tmessage: string;\n\toptions: PrompterOption[];\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\";\nimport glob from \"glob\";\n\nimport { AssetService } from \"@intelligentgraphics/ig.gfx.tools.core\";\n\nimport {\n\tdetectPackage,\n\tPackageLocation,\n\tparseCreatorPackageName,\n\treadPackageCreatorManifest,\n} from \"./lib/package\";\nimport {\n\tdetectWorkspace,\n\treadWorkspaceNpmManifest,\n\tWorkspaceLocation,\n\twriteWorkspaceNpmManifest,\n} from \"./lib/workspace\";\nimport type { ReleaseFolderOptions } from \"./commands/publish\";\nimport { createDefaultPrompter } from \"./lib/prompter\";\nimport { PackageJSON } from \"./lib/packageJSON\";\nimport { getPackageTypescriptFiles } from \"./lib/scripts\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\nconst pjson: PackageJSON = JSON.parse(\n\tfs.readFileSync(path.join(__dirname, \"..\", \"package.json\"), \"utf8\"),\n);\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(\n\t\t\t\"Stopped execution because of the following error: \" + err.message,\n\t\t);\n\t}\n\n\tprocess.exit(1);\n};\n\nconst buildOptions = {\n\toutDir: {\n\t\tdescription: \"Output directory\",\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: \"Minify output\",\n\t\ttype: \"boolean\",\n\t\tdefault: true,\n\t},\n\tcwd: {\n\t\tdescription: \"Working directory\",\n\t\ttype: \"string\",\n\t\tdefault: process.cwd(),\n\t},\n\tclean: {\n\t\tdescription: \"Empty output dir before compiling\",\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 (workspaceLocation: WorkspaceLocation) => {\n\tconst executedLocalPackager = __filename.startsWith(workspaceLocation.path);\n\tconst repositoryPackage = readWorkspaceNpmManifest(workspaceLocation);\n\n\tif (\n\t\trepositoryPackage?.dependencies?.[\n\t\t\t\"@intelligentgraphics/ig.gfx.packager\"\n\t\t] ||\n\t\trepositoryPackage?.devDependencies?.[\n\t\t\t\"@intelligentgraphics/ig.gfx.packager\"\n\t\t]\n\t) {\n\t\tconst parts = [\"Detected locally installed ig.gfx.packager.\"];\n\n\t\tif (executedLocalPackager) {\n\t\t\tparts.push(\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.',\n\t\t\t);\n\t\t}\n\t\tparts.push(\n\t\t\t'Run \"npm uninstall @intelligentgraphics/ig.gfx.packager\" to remove the local version.',\n\t\t);\n\n\t\tconsole.error(parts.join(\"\\n\"));\n\t\tprocess.exit(1);\n\t}\n\n\tif (executedLocalPackager) {\n\t\tconsole.error(`Detected locally installed ig.gfx.packager.\nRun \"npm install -g @intelligentgraphics/ig.gfx.packager@latest\" to install the global version, if it is not yet installed.\nRun \"npm install\" to get rid of the local packager version.`);\n\t\tprocess.exit(1);\n\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: true,\n\t\tdefer: true,\n\t});\n\n\tif (repositoryPackage === 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\trepositoryPackage.scripts ??= {};\n\trepositoryPackage.scripts.postinstall = \"packager postinstall\";\n\n\twriteWorkspaceNpmManifest(workspaceLocation, repositoryPackage);\n};\n\nconst yargsInstance = yargs(process.argv.slice(2));\n\nconst resolvePackagesFromMaybePatterns = (\n\targs: string[] = [],\n\tworkspace: WorkspaceLocation,\n) => {\n\tconst folders = new Map<string, PackageLocation>();\n\n\tfor (const arg of args) {\n\t\tglob.sync(arg, { cwd: workspace.path, absolute: true }).forEach(\n\t\t\t(folder) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst location = detectPackage(workspace, folder);\n\n\t\t\t\t\tfolders.set(folder, location);\n\t\t\t\t} catch (err) {}\n\t\t\t},\n\t\t);\n\t}\n\n\treturn Array.from(folders.values());\n};\n\nyargsInstance.command(\n\t\"build [directories...]\",\n\t\"Builds the specified directories\",\n\t(argv) =>\n\t\targv.options({\n\t\t\t...buildOptions,\n\t\t\twatch: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t},\n\t\t}),\n\tasync ({ directories = [], watch, ...options }) => {\n\t\tconst workspace = detectWorkspace(options.cwd);\n\t\tconst folders = resolvePackagesFromMaybePatterns(\n\t\t\tdirectories as string[],\n\t\t\tworkspace,\n\t\t);\n\n\t\tawait preCommandCheck(workspace);\n\n\t\tif (folders.length === 0) {\n\t\t\treturn console.log(\n\t\t\t\t\"No build targets found. Please check wether a folder with the provided name exists and wether it has _Package.json.\",\n\t\t\t);\n\t\t}\n\n\t\tconst { buildFolders, buildFoldersWatch } = await import(\n\t\t\t\"./commands/build\"\n\t\t);\n\n\t\tif (watch) {\n\t\t\tawait buildFoldersWatch({\n\t\t\t\t...options,\n\t\t\t\tpackages: folders,\n\t\t\t\tworkspace,\n\t\t\t}).catch(captureError);\n\t\t\treturn;\n\t\t}\n\n\t\tawait buildFolders({\n\t\t\t...options,\n\t\t\tpackages: folders,\n\t\t\tworkspace,\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: \"Only zip built files and do not upload them\",\n\t\t\t},\n\t\t\tdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Overwrite the publish domain. Defaults to the one in the _Package.json\",\n\t\t\t},\n\t\t\tsubdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Overwrite the publish subdomain. Defaults to the one in the _Package.json\",\n\t\t\t},\n\t\t\tnewVersion: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"The name of the new version\",\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: \"Address\",\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: \"IG.Asset.Server url\",\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: \"User\",\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: \"Password\",\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: \"Generate typedoc documentation\",\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:\n\t\t\t\t\t\"Try to upload an existing zip file without building and validating the version number\",\n\t\t\t},\n\t\t\tlicense: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Path to a license file\",\n\t\t\t\tdefault: process.env.IG_GFX_LICENSE,\n\t\t\t},\n\t\t\tskipDependencies: {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: \"Skip dependency checks\",\n\t\t\t},\n\t\t}),\n\tasync ({ directory, user, password, service, license, ...options }) => {\n\t\tconst workspace = detectWorkspace(options.cwd);\n\t\tconst folder = detectPackage(workspace, directory as string);\n\n\t\tawait preCommandCheck(workspace);\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\t'The IG.Asset.Server url has to either be provided using the option --service or through the \"IG_GFX_ASSET_SERVICE\" environment variable',\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: AssetService.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: folder,\n\t\t\tbanner: true,\n\t\t\tprompter,\n\t\t\tnewVersion: options.newVersion!,\n\t\t\tworkspace,\n\t\t};\n\n\t\tawait releaseFolder(fullOptions).catch(captureError);\n\t},\n);\n\nyargsInstance.command(\n\t\"testConnection [directory]\",\n\t\"Tests connection to asset service\",\n\t(argv) =>\n\t\targv.options({\n\t\t\tdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Overwrite the publish domain. Defaults to the one in the _Package.json\",\n\t\t\t},\n\t\t\tsubdomain: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription:\n\t\t\t\t\t\"Overwrite the publish subdomain. Defaults to the one in the _Package.json\",\n\t\t\t},\n\t\t\taddress: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Address\",\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: \"IG.Asset.Server url\",\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: \"User\",\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: \"Password\",\n\t\t\t\tdefault: process.env.IG_GFX_PWD,\n\t\t\t},\n\t\t\tlicense: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: \"Path to a license file\",\n\t\t\t\tdefault: process.env.IG_GFX_LICENSE,\n\t\t\t},\n\t\t}),\n\tasync ({\n\t\tuser,\n\t\tpassword,\n\t\tservice,\n\t\tlicense,\n\t\tsubdomain,\n\t\tdomain,\n\t\taddress,\n\t\tdirectory,\n\t}) => {\n\t\tif (!service) {\n\t\t\tcaptureError(\n\t\t\t\tnew Error(\n\t\t\t\t\t'The IG.Asset.Server url has to either be provided using the option --service or through the \"IG_GFX_ASSET_SERVICE\" environment variable',\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!license && (!user || !password)) {\n\t\t\tcaptureError(\n\t\t\t\tnew Error(\n\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),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (license && !license.endsWith(\".iglic\")) {\n\t\t\tcaptureError(\n\t\t\t\tnew Error(\n\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),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tlet authentication: AssetService.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\tif (authentication === undefined) {\n\t\t\tthrow new Error(`Expected authentication to be available`);\n\t\t}\n\n\t\tif (typeof directory === \"string\") {\n\t\t\tconst workspace = detectWorkspace(process.cwd());\n\t\t\tconst folder = detectPackage(workspace, directory as string);\n\t\t\tconst manifest = readPackageCreatorManifest(folder);\n\t\t\tconst parsedName = parseCreatorPackageName(manifest);\n\n\t\t\tif (domain === undefined) {\n\t\t\t\tdomain = parsedName.domain;\n\t\t\t}\n\t\t\tif (subdomain === undefined) {\n\t\t\t\tsubdomain = parsedName.subdomain;\n\t\t\t}\n\t\t}\n\n\t\tif (domain === undefined || subdomain === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t`Expected either domain and subdomain to be provided through options or to be executed for a specific package directory`,\n\t\t\t);\n\t\t}\n\n\t\tconst session = await AssetService.startSession({\n\t\t\turl: service,\n\t\t\taddress,\n\t\t\tdomain,\n\t\t\tsubDomain: subdomain,\n\t\t\tauthentication,\n\t\t});\n\n\t\tawait AssetService.closeSession(session);\n\n\t\tconsole.log(`Asset service session successfully started and closed`);\n\t},\n);\n\nyargsInstance.command({\n\tcommand: \"generateIndex [directory]\",\n\tbuilder: (argv) =>\n\t\targv\n\t\t\t.option(\"ignore\", {\n\t\t\t\ttype: \"array\",\n\t\t\t\tdefault: [],\n\t\t\t\tdescription: \"Files to ignore while generating index\",\n\t\t\t})\n\t\t\t.option(\"strictOptional\", {\n\t\t\t\ttype: \"boolean\",\n\t\t\t\tdefault: false,\n\t\t\t\tdescription:\n\t\t\t\t\t\"Marks non optional parameter object properties as required\",\n\t\t\t}),\n\thandler: async ({ directory, ignore, strictOptional }) => {\n\t\tconst workspace = detectWorkspace(process.cwd());\n\n\t\tawait preCommandCheck(workspace);\n\n\t\tconst { generateIndex } = await import(\"./commands/generateIndex\");\n\n\t\tconst location = detectPackage(workspace, directory as string);\n\n\t\tgenerateIndex({\n\t\t\tlocation,\n\t\t\tignore: ignore as string[],\n\t\t\tstrictOptional,\n\t\t});\n\t},\n\tdescribe: \"Generates an index file for a package based on typescript types\",\n});\n\nyargsInstance.command({\n\tcommand: \"generateParameterType [directory] [name]\",\n\thandler: async ({ directory, name }) => {\n\t\tconst workspace = detectWorkspace(process.cwd());\n\n\t\tawait preCommandCheck(workspace);\n\n\t\tconst { generateParameterType } = await import(\n\t\t\t\"./commands/generateParameterType\"\n\t\t);\n\n\t\tconst location = detectPackage(workspace, directory as string);\n\n\t\tgenerateParameterType({\n\t\t\tlocation,\n\t\t\tname,\n\t\t});\n\t},\n\tdescribe: \"Generates a parameter type for an interactor or evaluator\",\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: \"Name of the new version\",\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(pjson.version).argv;\n"],"names":["stripUtf8Bom","text","charCodeAt","slice","readNpmManifest","directory","packageJsonPath","path","join","packageJson","fs","readFileSync","encoding","JSON","parse","writeNpmManifest","writePackageSync","getNodeErrorCode","error","code","undefined","isErrorEACCES","isErrorENOENT","isErrorEPERM","PACKAGE_FILE","INDEX_FILE","ANIMATION_FILE_SUFFIX","getCreatorIndexParameterPrimaryJSType","type","parseCreatorPackageName","manifest","domain","subdomain","Package","split","detectPackage","workspace","resolve","scriptsPath","tsPath","location","existsSync","_kind","scriptsDir","manifestDir","readPackageCreatorManifest","err","Error","writePackageCreatorManifest","creatorPackage","writeFileSync","stringify","getPackageCreatorIndexPath","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","cache","MurmurHash3","key","seed","m","reset","length","hash","prototype","h1","k1","i","top","len","rem","result","module","exports","platform","global","processOk","removeListener","emit","reallyExit","listeners","kill","pid","on","signalExitModule","assert","require$$0","signals","require$$1","isWin","test","EE","require$$2","EventEmitter","emitter","__signal_exit_emitter__","count","emitted","infinite","setMaxListeners","Infinity","cb","opts","equal","loaded","load","ev","alwaysLast","remove","unload","forEach","sig","sigListeners","er","originalProcessEmit","originalProcessReallyExit","unload_1","event","signal","listener","signals_1","filter","processEmit","processReallyExit","load_1","exitCode","call","arg","ret","apply","arguments","isTypedarray","isTypedArray","strict","isStrictTypedArray","loose","isLooseTypedArray","toString","Object","names","arr","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","Float32Array","Float64Array","typedarrayToBuffer","buf","Buffer","from","buffer","byteLength","byteOffset","writeFileAtomicModule","writeFile","sync","_getTmpname","getTmpname","_cleanupOnExit","cleanupOnExit","onExit","require$$3","require$$4","typedArrayToBuffer","require$$5","promisify","require$$6","activeFiles","threadId","getId","workerThreads","require","e","invocations","filename","__filename","String","tmpfile","unlinkSync","_","serializeActiveFile","absoluteName","Promise","isChownErrOk","nonroot","getuid","writeFileAsync","data","options","fd","removeOnExitHandler","truename","realpath","catch","mode","chown","stats","stat","uid","gid","open","tmpfileCreated","isBuffer","write","fsync","close","chmod","rename","unlink","shift","callback","Function","promise","then","realpathSync","ex","statSync","assign","cleanup","threw","openSync","writeSync","fsyncSync","closeSync","chownSync","chmodSync","renameSync","PLUGIN_ID","startSession","url","authentication","params","payload","user","password","license","plugin","username","session","sessionId","state","response","axios","post","baseURL","message","subDomain","closeSession","get","uploadPackageFromStream","version","stream","uploadPackageToUrl","status","objectBody","text_1","getExistingPackages","validateStatus","createDefaultPrompter","confirm","inquirer","prompt","ask","question","answer","choices","default","fileURLToPath","__dirname","dirname","pjson","captureError","console","log","env","NODE_ENV","exit","buildOptions","outDir","description","coerce","input","minimize","clean","docs","preCommandCheck","workspaceLocation","repositoryPackage","executedLocalPackager","startsWith","dependencies","devDependencies","parts","notifier","updateNotifier","pkg","shouldNotifyInNpmScript","updateCheckInterval","notify","isGlobal","defer","scripts","postinstall","yargsInstance","yargs","argv","resolvePackagesFromMaybePatterns","args","folders","Map","glob","absolute","folder","set","Array","values","command","watch","directories","buildFolders","buildFoldersWatch","packages","noUpload","newVersion","VERSION","required","address","service","IG_GFX_ASSET_SERVICE","IG_GFX_USER","IG_GFX_PWD","pushOnly","IG_GFX_LICENSE","skipDependencies","fullLicensePath","content","releaseFolder","prompter","fullOptions","banner","parsedName","AssetService","builder","option","handler","ignore","strictOptional","generateIndex","describe","generateParameterType","executePostInstall","dryRun","publishToNpm","demandCommand","pkgConf","showHelpOnFail"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAMA,eAAe,CAACC,IAAAA,GAAAA;;;AAGlB,IAAA,IAAIA,IAAKC,CAAAA,UAAU,CAAC,CAAA,CAAA,KAAO,MAAQ,EAAA;QAC/B,OAAOD,IAAAA,CAAKE,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,IAAI;;;;;;;;","x_google_ignoreList":[5,6,7,8,9,10]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as path from 'path';
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import resolve from 'resolve';
|
|
4
|
-
import { n as readNpmManifest, P as PACKAGE_FILE, o as stripUtf8Bom, i as isErrorENOENT, I as INDEX_FILE, b as readWorkspaceNpmManifest } from './cli-
|
|
4
|
+
import { n as readNpmManifest, P as PACKAGE_FILE, o as stripUtf8Bom, i as isErrorENOENT, I as INDEX_FILE, b as readWorkspaceNpmManifest } from './cli-t3HbtHpD.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Detects a published package from a path.
|
|
@@ -126,4 +126,4 @@ const collectIGLibraries = (workspace, manifest)=>{
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
export { readPublishedPackageNpmManifest as a, readPublishedPackageCreatorManifest as b, determineWorkspaceIGLibraries as d, readPublishedPackageCreatorIndex as r };
|
|
129
|
-
//# sourceMappingURL=dependencies-
|
|
129
|
+
//# sourceMappingURL=dependencies-DevWjwri.mjs.map
|