@osdk/cli 0.18.0 → 0.18.1
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 +8 -0
- package/build/js/{chunk-BV25PWLB.cjs → chunk-R5KSQSWR.cjs} +2 -2
- package/build/js/{chunk-7KPWDWPW.mjs → chunk-RVBQ6FHA.mjs} +2 -2
- package/build/js/{handleGenerate-O475QVDP-LPHRGOCS.mjs → handleGenerate-JPPKN37T-GN2XPH7N.mjs} +7 -7
- package/build/js/{handleGenerate-O475QVDP-36H6I4K6.cjs.map → handleGenerate-JPPKN37T-GN2XPH7N.mjs.map} +1 -1
- package/build/js/{handleGenerate-O475QVDP-36H6I4K6.cjs → handleGenerate-JPPKN37T-UTZRBDTJ.cjs} +7 -7
- package/build/js/{handleGenerate-O475QVDP-LPHRGOCS.mjs.map → handleGenerate-JPPKN37T-UTZRBDTJ.cjs.map} +1 -1
- package/build/js/index.cjs +8 -8
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +8 -8
- package/build/js/index.mjs.map +1 -1
- package/build/js/{siteDeployCommand-WFDCTRE4.cjs → siteDeployCommand-XSD3JQAH.cjs} +7 -7
- package/build/js/{siteDeployCommand-BPKA37JG.mjs → siteDeployCommand-YCBAYQPC.mjs} +2 -2
- package/build/js/{versionDeleteCommand-Q6PV5OHT.mjs → versionDeleteCommand-JTXFP4Z5.mjs} +2 -2
- package/build/js/{versionDeleteCommand-OPW5GZJ7.cjs → versionDeleteCommand-PVA27UNF.cjs} +5 -5
- package/build/js/{versionGetCommand-X33VP7PZ.mjs → versionGetCommand-2IM7B5DL.mjs} +2 -2
- package/build/js/{versionGetCommand-XNI4OY7J.cjs → versionGetCommand-AWLHDOMW.cjs} +5 -5
- package/build/js/{versionListCommand-T2K6FMFG.mjs → versionListCommand-FIV7HEUJ.mjs} +2 -2
- package/build/js/{versionListCommand-MTMK4ZO7.cjs → versionListCommand-Z6HE7MWB.cjs} +5 -5
- package/build/js/{versionSetCommand-KM3YB43Q.mjs → versionSetCommand-KABVTMJ6.mjs} +2 -2
- package/build/js/{versionSetCommand-EVMFV4VA.cjs → versionSetCommand-SKDM2S7Y.cjs} +5 -5
- package/build/js/{versionUnsetCommand-MZD3D2VF.mjs → versionUnsetCommand-5DQJZPJM.mjs} +2 -2
- package/build/js/{versionUnsetCommand-BEU52IRT.cjs → versionUnsetCommand-HFW6273F.cjs} +5 -5
- package/package.json +3 -3
- /package/build/js/{chunk-7KPWDWPW.mjs.map → chunk-R5KSQSWR.cjs.map} +0 -0
- /package/build/js/{chunk-BV25PWLB.cjs.map → chunk-RVBQ6FHA.mjs.map} +0 -0
- /package/build/js/{siteDeployCommand-BPKA37JG.mjs.map → siteDeployCommand-XSD3JQAH.cjs.map} +0 -0
- /package/build/js/{siteDeployCommand-WFDCTRE4.cjs.map → siteDeployCommand-YCBAYQPC.mjs.map} +0 -0
- /package/build/js/{versionDeleteCommand-OPW5GZJ7.cjs.map → versionDeleteCommand-JTXFP4Z5.mjs.map} +0 -0
- /package/build/js/{versionDeleteCommand-Q6PV5OHT.mjs.map → versionDeleteCommand-PVA27UNF.cjs.map} +0 -0
- /package/build/js/{versionGetCommand-X33VP7PZ.mjs.map → versionGetCommand-2IM7B5DL.mjs.map} +0 -0
- /package/build/js/{versionGetCommand-XNI4OY7J.cjs.map → versionGetCommand-AWLHDOMW.cjs.map} +0 -0
- /package/build/js/{versionListCommand-MTMK4ZO7.cjs.map → versionListCommand-FIV7HEUJ.mjs.map} +0 -0
- /package/build/js/{versionListCommand-T2K6FMFG.mjs.map → versionListCommand-Z6HE7MWB.cjs.map} +0 -0
- /package/build/js/{versionSetCommand-EVMFV4VA.cjs.map → versionSetCommand-KABVTMJ6.mjs.map} +0 -0
- /package/build/js/{versionSetCommand-KM3YB43Q.mjs.map → versionSetCommand-SKDM2S7Y.cjs.map} +0 -0
- /package/build/js/{versionUnsetCommand-BEU52IRT.cjs.map → versionUnsetCommand-5DQJZPJM.mjs.map} +0 -0
- /package/build/js/{versionUnsetCommand-MZD3D2VF.mjs.map → versionUnsetCommand-HFW6273F.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -31,7 +31,7 @@ chunkHQDDGVB7_cjs.__export(third_party_applications_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
// src/net/UserAgent.ts
|
|
34
|
-
var USER_AGENT = `osdk-cli/${"0.18.
|
|
34
|
+
var USER_AGENT = `osdk-cli/${"0.18.1"}`;
|
|
35
35
|
|
|
36
36
|
// src/net/createFetch.mts
|
|
37
37
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -204,4 +204,4 @@ exports.createInternalClientContext = createInternalClientContext;
|
|
|
204
204
|
exports.loadToken = loadToken;
|
|
205
205
|
exports.third_party_applications_exports = third_party_applications_exports;
|
|
206
206
|
//# sourceMappingURL=out.js.map
|
|
207
|
-
//# sourceMappingURL=chunk-
|
|
207
|
+
//# sourceMappingURL=chunk-R5KSQSWR.cjs.map
|
|
@@ -25,7 +25,7 @@ __export(third_party_applications_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
// src/net/UserAgent.ts
|
|
28
|
-
var USER_AGENT = `osdk-cli/${"0.18.
|
|
28
|
+
var USER_AGENT = `osdk-cli/${"0.18.1"}`;
|
|
29
29
|
|
|
30
30
|
// src/net/createFetch.mts
|
|
31
31
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -196,4 +196,4 @@ function isJWT(token) {
|
|
|
196
196
|
|
|
197
197
|
export { createInternalClientContext, loadToken, third_party_applications_exports };
|
|
198
198
|
//# sourceMappingURL=out.js.map
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
199
|
+
//# sourceMappingURL=chunk-RVBQ6FHA.mjs.map
|
package/build/js/{handleGenerate-O475QVDP-LPHRGOCS.mjs → handleGenerate-JPPKN37T-GN2XPH7N.mjs}
RENAMED
|
@@ -10,7 +10,7 @@ import * as fs from 'fs';
|
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
import { fileURLToPath } from 'url';
|
|
12
12
|
|
|
13
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.1.
|
|
13
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.1.1"}`;
|
|
14
14
|
async function handleGenerate(args) {
|
|
15
15
|
let success = false;
|
|
16
16
|
if (args.ontologyPath) {
|
|
@@ -86,7 +86,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
86
86
|
await generateSourceFiles(args, ontology, createNormalFs());
|
|
87
87
|
return true;
|
|
88
88
|
}
|
|
89
|
-
await __UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, dependencyVersions, "0.18.
|
|
89
|
+
await __UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, dependencyVersions, "0.18.1");
|
|
90
90
|
return true;
|
|
91
91
|
} catch (e) {
|
|
92
92
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -99,9 +99,9 @@ async function getDependencyVersions() {
|
|
|
99
99
|
const typescriptVersion = ourPackageJson.devDependencies.typescript;
|
|
100
100
|
const tslibVersion = ourPackageJson.dependencies.tslib;
|
|
101
101
|
const areTheTypesWrongVersion = ourPackageJson.dependencies["@arethetypeswrong/cli"];
|
|
102
|
-
const osdkClientVersion = `^${"0.16.
|
|
102
|
+
const osdkClientVersion = `^${"0.16.1"}`;
|
|
103
103
|
const osdkApiVersion = `^${"1.7.0"}`;
|
|
104
|
-
const osdkLegacyClientVersion = `^${"2.2.
|
|
104
|
+
const osdkLegacyClientVersion = `^${"2.2.2"}`;
|
|
105
105
|
return {
|
|
106
106
|
typescriptVersion,
|
|
107
107
|
tslibVersion,
|
|
@@ -129,9 +129,9 @@ async function generateSourceFiles(args, ontology, fs2) {
|
|
|
129
129
|
}
|
|
130
130
|
function getUserAgent(version) {
|
|
131
131
|
if (version === "dev") {
|
|
132
|
-
return "typescript-
|
|
132
|
+
return "typescript-osdk/dev osdk-cli/dev";
|
|
133
133
|
} else {
|
|
134
|
-
return `typescript-
|
|
134
|
+
return `typescript-osdk/${version} ${USER_AGENT}`;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
function createNormalFs() {
|
|
@@ -148,4 +148,4 @@ function createNormalFs() {
|
|
|
148
148
|
|
|
149
149
|
export { getDependencyVersions, handleGenerate };
|
|
150
150
|
//# sourceMappingURL=out.js.map
|
|
151
|
-
//# sourceMappingURL=handleGenerate-
|
|
151
|
+
//# sourceMappingURL=handleGenerate-JPPKN37T-GN2XPH7N.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/handleGenerate-
|
|
1
|
+
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/handleGenerate-JPPKN37T.mjs"],"names":[],"mappings":";;;;;;;;;;AAEA,SAAS,kBAAkB,+BAA+B;AAC1D,SAAS,qCAAqC,sCAAsC,yCAAyC;AAC7H,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,qBAAqB;AAG9B,IAAI,aAAa,2BAA2B,OAAO;AACnD,eAAe,eAAe,MAAM;AAClC,MAAI,UAAU;AACd,MAAI,KAAK,cAAc;AACrB,cAAU,MAAM,sBAAsB,IAAI;AAAA,EAC5C,WAAW,KAAK,cAAc,KAAK,UAAU;AAC3C,cAAU,MAAM,kBAAkB,IAAI;AAAA,EACxC,OAAO;AACL,UAAM,IAAI,gBAAgB,wDAAwD;AAAA,EACpF;AACA,MAAI,SAAS;AACX,YAAQ,KAAK,iBAAiB;AAAA,EAChC,OAAO;AACL,UAAM,IAAI,iBAAiB,GAAG,uCAAuC;AAAA,EACvE;AACF;AACA,eAAe,sBAAsB,MAAM;AACzC,MAAI,CAAI,cAAW,KAAK,YAAY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C,mCAAmC,UAAU,aAAa,KAAK,OAAO,GAAG,KAAK,KAAK,QAAQ,KAAK,WAAW;AACvK;AACA,SAAS,aAAa,SAAS;AAC7B,MAAI,YAAY,OAAO;AACrB,WAAO;AAAA,EACT,OAAO;AACL,WAAO,mBAAmB,OAAO,IAAI,UAAU;AAAA,EACjD;AACF;AACA,SAAS,iBAAiB;AACxB,SAAO;AAAA,IACL,WAAW,CAAC,OAAO,aAAa;AAC9B,aAAU,YAAS,UAAU,OAAO,UAAU,OAAO;AAAA,IACvD;AAAA,IACA,OAAO,OAAO,OAAO,YAAY;AAC/B,YAAS,YAAS,MAAM,OAAO,OAAO;AAAA,IACxC;AAAA,IACA,SAAS,OAAM,UAAY,YAAS,QAAQ,KAAK;AAAA,EACnD;AACF","sourcesContent":["import { YargsCheckError, ExitProcessError } from '@osdk/cli.common';\nimport invokeLoginFlow from '@osdk/cli.common/loginFlow';\nimport { listOntologiesV2, getOntologyFullMetadata } from '@osdk/gateway/requests';\nimport { __UNSTABLE_generateClientSdkPackage, generateClientSdkVersionTwoPointZero, generateClientSdkVersionOneDotOne } from '@osdk/generator';\nimport { createClientContext, createOpenApiRequest } from '@osdk/shared.net';\nimport { consola } from 'consola';\nimport { findUp } from 'find-up';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { fileURLToPath } from 'url';\n\n// src/generate/handleGenerate.mts\nvar USER_AGENT = `osdk-cli.cmd.typescript/${\"0.1.1\"}`;\nasync function handleGenerate(args) {\n let success = false;\n if (args.ontologyPath) {\n success = await generateFromLocalFile(args);\n } else if (args.foundryUrl && args.clientId) {\n success = await generateFromStack(args);\n } else {\n throw new YargsCheckError(\"Must have specified ontologyPath or stack and clientId\");\n }\n if (success) {\n consola.info(\"OSDK Generated!\");\n } else {\n throw new ExitProcessError(1, \"Failed to generate the TypeScript SDK\");\n }\n}\nasync function generateFromLocalFile(args) {\n if (!fs.existsSync(args.ontologyPath)) {\n consola.error(`Ontology file does not exist: ${args.ontologyPath}`);\n return false;\n }\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n return await generateClientSdk(ontology, args);\n}\nasync function generateFromStack(args) {\n const {\n foundryUrl,\n clientId,\n ontologyWritePath\n } = args;\n const token = await invokeLoginFlow({\n clientId,\n foundryUrl,\n verbose: 0\n });\n const {\n fetch\n } = createClientContext({\n metadata: {\n userAgent: USER_AGENT\n }\n }, args.foundryUrl, () => token.access_token, USER_AGENT);\n try {\n const ontologies = await listOntologiesV2(createOpenApiRequest(foundryUrl, fetch));\n if (args.ontologyRid) {\n ontologies.data = ontologies.data.filter(o => o.rid === args.ontologyRid);\n }\n if (ontologies.data.length !== 1) {\n consola.error(`Could not look up ontology with these credentials. Found ${ontologies.data.length} ontologies.`);\n return false;\n }\n const ontology = await getOntologyFullMetadata(createOpenApiRequest(foundryUrl, fetch), ontologies.data[0].apiName);\n if (ontologyWritePath) {\n fs.writeFileSync(ontologyWritePath, JSON.stringify(ontology, null, 2));\n }\n return await generateClientSdk(ontology, args);\n } catch (e) {\n consola.error(\"Failed to generate the ontology\", e);\n return false;\n }\n}\nasync function generateClientSdk(ontology, args) {\n const minimalFs = createNormalFs();\n const dependencyVersions = await getDependencyVersions();\n try {\n if (args.clean) {\n consola.info(\"Cleaning output directory\", args.outDir);\n await fs.promises.rm(args.outDir, {\n recursive: true,\n force: true\n });\n }\n if (!args.asPackage) {\n await generateSourceFiles(args, ontology, createNormalFs());\n return true;\n }\n await __UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? \"2.0\" : \"1.1\", args.outDir, ontology, minimalFs, dependencyVersions, \"0.18.1\");\n return true;\n } catch (e) {\n consola.error(\"OSDK generation failed\", e.message, e.stack);\n return false;\n }\n}\nasync function getDependencyVersions() {\n const ourPackageJsonPath = await getOurPackageJsonPath();\n const ourPackageJson = JSON.parse(await fs.promises.readFile(ourPackageJsonPath, \"utf-8\"));\n const typescriptVersion = ourPackageJson.devDependencies.typescript;\n const tslibVersion = ourPackageJson.dependencies.tslib;\n const areTheTypesWrongVersion = ourPackageJson.dependencies[\"@arethetypeswrong/cli\"];\n const osdkClientVersion = `^${\"0.16.1\"}`;\n const osdkApiVersion = `^${\"1.7.0\"}`;\n const osdkLegacyClientVersion = `^${\"2.2.2\"}`;\n return {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion,\n osdkApiVersion,\n osdkClientVersion,\n osdkLegacyClientVersion\n };\n}\nvar cachedOurPackageJsonPath;\nasync function getOurPackageJsonPath() {\n if (cachedOurPackageJsonPath) return cachedOurPackageJsonPath;\n const __dir = path.dirname(fileURLToPath(import.meta.url));\n const ourPackageJsonPath = await findUp(\"package.json\", {\n cwd: __dir\n });\n if (!ourPackageJsonPath) {\n throw new Error(\"Could not find our package.json\");\n }\n return cachedOurPackageJsonPath = ourPackageJsonPath;\n}\nasync function generateSourceFiles(args, ontology, fs2) {\n await (args.beta ? generateClientSdkVersionTwoPointZero : generateClientSdkVersionOneDotOne)(ontology, getUserAgent(args.version), fs2, args.outDir, args.packageType);\n}\nfunction getUserAgent(version) {\n if (version === \"dev\") {\n return \"typescript-osdk/dev osdk-cli/dev\";\n } else {\n return `typescript-osdk/${version} ${USER_AGENT}`;\n }\n}\nfunction createNormalFs() {\n return {\n writeFile: (path2, contents) => {\n return fs.promises.writeFile(path2, contents, \"utf-8\");\n },\n mkdir: async (path2, options) => {\n await fs.promises.mkdir(path2, options);\n },\n readdir: async path2 => fs.promises.readdir(path2)\n };\n}\nexport { getDependencyVersions, handleGenerate };"]}
|
package/build/js/{handleGenerate-O475QVDP-36H6I4K6.cjs → handleGenerate-JPPKN37T-UTZRBDTJ.cjs}
RENAMED
|
@@ -34,7 +34,7 @@ function _interopNamespace(e) {
|
|
|
34
34
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
35
35
|
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
36
36
|
|
|
37
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.1.
|
|
37
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.1.1"}`;
|
|
38
38
|
async function handleGenerate(args) {
|
|
39
39
|
let success = false;
|
|
40
40
|
if (args.ontologyPath) {
|
|
@@ -110,7 +110,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
110
110
|
await generateSourceFiles(args, ontology, createNormalFs());
|
|
111
111
|
return true;
|
|
112
112
|
}
|
|
113
|
-
await generator.__UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, dependencyVersions, "0.18.
|
|
113
|
+
await generator.__UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, dependencyVersions, "0.18.1");
|
|
114
114
|
return true;
|
|
115
115
|
} catch (e) {
|
|
116
116
|
consola.consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -123,9 +123,9 @@ async function getDependencyVersions() {
|
|
|
123
123
|
const typescriptVersion = ourPackageJson.devDependencies.typescript;
|
|
124
124
|
const tslibVersion = ourPackageJson.dependencies.tslib;
|
|
125
125
|
const areTheTypesWrongVersion = ourPackageJson.dependencies["@arethetypeswrong/cli"];
|
|
126
|
-
const osdkClientVersion = `^${"0.16.
|
|
126
|
+
const osdkClientVersion = `^${"0.16.1"}`;
|
|
127
127
|
const osdkApiVersion = `^${"1.7.0"}`;
|
|
128
|
-
const osdkLegacyClientVersion = `^${"2.2.
|
|
128
|
+
const osdkLegacyClientVersion = `^${"2.2.2"}`;
|
|
129
129
|
return {
|
|
130
130
|
typescriptVersion,
|
|
131
131
|
tslibVersion,
|
|
@@ -153,9 +153,9 @@ async function generateSourceFiles(args, ontology, fs2) {
|
|
|
153
153
|
}
|
|
154
154
|
function getUserAgent(version) {
|
|
155
155
|
if (version === "dev") {
|
|
156
|
-
return "typescript-
|
|
156
|
+
return "typescript-osdk/dev osdk-cli/dev";
|
|
157
157
|
} else {
|
|
158
|
-
return `typescript-
|
|
158
|
+
return `typescript-osdk/${version} ${USER_AGENT}`;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
function createNormalFs() {
|
|
@@ -173,4 +173,4 @@ function createNormalFs() {
|
|
|
173
173
|
exports.getDependencyVersions = getDependencyVersions;
|
|
174
174
|
exports.handleGenerate = handleGenerate;
|
|
175
175
|
//# sourceMappingURL=out.js.map
|
|
176
|
-
//# sourceMappingURL=handleGenerate-
|
|
176
|
+
//# sourceMappingURL=handleGenerate-JPPKN37T-UTZRBDTJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/handleGenerate-
|
|
1
|
+
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/handleGenerate-JPPKN37T.mjs"],"names":[],"mappings":";;;;;;;;;;AAEA,SAAS,kBAAkB,+BAA+B;AAC1D,SAAS,qCAAqC,sCAAsC,yCAAyC;AAC7H,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,YAAY,QAAQ;AACpB,YAAY,UAAU;AACtB,SAAS,qBAAqB;AAG9B,IAAI,aAAa,2BAA2B,OAAO;AACnD,eAAe,eAAe,MAAM;AAClC,MAAI,UAAU;AACd,MAAI,KAAK,cAAc;AACrB,cAAU,MAAM,sBAAsB,IAAI;AAAA,EAC5C,WAAW,KAAK,cAAc,KAAK,UAAU;AAC3C,cAAU,MAAM,kBAAkB,IAAI;AAAA,EACxC,OAAO;AACL,UAAM,IAAI,gBAAgB,wDAAwD;AAAA,EACpF;AACA,MAAI,SAAS;AACX,YAAQ,KAAK,iBAAiB;AAAA,EAChC,OAAO;AACL,UAAM,IAAI,iBAAiB,GAAG,uCAAuC;AAAA,EACvE;AACF;AACA,eAAe,sBAAsB,MAAM;AACzC,MAAI,CAAI,cAAW,KAAK,YAAY,GAAG;AACrC,YAAQ,MAAM,iCAAiC,KAAK,YAAY,EAAE;AAClE,WAAO;AAAA,EACT;AACA,QAAM,WAAW,K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,SAAS;AAC7B,MAAI,YAAY,OAAO;AACrB,WAAO;AAAA,EACT,OAAO;AACL,WAAO,mBAAmB,OAAO,IAAI,UAAU;AAAA,EACjD;AACF;AACA,SAAS,iBAAiB;AACxB,SAAO;AAAA,IACL,WAAW,CAAC,OAAO,aAAa;AAC9B,aAAU,YAAS,UAAU,OAAO,UAAU,OAAO;AAAA,IACvD;AAAA,IACA,OAAO,OAAO,OAAO,YAAY;AAC/B,YAAS,YAAS,MAAM,OAAO,OAAO;AAAA,IACxC;AAAA,IACA,SAAS,OAAM,UAAY,YAAS,QAAQ,KAAK;AAAA,EACnD;AACF","sourcesContent":["import { YargsCheckError, ExitProcessError } from '@osdk/cli.common';\nimport invokeLoginFlow from '@osdk/cli.common/loginFlow';\nimport { listOntologiesV2, getOntologyFullMetadata } from '@osdk/gateway/requests';\nimport { __UNSTABLE_generateClientSdkPackage, generateClientSdkVersionTwoPointZero, generateClientSdkVersionOneDotOne } from '@osdk/generator';\nimport { createClientContext, createOpenApiRequest } from '@osdk/shared.net';\nimport { consola } from 'consola';\nimport { findUp } from 'find-up';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { fileURLToPath } from 'url';\n\n// src/generate/handleGenerate.mts\nvar USER_AGENT = `osdk-cli.cmd.typescript/${\"0.1.1\"}`;\nasync function handleGenerate(args) {\n let success = false;\n if (args.ontologyPath) {\n success = await generateFromLocalFile(args);\n } else if (args.foundryUrl && args.clientId) {\n success = await generateFromStack(args);\n } else {\n throw new YargsCheckError(\"Must have specified ontologyPath or stack and clientId\");\n }\n if (success) {\n consola.info(\"OSDK Generated!\");\n } else {\n throw new ExitProcessError(1, \"Failed to generate the TypeScript SDK\");\n }\n}\nasync function generateFromLocalFile(args) {\n if (!fs.existsSync(args.ontologyPath)) {\n consola.error(`Ontology file does not exist: ${args.ontologyPath}`);\n return false;\n }\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n return await generateClientSdk(ontology, args);\n}\nasync function generateFromStack(args) {\n const {\n foundryUrl,\n clientId,\n ontologyWritePath\n } = args;\n const token = await invokeLoginFlow({\n clientId,\n foundryUrl,\n verbose: 0\n });\n const {\n fetch\n } = createClientContext({\n metadata: {\n userAgent: USER_AGENT\n }\n }, args.foundryUrl, () => token.access_token, USER_AGENT);\n try {\n const ontologies = await listOntologiesV2(createOpenApiRequest(foundryUrl, fetch));\n if (args.ontologyRid) {\n ontologies.data = ontologies.data.filter(o => o.rid === args.ontologyRid);\n }\n if (ontologies.data.length !== 1) {\n consola.error(`Could not look up ontology with these credentials. Found ${ontologies.data.length} ontologies.`);\n return false;\n }\n const ontology = await getOntologyFullMetadata(createOpenApiRequest(foundryUrl, fetch), ontologies.data[0].apiName);\n if (ontologyWritePath) {\n fs.writeFileSync(ontologyWritePath, JSON.stringify(ontology, null, 2));\n }\n return await generateClientSdk(ontology, args);\n } catch (e) {\n consola.error(\"Failed to generate the ontology\", e);\n return false;\n }\n}\nasync function generateClientSdk(ontology, args) {\n const minimalFs = createNormalFs();\n const dependencyVersions = await getDependencyVersions();\n try {\n if (args.clean) {\n consola.info(\"Cleaning output directory\", args.outDir);\n await fs.promises.rm(args.outDir, {\n recursive: true,\n force: true\n });\n }\n if (!args.asPackage) {\n await generateSourceFiles(args, ontology, createNormalFs());\n return true;\n }\n await __UNSTABLE_generateClientSdkPackage(args.packageName, args.version, args.beta ? \"2.0\" : \"1.1\", args.outDir, ontology, minimalFs, dependencyVersions, \"0.18.1\");\n return true;\n } catch (e) {\n consola.error(\"OSDK generation failed\", e.message, e.stack);\n return false;\n }\n}\nasync function getDependencyVersions() {\n const ourPackageJsonPath = await getOurPackageJsonPath();\n const ourPackageJson = JSON.parse(await fs.promises.readFile(ourPackageJsonPath, \"utf-8\"));\n const typescriptVersion = ourPackageJson.devDependencies.typescript;\n const tslibVersion = ourPackageJson.dependencies.tslib;\n const areTheTypesWrongVersion = ourPackageJson.dependencies[\"@arethetypeswrong/cli\"];\n const osdkClientVersion = `^${\"0.16.1\"}`;\n const osdkApiVersion = `^${\"1.7.0\"}`;\n const osdkLegacyClientVersion = `^${\"2.2.2\"}`;\n return {\n typescriptVersion,\n tslibVersion,\n areTheTypesWrongVersion,\n osdkApiVersion,\n osdkClientVersion,\n osdkLegacyClientVersion\n };\n}\nvar cachedOurPackageJsonPath;\nasync function getOurPackageJsonPath() {\n if (cachedOurPackageJsonPath) return cachedOurPackageJsonPath;\n const __dir = path.dirname(fileURLToPath(import.meta.url));\n const ourPackageJsonPath = await findUp(\"package.json\", {\n cwd: __dir\n });\n if (!ourPackageJsonPath) {\n throw new Error(\"Could not find our package.json\");\n }\n return cachedOurPackageJsonPath = ourPackageJsonPath;\n}\nasync function generateSourceFiles(args, ontology, fs2) {\n await (args.beta ? generateClientSdkVersionTwoPointZero : generateClientSdkVersionOneDotOne)(ontology, getUserAgent(args.version), fs2, args.outDir, args.packageType);\n}\nfunction getUserAgent(version) {\n if (version === \"dev\") {\n return \"typescript-osdk/dev osdk-cli/dev\";\n } else {\n return `typescript-osdk/${version} ${USER_AGENT}`;\n }\n}\nfunction createNormalFs() {\n return {\n writeFile: (path2, contents) => {\n return fs.promises.writeFile(path2, contents, \"utf-8\");\n },\n mkdir: async (path2, options) => {\n await fs.promises.mkdir(path2, options);\n },\n readdir: async path2 => fs.promises.readdir(path2)\n };\n}\nexport { getDependencyVersions, handleGenerate };"]}
|
package/build/js/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ var generateCommand = {
|
|
|
92
92
|
});
|
|
93
93
|
},
|
|
94
94
|
handler: async (args) => {
|
|
95
|
-
const command10 = await import('./handleGenerate-
|
|
95
|
+
const command10 = await import('./handleGenerate-JPPKN37T-UTZRBDTJ.cjs');
|
|
96
96
|
await command10.handleGenerate(args);
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -314,7 +314,7 @@ var command2 = {
|
|
|
314
314
|
}).middleware((args) => logDeployCommandConfigFileOverride(args, siteConfig));
|
|
315
315
|
},
|
|
316
316
|
handler: async (args) => {
|
|
317
|
-
const command10 = await import('./siteDeployCommand-
|
|
317
|
+
const command10 = await import('./siteDeployCommand-XSD3JQAH.cjs');
|
|
318
318
|
const {
|
|
319
319
|
version,
|
|
320
320
|
autoVersion,
|
|
@@ -357,7 +357,7 @@ var command3 = {
|
|
|
357
357
|
}).group(["yes"], "Delete Options");
|
|
358
358
|
},
|
|
359
359
|
handler: async (args) => {
|
|
360
|
-
const command10 = await import('./versionDeleteCommand-
|
|
360
|
+
const command10 = await import('./versionDeleteCommand-PVA27UNF.cjs');
|
|
361
361
|
await command10.default(args);
|
|
362
362
|
}
|
|
363
363
|
};
|
|
@@ -371,7 +371,7 @@ var command4 = {
|
|
|
371
371
|
return argv;
|
|
372
372
|
},
|
|
373
373
|
handler: async (args) => {
|
|
374
|
-
const command10 = await import('./versionGetCommand-
|
|
374
|
+
const command10 = await import('./versionGetCommand-AWLHDOMW.cjs');
|
|
375
375
|
await command10.default(args);
|
|
376
376
|
}
|
|
377
377
|
};
|
|
@@ -385,7 +385,7 @@ var command5 = {
|
|
|
385
385
|
return argv;
|
|
386
386
|
},
|
|
387
387
|
handler: async (args) => {
|
|
388
|
-
const command10 = await import('./versionListCommand-
|
|
388
|
+
const command10 = await import('./versionListCommand-Z6HE7MWB.cjs');
|
|
389
389
|
await command10.default(args);
|
|
390
390
|
}
|
|
391
391
|
};
|
|
@@ -403,7 +403,7 @@ var command6 = {
|
|
|
403
403
|
});
|
|
404
404
|
},
|
|
405
405
|
handler: async (args) => {
|
|
406
|
-
const command10 = await import('./versionSetCommand-
|
|
406
|
+
const command10 = await import('./versionSetCommand-SKDM2S7Y.cjs');
|
|
407
407
|
await command10.default(args);
|
|
408
408
|
}
|
|
409
409
|
};
|
|
@@ -421,7 +421,7 @@ var command7 = {
|
|
|
421
421
|
}).group(["yes"], "Unset Options");
|
|
422
422
|
},
|
|
423
423
|
handler: async (args) => {
|
|
424
|
-
const command10 = await import('./versionUnsetCommand-
|
|
424
|
+
const command10 = await import('./versionUnsetCommand-HFW6273F.cjs');
|
|
425
425
|
await command10.default(args);
|
|
426
426
|
}
|
|
427
427
|
};
|
|
@@ -503,7 +503,7 @@ async function logConfigFileMiddleware() {
|
|
|
503
503
|
|
|
504
504
|
// src/cli.ts
|
|
505
505
|
async function cli(args = process.argv) {
|
|
506
|
-
consola.consola.info(`Palantir OSDK CLI ${"0.18.
|
|
506
|
+
consola.consola.info(`Palantir OSDK CLI ${"0.18.1"}
|
|
507
507
|
`);
|
|
508
508
|
const base = chunk467BAS7X_cjs.getYargsBase(args);
|
|
509
509
|
try {
|
package/build/js/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/index.mjs","../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.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/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","consola","autoVersion","application","foundryUrl"],"mappings":";;;;;;;;;AACA,SAAS,eAAe;AAGxB,IAAI,kBAAkB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc,UAAU;AAAA,MACtC;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;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,cAAM,EAAE,MAAM,UAAQ;AAC7H,UAAI,CAAC,KAAK,WAAW,WAAW,UAAU,GAAG;AAC3C,cAAM,IAAI,gBAAgB,qCAAqC;AAAA,MACjE;AACA,aAAO;AAAA,IACT,CAAC,EAAE,WAAW,UAAQ,iCAAiC,MAAM,QAAQ,aAAa,CAAC,EAAE,cAAc;AAAA,EACrG;AAAA,EACA,SAAS,OAAM,SAAQ;AAAA,EAAC;AAC1B;AACA,IAAO,eAAQJ;;;ACpDf,SAAS,WAAAC,gBAAe;AAExB,IAAI,YAAY;AAChB,eAAsB,0BAA0B;AAC9C,MAAI,WAAW;AACb,gBAAY;AACZ,UAAM,SAAS,qBAAU;AACzB,UAAM,kBAAkB,MAAM,SAAS;AACvC,QAAI,gBAAgB;AAClB,MAAAA,SAAQ,MAAM,mCAAmC,cAAc,GAAG;AAAA,IACpE;AAAA,EACF;AACF;;;AfNA,eAAsB,IAAI,OAAO,QAAQ,MAAM;AAC7C,EAAAA,SAAQ,KAAK,qBAAqB,QAA2B;AAAA,CAAI;AACjE,QAAM,OAAO,aAAa,IAAI;AAG9B,MAAI;AACF,WAAO,MAAM,KAAK,WAAW,uBAAuB,EAAE,QAAQ;AAAA,MAC5D,SAAS;AAAA,MACT,SAAS,CAAC,cAAc;AAAA,MACxB,UAAU;AAAA,MACV,SAAS,OAAM,SAAQ;AACrB,eAAO,KAAK,QAAQ,YAAI,EAAE,QAAQ,iBAAU,EAAE,QAAQ,YAAI,EAAE,cAAc;AAAA,MAC5E;AAAA,MACA,SAAS,WAAS;AAAA,MAAC;AAAA,IACrB,CAAC,EAAE,WAAW;AAAA,EAChB,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar 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\"\n // 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 }).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-O475QVDP.mjs');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.1.0\"}\n`);\n const base = getYargsBase(args);\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\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).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 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 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\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 { 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 { 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 { 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 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\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 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\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 { 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":["../../../cli.cmd.typescript/build/js/index.mjs","../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.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/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","consola","autoVersion","application","foundryUrl"],"mappings":";;;;;;;;;AACA,SAAS,eAAe;AAGxB,IAAI,kBAAkB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc,UAAU;AAAA,MACtC;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,SAAS;AAAA,QACT,OAAO;AAAA;AAAA,MAET;AAAA,MACA,UAAU;AAAA,QACR,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,SAAS;AAAA,MACX;AAAA,MACA,aAAa;AAAA,QACX,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,MACA,mBAAmB;AAAA,QACjB,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc;AAAA,MAC5B;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,SAAS,CAAC,YAAY,QAAQ;AAAA,MAChC;AAAA,MACA,SAAS;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,aAAa;AAAA,QACX,MAAM;AAAA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,QAAM,OAAO,aAAa,IAAI;AAG9B,MAAI;AACF,WAAO,MAAM,KAAK,WAAW,uBAAuB,EAAE,QAAQ;AAAA,MAC5D,SAAS;AAAA,MACT,SAAS,CAAC,cAAc;AAAA,MACxB,UAAU;AAAA,MACV,SAAS,OAAM,SAAQ;AACrB,eAAO,KAAK,QAAQ,YAAI,EAAE,QAAQ,iBAAU,EAAE,QAAQ,YAAI,EAAE,cAAc;AAAA,MAC5E;AAAA,MACA,SAAS,WAAS;AAAA,MAAC;AAAA,IACrB,CAAC,EAAE,WAAW;AAAA,EAChB,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar 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\"\n // 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 }).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-JPPKN37T.mjs');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.1.1\"}\n`);\n const base = getYargsBase(args);\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\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).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 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 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\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 { 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 { 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 { 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 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\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 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\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 { 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}"]}
|
package/build/js/index.mjs
CHANGED
|
@@ -90,7 +90,7 @@ var generateCommand = {
|
|
|
90
90
|
});
|
|
91
91
|
},
|
|
92
92
|
handler: async (args) => {
|
|
93
|
-
const command10 = await import('./handleGenerate-
|
|
93
|
+
const command10 = await import('./handleGenerate-JPPKN37T-GN2XPH7N.mjs');
|
|
94
94
|
await command10.handleGenerate(args);
|
|
95
95
|
}
|
|
96
96
|
};
|
|
@@ -312,7 +312,7 @@ var command2 = {
|
|
|
312
312
|
}).middleware((args) => logDeployCommandConfigFileOverride(args, siteConfig));
|
|
313
313
|
},
|
|
314
314
|
handler: async (args) => {
|
|
315
|
-
const command10 = await import('./siteDeployCommand-
|
|
315
|
+
const command10 = await import('./siteDeployCommand-YCBAYQPC.mjs');
|
|
316
316
|
const {
|
|
317
317
|
version,
|
|
318
318
|
autoVersion,
|
|
@@ -355,7 +355,7 @@ var command3 = {
|
|
|
355
355
|
}).group(["yes"], "Delete Options");
|
|
356
356
|
},
|
|
357
357
|
handler: async (args) => {
|
|
358
|
-
const command10 = await import('./versionDeleteCommand-
|
|
358
|
+
const command10 = await import('./versionDeleteCommand-JTXFP4Z5.mjs');
|
|
359
359
|
await command10.default(args);
|
|
360
360
|
}
|
|
361
361
|
};
|
|
@@ -369,7 +369,7 @@ var command4 = {
|
|
|
369
369
|
return argv;
|
|
370
370
|
},
|
|
371
371
|
handler: async (args) => {
|
|
372
|
-
const command10 = await import('./versionGetCommand-
|
|
372
|
+
const command10 = await import('./versionGetCommand-2IM7B5DL.mjs');
|
|
373
373
|
await command10.default(args);
|
|
374
374
|
}
|
|
375
375
|
};
|
|
@@ -383,7 +383,7 @@ var command5 = {
|
|
|
383
383
|
return argv;
|
|
384
384
|
},
|
|
385
385
|
handler: async (args) => {
|
|
386
|
-
const command10 = await import('./versionListCommand-
|
|
386
|
+
const command10 = await import('./versionListCommand-FIV7HEUJ.mjs');
|
|
387
387
|
await command10.default(args);
|
|
388
388
|
}
|
|
389
389
|
};
|
|
@@ -401,7 +401,7 @@ var command6 = {
|
|
|
401
401
|
});
|
|
402
402
|
},
|
|
403
403
|
handler: async (args) => {
|
|
404
|
-
const command10 = await import('./versionSetCommand-
|
|
404
|
+
const command10 = await import('./versionSetCommand-KABVTMJ6.mjs');
|
|
405
405
|
await command10.default(args);
|
|
406
406
|
}
|
|
407
407
|
};
|
|
@@ -419,7 +419,7 @@ var command7 = {
|
|
|
419
419
|
}).group(["yes"], "Unset Options");
|
|
420
420
|
},
|
|
421
421
|
handler: async (args) => {
|
|
422
|
-
const command10 = await import('./versionUnsetCommand-
|
|
422
|
+
const command10 = await import('./versionUnsetCommand-5DQJZPJM.mjs');
|
|
423
423
|
await command10.default(args);
|
|
424
424
|
}
|
|
425
425
|
};
|
|
@@ -501,7 +501,7 @@ async function logConfigFileMiddleware() {
|
|
|
501
501
|
|
|
502
502
|
// src/cli.ts
|
|
503
503
|
async function cli(args = process.argv) {
|
|
504
|
-
consola.info(`Palantir OSDK CLI ${"0.18.
|
|
504
|
+
consola.info(`Palantir OSDK CLI ${"0.18.1"}
|
|
505
505
|
`);
|
|
506
506
|
const base = getYargsBase(args);
|
|
507
507
|
try {
|
package/build/js/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/index.mjs","../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.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/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","consola","autoVersion","application","foundryUrl"],"mappings":";;;;;;;;;AACA,SAAS,eAAe;AAGxB,IAAI,kBAAkB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc,UAAU;AAAA,MACtC;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,SAAS;AAAA,QACT,OAAO;AAAA;AAAA,MAET;AAAA,MACA,UAAU;AAAA,QACR,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,SAAS;AAAA,MACX;AAAA,MACA,aAAa;AAAA,QACX,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,MACA,mBAAmB;AAAA,QACjB,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc;AAAA,MAC5B;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,aAAa;AAAA,QACX,SAAS;AAAA,QACT,SAAS,CAAC,YAAY,QAAQ;AAAA,MAChC;AAAA,MACA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F;AACF;;;AfNA,eAAsB,IAAI,OAAO,QAAQ,MAAM;AAC7C,EAAAA,SAAQ,KAAK,qBAAqB,QAA2B;AAAA,CAAI;AACjE,QAAM,OAAO,aAAa,IAAI;AAG9B,MAAI;AACF,WAAO,MAAM,KAAK,WAAW,uBAAuB,EAAE,QAAQ;AAAA,MAC5D,SAAS;AAAA,MACT,SAAS,CAAC,cAAc;AAAA,MACxB,UAAU;AAAA,MACV,SAAS,OAAM,SAAQ;AACrB,eAAO,KAAK,QAAQ,YAAI,EAAE,QAAQ,iBAAU,EAAE,QAAQ,YAAI,EAAE,cAAc;AAAA,MAC5E;AAAA,MACA,SAAS,WAAS;AAAA,MAAC;AAAA,IACrB,CAAC,EAAE,WAAW;AAAA,EAChB,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar 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\"\n // 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 }).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-O475QVDP.mjs');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.1.0\"}\n`);\n const base = getYargsBase(args);\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\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).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 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 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\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 { 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 { 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 { 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 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\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 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\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 { 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":["../../../cli.cmd.typescript/build/js/index.mjs","../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.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/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","consola","autoVersion","application","foundryUrl"],"mappings":";;;;;;;;;AACA,SAAS,eAAe;AAGxB,IAAI,kBAAkB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc,UAAU;AAAA,MACtC;AAAA,MACA,YAAY;AAAA,QACV,aAA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AgB,EAAE,QAAQ,eAAO,EAAE,QAAQ,cAAM,EAAE,MAAM,UAAQ;AAC7H,UAAI,CAAC,KAAK,WAAW,WAAW,UAAU,GAAG;AAC3C,cAAM,IAAI,gBAAgB,qCAAqC;AAAA,MACjE;AACA,aAAO;AAAA,IACT,CAAC,EAAE,WAAW,UAAQ,iCAAiC,MAAM,QAAQ,aAAa,CAAC,EAAE,cAAc;AAAA,EACrG;AAAA,EACA,SAAS,OAAM,SAAQ;AAAA,EAAC;AAC1B;AACA,IAAO,eAAQJ;;;ACpDf,SAAS,WAAAC,gBAAe;AAExB,IAAI,YAAY;AAChB,eAAsB,0BAA0B;AAC9C,MAAI,WAAW;AACb,gBAAY;AACZ,UAAM,SAAS,qBAAU;AACzB,UAAM,kBAAkB,MAAM,SAAS;AACvC,QAAI,gBAAgB;AAClB,MAAAA,SAAQ,MAAM,mCAAmC,cAAc,GAAG;AAAA,IACpE;AAAA,EACF;AACF;;;AfNA,eAAsB,IAAI,OAAO,QAAQ,MAAM;AAC7C,EAAAA,SAAQ,KAAK,qBAAqB,QAA2B;AAAA,CAAI;AACjE,QAAM,OAAO,aAAa,IAAI;AAG9B,MAAI;AACF,WAAO,MAAM,KAAK,WAAW,uBAAuB,EAAE,QAAQ;AAAA,MAC5D,SAAS;AAAA,MACT,SAAS,CAAC,cAAc;AAAA,MACxB,UAAU;AAAA,MACV,SAAS,OAAM,SAAQ;AACrB,eAAO,KAAK,QAAQ,YAAI,EAAE,QAAQ,iBAAU,EAAE,QAAQ,YAAI,EAAE,cAAc;AAAA,MAC5E;AAAA,MACA,SAAS,WAAS;AAAA,MAAC;AAAA,IACrB,CAAC,EAAE,WAAW;AAAA,EAChB,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar 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\"\n // 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 }).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-JPPKN37T.mjs');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.1.1\"}\n`);\n const base = getYargsBase(args);\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\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).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 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 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\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 { 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 { 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 { 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 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\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 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\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 { 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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
4
4
|
var chunk467BAS7X_cjs = require('./chunk-467BAS7X.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -83,9 +83,9 @@ async function siteDeployCommand({
|
|
|
83
83
|
token,
|
|
84
84
|
tokenFile
|
|
85
85
|
}) {
|
|
86
|
-
const loadedToken = await
|
|
86
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
87
87
|
const tokenProvider = () => loadedToken;
|
|
88
|
-
const clientCtx =
|
|
88
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
89
89
|
let siteVersion;
|
|
90
90
|
if (typeof selectedVersion === "string") {
|
|
91
91
|
siteVersion = selectedVersion;
|
|
@@ -102,7 +102,7 @@ async function siteDeployCommand({
|
|
|
102
102
|
const archive = archiver__default.default("zip").directory(directory, false);
|
|
103
103
|
logArchiveStats(archive);
|
|
104
104
|
consola.consola.start("Uploading site files");
|
|
105
|
-
await Promise.all([
|
|
105
|
+
await Promise.all([chunkR5KSQSWR_cjs.third_party_applications_exports.uploadWebsiteVersion(
|
|
106
106
|
clientCtx,
|
|
107
107
|
application,
|
|
108
108
|
siteVersion,
|
|
@@ -111,7 +111,7 @@ async function siteDeployCommand({
|
|
|
111
111
|
), archive.finalize()]);
|
|
112
112
|
consola.consola.success("Upload complete");
|
|
113
113
|
if (!uploadOnly) {
|
|
114
|
-
const deployment = await
|
|
114
|
+
const deployment = await chunkR5KSQSWR_cjs.third_party_applications_exports.updateWebsiteDeployment(clientCtx, application, {
|
|
115
115
|
version: siteVersion
|
|
116
116
|
});
|
|
117
117
|
consola.consola.success(`Deployed ${siteVersion} successfully`);
|
|
@@ -120,7 +120,7 @@ async function siteDeployCommand({
|
|
|
120
120
|
logSiteLink("View live site:", `https://${domain}`);
|
|
121
121
|
}
|
|
122
122
|
} else {
|
|
123
|
-
const deployment = await
|
|
123
|
+
const deployment = await chunkR5KSQSWR_cjs.third_party_applications_exports.getWebsiteDeployment(clientCtx, application);
|
|
124
124
|
const domain = deployment?.subdomains[0];
|
|
125
125
|
consola.consola.debug("Upload only mode enabled, skipping deployment");
|
|
126
126
|
if (domain != null) {
|
|
@@ -158,4 +158,4 @@ ${utils.colorize("green", link)}`,
|
|
|
158
158
|
|
|
159
159
|
module.exports = siteDeployCommand;
|
|
160
160
|
//# sourceMappingURL=out.js.map
|
|
161
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
161
|
+
//# sourceMappingURL=siteDeployCommand-XSD3JQAH.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
2
2
|
import { ExitProcessError, isValidSemver } from './chunk-CWMSASIM.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
@@ -132,4 +132,4 @@ ${colorize("green", link)}`,
|
|
|
132
132
|
|
|
133
133
|
export { siteDeployCommand as default };
|
|
134
134
|
//# sourceMappingURL=out.js.map
|
|
135
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
135
|
+
//# sourceMappingURL=siteDeployCommand-YCBAYQPC.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
3
3
|
import './chunk-CWMSASIM.mjs';
|
|
4
4
|
import './chunk-E2SEJZTC.mjs';
|
|
5
5
|
import { consola } from 'consola';
|
|
@@ -30,4 +30,4 @@ ${colorize("bold", "This action cannot be undone.")}`, {
|
|
|
30
30
|
|
|
31
31
|
export { versionDeleteCommand as default };
|
|
32
32
|
//# sourceMappingURL=out.js.map
|
|
33
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
33
|
+
//# sourceMappingURL=versionDeleteCommand-JTXFP4Z5.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
5
5
|
require('./chunk-467BAS7X.cjs');
|
|
6
6
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
@@ -23,13 +23,13 @@ ${utils.colorize("bold", "This action cannot be undone.")}`, {
|
|
|
23
23
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
24
24
|
}
|
|
25
25
|
consola.consola.start(`Deleting version ${version}`);
|
|
26
|
-
const loadedToken = await
|
|
26
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
27
27
|
const tokenProvider = () => loadedToken;
|
|
28
|
-
const clientCtx =
|
|
29
|
-
await
|
|
28
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
29
|
+
await chunkR5KSQSWR_cjs.third_party_applications_exports.deleteWebsiteVersion(clientCtx, application, version);
|
|
30
30
|
consola.consola.success(`Deleted version ${version}`);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
module.exports = versionDeleteCommand;
|
|
34
34
|
//# sourceMappingURL=out.js.map
|
|
35
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
35
|
+
//# sourceMappingURL=versionDeleteCommand-PVA27UNF.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
2
2
|
import './chunk-CWMSASIM.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
@@ -23,4 +23,4 @@ async function versionGetCommand({
|
|
|
23
23
|
|
|
24
24
|
export { versionGetCommand as default };
|
|
25
25
|
//# sourceMappingURL=out.js.map
|
|
26
|
-
//# sourceMappingURL=versionGetCommand-
|
|
26
|
+
//# sourceMappingURL=versionGetCommand-2IM7B5DL.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
4
4
|
require('./chunk-467BAS7X.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -11,11 +11,11 @@ async function versionGetCommand({
|
|
|
11
11
|
token,
|
|
12
12
|
tokenFile
|
|
13
13
|
}) {
|
|
14
|
-
const loadedToken = await
|
|
14
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
15
15
|
const tokenProvider = () => loadedToken;
|
|
16
|
-
const clientCtx =
|
|
16
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
17
17
|
consola.consola.start("Getting live version");
|
|
18
|
-
const deployment = await
|
|
18
|
+
const deployment = await chunkR5KSQSWR_cjs.third_party_applications_exports.getWebsiteDeployment(clientCtx, application);
|
|
19
19
|
if (!deployment) {
|
|
20
20
|
consola.consola.info("No live site version set");
|
|
21
21
|
} else {
|
|
@@ -25,4 +25,4 @@ async function versionGetCommand({
|
|
|
25
25
|
|
|
26
26
|
module.exports = versionGetCommand;
|
|
27
27
|
//# sourceMappingURL=out.js.map
|
|
28
|
-
//# sourceMappingURL=versionGetCommand-
|
|
28
|
+
//# sourceMappingURL=versionGetCommand-AWLHDOMW.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
2
2
|
import './chunk-CWMSASIM.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
@@ -29,4 +29,4 @@ async function versionListCommand({
|
|
|
29
29
|
|
|
30
30
|
export { versionListCommand as default };
|
|
31
31
|
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=versionListCommand-
|
|
32
|
+
//# sourceMappingURL=versionListCommand-FIV7HEUJ.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
4
4
|
require('./chunk-467BAS7X.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -12,11 +12,11 @@ async function versionListCommand({
|
|
|
12
12
|
token,
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
|
-
const loadedToken = await
|
|
15
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
16
16
|
const tokenProvider = () => loadedToken;
|
|
17
|
-
const clientCtx =
|
|
17
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
18
18
|
consola.consola.start("Fetching versions & deployed version");
|
|
19
|
-
const [versions, deployment] = await Promise.all([
|
|
19
|
+
const [versions, deployment] = await Promise.all([chunkR5KSQSWR_cjs.third_party_applications_exports.listWebsiteVersions(clientCtx, application), chunkR5KSQSWR_cjs.third_party_applications_exports.getWebsiteDeployment(clientCtx, application)]);
|
|
20
20
|
if (versions.data.length === 0) {
|
|
21
21
|
consola.consola.info("No site versions found");
|
|
22
22
|
return;
|
|
@@ -31,4 +31,4 @@ async function versionListCommand({
|
|
|
31
31
|
|
|
32
32
|
module.exports = versionListCommand;
|
|
33
33
|
//# sourceMappingURL=out.js.map
|
|
34
|
-
//# sourceMappingURL=versionListCommand-
|
|
34
|
+
//# sourceMappingURL=versionListCommand-Z6HE7MWB.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
2
2
|
import './chunk-CWMSASIM.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
@@ -24,4 +24,4 @@ async function versionSetCommand({
|
|
|
24
24
|
|
|
25
25
|
export { versionSetCommand as default };
|
|
26
26
|
//# sourceMappingURL=out.js.map
|
|
27
|
-
//# sourceMappingURL=versionSetCommand-
|
|
27
|
+
//# sourceMappingURL=versionSetCommand-KABVTMJ6.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
4
4
|
require('./chunk-467BAS7X.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -13,11 +13,11 @@ async function versionSetCommand({
|
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
15
|
consola.consola.start(`Setting live version`);
|
|
16
|
-
const loadedToken = await
|
|
16
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
17
17
|
const tokenProvider = () => loadedToken;
|
|
18
|
-
const clientCtx =
|
|
18
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
19
19
|
if (version) {
|
|
20
|
-
await
|
|
20
|
+
await chunkR5KSQSWR_cjs.third_party_applications_exports.updateWebsiteDeployment(clientCtx, application, {
|
|
21
21
|
version
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -26,4 +26,4 @@ async function versionSetCommand({
|
|
|
26
26
|
|
|
27
27
|
module.exports = versionSetCommand;
|
|
28
28
|
//# sourceMappingURL=out.js.map
|
|
29
|
-
//# sourceMappingURL=versionSetCommand-
|
|
29
|
+
//# sourceMappingURL=versionSetCommand-SKDM2S7Y.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-RVBQ6FHA.mjs';
|
|
3
3
|
import './chunk-CWMSASIM.mjs';
|
|
4
4
|
import './chunk-E2SEJZTC.mjs';
|
|
5
5
|
import { consola } from 'consola';
|
|
@@ -29,4 +29,4 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
|
|
|
29
29
|
|
|
30
30
|
export { versionUnsetCommand as default };
|
|
31
31
|
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
32
|
+
//# sourceMappingURL=versionUnsetCommand-5DQJZPJM.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkR5KSQSWR_cjs = require('./chunk-R5KSQSWR.cjs');
|
|
5
5
|
require('./chunk-467BAS7X.cjs');
|
|
6
6
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
@@ -21,14 +21,14 @@ ${utils.colorize("bold", "Your site will no longer be accessible until a new liv
|
|
|
21
21
|
});
|
|
22
22
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
23
23
|
}
|
|
24
|
-
const loadedToken = await
|
|
24
|
+
const loadedToken = await chunkR5KSQSWR_cjs.loadToken(token, tokenFile);
|
|
25
25
|
const tokenProvider = () => loadedToken;
|
|
26
|
-
const clientCtx =
|
|
26
|
+
const clientCtx = chunkR5KSQSWR_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
27
27
|
consola.consola.start("Clearing live site version");
|
|
28
|
-
await
|
|
28
|
+
await chunkR5KSQSWR_cjs.third_party_applications_exports.deleteWebsiteDeployment(clientCtx, application);
|
|
29
29
|
consola.consola.success("Cleared live site version");
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
module.exports = versionUnsetCommand;
|
|
33
33
|
//# sourceMappingURL=out.js.map
|
|
34
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
34
|
+
//# sourceMappingURL=versionUnsetCommand-HFW6273F.cjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"yargs": "^17.7.2",
|
|
34
34
|
"@osdk/api": "^1.7.0",
|
|
35
35
|
"@osdk/gateway": "^2.2.0",
|
|
36
|
-
"@osdk/generator": "^1.10.
|
|
36
|
+
"@osdk/generator": "^1.10.1",
|
|
37
37
|
"@osdk/shared.net": "^1.10.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/yargs": "^17.0.29",
|
|
45
45
|
"ts-expect": "^1.3.0",
|
|
46
46
|
"typescript": "^5.4.2",
|
|
47
|
-
"@osdk/cli.cmd.typescript": "^0.1.
|
|
47
|
+
"@osdk/cli.cmd.typescript": "^0.1.1",
|
|
48
48
|
"@osdk/cli.common": "^0.1.0"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/js/{versionDeleteCommand-OPW5GZJ7.cjs.map → versionDeleteCommand-JTXFP4Z5.mjs.map}
RENAMED
|
File without changes
|
/package/build/js/{versionDeleteCommand-Q6PV5OHT.mjs.map → versionDeleteCommand-PVA27UNF.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/js/{versionListCommand-MTMK4ZO7.cjs.map → versionListCommand-FIV7HEUJ.mjs.map}
RENAMED
|
File without changes
|
/package/build/js/{versionListCommand-T2K6FMFG.mjs.map → versionListCommand-Z6HE7MWB.cjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build/js/{versionUnsetCommand-BEU52IRT.cjs.map → versionUnsetCommand-5DQJZPJM.mjs.map}
RENAMED
|
File without changes
|
/package/build/js/{versionUnsetCommand-MZD3D2VF.mjs.map → versionUnsetCommand-HFW6273F.cjs.map}
RENAMED
|
File without changes
|