@osdk/cli 0.24.9 → 0.24.11
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/CHANGELOG.md +14 -0
- package/build/browser/{chunk-3H567IY3.js → chunk-CDP3LF3Z.js} +6 -6
- package/build/{esm/chunk-3H567IY3.js.map → browser/chunk-CDP3LF3Z.js.map} +1 -1
- package/build/{esm/chunk-UT43C4BM.js → browser/chunk-QIS7XFJM.js} +70 -5
- package/build/browser/chunk-QIS7XFJM.js.map +1 -0
- package/build/browser/{handleGenerate-QY5GPZ7H.js → handleGenerate-AXSE37T7.js} +8 -8
- package/build/browser/{handleGenerate-QY5GPZ7H.js.map → handleGenerate-AXSE37T7.js.map} +1 -1
- package/build/browser/index.js +36 -13
- package/build/browser/index.js.map +1 -1
- package/build/browser/{siteDeployCommand-T34QFCR6.js → siteDeployCommand-6JHGJGO3.js} +40 -15
- package/build/browser/siteDeployCommand-6JHGJGO3.js.map +1 -0
- package/build/browser/{versionDeleteCommand-VJQHB3Y7.js → versionDeleteCommand-YZ5RK72V.js} +4 -4
- package/build/browser/{versionDeleteCommand-VJQHB3Y7.js.map → versionDeleteCommand-YZ5RK72V.js.map} +1 -1
- package/build/{esm/versionGetCommand-SIKXTJAX.js → browser/versionGetCommand-VW6TYQ2K.js} +4 -4
- package/build/browser/{versionGetCommand-SIKXTJAX.js.map → versionGetCommand-VW6TYQ2K.js.map} +1 -1
- package/build/{esm/versionListCommand-RILPQSQH.js → browser/versionListCommand-ZCVNF2LJ.js} +4 -4
- package/build/browser/{versionListCommand-RILPQSQH.js.map → versionListCommand-ZCVNF2LJ.js.map} +1 -1
- package/build/{esm/versionSetCommand-GAGHJ2VU.js → browser/versionSetCommand-EEGGAV3E.js} +4 -4
- package/build/browser/{versionSetCommand-GAGHJ2VU.js.map → versionSetCommand-EEGGAV3E.js.map} +1 -1
- package/build/browser/{versionUnsetCommand-VETAWEOH.js → versionUnsetCommand-6RJFVA4F.js} +4 -4
- package/build/browser/{versionUnsetCommand-VETAWEOH.js.map → versionUnsetCommand-6RJFVA4F.js.map} +1 -1
- package/build/esm/{chunk-3H567IY3.js → chunk-CDP3LF3Z.js} +6 -6
- package/build/{browser/chunk-3H567IY3.js.map → esm/chunk-CDP3LF3Z.js.map} +1 -1
- package/build/{browser/chunk-UT43C4BM.js → esm/chunk-QIS7XFJM.js} +70 -5
- package/build/esm/chunk-QIS7XFJM.js.map +1 -0
- package/build/esm/commands/site/deploy/SiteDeployArgs.d.ts +2 -0
- package/build/esm/commands/site/deploy/SiteDeployArgs.d.ts.map +1 -1
- package/build/esm/commands/site/deploy/index.d.ts.map +1 -1
- package/build/esm/commands/site/deploy/logDeployCommandConfigFileOverride.d.ts.map +1 -1
- package/build/esm/commands/site/deploy/siteDeployCommand.d.mts +2 -4
- package/build/esm/commands/site/deploy/siteDeployCommand.d.mts.map +1 -1
- package/build/esm/{handleGenerate-QY5GPZ7H.js → handleGenerate-AXSE37T7.js} +8 -8
- package/build/esm/{handleGenerate-QY5GPZ7H.js.map → handleGenerate-AXSE37T7.js.map} +1 -1
- package/build/esm/index.js +36 -13
- package/build/esm/index.js.map +1 -1
- package/build/esm/net/createFetch.d.mts.map +1 -1
- package/build/esm/net/third-party-applications/index.d.mts +1 -0
- package/build/esm/net/third-party-applications/index.d.mts.map +1 -1
- package/build/esm/net/third-party-applications/uploadSnapshotVersion.d.mts +5 -0
- package/build/esm/net/third-party-applications/uploadSnapshotVersion.d.mts.map +1 -0
- package/build/esm/{siteDeployCommand-T34QFCR6.js → siteDeployCommand-6JHGJGO3.js} +40 -15
- package/build/esm/siteDeployCommand-6JHGJGO3.js.map +1 -0
- package/build/esm/util/config.d.ts +1 -0
- package/build/esm/util/config.d.ts.map +1 -1
- package/build/esm/{versionDeleteCommand-VJQHB3Y7.js → versionDeleteCommand-YZ5RK72V.js} +4 -4
- package/build/esm/{versionDeleteCommand-VJQHB3Y7.js.map → versionDeleteCommand-YZ5RK72V.js.map} +1 -1
- package/build/{browser/versionGetCommand-SIKXTJAX.js → esm/versionGetCommand-VW6TYQ2K.js} +4 -4
- package/build/esm/{versionGetCommand-SIKXTJAX.js.map → versionGetCommand-VW6TYQ2K.js.map} +1 -1
- package/build/{browser/versionListCommand-RILPQSQH.js → esm/versionListCommand-ZCVNF2LJ.js} +4 -4
- package/build/esm/{versionListCommand-RILPQSQH.js.map → versionListCommand-ZCVNF2LJ.js.map} +1 -1
- package/build/{browser/versionSetCommand-GAGHJ2VU.js → esm/versionSetCommand-EEGGAV3E.js} +4 -4
- package/build/esm/{versionSetCommand-GAGHJ2VU.js.map → versionSetCommand-EEGGAV3E.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-VETAWEOH.js → versionUnsetCommand-6RJFVA4F.js} +4 -4
- package/build/esm/{versionUnsetCommand-VETAWEOH.js.map → versionUnsetCommand-6RJFVA4F.js.map} +1 -1
- package/package.json +6 -5
- package/build/browser/chunk-UT43C4BM.js.map +0 -1
- package/build/browser/siteDeployCommand-T34QFCR6.js.map +0 -1
- package/build/esm/chunk-UT43C4BM.js.map +0 -1
- package/build/esm/siteDeployCommand-T34QFCR6.js.map +0 -1
package/build/browser/index.js
CHANGED
|
@@ -136,7 +136,7 @@ var generateCommand = {
|
|
|
136
136
|
});
|
|
137
137
|
},
|
|
138
138
|
handler: async (args) => {
|
|
139
|
-
const command10 = await import('./handleGenerate-
|
|
139
|
+
const command10 = await import('./handleGenerate-AXSE37T7.js');
|
|
140
140
|
await command10.handleGenerate(args);
|
|
141
141
|
}
|
|
142
142
|
};
|
|
@@ -237,6 +237,10 @@ var CONFIG_FILE_SCHEMA = {
|
|
|
237
237
|
}
|
|
238
238
|
}],
|
|
239
239
|
required: ["type"]
|
|
240
|
+
},
|
|
241
|
+
uploadOnly: {
|
|
242
|
+
type: "boolean",
|
|
243
|
+
nullable: true
|
|
240
244
|
}
|
|
241
245
|
},
|
|
242
246
|
required: ["application", "directory"]
|
|
@@ -300,15 +304,18 @@ init_esm_shims();
|
|
|
300
304
|
// src/commands/site/deploy/logDeployCommandConfigFileOverride.ts
|
|
301
305
|
init_esm_shims();
|
|
302
306
|
async function logDeployCommandConfigFileOverride(args, config) {
|
|
303
|
-
if (config?.autoVersion != null && args.autoVersion !== config
|
|
307
|
+
if (config?.autoVersion != null && args.autoVersion !== config.autoVersion.type) {
|
|
304
308
|
consola.debug(`Overriding "autoVersion" from config file with ${args.autoVersion}`);
|
|
305
309
|
}
|
|
306
|
-
if (config?.directory != null && args.directory !== config
|
|
310
|
+
if (config?.directory != null && args.directory !== config.directory) {
|
|
307
311
|
consola.debug(`Overriding "directory" from config file with ${args.directory}`);
|
|
308
312
|
}
|
|
309
|
-
if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config
|
|
313
|
+
if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config.autoVersion.tagPrefix) {
|
|
310
314
|
consola.debug(`Overriding "gitTagPrefix" from config file with ${args.gitTagPrefix}`);
|
|
311
315
|
}
|
|
316
|
+
if (config?.uploadOnly != null && args.uploadOnly !== config.uploadOnly) {
|
|
317
|
+
consola.debug(`Overriding "uploadOnly" from config file with ${args.uploadOnly}`);
|
|
318
|
+
}
|
|
312
319
|
}
|
|
313
320
|
|
|
314
321
|
// src/commands/site/deploy/index.ts
|
|
@@ -321,6 +328,7 @@ var command2 = {
|
|
|
321
328
|
const directory = siteConfig?.directory;
|
|
322
329
|
const autoVersion = siteConfig?.autoVersion;
|
|
323
330
|
const gitTagPrefix = autoVersion?.tagPrefix;
|
|
331
|
+
const uploadOnly = siteConfig?.uploadOnly;
|
|
324
332
|
return argv.options({
|
|
325
333
|
directory: {
|
|
326
334
|
type: "string",
|
|
@@ -334,7 +342,7 @@ var command2 = {
|
|
|
334
342
|
uploadOnly: {
|
|
335
343
|
type: "boolean",
|
|
336
344
|
description: "Upload new site version only without setting as live",
|
|
337
|
-
default: false
|
|
345
|
+
default: uploadOnly ?? false
|
|
338
346
|
},
|
|
339
347
|
version: {
|
|
340
348
|
type: "string",
|
|
@@ -360,8 +368,17 @@ var command2 = {
|
|
|
360
368
|
...gitTagPrefix ? {
|
|
361
369
|
default: gitTagPrefix
|
|
362
370
|
} : {}
|
|
371
|
+
},
|
|
372
|
+
snapshot: {
|
|
373
|
+
type: "boolean",
|
|
374
|
+
description: "Upload a snapshot version only with automatic retention",
|
|
375
|
+
default: false
|
|
376
|
+
},
|
|
377
|
+
snapshotId: {
|
|
378
|
+
type: "string",
|
|
379
|
+
description: "Optional id to associate with snapshot version as an alias"
|
|
363
380
|
}
|
|
364
|
-
}).group(["directory", "version", "uploadOnly"], "Deploy Options").group(["autoVersion", "gitTagPrefix"], "Auto Version Options").check((args) => {
|
|
381
|
+
}).group(["directory", "version", "uploadOnly"], "Deploy Options").group(["autoVersion", "gitTagPrefix"], "Auto Version Options").group(["snapshot", "snapshotId"], "Snapshot Options").check((args) => {
|
|
365
382
|
if (autoVersion == null && args.autoVersion == null && args.version == null) {
|
|
366
383
|
throw new YargsCheckError("One of --version or --autoVersion must be specified");
|
|
367
384
|
}
|
|
@@ -376,11 +393,17 @@ var command2 = {
|
|
|
376
393
|
if (gitTagPrefixValue != null && autoVersionType !== "git-describe") {
|
|
377
394
|
throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);
|
|
378
395
|
}
|
|
396
|
+
if (args.uploadOnly && args.snapshot) {
|
|
397
|
+
throw new YargsCheckError(`--uploadOnly and --snapshot cannot be enabled together`);
|
|
398
|
+
}
|
|
399
|
+
if (args.snapshotId != null && !args.snapshot) {
|
|
400
|
+
throw new YargsCheckError("--snapshotId is only supported when --snapshot is enabled");
|
|
401
|
+
}
|
|
379
402
|
return true;
|
|
380
403
|
}).middleware((args) => logDeployCommandConfigFileOverride(args, siteConfig));
|
|
381
404
|
},
|
|
382
405
|
handler: async (args) => {
|
|
383
|
-
const command10 = await import('./siteDeployCommand-
|
|
406
|
+
const command10 = await import('./siteDeployCommand-6JHGJGO3.js');
|
|
384
407
|
const {
|
|
385
408
|
version,
|
|
386
409
|
autoVersion,
|
|
@@ -430,7 +453,7 @@ var command3 = {
|
|
|
430
453
|
}).group(["yes"], "Delete Options");
|
|
431
454
|
},
|
|
432
455
|
handler: async (args) => {
|
|
433
|
-
const command10 = await import('./versionDeleteCommand-
|
|
456
|
+
const command10 = await import('./versionDeleteCommand-YZ5RK72V.js');
|
|
434
457
|
await command10.default(args);
|
|
435
458
|
}
|
|
436
459
|
};
|
|
@@ -445,7 +468,7 @@ var command4 = {
|
|
|
445
468
|
return argv;
|
|
446
469
|
},
|
|
447
470
|
handler: async (args) => {
|
|
448
|
-
const command10 = await import('./versionGetCommand-
|
|
471
|
+
const command10 = await import('./versionGetCommand-VW6TYQ2K.js');
|
|
449
472
|
await command10.default(args);
|
|
450
473
|
}
|
|
451
474
|
};
|
|
@@ -460,7 +483,7 @@ var command5 = {
|
|
|
460
483
|
return argv;
|
|
461
484
|
},
|
|
462
485
|
handler: async (args) => {
|
|
463
|
-
const command10 = await import('./versionListCommand-
|
|
486
|
+
const command10 = await import('./versionListCommand-ZCVNF2LJ.js');
|
|
464
487
|
await command10.default(args);
|
|
465
488
|
}
|
|
466
489
|
};
|
|
@@ -479,7 +502,7 @@ var command6 = {
|
|
|
479
502
|
});
|
|
480
503
|
},
|
|
481
504
|
handler: async (args) => {
|
|
482
|
-
const command10 = await import('./versionSetCommand-
|
|
505
|
+
const command10 = await import('./versionSetCommand-EEGGAV3E.js');
|
|
483
506
|
await command10.default(args);
|
|
484
507
|
}
|
|
485
508
|
};
|
|
@@ -498,7 +521,7 @@ var command7 = {
|
|
|
498
521
|
}).group(["yes"], "Unset Options");
|
|
499
522
|
},
|
|
500
523
|
handler: async (args) => {
|
|
501
|
-
const command10 = await import('./versionUnsetCommand-
|
|
524
|
+
const command10 = await import('./versionUnsetCommand-6RJFVA4F.js');
|
|
502
525
|
await command10.default(args);
|
|
503
526
|
}
|
|
504
527
|
};
|
|
@@ -583,7 +606,7 @@ async function logConfigFileMiddleware() {
|
|
|
583
606
|
|
|
584
607
|
// src/cli.ts
|
|
585
608
|
async function cli2(args = process.argv) {
|
|
586
|
-
consola.info(`Palantir OSDK CLI ${"0.24.
|
|
609
|
+
consola.info(`Palantir OSDK CLI ${"0.24.11"}
|
|
587
610
|
`);
|
|
588
611
|
const base = getYargsBase(args);
|
|
589
612
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/cli.ts","../../../cli.cmd.typescript/build/esm/index.js","../../../cli.cmd.typescript/build/esm/cli.js","../../../cli.cmd.typescript/build/esm/generate/generate.js","../../../cli.cmd.typescript/build/esm/typescriptCommand.js","../../src/commands/auth/index.ts","../../src/commands/auth/login/index.ts","../../src/commands/site/index.ts","../../src/util/configLoader.ts","../../src/util/config.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/logSiteCommandConfigFileOverride.ts","../../src/commands/site/version/index.ts","../../src/commands/site/version/delete/index.ts","../../src/commands/site/version/get/index.ts","../../src/commands/site/version/list/index.ts","../../src/commands/site/version/set/index.ts","../../src/commands/site/version/unset/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","fsPromises","consola","autoVersion","application","foundryUrl","cli"],"mappings":";;;;;;;AAAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AAgBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,OAAS,EAAA,UAAA;AAAA,EACT,QAAU,EAAA,uCAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,QAAA;AAAA,QACN,WAAa,EAAA,oCAAA;AAAA,QACb,YAAc,EAAA,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AAS,KAAA,KAAA;AAAA,OAAC;AAAA,KACpB,EAAE,UAAW,EAAA,CAAA;AAAA,WACP,GAAK,EAAA;AACZ,IAAA,IAAI,eAAe,gBAAkB,EAAA;AACnC,MAAAA,OAAAA,CAAQ,MAAM,GAAG,CAAA,CAAA;AAAA,KACnB;AAAA,GACF;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { cli } from \"./cli.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport typescript from \"@osdk/cli.cmd.typescript\";\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport { logConfigFileMiddleware } from \"./yargs/logConfigFileMiddleware.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${process.env.PACKAGE_VERSION}\\n`);\n const base = getYargsBase(args);\n\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.middleware(logConfigFileMiddleware).command(site).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { cli } from \"./cli.js\";\nexport { typescriptCommand as default } from \"./typescriptCommand.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport { generateCommand } from \"./generate/generate.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.24.9\"}\\n`);\n const base = getYargsBase(args);\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.command(generateCommand).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nexport const generateCommand = {\n command: \"generate\",\n describe: \"Generate TypeScript SDK from ontology\",\n builder: argv => {\n return argv.options({\n outDir: {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"Path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"foundryUrl\", \"clientId\"]\n },\n foundryUrl: {\n description: \"URL for the foundry stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\",\n alias: \"stack\" // for backwards compatibility\n },\n clientId: {\n description: \"OAuth client ID for application\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"foundryUrl\"\n },\n ontologyRid: {\n description: \"Limit requests to this ontology rid only\",\n type: \"string\",\n demandOption: false\n },\n ontologyWritePath: {\n description: \"Path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n },\n version: {\n type: \"string\",\n description: \"Version of the generated code, or 'dev'\",\n demandOption: true\n },\n packageName: {\n type: \"string\",\n description: \"Name of the package to generate\"\n },\n asPackage: {\n type: \"boolean\",\n description: \"Generate as a package (makes a package.json and co)\"\n },\n clean: {\n type: \"boolean\",\n description: \"Clean the output directory before generating\"\n },\n internal: {\n type: \"boolean\",\n default: false\n },\n externalObjects: {\n type: \"string\",\n coerce: value => {\n const map = new Map();\n if (value) {\n for (const entry of value.split(\",\")) {\n const [api, ns] = entry.split(\":\");\n map.set(api, ns);\n }\n }\n return map;\n },\n default: \"\"\n },\n externalInterfaces: {\n type: \"string\",\n coerce: value => {\n const map = new Map();\n if (value) {\n for (const entry of value.split(\",\")) {\n const [api, ns] = entry.split(\":\");\n map.set(api, ns);\n }\n }\n return map;\n },\n default: \"\"\n }\n }).group([\"ontologyPath\", \"outDir\", \"version\"], \"Generate from a local file\").group([\"foundryUrl\", \"clientId\", \"outDir\", \"ontologyWritePath\", \"version\"], \"OR Generate from Foundry\").group([\"packageName\", \"as\"], \"Package generation options\").check(args => {\n if (!args.ontologyPath && !args.foundryUrl) {\n throw new YargsCheckError(\"Must specify either ontologyPath or foundryUrl and clientId\");\n }\n if (args.version !== \"dev\" && !isValidSemver(args.version)) {\n throw new YargsCheckError(\"Version must be 'dev' or a valid semver version\");\n }\n if (args.asPackage && !args.packageName) {\n throw new YargsCheckError(\"Must specify packageName when generating as a package\");\n }\n if (args.asPackage && !args.version) {\n throw new YargsCheckError(\"Must specify version when generating as a package\");\n }\n return true;\n });\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.handleGenerate(args);\n }\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateCommand } from \"./generate/generate.js\";\nexport const typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async () => {}\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport login from \"./login/index.js\";\nconst auth = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n foundryUrl: {\n type: \"string\",\n demandOption: true,\n alias: \"baseUrl\",\n // for backwards compatibility\n describe: \"URL for the Foundry stack\"\n }\n }).command(login).demandCommand();\n },\n handler: async args => {}\n};\nexport default auth;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"clientId\", {\n alias: \"applicationId\",\n // for backwards compatibility\n type: \"string\",\n demandOption: true,\n describe: \"OAuth client ID for application\"\n });\n },\n handler: async args => {\n const command = await import(\"@osdk/cli.common/loginFlow\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../util/configLoader.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logSiteCommandConfigFileOverride } from \"./logSiteCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: async argv => {\n const config = await configLoader();\n const application = config?.foundryConfig.site.application;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n application: {\n type: \"string\",\n coerce: application => application,\n ...(application ? {\n default: application\n } : {\n demandOption: true\n }),\n description: \"Application resource identifier (rid)\"\n },\n foundryUrl: {\n coerce: foundryUrl => foundryUrl.replace(/\\/$/, \"\"),\n type: \"string\",\n ...(foundryUrl ? {\n default: foundryUrl\n } : {\n demandOption: true\n }),\n description: \"URL for the Foundry stack\"\n },\n token: {\n type: \"string\",\n conflicts: \"tokenFile\",\n description: \"Foundry API token\"\n },\n tokenFile: {\n type: \"string\",\n conflicts: \"token\",\n description: \"Path to file containing Foundry API token\"\n }\n }).group([\"application\", \"foundryUrl\", \"token\", \"tokenFile\"], \"Common Options\").command(version).command(deploy).check(args => {\n if (!args.foundryUrl.startsWith(\"https://\")) {\n throw new YargsCheckError(\"foundryUrl must start with https://\");\n }\n return true;\n }).middleware(args => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { loadFoundryConfig } from \"./config.js\";\nlet configPromise = undefined;\nfunction getConfig() {\n if (configPromise == null) {\n configPromise = loadFoundryConfig();\n }\n return configPromise;\n}\nexport default getConfig;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst CONFIG_FILE_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n type: {\n const: \"git-describe\",\n type: \"string\"\n },\n tagPrefix: {\n type: \"string\",\n nullable: true\n }\n }\n }],\n required: [\"type\"]\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\nexport async function loadFoundryConfig() {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(CONFIG_FILE_SCHEMA);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logDeployCommandConfigFileOverride } from \"./logDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader();\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.tagPrefix;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`Only 'git-describe' is supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n // Future proofing for when we support other autoVersion types\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n return true;\n }).middleware(args => logDeployCommandConfigFileOverride(args, siteConfig));\n },\n handler: async args => {\n const command = await import(\"./siteDeployCommand.mjs\");\n const {\n version,\n autoVersion,\n gitTagPrefix,\n ...restArgs\n } = args;\n const selectedVersion = args.version != null ? args.version : {\n type: args.autoVersion,\n tagPrefix: args.gitTagPrefix\n };\n await command.default({\n ...restArgs,\n selectedVersion\n });\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logDeployCommandConfigFileOverride(args, config) {\n if (config?.autoVersion != null && args.autoVersion !== config?.autoVersion.type) {\n consola.debug(`Overriding \"autoVersion\" from config file with ${args.autoVersion}`);\n }\n if (config?.directory != null && args.directory !== config?.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config?.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logSiteCommandConfigFileOverride(args, config) {\n if (config?.site.application != null && args.application !== config.site.application) {\n consola.debug(`Overriding \"application\" from config file with ${args.application}`);\n }\n if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {\n consola.debug(`Overriding \"foundryUrl\" from config file with ${args.foundryUrl}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport deleteCmd from \"./delete/index.js\";\nimport get from \"./get/index.js\";\nimport list from \"./list/index.js\";\nimport set from \"./set/index.js\";\nimport unset from \"./unset/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage site versions\",\n builder: argv => {\n return argv.command(list).command(get).command(set).command(unset).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"delete <version>\",\n describe: \"Delete site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n }).option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Delete Options\");\n },\n handler: async args => {\n const command = await import(\"./versionDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"get\",\n describe: \"Get live site version\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionGetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"list\",\n describe: \"List site versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionListCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"set <version>\",\n describe: \"Set live site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionSetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"unset\",\n describe: \"Clear live site version\",\n builder: argv => {\n return argv.option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Unset Options\");\n },\n handler: async args => {\n const command = await import(\"./versionUnsetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware() {\n if (firstTime) {\n firstTime = false;\n const config = getConfig();\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/cli.ts","../../../cli.cmd.typescript/build/esm/index.js","../../../cli.cmd.typescript/build/esm/cli.js","../../../cli.cmd.typescript/build/esm/generate/generate.js","../../../cli.cmd.typescript/build/esm/typescriptCommand.js","../../src/commands/auth/index.ts","../../src/commands/auth/login/index.ts","../../src/commands/site/index.ts","../../src/util/configLoader.ts","../../src/util/config.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/logSiteCommandConfigFileOverride.ts","../../src/commands/site/version/index.ts","../../src/commands/site/version/delete/index.ts","../../src/commands/site/version/get/index.ts","../../src/commands/site/version/list/index.ts","../../src/commands/site/version/set/index.ts","../../src/commands/site/version/unset/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","fsPromises","consola","autoVersion","application","foundryUrl","cli"],"mappings":";;;;;;;AAAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AAgBO,IAAM,eAAkB,GAAA;AAAA,EAC7B,OAAS,EAAA,UAAA;AAAA,EACT,QAAU,EAAA,uCAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,QAAA;AAAA,QACN,WAAa,EAAA,oCAAA;AAAA,QACb,YAAc,EAAA,IAAA;AAAA,OAChB;AAAA,MACA,YAAc,EAAA;AAAA,QACZ,WAAa,EAAA,gCAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAA,EAAW,CAAC,YAAA,EAAc,UAAU,CAAA;AAAA,OACtC;AAAA,MACA,UAAY,EAAA;AAAA,QACV,WAAa,EAAA,sDAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAW,EAAA,cAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,QACT,KAAO,EAAA,OAAA;AAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,WAAa,EAAA,iCAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAW,EAAA,cAAA;AAAA,QACX,OAAS,EAAA,YAAA;AAAA,OACX;AAAA,MACA,WAAa,EAAA;AAAA,QACX,WAAa,EAAA,0CAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,MAC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A;AAAA,MACxB,QAAU,EAAA,mBAAA;AAAA,MACV,OAAA,EAAS,OAAM,IAAQ,KAAA;AACrB,QAAA,OAAO,KAAK,OAAQ,CAAA,iBAAU,EAAE,OAAQ,CAAA,YAAI,EAAE,aAAc,EAAA,CAAA;AAAA,OAC9D;AAAA,MACA,SAAS,CAAS,KAAA,KAAA;AAAA,OAAC;AAAA,KACpB,EAAE,UAAW,EAAA,CAAA;AAAA,WACP,GAAK,EAAA;AACZ,IAAA,IAAI,eAAe,gBAAkB,EAAA;AACnC,MAAAA,OAAAA,CAAQ,MAAM,GAAG,CAAA,CAAA;AAAA,KACnB;AAAA,GACF;AACF","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { cli } from \"./cli.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport typescript from \"@osdk/cli.cmd.typescript\";\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport { logConfigFileMiddleware } from \"./yargs/logConfigFileMiddleware.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${process.env.PACKAGE_VERSION}\\n`);\n const base = getYargsBase(args);\n\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.middleware(logConfigFileMiddleware).command(site).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { cli } from \"./cli.js\";\nexport { typescriptCommand as default } from \"./typescriptCommand.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport { generateCommand } from \"./generate/generate.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.24.11\"}\\n`);\n const base = getYargsBase(args);\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.command(generateCommand).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nexport const generateCommand = {\n command: \"generate\",\n describe: \"Generate TypeScript SDK from ontology\",\n builder: argv => {\n return argv.options({\n outDir: {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"Path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"foundryUrl\", \"clientId\"]\n },\n foundryUrl: {\n description: \"URL for the foundry stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\",\n alias: \"stack\" // for backwards compatibility\n },\n clientId: {\n description: \"OAuth client ID for application\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"foundryUrl\"\n },\n ontologyRid: {\n description: \"Limit requests to this ontology rid only\",\n type: \"string\",\n demandOption: false\n },\n ontologyWritePath: {\n description: \"Path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n },\n version: {\n type: \"string\",\n description: \"Version of the generated code, or 'dev'\",\n demandOption: true\n },\n packageName: {\n type: \"string\",\n description: \"Name of the package to generate\"\n },\n asPackage: {\n type: \"boolean\",\n description: \"Generate as a package (makes a package.json and co)\"\n },\n clean: {\n type: \"boolean\",\n description: \"Clean the output directory before generating\"\n },\n internal: {\n type: \"boolean\",\n default: false\n },\n externalObjects: {\n type: \"string\",\n coerce: value => {\n const map = new Map();\n if (value) {\n for (const entry of value.split(\",\")) {\n const [api, ns] = entry.split(\":\");\n map.set(api, ns);\n }\n }\n return map;\n },\n default: \"\"\n },\n externalInterfaces: {\n type: \"string\",\n coerce: value => {\n const map = new Map();\n if (value) {\n for (const entry of value.split(\",\")) {\n const [api, ns] = entry.split(\":\");\n map.set(api, ns);\n }\n }\n return map;\n },\n default: \"\"\n }\n }).group([\"ontologyPath\", \"outDir\", \"version\"], \"Generate from a local file\").group([\"foundryUrl\", \"clientId\", \"outDir\", \"ontologyWritePath\", \"version\"], \"OR Generate from Foundry\").group([\"packageName\", \"as\"], \"Package generation options\").check(args => {\n if (!args.ontologyPath && !args.foundryUrl) {\n throw new YargsCheckError(\"Must specify either ontologyPath or foundryUrl and clientId\");\n }\n if (args.version !== \"dev\" && !isValidSemver(args.version)) {\n throw new YargsCheckError(\"Version must be 'dev' or a valid semver version\");\n }\n if (args.asPackage && !args.packageName) {\n throw new YargsCheckError(\"Must specify packageName when generating as a package\");\n }\n if (args.asPackage && !args.version) {\n throw new YargsCheckError(\"Must specify version when generating as a package\");\n }\n return true;\n });\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.handleGenerate(args);\n }\n};","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { generateCommand } from \"./generate/generate.js\";\nexport const typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async () => {}\n};","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport login from \"./login/index.js\";\nconst auth = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n foundryUrl: {\n type: \"string\",\n demandOption: true,\n alias: \"baseUrl\",\n // for backwards compatibility\n describe: \"URL for the Foundry stack\"\n }\n }).command(login).demandCommand();\n },\n handler: async args => {}\n};\nexport default auth;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"clientId\", {\n alias: \"applicationId\",\n // for backwards compatibility\n type: \"string\",\n demandOption: true,\n describe: \"OAuth client ID for application\"\n });\n },\n handler: async args => {\n const command = await import(\"@osdk/cli.common/loginFlow\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../util/configLoader.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logSiteCommandConfigFileOverride } from \"./logSiteCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: async argv => {\n const config = await configLoader();\n const application = config?.foundryConfig.site.application;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n application: {\n type: \"string\",\n coerce: application => application,\n ...(application ? {\n default: application\n } : {\n demandOption: true\n }),\n description: \"Application resource identifier (rid)\"\n },\n foundryUrl: {\n coerce: foundryUrl => foundryUrl.replace(/\\/$/, \"\"),\n type: \"string\",\n ...(foundryUrl ? {\n default: foundryUrl\n } : {\n demandOption: true\n }),\n description: \"URL for the Foundry stack\"\n },\n token: {\n type: \"string\",\n conflicts: \"tokenFile\",\n description: \"Foundry API token\"\n },\n tokenFile: {\n type: \"string\",\n conflicts: \"token\",\n description: \"Path to file containing Foundry API token\"\n }\n }).group([\"application\", \"foundryUrl\", \"token\", \"tokenFile\"], \"Common Options\").command(version).command(deploy).check(args => {\n if (!args.foundryUrl.startsWith(\"https://\")) {\n throw new YargsCheckError(\"foundryUrl must start with https://\");\n }\n return true;\n }).middleware(args => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { loadFoundryConfig } from \"./config.js\";\nlet configPromise = undefined;\nfunction getConfig() {\n if (configPromise == null) {\n configPromise = loadFoundryConfig();\n }\n return configPromise;\n}\nexport default getConfig;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst CONFIG_FILE_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n type: {\n const: \"git-describe\",\n type: \"string\"\n },\n tagPrefix: {\n type: \"string\",\n nullable: true\n }\n }\n }],\n required: [\"type\"]\n },\n uploadOnly: {\n type: \"boolean\",\n nullable: true\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\nexport async function loadFoundryConfig() {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(CONFIG_FILE_SCHEMA);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logDeployCommandConfigFileOverride } from \"./logDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader();\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.tagPrefix;\n const uploadOnly = siteConfig?.uploadOnly;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: uploadOnly ?? false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n },\n snapshot: {\n type: \"boolean\",\n description: \"Upload a snapshot version only with automatic retention\",\n default: false\n },\n snapshotId: {\n type: \"string\",\n description: \"Optional id to associate with snapshot version as an alias\"\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").group([\"snapshot\", \"snapshotId\"], \"Snapshot Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`Only 'git-describe' is supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n // Future proofing for when we support other autoVersion types\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n if (args.uploadOnly && args.snapshot) {\n throw new YargsCheckError(`--uploadOnly and --snapshot cannot be enabled together`);\n }\n if (args.snapshotId != null && !args.snapshot) {\n throw new YargsCheckError(\"--snapshotId is only supported when --snapshot is enabled\");\n }\n return true;\n }).middleware(args => logDeployCommandConfigFileOverride(args, siteConfig));\n },\n handler: async args => {\n const command = await import(\"./siteDeployCommand.mjs\");\n const {\n version,\n autoVersion,\n gitTagPrefix,\n ...restArgs\n } = args;\n const selectedVersion = args.version != null ? args.version : {\n type: args.autoVersion,\n tagPrefix: args.gitTagPrefix\n };\n await command.default({\n ...restArgs,\n selectedVersion\n });\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logDeployCommandConfigFileOverride(args, config) {\n if (config?.autoVersion != null && args.autoVersion !== config.autoVersion.type) {\n consola.debug(`Overriding \"autoVersion\" from config file with ${args.autoVersion}`);\n }\n if (config?.directory != null && args.directory !== config.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\n }\n if (config?.uploadOnly != null && args.uploadOnly !== config.uploadOnly) {\n consola.debug(`Overriding \"uploadOnly\" from config file with ${args.uploadOnly}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logSiteCommandConfigFileOverride(args, config) {\n if (config?.site.application != null && args.application !== config.site.application) {\n consola.debug(`Overriding \"application\" from config file with ${args.application}`);\n }\n if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {\n consola.debug(`Overriding \"foundryUrl\" from config file with ${args.foundryUrl}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport deleteCmd from \"./delete/index.js\";\nimport get from \"./get/index.js\";\nimport list from \"./list/index.js\";\nimport set from \"./set/index.js\";\nimport unset from \"./unset/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage site versions\",\n builder: argv => {\n return argv.command(list).command(get).command(set).command(unset).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"delete <version>\",\n describe: \"Delete site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n }).option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Delete Options\");\n },\n handler: async args => {\n const command = await import(\"./versionDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"get\",\n describe: \"Get live site version\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionGetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"list\",\n describe: \"List site versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionListCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"set <version>\",\n describe: \"Set live site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionSetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"unset\",\n describe: \"Clear live site version\",\n builder: argv => {\n return argv.option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Unset Options\");\n },\n handler: async args => {\n const command = await import(\"./versionUnsetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware() {\n if (firstTime) {\n firstTime = false;\n const config = getConfig();\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-QIS7XFJM.js';
|
|
2
|
+
import './chunk-CDP3LF3Z.js';
|
|
3
3
|
import { ExitProcessError, isValidSemver } from './chunk-G6CPJEWR.js';
|
|
4
4
|
import { init_esm_shims } from './chunk-TIWBVCHX.js';
|
|
5
5
|
import { consola } from 'consola';
|
|
@@ -8,6 +8,7 @@ import { colorize } from 'consola/utils';
|
|
|
8
8
|
import * as fs from 'fs';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { Readable } from 'stream';
|
|
11
|
+
import prettyBytes from 'pretty-bytes';
|
|
11
12
|
import { exec } from 'child_process';
|
|
12
13
|
import { promisify } from 'util';
|
|
13
14
|
|
|
@@ -59,6 +60,8 @@ async function siteDeployCommand({
|
|
|
59
60
|
application,
|
|
60
61
|
foundryUrl,
|
|
61
62
|
uploadOnly,
|
|
63
|
+
snapshot,
|
|
64
|
+
snapshotId,
|
|
62
65
|
directory,
|
|
63
66
|
token,
|
|
64
67
|
tokenFile
|
|
@@ -81,15 +84,12 @@ async function siteDeployCommand({
|
|
|
81
84
|
consola.start("Zipping site files");
|
|
82
85
|
const archive = archiver("zip").directory(directory, false);
|
|
83
86
|
logArchiveStats(archive);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
// This cast is because the dom fetch doesn't align type wise with streams
|
|
91
|
-
), archive.finalize()]);
|
|
92
|
-
consola.success("Upload complete");
|
|
87
|
+
if (snapshot) {
|
|
88
|
+
await uploadSnapshot(clientCtx, application, siteVersion, snapshotId ?? "", archive);
|
|
89
|
+
consola.info("Snapshot mode enabled, skipping deployment");
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
await upload(clientCtx, application, siteVersion, archive);
|
|
93
93
|
if (!uploadOnly) {
|
|
94
94
|
const website = await third_party_applications_exports.deployWebsite(clientCtx, application, {
|
|
95
95
|
version: siteVersion
|
|
@@ -102,12 +102,35 @@ async function siteDeployCommand({
|
|
|
102
102
|
} else {
|
|
103
103
|
const website = await third_party_applications_exports.getWebsite(clientCtx, application);
|
|
104
104
|
const domain = website?.subdomains[0];
|
|
105
|
-
consola.
|
|
105
|
+
consola.info("Upload only mode enabled, skipping deployment");
|
|
106
106
|
if (domain != null) {
|
|
107
107
|
logSiteLink("Preview link:", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
async function uploadSnapshot(clientCtx, application, siteVersion, snapshotId, archive) {
|
|
112
|
+
consola.start("Uploading snapshot site files");
|
|
113
|
+
await Promise.all([third_party_applications_exports.uploadSnapshotVersion(
|
|
114
|
+
clientCtx,
|
|
115
|
+
application,
|
|
116
|
+
siteVersion,
|
|
117
|
+
snapshotId,
|
|
118
|
+
Readable.toWeb(archive)
|
|
119
|
+
// This cast is because the dom fetch doesn't align type wise with streams
|
|
120
|
+
), archive.finalize()]);
|
|
121
|
+
consola.success("Snapshot upload complete");
|
|
122
|
+
}
|
|
123
|
+
async function upload(clientCtx, application, siteVersion, archive) {
|
|
124
|
+
consola.start("Uploading site files");
|
|
125
|
+
await Promise.all([third_party_applications_exports.uploadVersion(
|
|
126
|
+
clientCtx,
|
|
127
|
+
application,
|
|
128
|
+
siteVersion,
|
|
129
|
+
Readable.toWeb(archive)
|
|
130
|
+
// This cast is because the dom fetch doesn't align type wise with streams
|
|
131
|
+
), archive.finalize()]);
|
|
132
|
+
consola.success("Upload complete");
|
|
133
|
+
}
|
|
111
134
|
function logArchiveStats(archive) {
|
|
112
135
|
let archiveStats = {
|
|
113
136
|
fileCount: 0,
|
|
@@ -120,7 +143,9 @@ function logArchiveStats(archive) {
|
|
|
120
143
|
};
|
|
121
144
|
});
|
|
122
145
|
archive.on("finish", () => {
|
|
123
|
-
consola.
|
|
146
|
+
consola.info(`Zipped ${prettyBytes(archiveStats.bytes, {
|
|
147
|
+
binary: true
|
|
148
|
+
})} total over ${archiveStats.fileCount} files`);
|
|
124
149
|
});
|
|
125
150
|
}
|
|
126
151
|
function logSiteLink(title, link) {
|
|
@@ -137,5 +162,5 @@ ${colorize("green", link)}`,
|
|
|
137
162
|
}
|
|
138
163
|
|
|
139
164
|
export { siteDeployCommand as default };
|
|
140
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
141
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
165
|
+
//# sourceMappingURL=siteDeployCommand-6JHGJGO3.js.map
|
|
166
|
+
//# sourceMappingURL=siteDeployCommand-6JHGJGO3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/deploy/siteDeployCommand.mts","../../src/util/autoVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AA2BA,eAAsB,WAAA,CAAY,YAAY,EAAI,EAAA;AAChD,EAAM,MAAA,CAAC,aAAa,WAAW,CAAA,GAAI,cAAc,EAAK,GAAA,CAAC,WAAW,IAAI,MAAA,CAAO,IAAI,SAAS,CAAA,CAAE,CAAC,CAAI,GAAA,CAAC,QAAW,IAAI,MAAA,CAAO,KAAK,CAAC,CAAA,CAAA;AAC9H,EAAM,MAAA,UAAA,GAAa,MAAM,WAAA,CAAY,WAAW,CAAA,CAAA;AAChD,EAAA,MAAM,UAAU,UAAW,CAAA,IAAA,EAAO,CAAA,OAAA,CA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B,SAAW,EAAA,CAAA;AAAA,IACX,KAAO,EAAA,CAAA;AAAA,GACT,CAAA;AACA,EAAQ,OAAA,CAAA,EAAA,CAAG,YAAY,CAAY,QAAA,KAAA;AACjC,IAAe,YAAA,GAAA;AAAA,MACb,SAAA,EAAW,SAAS,OAAQ,CAAA,KAAA;AAAA,MAC5B,KAAA,EAAO,SAAS,EAAG,CAAA,UAAA;AAAA,KACrB,CAAA;AAAA,GACD,CAAA,CAAA;AACD,EAAQ,OAAA,CAAA,EAAA,CAAG,UAAU,MAAM;AACzB,IAAA,OAAA,CAAQ,IAAK,CAAA,CAAA,OAAA,EAAU,WAAY,CAAA,YAAA,CAAa,KAAO,EAAA;AAAA,MACrD,MAAQ,EAAA,IAAA;AAAA,KACT,CAAC,CAAe,YAAA,EAAA,YAAA,CAAa,SAAS,CAAQ,MAAA,CAAA,CAAA,CAAA;AAAA,GAChD,CAAA,CAAA;AACH,CAAA;AACA,SAAS,WAAA,CAAY,OAAO,IAAM,EAAA;AAChC,EAAA,OAAA,CAAQ,GAAI,CAAA;AAAA,IACV,OAAA,EAAS,GAAG,KAAK,CAAA;AAAA;AAAA,EAAO,QAAA,CAAS,OAAS,EAAA,IAAI,CAAC,CAAA,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,CAAA;AAAA,MACT,WAAa,EAAA,OAAA;AAAA,MACb,WAAa,EAAA,SAAA;AAAA,KACf;AAAA,GACD,CAAA,CAAA;AACH","file":"siteDeployCommand-6JHGJGO3.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport prettyBytes from \"pretty-bytes\";\nimport { autoVersion as findAutoVersion } from \"../../../util/autoVersion.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n snapshot,\n snapshotId,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion.tagPrefix);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n if (snapshot) {\n await uploadSnapshot(clientCtx, application, siteVersion, snapshotId ?? \"\", archive);\n consola.info(\"Snapshot mode enabled, skipping deployment\");\n return;\n }\n await upload(clientCtx, application, siteVersion, archive);\n if (!uploadOnly) {\n const website = await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version: siteVersion\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n const domain = website.subdomains[0];\n if (domain != null) {\n logSiteLink(\"View live site:\", `https://${domain}`);\n }\n } else {\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const domain = website?.subdomains[0];\n consola.info(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n logSiteLink(\"Preview link:\", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);\n }\n }\n}\nasync function uploadSnapshot(clientCtx, application, siteVersion, snapshotId, archive) {\n consola.start(\"Uploading snapshot site files\");\n await Promise.all([thirdPartyApplications.uploadSnapshotVersion(clientCtx, application, siteVersion, snapshotId, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Snapshot upload complete\");\n}\nasync function upload(clientCtx, application, siteVersion, archive) {\n consola.start(\"Uploading site files\");\n await Promise.all([thirdPartyApplications.uploadVersion(clientCtx, application, siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.info(`Zipped ${prettyBytes(archiveStats.bytes, {\n binary: true\n })} total over ${archiveStats.fileCount} files`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError, isValidSemver } from \"@osdk/cli.common\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n if (!isValidSemver(version)) {\n throw new ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);\n }\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new ExitProcessError(2, \"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-6YTCOSZQ.js';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-QIS7XFJM.js';
|
|
3
|
+
import './chunk-CDP3LF3Z.js';
|
|
4
4
|
import './chunk-G6CPJEWR.js';
|
|
5
5
|
import { init_esm_shims } from './chunk-TIWBVCHX.js';
|
|
6
6
|
import { consola } from 'consola';
|
|
@@ -32,5 +32,5 @@ ${colorize("bold", "This action cannot be undone.")}`, {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export { versionDeleteCommand as default };
|
|
35
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
36
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
35
|
+
//# sourceMappingURL=versionDeleteCommand-YZ5RK72V.js.map
|
|
36
|
+
//# sourceMappingURL=versionDeleteCommand-YZ5RK72V.js.map
|
package/build/browser/{versionDeleteCommand-VJQHB3Y7.js.map → versionDeleteCommand-YZ5RK72V.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;;;;AAAA,cAAA,EAAA,CAAA;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAA,MAAM,SAAY,GAAA,MAAM,OAAQ,CAAA,MAAA,CAAO,+CAA+C,OAAO,CAAA;AAAA,EAAM,QAAS,CAAA,MAAA,EAAQ,+BAA+B,CAAC,CAAI,CAAA,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAQ,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A;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,MAAM,gCAAuB,CAAA,aAAA,CAAc,SAAW,EAAA,WAAA,EAAa,OAAO,CAAA,CAAA;AAC1E,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-YZ5RK72V.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await thirdPartyApplications.deleteVersion(clientCtx, application, version);\n consola.success(`Deleted version ${version}`);\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-QIS7XFJM.js';
|
|
2
|
+
import './chunk-CDP3LF3Z.js';
|
|
3
3
|
import './chunk-G6CPJEWR.js';
|
|
4
4
|
import { init_esm_shims } from './chunk-TIWBVCHX.js';
|
|
5
5
|
import { consola } from 'consola';
|
|
@@ -26,5 +26,5 @@ async function versionGetCommand({
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export { versionGetCommand as default };
|
|
29
|
-
//# sourceMappingURL=versionGetCommand-
|
|
30
|
-
//# sourceMappingURL=versionGetCommand-
|
|
29
|
+
//# sourceMappingURL=versionGetCommand-VW6TYQ2K.js.map
|
|
30
|
+
//# sourceMappingURL=versionGetCommand-VW6TYQ2K.js.map
|
package/build/browser/{versionGetCommand-SIKXTJAX.js.map → versionGetCommand-VW6TYQ2K.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA,CAAA;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAM,gCAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA,CAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAA,OAAA,CAAQ,KAAK,0BAA0B,CAAA,CAAA;AAAA,GAClC,MAAA;AACL,IAAQ,OAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3D;AACF","file":"versionGetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA,CAAA;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAM,gCAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA,CAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAA,OAAA,CAAQ,KAAK,0BAA0B,CAAA,CAAA;AAAA,GAClC,MAAA;AACL,IAAQ,OAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3D;AACF","file":"versionGetCommand-VW6TYQ2K.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionGetCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Getting live version\");\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const deployedVersion = website?.deployedVersion;\n if (!deployedVersion) {\n consola.info(\"No live site version set\");\n } else {\n consola.success(`Live site version is ${deployedVersion}`);\n }\n}"]}
|