@osdk/cli 0.19.0-next-20240426195134 → 0.19.0
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 +3 -6
- package/README.md +148 -0
- package/build/js/chunk-3NRUGBBO.browser.mjs +15 -0
- package/build/js/chunk-3NRUGBBO.browser.mjs.map +1 -0
- package/build/js/chunk-C5C5AQYT.browser.mjs +9 -0
- package/build/js/{chunk-ZSTKOCBT.mjs → chunk-E2SEJZTC.mjs} +1 -1
- package/build/js/chunk-F6DFEGKQ.browser.mjs +118 -0
- package/build/js/chunk-F6DFEGKQ.browser.mjs.map +1 -0
- package/build/js/chunk-FRT6INSG.browser.mjs +65 -0
- package/build/js/chunk-FRT6INSG.browser.mjs.map +1 -0
- package/build/js/{chunk-7G2FSZUY.cjs → chunk-HQDDGVB7.cjs} +1 -1
- package/build/js/chunk-HQDDGVB7.cjs.map +1 -0
- package/build/js/{chunk-DKCYYJ36.mjs → chunk-MQIOUPGJ.mjs} +40 -40
- package/build/js/chunk-MQIOUPGJ.mjs.map +1 -0
- package/build/js/chunk-NTRB7WUY.browser.mjs +199 -0
- package/build/js/chunk-NTRB7WUY.browser.mjs.map +1 -0
- package/build/js/{chunk-DKKDHTGT.cjs → chunk-RHOIENYA.cjs} +41 -41
- package/build/js/chunk-RHOIENYA.cjs.map +1 -0
- package/build/js/{handleGenerate-ZYXEGPSG-Q3HISCOY.cjs → handleGenerate-YNVZFAXQ-3KAATT5S.cjs} +5 -5
- package/build/js/handleGenerate-YNVZFAXQ-3KAATT5S.cjs.map +1 -0
- package/build/js/handleGenerate-YNVZFAXQ-FJO7YEOC.browser.mjs +151 -0
- package/build/js/handleGenerate-YNVZFAXQ-FJO7YEOC.browser.mjs.map +1 -0
- package/build/js/{handleGenerate-ZYXEGPSG-T7AGZBSH.mjs → handleGenerate-YNVZFAXQ-RJ45FF22.mjs} +5 -5
- package/build/js/handleGenerate-YNVZFAXQ-RJ45FF22.mjs.map +1 -0
- package/build/js/index.browser.mjs +527 -0
- package/build/js/index.browser.mjs.map +1 -0
- package/build/js/index.cjs +12 -12
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +12 -12
- package/build/js/index.mjs.map +1 -1
- package/build/js/loginFlow-H6IOYVXH.browser.mjs +4 -0
- package/build/js/{loginFlow-3V5OVOTH.cjs → loginFlow-QTUKYZEL.cjs} +2 -2
- package/build/js/{loginFlow-IBTRFIH3.mjs → loginFlow-ZFVT2AFZ.mjs} +2 -2
- package/build/js/loginFlow-ZFVT2AFZ.mjs.map +1 -0
- package/build/js/siteDeployCommand-CY2WWLXP.browser.mjs +135 -0
- package/build/js/siteDeployCommand-CY2WWLXP.browser.mjs.map +1 -0
- package/build/js/{siteDeployCommand-P2IDJRWT.cjs → siteDeployCommand-EYM2TXE6.cjs} +10 -10
- package/build/js/siteDeployCommand-EYM2TXE6.cjs.map +1 -0
- package/build/js/{siteDeployCommand-PJJT2NNF.mjs → siteDeployCommand-GV3QRLZD.mjs} +8 -8
- package/build/js/siteDeployCommand-GV3QRLZD.mjs.map +1 -0
- package/build/js/versionDeleteCommand-2OJI3HPR.browser.mjs +33 -0
- package/build/js/versionDeleteCommand-2OJI3HPR.browser.mjs.map +1 -0
- package/build/js/{versionDeleteCommand-4FUKGJQ2.mjs → versionDeleteCommand-E6727BXW.mjs} +4 -4
- package/build/js/versionDeleteCommand-E6727BXW.mjs.map +1 -0
- package/build/js/{versionDeleteCommand-X7IHRPH3.cjs → versionDeleteCommand-LZJDT2HD.cjs} +6 -6
- package/build/js/versionDeleteCommand-LZJDT2HD.cjs.map +1 -0
- package/build/js/versionGetCommand-4LGRRMQM.cjs +29 -0
- package/build/js/versionGetCommand-4LGRRMQM.cjs.map +1 -0
- package/build/js/versionGetCommand-A6BVV3GL.browser.mjs +27 -0
- package/build/js/versionGetCommand-A6BVV3GL.browser.mjs.map +1 -0
- package/build/js/{versionGetCommand-7ZWZ3BQY.mjs → versionGetCommand-XCXFCFAP.mjs} +7 -6
- package/build/js/versionGetCommand-XCXFCFAP.mjs.map +1 -0
- package/build/js/versionListCommand-2LWNOKV2.browser.mjs +32 -0
- package/build/js/versionListCommand-2LWNOKV2.browser.mjs.map +1 -0
- package/build/js/{versionListCommand-5K3FUVCO.mjs → versionListCommand-TSPBNGWW.mjs} +5 -5
- package/build/js/versionListCommand-TSPBNGWW.mjs.map +1 -0
- package/build/js/{versionListCommand-RZYNYI4A.cjs → versionListCommand-ZHIPVSQP.cjs} +7 -7
- package/build/js/versionListCommand-ZHIPVSQP.cjs.map +1 -0
- package/build/js/{versionSetCommand-C2NZCHJY.mjs → versionSetCommand-FUZKBVIF.mjs} +4 -4
- package/build/js/versionSetCommand-FUZKBVIF.mjs.map +1 -0
- package/build/js/versionSetCommand-SN2KIDW3.browser.mjs +27 -0
- package/build/js/versionSetCommand-SN2KIDW3.browser.mjs.map +1 -0
- package/build/js/{versionSetCommand-CXMMMNSS.cjs → versionSetCommand-TAHDYWUK.cjs} +6 -6
- package/build/js/versionSetCommand-TAHDYWUK.cjs.map +1 -0
- package/build/js/{versionUnsetCommand-ZQHUGPWQ.mjs → versionUnsetCommand-BJPJ2XCE.mjs} +4 -4
- package/build/js/{versionUnsetCommand-I46GWIIR.cjs.map → versionUnsetCommand-BJPJ2XCE.mjs.map} +1 -1
- package/build/js/{versionUnsetCommand-I46GWIIR.cjs → versionUnsetCommand-MGG4LFZL.cjs} +6 -6
- package/build/js/{versionUnsetCommand-ZQHUGPWQ.mjs.map → versionUnsetCommand-MGG4LFZL.cjs.map} +1 -1
- package/build/js/versionUnsetCommand-Q6IDL3M4.browser.mjs +32 -0
- package/build/js/versionUnsetCommand-Q6IDL3M4.browser.mjs.map +1 -0
- package/build/types/commands/site/version/get/versionGetCommand.d.mts.map +1 -1
- package/build/types/net/third-party-applications/DeployWebsiteRequest.d.mts +4 -0
- package/build/types/net/third-party-applications/DeployWebsiteRequest.d.mts.map +1 -0
- package/build/types/net/third-party-applications/ListVersionsResponse.d.mts +6 -0
- package/build/types/net/third-party-applications/ListVersionsResponse.d.mts.map +1 -0
- package/build/types/net/third-party-applications/Version.d.mts +4 -0
- package/build/types/net/third-party-applications/Version.d.mts.map +1 -0
- package/build/types/net/third-party-applications/Website.d.mts +5 -0
- package/build/types/net/third-party-applications/Website.d.mts.map +1 -0
- package/build/types/net/third-party-applications/deleteVersion.d.mts +4 -0
- package/build/types/net/third-party-applications/deleteVersion.d.mts.map +1 -0
- package/build/types/net/third-party-applications/deployWebsite.d.mts +6 -0
- package/build/types/net/third-party-applications/deployWebsite.d.mts.map +1 -0
- package/build/types/net/third-party-applications/getWebsite.d.mts +5 -0
- package/build/types/net/third-party-applications/getWebsite.d.mts.map +1 -0
- package/build/types/net/third-party-applications/index.d.mts +10 -10
- package/build/types/net/third-party-applications/index.d.mts.map +1 -1
- package/build/types/net/third-party-applications/listVersions.d.mts +5 -0
- package/build/types/net/third-party-applications/listVersions.d.mts.map +1 -0
- package/build/types/net/third-party-applications/undeployWebsite.d.mts +4 -0
- package/build/types/net/third-party-applications/undeployWebsite.d.mts.map +1 -0
- package/build/types/net/third-party-applications/uploadVersion.d.mts +5 -0
- package/build/types/net/third-party-applications/uploadVersion.d.mts.map +1 -0
- package/package.json +6 -4
- package/build/js/chunk-DKCYYJ36.mjs.map +0 -1
- package/build/js/chunk-DKKDHTGT.cjs.map +0 -1
- package/build/js/handleGenerate-ZYXEGPSG-Q3HISCOY.cjs.map +0 -1
- package/build/js/handleGenerate-ZYXEGPSG-T7AGZBSH.mjs.map +0 -1
- package/build/js/siteDeployCommand-P2IDJRWT.cjs.map +0 -1
- package/build/js/siteDeployCommand-PJJT2NNF.mjs.map +0 -1
- package/build/js/versionDeleteCommand-4FUKGJQ2.mjs.map +0 -1
- package/build/js/versionDeleteCommand-X7IHRPH3.cjs.map +0 -1
- package/build/js/versionGetCommand-3HMZEFY6.cjs +0 -28
- package/build/js/versionGetCommand-3HMZEFY6.cjs.map +0 -1
- package/build/js/versionGetCommand-7ZWZ3BQY.mjs.map +0 -1
- package/build/js/versionListCommand-5K3FUVCO.mjs.map +0 -1
- package/build/js/versionListCommand-RZYNYI4A.cjs.map +0 -1
- package/build/js/versionSetCommand-C2NZCHJY.mjs.map +0 -1
- package/build/js/versionSetCommand-CXMMMNSS.cjs.map +0 -1
- package/build/types/net/third-party-applications/ListWebsiteVersionsResponse.d.mts +0 -6
- package/build/types/net/third-party-applications/ListWebsiteVersionsResponse.d.mts.map +0 -1
- package/build/types/net/third-party-applications/UpdateWebsiteDeploymentRequest.d.mts +0 -4
- package/build/types/net/third-party-applications/UpdateWebsiteDeploymentRequest.d.mts.map +0 -1
- package/build/types/net/third-party-applications/WebsiteDeployment.d.mts +0 -5
- package/build/types/net/third-party-applications/WebsiteDeployment.d.mts.map +0 -1
- package/build/types/net/third-party-applications/WebsiteVersion.d.mts +0 -4
- package/build/types/net/third-party-applications/WebsiteVersion.d.mts.map +0 -1
- package/build/types/net/third-party-applications/deleteWebsiteDeployment.d.mts +0 -4
- package/build/types/net/third-party-applications/deleteWebsiteDeployment.d.mts.map +0 -1
- package/build/types/net/third-party-applications/deleteWebsiteVersion.d.mts +0 -4
- package/build/types/net/third-party-applications/deleteWebsiteVersion.d.mts.map +0 -1
- package/build/types/net/third-party-applications/getWebsiteDeployment.d.mts +0 -5
- package/build/types/net/third-party-applications/getWebsiteDeployment.d.mts.map +0 -1
- package/build/types/net/third-party-applications/listWebsiteVersions.d.mts +0 -5
- package/build/types/net/third-party-applications/listWebsiteVersions.d.mts.map +0 -1
- package/build/types/net/third-party-applications/updateWebsiteDeployment.d.mts +0 -6
- package/build/types/net/third-party-applications/updateWebsiteDeployment.d.mts.map +0 -1
- package/build/types/net/third-party-applications/uploadWebsiteVersion.d.mts +0 -5
- package/build/types/net/third-party-applications/uploadWebsiteVersion.d.mts.map +0 -1
- /package/build/js/{chunk-7G2FSZUY.cjs.map → chunk-C5C5AQYT.browser.mjs.map} +0 -0
- /package/build/js/{chunk-ZSTKOCBT.mjs.map → chunk-E2SEJZTC.mjs.map} +0 -0
- /package/build/js/{loginFlow-3V5OVOTH.cjs.map → loginFlow-H6IOYVXH.browser.mjs.map} +0 -0
- /package/build/js/{loginFlow-IBTRFIH3.mjs.map → loginFlow-QTUKYZEL.cjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-MQIOUPGJ.mjs';
|
|
2
2
|
import './chunk-CWMSASIM.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ async function versionListCommand({
|
|
|
14
14
|
const tokenProvider = () => loadedToken;
|
|
15
15
|
const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
|
|
16
16
|
consola.start("Fetching versions & deployed version");
|
|
17
|
-
const [versions,
|
|
17
|
+
const [versions, website] = await Promise.all([third_party_applications_exports.listVersions(clientCtx, application), third_party_applications_exports.getWebsite(clientCtx, application)]);
|
|
18
18
|
if (versions.data.length === 0) {
|
|
19
19
|
consola.info("No site versions found");
|
|
20
20
|
return;
|
|
@@ -23,10 +23,10 @@ async function versionListCommand({
|
|
|
23
23
|
const semver = await import('semver');
|
|
24
24
|
const sortedVersions = semver.rsort(versions.data.map((v) => v.version).filter((v) => semver.valid(v)));
|
|
25
25
|
for (const version of sortedVersions) {
|
|
26
|
-
consola.log(` - ${version}${
|
|
26
|
+
consola.log(` - ${version}${website?.deployedVersion && version === website?.deployedVersion ? colorize("green", ` (deployed)`) : ""}`);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { versionListCommand as default };
|
|
31
31
|
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=versionListCommand-
|
|
32
|
+
//# sourceMappingURL=versionListCommand-TSPBNGWW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,eAAO,mBAA0C;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,sCAAsC;AACpD,QAAM,CAAC,UAAU,OAAO,IAAI,MAAM,QAAQ,IAAI,CAAC,iCAAuB,aAAa,WAAW,WAAW,GAAG,iCAAuB,WAAW,WAAW,WAAW,CAAC,CAAC;AACtK,MAAI,SAAS,KAAK,WAAW,GAAG;AAC9B,YAAQ,KAAK,wBAAwB;AACrC;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,QAAM,SAAS,MAAM,OAAO,QAAQ;AACpC,QAAM,iBAAiB,OAAO,MAAM,SAAS,KAAK,IAAI,OAAK,EAAE,OAAO,EAAE,OAAO,OAAK,OAAO,MAAM,CAAC,CAAC,CAAC;AAClG,aAAW,WAAW,gBAAgB;AACpC,YAAQ,IAAI,SAAS,OAAO,GAAG,SAAS,mBAAmB,YAAY,SAAS,kBAAkB,SAAS,SAAS,aAAa,IAAI,EAAE,EAAE;AAAA,EAC3I;AACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionListCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Fetching versions & deployed version\");\n const [versions, website] = await Promise.all([thirdPartyApplications.listVersions(clientCtx, application), thirdPartyApplications.getWebsite(clientCtx, application)]);\n if (versions.data.length === 0) {\n consola.info(\"No site versions found\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(versions.data.map(v => v.version).filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}${website?.deployedVersion && version === website?.deployedVersion ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRHOIENYA_cjs = require('./chunk-RHOIENYA.cjs');
|
|
4
4
|
require('./chunk-467BAS7X.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
var utils = require('consola/utils');
|
|
8
8
|
|
|
@@ -12,11 +12,11 @@ async function versionListCommand({
|
|
|
12
12
|
token,
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
|
-
const loadedToken = await
|
|
15
|
+
const loadedToken = await chunkRHOIENYA_cjs.loadToken(token, tokenFile);
|
|
16
16
|
const tokenProvider = () => loadedToken;
|
|
17
|
-
const clientCtx =
|
|
17
|
+
const clientCtx = chunkRHOIENYA_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
18
18
|
consola.consola.start("Fetching versions & deployed version");
|
|
19
|
-
const [versions,
|
|
19
|
+
const [versions, website] = await Promise.all([chunkRHOIENYA_cjs.third_party_applications_exports.listVersions(clientCtx, application), chunkRHOIENYA_cjs.third_party_applications_exports.getWebsite(clientCtx, application)]);
|
|
20
20
|
if (versions.data.length === 0) {
|
|
21
21
|
consola.consola.info("No site versions found");
|
|
22
22
|
return;
|
|
@@ -25,10 +25,10 @@ async function versionListCommand({
|
|
|
25
25
|
const semver = await import('semver');
|
|
26
26
|
const sortedVersions = semver.rsort(versions.data.map((v) => v.version).filter((v) => semver.valid(v)));
|
|
27
27
|
for (const version of sortedVersions) {
|
|
28
|
-
consola.consola.log(` - ${version}${
|
|
28
|
+
consola.consola.log(` - ${version}${website?.deployedVersion && version === website?.deployedVersion ? utils.colorize("green", ` (deployed)`) : ""}`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
module.exports = versionListCommand;
|
|
33
33
|
//# sourceMappingURL=out.js.map
|
|
34
|
-
//# sourceMappingURL=versionListCommand-
|
|
34
|
+
//# sourceMappingURL=versionListCommand-ZHIPVSQP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,eAAO,mBAA0C;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,sCAAsC;AACpD,QAAM,CAAC,UAAU,OAAO,IAAI,MAAM,QAAQ,IAAI,CAAC,iCAAuB,aAAa,WAAW,WAAW,GAAG,iCAAuB,WAAW,WAAW,WAAW,CAAC,CAAC;AACtK,MAAI,SAAS,KAAK,WAAW,GAAG;AAC9B,YAAQ,KAAK,wBAAwB;AACrC;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,QAAM,SAAS,MAAM,OAAO,QAAQ;AACpC,QAAM,iBAAiB,OAAO,MAAM,SAAS,KAAK,IAAI,OAAK,EAAE,OAAO,EAAE,OAAO,OAAK,OAAO,MAAM,CAAC,CAAC,CAAC;AAClG,aAAW,WAAW,gBAAgB;AACpC,YAAQ,IAAI,SAAS,OAAO,GAAG,SAAS,mBAAmB,YAAY,SAAS,kBAAkB,SAAS,SAAS,aAAa,IAAI,EAAE,EAAE;AAAA,EAC3I;AACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionListCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Fetching versions & deployed version\");\n const [versions, website] = await Promise.all([thirdPartyApplications.listVersions(clientCtx, application), thirdPartyApplications.getWebsite(clientCtx, application)]);\n if (versions.data.length === 0) {\n consola.info(\"No site versions found\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(versions.data.map(v => v.version).filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}${website?.deployedVersion && version === website?.deployedVersion ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-MQIOUPGJ.mjs';
|
|
2
2
|
import './chunk-CWMSASIM.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
6
6
|
async function versionSetCommand({
|
|
@@ -15,7 +15,7 @@ async function versionSetCommand({
|
|
|
15
15
|
const tokenProvider = () => loadedToken;
|
|
16
16
|
const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
|
|
17
17
|
if (version) {
|
|
18
|
-
await third_party_applications_exports.
|
|
18
|
+
await third_party_applications_exports.deployWebsite(clientCtx, application, {
|
|
19
19
|
version
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -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-FUZKBVIF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,SAAS,eAAe;AAGxB,eAAO,kBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sBAAsB;AACpC,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,MAAI,SAAS;AACX,UAAM,iCAAuB,cAAc,WAAW,aAAa;AAAA,MACjE;AAAA,IACF,CAAC;AAAA,EACH;AACA,UAAQ,QAAQ,uBAAuB,OAAO,EAAE;AAClD","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionSetCommand({\n version,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n consola.start(`Setting live version`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n if (version) {\n await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version\n });\n }\n consola.success(`Set live version to ${version}`);\n}"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-NTRB7WUY.browser.mjs';
|
|
2
|
+
import './chunk-FRT6INSG.browser.mjs';
|
|
3
|
+
import './chunk-C5C5AQYT.browser.mjs';
|
|
4
|
+
import { consola } from 'consola';
|
|
5
|
+
|
|
6
|
+
async function versionSetCommand({
|
|
7
|
+
version,
|
|
8
|
+
application,
|
|
9
|
+
foundryUrl,
|
|
10
|
+
token,
|
|
11
|
+
tokenFile
|
|
12
|
+
}) {
|
|
13
|
+
consola.start(`Setting live version`);
|
|
14
|
+
const loadedToken = await loadToken(token, tokenFile);
|
|
15
|
+
const tokenProvider = () => loadedToken;
|
|
16
|
+
const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
|
|
17
|
+
if (version) {
|
|
18
|
+
await third_party_applications_exports.deployWebsite(clientCtx, application, {
|
|
19
|
+
version
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
consola.success(`Set live version to ${version}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { versionSetCommand as default };
|
|
26
|
+
//# sourceMappingURL=out.js.map
|
|
27
|
+
//# sourceMappingURL=versionSetCommand-SN2KIDW3.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,SAAS,eAAe;AAGxB,eAAO,kBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sBAAsB;AACpC,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,MAAI,SAAS;AACX,UAAM,iCAAuB,cAAc,WAAW,aAAa;AAAA,MACjE;AAAA,IACF,CAAC;AAAA,EACH;AACA,UAAQ,QAAQ,uBAAuB,OAAO,EAAE;AAClD","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionSetCommand({\n version,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n consola.start(`Setting live version`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n if (version) {\n await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version\n });\n }\n consola.success(`Set live version to ${version}`);\n}"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRHOIENYA_cjs = require('./chunk-RHOIENYA.cjs');
|
|
4
4
|
require('./chunk-467BAS7X.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
|
|
8
8
|
async function versionSetCommand({
|
|
@@ -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 chunkRHOIENYA_cjs.loadToken(token, tokenFile);
|
|
17
17
|
const tokenProvider = () => loadedToken;
|
|
18
|
-
const clientCtx =
|
|
18
|
+
const clientCtx = chunkRHOIENYA_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
19
19
|
if (version) {
|
|
20
|
-
await
|
|
20
|
+
await chunkRHOIENYA_cjs.third_party_applications_exports.deployWebsite(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-TAHDYWUK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,SAAS,eAAe;AAGxB,eAAO,kBAAyC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sBAAsB;AACpC,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,MAAI,SAAS;AACX,UAAM,iCAAuB,cAAc,WAAW,aAAa;AAAA,MACjE;AAAA,IACF,CAAC;AAAA,EACH;AACA,UAAQ,QAAQ,uBAAuB,OAAO,EAAE;AAClD","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionSetCommand({\n version,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n consola.start(`Setting live version`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n if (version) {\n await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version\n });\n }\n consola.success(`Set live version to ${version}`);\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
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-MQIOUPGJ.mjs';
|
|
3
3
|
import './chunk-CWMSASIM.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-E2SEJZTC.mjs';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
6
|
import { colorize } from 'consola/utils';
|
|
7
7
|
|
|
@@ -23,10 +23,10 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
|
|
|
23
23
|
const tokenProvider = () => loadedToken;
|
|
24
24
|
const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
|
|
25
25
|
consola.start("Clearing live site version");
|
|
26
|
-
await third_party_applications_exports.
|
|
26
|
+
await third_party_applications_exports.undeployWebsite(clientCtx, application);
|
|
27
27
|
consola.success("Cleared live site version");
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { versionUnsetCommand as default };
|
|
31
31
|
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
32
|
+
//# sourceMappingURL=versionUnsetCommand-BJPJ2XCE.mjs.map
|
package/build/js/{versionUnsetCommand-I46GWIIR.cjs.map → versionUnsetCommand-BJPJ2XCE.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,iCAAuB,
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,iCAAuB,gBAAgB,WAAW,WAAW;AACnE,UAAQ,QAAQ,2BAA2B;AAC7C","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionUnsetCommand({\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?\\n${colorize(\"bold\", \"Your site will no longer be accessible until a new live site version is set.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Clearing live site version\");\n await thirdPartyApplications.undeployWebsite(clientCtx, application);\n consola.success(\"Cleared live site version\");\n}"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkRHOIENYA_cjs = require('./chunk-RHOIENYA.cjs');
|
|
5
5
|
require('./chunk-467BAS7X.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-HQDDGVB7.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
8
8
|
var utils = require('consola/utils');
|
|
9
9
|
|
|
@@ -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 chunkRHOIENYA_cjs.loadToken(token, tokenFile);
|
|
25
25
|
const tokenProvider = () => loadedToken;
|
|
26
|
-
const clientCtx =
|
|
26
|
+
const clientCtx = chunkRHOIENYA_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
27
27
|
consola.consola.start("Clearing live site version");
|
|
28
|
-
await
|
|
28
|
+
await chunkRHOIENYA_cjs.third_party_applications_exports.undeployWebsite(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-MGG4LFZL.cjs.map
|
package/build/js/{versionUnsetCommand-ZQHUGPWQ.mjs.map → versionUnsetCommand-MGG4LFZL.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,iCAAuB,
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,iCAAuB,gBAAgB,WAAW,WAAW;AACnE,UAAQ,QAAQ,2BAA2B;AAC7C","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionUnsetCommand({\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?\\n${colorize(\"bold\", \"Your site will no longer be accessible until a new live site version is set.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Clearing live site version\");\n await thirdPartyApplications.undeployWebsite(clientCtx, application);\n consola.success(\"Cleared live site version\");\n}"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { handlePromptCancel } from './chunk-3NRUGBBO.browser.mjs';
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-NTRB7WUY.browser.mjs';
|
|
3
|
+
import './chunk-FRT6INSG.browser.mjs';
|
|
4
|
+
import './chunk-C5C5AQYT.browser.mjs';
|
|
5
|
+
import { consola } from 'consola';
|
|
6
|
+
import { colorize } from 'consola/utils';
|
|
7
|
+
|
|
8
|
+
async function versionUnsetCommand({
|
|
9
|
+
yes,
|
|
10
|
+
application,
|
|
11
|
+
foundryUrl,
|
|
12
|
+
token,
|
|
13
|
+
tokenFile
|
|
14
|
+
}) {
|
|
15
|
+
if (!yes) {
|
|
16
|
+
const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?
|
|
17
|
+
${colorize("bold", "Your site will no longer be accessible until a new live site version is set.")}`, {
|
|
18
|
+
type: "confirm"
|
|
19
|
+
});
|
|
20
|
+
handlePromptCancel(confirmed);
|
|
21
|
+
}
|
|
22
|
+
const loadedToken = await loadToken(token, tokenFile);
|
|
23
|
+
const tokenProvider = () => loadedToken;
|
|
24
|
+
const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
|
|
25
|
+
consola.start("Clearing live site version");
|
|
26
|
+
await third_party_applications_exports.undeployWebsite(clientCtx, application);
|
|
27
|
+
consola.success("Cleared live site version");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { versionUnsetCommand as default };
|
|
31
|
+
//# sourceMappingURL=out.js.map
|
|
32
|
+
//# sourceMappingURL=versionUnsetCommand-Q6IDL3M4.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,iCAAuB,gBAAgB,WAAW,WAAW;AACnE,UAAQ,QAAQ,2BAA2B;AAC7C","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionUnsetCommand({\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?\\n${colorize(\"bold\", \"Your site will no longer be accessible until a new live site version is set.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Clearing live site version\");\n await thirdPartyApplications.undeployWebsite(clientCtx, application);\n consola.success(\"Cleared live site version\");\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionGetCommand.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAA8B,iBAAiB,CAC7C,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"versionGetCommand.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAA8B,iBAAiB,CAC7C,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,iBAkB9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeployWebsiteRequest.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/DeployWebsiteRequest.mts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListVersionsResponse.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/ListVersionsResponse.mts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Version.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/Version.mts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Website.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/Website.mts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,OAAO;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
export declare function deleteVersion(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid, version: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=deleteVersion.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteVersion.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/deleteVersion.mts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,wBAAsB,aAAa,CACjC,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
import type { DeployWebsiteRequest } from "./DeployWebsiteRequest.mjs";
|
|
4
|
+
import type { Website } from "./Website.mjs";
|
|
5
|
+
export declare function deployWebsite(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid, request: DeployWebsiteRequest): Promise<Website>;
|
|
6
|
+
//# sourceMappingURL=deployWebsite.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployWebsite.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/deployWebsite.mts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAsB,aAAa,CACjC,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
import type { Website } from "./Website.mjs";
|
|
4
|
+
export declare function getWebsite(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid): Promise<Website | undefined>;
|
|
5
|
+
//# sourceMappingURL=getWebsite.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWebsite.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/getWebsite.mts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAsB,UAAU,CAC9B,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAmB9B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export
|
|
8
|
-
export {
|
|
9
|
-
export type {
|
|
10
|
-
export type {
|
|
1
|
+
export { deleteVersion } from "./deleteVersion.mjs";
|
|
2
|
+
export { deployWebsite } from "./deployWebsite.mjs";
|
|
3
|
+
export type { DeployWebsiteRequest } from "./DeployWebsiteRequest.mjs";
|
|
4
|
+
export { getWebsite } from "./getWebsite.mjs";
|
|
5
|
+
export { listVersions } from "./listVersions.mjs";
|
|
6
|
+
export type { ListVersionsResponse } from "./ListVersionsResponse.mjs";
|
|
7
|
+
export { undeployWebsite } from "./undeployWebsite.mjs";
|
|
8
|
+
export { uploadVersion } from "./uploadVersion.mjs";
|
|
9
|
+
export type { Version } from "./Version.mjs";
|
|
10
|
+
export type { Website } from "./Website.mjs";
|
|
11
11
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/index.mts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/index.mts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
import type { ListVersionsResponse } from "./ListVersionsResponse.mjs";
|
|
4
|
+
export declare function listVersions(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid): Promise<ListVersionsResponse>;
|
|
5
|
+
//# sourceMappingURL=listVersions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listVersions.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/listVersions.mts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,wBAAsB,YAAY,CAChC,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAO/B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
export declare function undeployWebsite(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=undeployWebsite.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undeployWebsite.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/undeployWebsite.mts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,wBAAsB,eAAe,CACnC,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InternalClientContext } from "../internalClientContext.mjs";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
|
+
import type { Version } from "./Version.mjs";
|
|
4
|
+
export declare function uploadVersion(ctx: InternalClientContext, thirdPartyAppRid: ThirdPartyAppRid, version: string, zipFile: ReadableStream | Blob | BufferSource): Promise<Version>;
|
|
5
|
+
//# sourceMappingURL=uploadVersion.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadVersion.d.mts","sourceRoot":"","sources":["../../../../src/net/third-party-applications/uploadVersion.mts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAsB,aAAa,CACjC,GAAG,EAAE,qBAAqB,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,YAAY,GAC5C,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.19.0
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./build/types/index.d.ts",
|
|
14
|
+
"browser": "./build/js/index.browser.mjs",
|
|
14
15
|
"import": "./build/js/index.mjs"
|
|
15
16
|
},
|
|
16
17
|
"./*": {
|
|
17
18
|
"types": "./build/types/public/*.d.ts",
|
|
19
|
+
"browser": "./build/js/public/*.browser.mjs",
|
|
18
20
|
"import": "./build/js/public/*.mjs"
|
|
19
21
|
}
|
|
20
22
|
},
|
|
@@ -30,8 +32,8 @@
|
|
|
30
32
|
"tslib": "^2.6.2",
|
|
31
33
|
"yargs": "^17.7.2",
|
|
32
34
|
"@osdk/api": "^1.7.0",
|
|
35
|
+
"@osdk/generator": "^1.10.0",
|
|
33
36
|
"@osdk/gateway": "^2.2.0",
|
|
34
|
-
"@osdk/generator": "^1.11.0-next-20240426195134",
|
|
35
37
|
"@osdk/shared.net": "^1.10.0"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
@@ -42,8 +44,8 @@
|
|
|
42
44
|
"@types/yargs": "^17.0.29",
|
|
43
45
|
"ts-expect": "^1.3.0",
|
|
44
46
|
"typescript": "^5.4.5",
|
|
45
|
-
"@osdk/cli.cmd.typescript": "^0.2.0
|
|
46
|
-
"@osdk/cli.common": "^0.2.0
|
|
47
|
+
"@osdk/cli.cmd.typescript": "^0.2.0",
|
|
48
|
+
"@osdk/cli.common": "^0.2.0"
|
|
47
49
|
},
|
|
48
50
|
"publishConfig": {
|
|
49
51
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/createInternalClientContext.mts","../../src/net/third-party-applications/index.mts","../../src/net/createFetch.mts","../../src/net/UserAgent.ts","../../src/net/third-party-applications/deleteWebsiteDeployment.mts","../../src/net/third-party-applications/deleteWebsiteVersion.mts","../../src/net/third-party-applications/getWebsiteDeployment.mts","../../src/net/third-party-applications/listWebsiteVersions.mts","../../src/net/third-party-applications/updateWebsiteDeployment.mts","../../src/net/third-party-applications/uploadWebsiteVersion.mts","../../src/util/token.ts"],"names":["fetch","PalantirApiError","consola"],"mappings":"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","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function createInternalClientContext(foundryUrl, tokenProvider) {\n return {\n tokenProvider,\n foundryUrl\n };\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteWebsiteDeployment } from \"./deleteWebsiteDeployment.mjs\";\nexport { deleteWebsiteVersion } from \"./deleteWebsiteVersion.mjs\";\nexport { getWebsiteDeployment } from \"./getWebsiteDeployment.mjs\";\nexport { listWebsiteVersions } from \"./listWebsiteVersions.mjs\";\nexport { updateWebsiteDeployment } from \"./updateWebsiteDeployment.mjs\";\nexport { uploadWebsiteVersion } from \"./uploadWebsiteVersion.mjs\";","/*\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 { createFetchHeaderMutator, createFetchOrThrow, PalantirApiError } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\nimport { USER_AGENT } from \"./UserAgent.js\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createRequestLoggingFetch(createErrorExitingFetch(createFetchOrThrow(fetchFn))), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", USER_AGENT);\n return headers;\n });\n}\nfunction createErrorExitingFetch(fetchFn = fetch) {\n return function errorExitingFetch(input, init) {\n return fetchFn(input, init).catch(handleFetchError);\n };\n}\nfunction handleFetchError(e) {\n if (!(e instanceof PalantirApiError)) {\n throw new ExitProcessError(1, \"Unexpected fetch error\");\n }\n let tip;\n if (e.statusCode === 401) {\n tip = \"Check your token is valid and has not expired or been disabled\";\n } else if (e.statusCode === 403) {\n tip = \"Check your token has the required scopes for this operation\";\n }\n let message = e.message;\n if (e.errorName === \"CannotDeleteDeployedWebsiteVersion\") {\n message = \"The site version to delete is live and cannot be deleted\";\n tip = \"Run the `site version set` command to change the live site version\";\n } else if (e.errorName === \"InvalidWebsiteVersion\") {\n message = \"The site version is invalid and must be a valid SemVer string\";\n } else if (e.errorName === \"WebsiteVersionAlreadyExists\") {\n message = \"The site version already exists\";\n } else if (e.errorName === \"WebsiteVersionNotFound\") {\n message = \"The site version could not be found\";\n }\n throw new ExitProcessError(1, message, tip, e);\n}\nfunction createRequestLoggingFetch(fetchFn = fetch) {\n return function requestLoggingFetch(input, init) {\n const requestLog = typeof input === \"string\" || input instanceof URL ? `${init?.method ?? \"GET\"}: ${input.toString().trim()}` : `${input.method ?? \"GET\"}: ${input.url.toString().trim()}`;\n consola.trace(requestLog);\n return fetchFn(input, init).then(a => {\n consola.trace(`FINISH ${requestLog}`);\n return a;\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 USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function deleteWebsiteDeployment(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteDeployment?preview=true`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function deleteWebsiteVersion(ctx, thirdPartyAppRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteVersions/${version}?preview=true`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { PalantirApiError } from \"@osdk/shared.net\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function getWebsiteDeployment(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteDeployment?preview=true`;\n try {\n const result = await fetch(url);\n return result.json();\n } catch (e) {\n // Revisit this error handling in the API\n if (e instanceof ExitProcessError && e.originalError != null && e.originalError instanceof PalantirApiError && e.originalError.errorName === \"WebsiteDeploymentNotFound\") {\n return undefined;\n }\n throw e;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function listWebsiteVersions(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteVersions?preview=true`;\n const result = await fetch(url);\n return result.json();\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function updateWebsiteDeployment(ctx, thirdPartyAppRid, request) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteDeployment?preview=true`;\n const result = await fetch(url, {\n method: \"PUT\",\n body: JSON.stringify(request),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n return result.json();\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function uploadWebsiteVersion(ctx, thirdPartyAppRid, version, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/websiteVersions/upload?version=${version}&preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n return result.json();\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport { promises as fsPromises } from \"node:fs\";\nimport path from \"node:path\";\nconst TOKEN_ENV_VARS = [\"FOUNDRY_TOKEN\", \"FOUNDRY_SDK_AUTH_TOKEN\"];\n\n/**\n * Loads a JWT Auth Token from an argument, a file, or environment variable returning the first found.\n * @param token The token as a string.\n * @param tokenFile The path to the token file.\n * @returns The token as a string.\n * @throws An error if no token is found.\n */\nexport async function loadToken(token, tokenFile) {\n if (token) {\n consola.debug(`Using token from --token option`);\n validate(token);\n return token;\n }\n if (tokenFile) {\n const loadedToken = await loadTokenFile(tokenFile);\n consola.debug(`Using token from --tokenFile=${loadedToken.filePath} option`);\n validate(loadedToken.token);\n return loadedToken.token;\n }\n for (const envVar of TOKEN_ENV_VARS) {\n const environmentToken = process.env[envVar];\n if (environmentToken) {\n consola.debug(`Using token from ${envVar} environment variable`);\n validate(environmentToken);\n if (envVar === \"FOUNDRY_SDK_AUTH_TOKEN\") {\n consola.warn(`Using FOUNDRY_SDK_AUTH_TOKEN environment variable is deprecated. Please use FOUNDRY_TOKEN instead.`);\n }\n return environmentToken;\n }\n }\n throw new ExitProcessError(2, `No token found.`, `You can supply a --token or --token-file option, or set the ${TOKEN_ENV_VARS[0]} environment variable`);\n}\n/**\n * Reads a JWT Auth Token from a file.\n * @param filePath The path to the token file.\n * @returns The token as a string.\n * @throws An error if the file cannot be read.\n */\nexport async function loadTokenFile(filePath) {\n let token;\n let resolvedPath;\n try {\n resolvedPath = path.resolve(filePath);\n token = await fsPromises.readFile(resolvedPath, \"utf8\");\n token = token.trim();\n } catch (error) {\n throw new ExitProcessError(2, `Unable to read token file \"${filePath}\": ${error}`);\n }\n return {\n filePath: resolvedPath,\n token\n };\n}\nexport function validate(token) {\n if (!isJWT(token)) {\n throw new ExitProcessError(2, `Token does not appear to be a JWT`);\n }\n}\nfunction isJWT(token) {\n // https://stackoverflow.com/a/65755789\n const jwtPattern = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n return jwtPattern.test(token);\n}"]}
|