@osdk/cli 0.32.0-beta.5 → 0.32.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 +8 -0
- package/build/esm/{chunk-KCCEJFXT.js → chunk-TUUWLZNZ.js} +3 -3
- package/build/esm/{chunk-KCCEJFXT.js.map → chunk-TUUWLZNZ.js.map} +1 -1
- package/build/esm/index.js +11 -11
- package/build/esm/index.js.map +1 -1
- package/build/esm/{siteDeployCommand-Q3UL7QE6.js → siteDeployCommand-4RSVHCYL.js} +3 -3
- package/build/esm/{siteDeployCommand-Q3UL7QE6.js.map → siteDeployCommand-4RSVHCYL.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-EDZA5XO5.js → versionDeleteCommand-E7XUIDUE.js} +3 -3
- package/build/esm/{versionDeleteCommand-EDZA5XO5.js.map → versionDeleteCommand-E7XUIDUE.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-3OTXGFAR.js → versionDeleteCommand-ZDSYOJVF.js} +3 -3
- package/build/esm/{versionDeleteCommand-3OTXGFAR.js.map → versionDeleteCommand-ZDSYOJVF.js.map} +1 -1
- package/build/esm/{versionGetCommand-AAJNSZ3H.js → versionGetCommand-3FJSCGFI.js} +3 -3
- package/build/esm/{versionGetCommand-AAJNSZ3H.js.map → versionGetCommand-3FJSCGFI.js.map} +1 -1
- package/build/esm/{versionInfoCommand-ZRKH66LP.js → versionInfoCommand-3NHIQCD4.js} +3 -3
- package/build/esm/{versionInfoCommand-ZRKH66LP.js.map → versionInfoCommand-3NHIQCD4.js.map} +1 -1
- package/build/esm/{versionListCommand-RUVS73QM.js → versionListCommand-FN6U7DQW.js} +3 -3
- package/build/esm/{versionListCommand-RUVS73QM.js.map → versionListCommand-FN6U7DQW.js.map} +1 -1
- package/build/esm/{versionListCommand-7RC43E36.js → versionListCommand-NYIQZT3U.js} +3 -3
- package/build/esm/{versionListCommand-7RC43E36.js.map → versionListCommand-NYIQZT3U.js.map} +1 -1
- package/build/esm/{versionSetCommand-BA57MK3B.js → versionSetCommand-OZDYOLQB.js} +3 -3
- package/build/esm/{versionSetCommand-BA57MK3B.js.map → versionSetCommand-OZDYOLQB.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-SVRXQFWT.js → versionUnsetCommand-YRRYIK4E.js} +3 -3
- package/build/esm/{versionUnsetCommand-SVRXQFWT.js.map → versionUnsetCommand-YRRYIK4E.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-EQGHAAOD.js → widgetSetDeployCommand-UE2GYNU4.js} +3 -3
- package/build/esm/{widgetSetDeployCommand-EQGHAAOD.js.map → widgetSetDeployCommand-UE2GYNU4.js.map} +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -29,7 +29,7 @@ __export(third_party_applications_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
// src/net/UserAgent.ts
|
|
32
|
-
var USER_AGENT = `osdk-cli/${"0.32.0
|
|
32
|
+
var USER_AGENT = `osdk-cli/${"0.32.0"}`;
|
|
33
33
|
|
|
34
34
|
// src/net/createFetch.mts
|
|
35
35
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -322,5 +322,5 @@ function isJWT(token) {
|
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
export { createInternalClientContext, loadToken, third_party_applications_exports, widget_registry_exports };
|
|
325
|
-
//# sourceMappingURL=chunk-
|
|
326
|
-
//# sourceMappingURL=chunk-
|
|
325
|
+
//# sourceMappingURL=chunk-TUUWLZNZ.js.map
|
|
326
|
+
//# sourceMappingURL=chunk-TUUWLZNZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/createInternalClientContext.mts","../../src/net/third-party-applications/index.mts","../../src/net/UserAgent.ts","../../src/net/createFetch.mts","../../src/net/third-party-applications/deleteVersion.mts","../../src/net/third-party-applications/deployWebsite.mts","../../src/net/third-party-applications/getWebsite.mts","../../src/net/third-party-applications/listVersions.mts","../../src/net/third-party-applications/undeployWebsite.mts","../../src/net/third-party-applications/uploadSnapshotVersion.mts","../../src/net/third-party-applications/uploadVersion.mts","../../src/net/widget-registry/index.mts","../../src/net/widget-registry/deleteRelease.mts","../../src/net/widget-registry/getRelease.mts","../../src/net/widget-registry/listReleases.mts","../../src/net/widget-registry/publishRelease.mts","../../src/util/token.ts"],"names":["fetch","ExitProcessError","PalantirApiError","consola","fsPromises"],"mappings":";;;;;;;;;;;AAgBO,SAAS,2BAAA,CAA4B,YAAY,aAAe,EAAA;AACrE,EAAO,OAAA;AAAA,IACL,aAAA;AAAA,IACA;AAAA,GACF;AACF;;;ACrBA,IAAA,gCAAA,GAAA;AAAA,QAAA,CAAA,gCAAA,EAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,aAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACgBO,IAAM,UAAA,GAAa,YAAY,eAA2B,CAAA,CAAA;;;ACO1D,SAAS,WAAA,CAAY,aAAe,EAAA,OAAA,GAAU,KAAO,EAAA;AAC1D,EAAO,OAAA,wBAAA,CAAyB,0BAA0B,uBAAwB,CAAA,kBAAA,CAAmB,OAAO,CAAC,CAAC,CAAG,EAAA,OAAM,OAAW,KAAA;AAChI,IAAM,MAAA,KAAA,GAAQ,MAAM,aAAc,EAAA;AAClC,IAAA,OAAA,CAAQ,GAAI,CAAA,eAAA,EAAiB,CAAU,OAAA,EAAA,KAAK,CAAE,CAAA,CAAA;AAC9C,IAAQ,OAAA,CAAA,GAAA,CAAI,oBAAoB,UAAU,CAAA;AAC1C,IAAO,OAAA,OAAA;AAAA,GACR,CAAA;AACH;AACA,SAAS,uBA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;AAAA;AAEnH,MAAO,OAAA,gBAAA;AAAA;AACT;AAEF,EAAM,MAAA,IAAIF,iBAAiB,CAAG,EAAA,CAAA,eAAA,CAAA,EAAmB,+DAA+D,cAAe,CAAA,CAAC,CAAC,CAAuB,qBAAA,CAAA,CAAA;AAC1J;AAOA,eAAsB,cAAc,QAAU,EAAA;AAC5C,EAAI,IAAA,KAAA;AACJ,EAAI,IAAA,YAAA;AACJ,EAAI,IAAA;AACF,IAAe,YAAA,GAAA,IAAA,CAAK,QAAQ,QAAQ,CAAA;AACpC,IAAA,KAAA,GAAQ,MAAMG,QAAA,CAAW,QAAS,CAAA,YAAA,EAAc,MAAM,CAAA;AACtD,IAAA,KAAA,GAAQ,MAAM,IAAK,EAAA;AAAA,WACZ,KAAO,EAAA;AACd,IAAA,MAAM,IAAIH,gBAAiB,CAAA,CAAA,EAAG,8BAA8B,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAE,CAAA,CAAA;AAAA;AAEnF,EAAO,OAAA;AAAA,IACL,QAAU,EAAA,YAAA;AAAA,IACV;AAAA,GACF;AACF;AACO,SAAS,SAAS,KAAO,EAAA;AAC9B,EAAI,IAAA,CAAC,KAAM,CAAA,KAAK,CAAG,EAAA;AACjB,IAAM,MAAA,IAAIA,gBAAiB,CAAA,CAAA,EAAG,CAAmC,iCAAA,CAAA,CAAA;AAAA;AAErE;AACA,SAAS,MAAM,KAAO,EAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,kDAAA;AACnB,EAAO,OAAA,UAAA,CAAW,KAAK,KAAK,CAAA;AAC9B","file":"chunk-KCCEJFXT.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport 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 { deleteVersion } from \"./deleteVersion.mjs\";\nexport { deployWebsite } from \"./deployWebsite.mjs\";\nexport { getWebsite } from \"./getWebsite.mjs\";\nexport { listVersions } from \"./listVersions.mjs\";\nexport { undeployWebsite } from \"./undeployWebsite.mjs\";\nexport { uploadSnapshotVersion } from \"./uploadSnapshotVersion.mjs\";\nexport { uploadVersion } from \"./uploadVersion.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\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\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 { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nimport { createFetchHeaderMutator, createFetchOrThrow } from \"@osdk/shared.net.fetch\";\nimport { consola } from \"consola\";\nimport { inspect } from \"node:util\";\nimport prettyBytes from \"pretty-bytes\";\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 } else if (e.statusCode === 404) {\n tip = \"The resource may not exist or your token may not have the required scopes to load it\";\n }\n let message;\n if (e.errorName === \"CannotDeleteDeployedVersion\") {\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 === \"InvalidVersion\") {\n message = \"The site version is invalid and must be a valid SemVer string\";\n } else if (e.errorName === \"VersionAlreadyExists\") {\n message = \"The site version already exists\";\n } else if (e.errorName === \"VersionNotFound\") {\n message = \"The site version could not be found\";\n } else if (e.errorName === \"VersionLimitExceeded\") {\n const {\n versionLimit\n } = e.parameters ?? {};\n const versionLimitPart = versionLimit != null ? ` (Limit: ${versionLimit} versions)` : \"\";\n message = `The site contains too many versions${versionLimitPart}`;\n tip = \"Run the `site version delete` command to delete an old version and try again\";\n } else if (e.errorName === \"FileCountLimitExceeded\") {\n const {\n fileCountLimit\n } = e.parameters ?? {};\n const fileCountLimitPart = fileCountLimit != null ? ` (Limit: ${fileCountLimit} files)` : \"\";\n message = `The .zip file contains too many files${fileCountLimitPart}`;\n tip = \"Reduce the number of files in the production build to below the limit\";\n } else if (e.errorName === \"FileSizeLimitExceeded\") {\n const {\n currentFilePath,\n currentFileSizeBytes,\n fileSizeBytesLimit\n } = e.parameters ?? {};\n const currentFilePathPart = currentFilePath != null ? ` \"${currentFilePath}\"` : \"\";\n const currentFileSizePart = currentFileSizeBytes != null ? ` (${prettyBytes(parseInt(currentFileSizeBytes), {\n binary: true\n })})` : \"\";\n const fileSizeLimitPart = fileSizeBytesLimit != null ? ` (Limit: ${prettyBytes(parseInt(fileSizeBytesLimit), {\n binary: true\n })})` : \"\";\n message = `The .zip file contains a file${currentFilePathPart}${currentFileSizePart} that is too large${fileSizeLimitPart}`;\n tip = \"Ensure all files in the production build are below the size limit\";\n } else if (e.errorName === \"ScanningInProgress\") {\n message = \"The website version is being scanned for vulnerabilities and cannot be deployed yet\";\n tip = \"If you have a `foundry.config.json` file, set the `site.uploadOnly` property to `true` to disable automatic deployment.\\n\" + \"Website versions can be manually deployed from the Website Hosting page in Developer Console after their scans have completed\";\n } else {\n if (e instanceof UnknownError) {\n // Include deep inspect of original error\n message = `${e.message}\\n\\n${inspect(e, {\n depth: 10,\n colors: true\n })}`;\n } else {\n // Include extra info about the original API error\n // https://www.palantir.com/docs/foundry/api/general/overview/errors/\n const {\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n } = e;\n message = `${e.message}\\n\\n${JSON.stringify({\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n }, null, 2)}`;\n }\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()}`\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-conversion\n : `${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 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 deleteVersion(ctx, thirdPartyAppRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/${encodeURIComponent(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 { createFetch } from \"../createFetch.mjs\";\nexport async function deployWebsite(ctx, thirdPartyAppRid, request) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/deploy?preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\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 { ExitProcessError } from \"@osdk/cli.common\";\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function getWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website?preview=true`;\n try {\n const result = await fetch(url);\n return await 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 === \"WebsiteNotFound\") {\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 listVersions(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions?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 undeployWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/undeploy?preview=true`;\n await fetch(url, {\n method: \"POST\"\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 uploadSnapshotVersion(ctx, thirdPartyAppRid, version, snapshotId, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/uploadSnapshot?version=${encodeURIComponent(version)}&preview=true${snapshotId !== \"\" ? `&snapshotIdentifier=${encodeURIComponent(snapshotId)}` : \"\"}`;\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 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 uploadVersion(ctx, thirdPartyAppRid, version, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/upload?version=${encodeURIComponent(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 2025 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 { deleteRelease } from \"./deleteRelease.mjs\";\nexport { getRelease } from \"./getRelease.mjs\";\nexport { listReleases } from \"./listReleases.mjs\";\nexport { publishRelease } from \"./publishRelease.mjs\";","/*\n * Copyright 2025 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 deleteRelease(ctx, widgetSetRid, releaseVersion) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases/${releaseVersion}?preview=true`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2025 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 getRelease(ctx, widgetSetRid, releaseVersion) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases/${releaseVersion}?preview=true`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 listReleases(ctx, widgetSetRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases?preview=true`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 publishRelease(ctx, repositoryRid, repositoryVersion, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/repositories/${repositoryRid}/publish?preview=true&repositoryVersion=${repositoryVersion}`;\n 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}","/*\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}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/net/createInternalClientContext.mts","../../src/net/third-party-applications/index.mts","../../src/net/UserAgent.ts","../../src/net/createFetch.mts","../../src/net/third-party-applications/deleteVersion.mts","../../src/net/third-party-applications/deployWebsite.mts","../../src/net/third-party-applications/getWebsite.mts","../../src/net/third-party-applications/listVersions.mts","../../src/net/third-party-applications/undeployWebsite.mts","../../src/net/third-party-applications/uploadSnapshotVersion.mts","../../src/net/third-party-applications/uploadVersion.mts","../../src/net/widget-registry/index.mts","../../src/net/widget-registry/deleteRelease.mts","../../src/net/widget-registry/getRelease.mts","../../src/net/widget-registry/listReleases.mts","../../src/net/widget-registry/publishRelease.mts","../../src/util/token.ts"],"names":["fetch","ExitProcessError","PalantirApiError","consola","fsPromises"],"mappings":";;;;;;;;;;;AAgBO,SAAS,2BAAA,CAA4B,YAAY,aAAe,EAAA;AACrE,EAAO,OAAA;AAAA,IACL,aAAA;AAAA,IACA;AAAA,GACF;AACF;;;ACrBA,IAAA,gCAAA,GAAA;AAAA,QAAA,CAAA,gCAAA,EAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,aAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACgBO,IAAM,UAAA,GAAa,YAAY,QAA2B,CAAA,CAAA;;;ACO1D,SAAS,WAAA,CAAY,aAAe,EAAA,OAAA,GAAU,KAAO,EAAA;AAC1D,EAAO,OAAA,wBAAA,CAAyB,0BAA0B,uBAAwB,CAAA,kBAAA,CAAmB,OAAO,CAAC,CAAC,CAAG,EAAA,OAAM,OAAW,KAAA;AAChI,IAAM,MAAA,KAAA,GAAQ,MAAM,aAAc,EAAA;AAClC,IAAA,OAAA,CAAQ,GAAI,CAAA,eAAA,EAAiB,CAAU,OAAA,EAAA,KAAK,CAAE,CAAA,CAAA;AAC9C,IAAQ,OAAA,CAAA,GAAA,CAAI,oBAAoB,UAAU,CAAA;AAC1C,IAAO,OAAA,OAAA;AAAA,GACR,CAAA;AACH;AACA,SAAS,uBAAA,CAAwB,UAAU,KAAO,EAAA;AAChD,EAAO,OAAA,SAAS,iBA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MAAA,IAAIF,iBAAiB,CAAG,EAAA,CAAA,eAAA,CAAA,EAAmB,+DAA+D,cAAe,CAAA,CAAC,CAAC,CAAuB,qBAAA,CAAA,CAAA;AAC1J;AAOA,eAAsB,cAAc,QAAU,EAAA;AAC5C,EAAI,IAAA,KAAA;AACJ,EAAI,IAAA,YAAA;AACJ,EAAI,IAAA;AACF,IAAe,YAAA,GAAA,IAAA,CAAK,QAAQ,QAAQ,CAAA;AACpC,IAAA,KAAA,GAAQ,MAAMG,QAAA,CAAW,QAAS,CAAA,YAAA,EAAc,MAAM,CAAA;AACtD,IAAA,KAAA,GAAQ,MAAM,IAAK,EAAA;AAAA,WACZ,KAAO,EAAA;AACd,IAAA,MAAM,IAAIH,gBAAiB,CAAA,CAAA,EAAG,8BAA8B,QAAQ,CAAA,GAAA,EAAM,KAAK,CAAE,CAAA,CAAA;AAAA;AAEnF,EAAO,OAAA;AAAA,IACL,QAAU,EAAA,YAAA;AAAA,IACV;AAAA,GACF;AACF;AACO,SAAS,SAAS,KAAO,EAAA;AAC9B,EAAI,IAAA,CAAC,KAAM,CAAA,KAAK,CAAG,EAAA;AACjB,IAAM,MAAA,IAAIA,gBAAiB,CAAA,CAAA,EAAG,CAAmC,iCAAA,CAAA,CAAA;AAAA;AAErE;AACA,SAAS,MAAM,KAAO,EAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,kDAAA;AACnB,EAAO,OAAA,UAAA,CAAW,KAAK,KAAK,CAAA;AAC9B","file":"chunk-TUUWLZNZ.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport 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 { deleteVersion } from \"./deleteVersion.mjs\";\nexport { deployWebsite } from \"./deployWebsite.mjs\";\nexport { getWebsite } from \"./getWebsite.mjs\";\nexport { listVersions } from \"./listVersions.mjs\";\nexport { undeployWebsite } from \"./undeployWebsite.mjs\";\nexport { uploadSnapshotVersion } from \"./uploadSnapshotVersion.mjs\";\nexport { uploadVersion } from \"./uploadVersion.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\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\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 { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nimport { createFetchHeaderMutator, createFetchOrThrow } from \"@osdk/shared.net.fetch\";\nimport { consola } from \"consola\";\nimport { inspect } from \"node:util\";\nimport prettyBytes from \"pretty-bytes\";\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 } else if (e.statusCode === 404) {\n tip = \"The resource may not exist or your token may not have the required scopes to load it\";\n }\n let message;\n if (e.errorName === \"CannotDeleteDeployedVersion\") {\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 === \"InvalidVersion\") {\n message = \"The site version is invalid and must be a valid SemVer string\";\n } else if (e.errorName === \"VersionAlreadyExists\") {\n message = \"The site version already exists\";\n } else if (e.errorName === \"VersionNotFound\") {\n message = \"The site version could not be found\";\n } else if (e.errorName === \"VersionLimitExceeded\") {\n const {\n versionLimit\n } = e.parameters ?? {};\n const versionLimitPart = versionLimit != null ? ` (Limit: ${versionLimit} versions)` : \"\";\n message = `The site contains too many versions${versionLimitPart}`;\n tip = \"Run the `site version delete` command to delete an old version and try again\";\n } else if (e.errorName === \"FileCountLimitExceeded\") {\n const {\n fileCountLimit\n } = e.parameters ?? {};\n const fileCountLimitPart = fileCountLimit != null ? ` (Limit: ${fileCountLimit} files)` : \"\";\n message = `The .zip file contains too many files${fileCountLimitPart}`;\n tip = \"Reduce the number of files in the production build to below the limit\";\n } else if (e.errorName === \"FileSizeLimitExceeded\") {\n const {\n currentFilePath,\n currentFileSizeBytes,\n fileSizeBytesLimit\n } = e.parameters ?? {};\n const currentFilePathPart = currentFilePath != null ? ` \"${currentFilePath}\"` : \"\";\n const currentFileSizePart = currentFileSizeBytes != null ? ` (${prettyBytes(parseInt(currentFileSizeBytes), {\n binary: true\n })})` : \"\";\n const fileSizeLimitPart = fileSizeBytesLimit != null ? ` (Limit: ${prettyBytes(parseInt(fileSizeBytesLimit), {\n binary: true\n })})` : \"\";\n message = `The .zip file contains a file${currentFilePathPart}${currentFileSizePart} that is too large${fileSizeLimitPart}`;\n tip = \"Ensure all files in the production build are below the size limit\";\n } else if (e.errorName === \"ScanningInProgress\") {\n message = \"The website version is being scanned for vulnerabilities and cannot be deployed yet\";\n tip = \"If you have a `foundry.config.json` file, set the `site.uploadOnly` property to `true` to disable automatic deployment.\\n\" + \"Website versions can be manually deployed from the Website Hosting page in Developer Console after their scans have completed\";\n } else {\n if (e instanceof UnknownError) {\n // Include deep inspect of original error\n message = `${e.message}\\n\\n${inspect(e, {\n depth: 10,\n colors: true\n })}`;\n } else {\n // Include extra info about the original API error\n // https://www.palantir.com/docs/foundry/api/general/overview/errors/\n const {\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n } = e;\n message = `${e.message}\\n\\n${JSON.stringify({\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n }, null, 2)}`;\n }\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()}`\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-conversion\n : `${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 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 deleteVersion(ctx, thirdPartyAppRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/${encodeURIComponent(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 { createFetch } from \"../createFetch.mjs\";\nexport async function deployWebsite(ctx, thirdPartyAppRid, request) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/deploy?preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\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 { ExitProcessError } from \"@osdk/cli.common\";\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function getWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website?preview=true`;\n try {\n const result = await fetch(url);\n return await 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 === \"WebsiteNotFound\") {\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 listVersions(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions?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 undeployWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/undeploy?preview=true`;\n await fetch(url, {\n method: \"POST\"\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 uploadSnapshotVersion(ctx, thirdPartyAppRid, version, snapshotId, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/uploadSnapshot?version=${encodeURIComponent(version)}&preview=true${snapshotId !== \"\" ? `&snapshotIdentifier=${encodeURIComponent(snapshotId)}` : \"\"}`;\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 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 uploadVersion(ctx, thirdPartyAppRid, version, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/upload?version=${encodeURIComponent(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 2025 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 { deleteRelease } from \"./deleteRelease.mjs\";\nexport { getRelease } from \"./getRelease.mjs\";\nexport { listReleases } from \"./listReleases.mjs\";\nexport { publishRelease } from \"./publishRelease.mjs\";","/*\n * Copyright 2025 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 deleteRelease(ctx, widgetSetRid, releaseVersion) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases/${releaseVersion}?preview=true`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2025 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 getRelease(ctx, widgetSetRid, releaseVersion) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases/${releaseVersion}?preview=true`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 listReleases(ctx, widgetSetRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/widgetSets/${widgetSetRid}/releases?preview=true`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 publishRelease(ctx, repositoryRid, repositoryVersion, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/widgets/repositories/${repositoryRid}/publish?preview=true&repositoryVersion=${repositoryVersion}`;\n 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}","/*\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}"]}
|
package/build/esm/index.js
CHANGED
|
@@ -181,7 +181,7 @@ var command2 = {
|
|
|
181
181
|
}).middleware((args) => logSiteDeployCommandConfigFileOverride(args, siteConfig));
|
|
182
182
|
},
|
|
183
183
|
handler: async (args) => {
|
|
184
|
-
const command16 = await import('./siteDeployCommand-
|
|
184
|
+
const command16 = await import('./siteDeployCommand-4RSVHCYL.js');
|
|
185
185
|
const {
|
|
186
186
|
version,
|
|
187
187
|
autoVersion,
|
|
@@ -224,7 +224,7 @@ var command3 = {
|
|
|
224
224
|
}).group(["yes"], "Delete Options");
|
|
225
225
|
},
|
|
226
226
|
handler: async (args) => {
|
|
227
|
-
const command16 = await import('./versionDeleteCommand-
|
|
227
|
+
const command16 = await import('./versionDeleteCommand-ZDSYOJVF.js');
|
|
228
228
|
await command16.default(args);
|
|
229
229
|
}
|
|
230
230
|
};
|
|
@@ -238,7 +238,7 @@ var command4 = {
|
|
|
238
238
|
return argv;
|
|
239
239
|
},
|
|
240
240
|
handler: async (args) => {
|
|
241
|
-
const command16 = await import('./versionGetCommand-
|
|
241
|
+
const command16 = await import('./versionGetCommand-3FJSCGFI.js');
|
|
242
242
|
await command16.default(args);
|
|
243
243
|
}
|
|
244
244
|
};
|
|
@@ -252,7 +252,7 @@ var command5 = {
|
|
|
252
252
|
return argv;
|
|
253
253
|
},
|
|
254
254
|
handler: async (args) => {
|
|
255
|
-
const command16 = await import('./versionListCommand-
|
|
255
|
+
const command16 = await import('./versionListCommand-FN6U7DQW.js');
|
|
256
256
|
await command16.default(args);
|
|
257
257
|
}
|
|
258
258
|
};
|
|
@@ -270,7 +270,7 @@ var command6 = {
|
|
|
270
270
|
});
|
|
271
271
|
},
|
|
272
272
|
handler: async (args) => {
|
|
273
|
-
const command16 = await import('./versionSetCommand-
|
|
273
|
+
const command16 = await import('./versionSetCommand-OZDYOLQB.js');
|
|
274
274
|
await command16.default(args);
|
|
275
275
|
}
|
|
276
276
|
};
|
|
@@ -288,7 +288,7 @@ var command7 = {
|
|
|
288
288
|
}).group(["yes"], "Unset Options");
|
|
289
289
|
},
|
|
290
290
|
handler: async (args) => {
|
|
291
|
-
const command16 = await import('./versionUnsetCommand-
|
|
291
|
+
const command16 = await import('./versionUnsetCommand-YRRYIK4E.js');
|
|
292
292
|
await command16.default(args);
|
|
293
293
|
}
|
|
294
294
|
};
|
|
@@ -400,7 +400,7 @@ The widget set files must contain a valid manifest at ${MANIFEST_FILE_LOCATION}
|
|
|
400
400
|
}).group(["directory", "repository"], "Deploy Options").middleware((args) => logWidgetSetDeployCommandConfigFileOverride(args, widgetSetConfig));
|
|
401
401
|
},
|
|
402
402
|
handler: async (args) => {
|
|
403
|
-
const command16 = await import('./widgetSetDeployCommand-
|
|
403
|
+
const command16 = await import('./widgetSetDeployCommand-UE2GYNU4.js');
|
|
404
404
|
await command16.default(args);
|
|
405
405
|
}
|
|
406
406
|
};
|
|
@@ -430,7 +430,7 @@ var command11 = {
|
|
|
430
430
|
}).group(["yes"], "Delete Options");
|
|
431
431
|
},
|
|
432
432
|
handler: async (args) => {
|
|
433
|
-
const command16 = await import('./versionDeleteCommand-
|
|
433
|
+
const command16 = await import('./versionDeleteCommand-E7XUIDUE.js');
|
|
434
434
|
await command16.default(args);
|
|
435
435
|
}
|
|
436
436
|
};
|
|
@@ -448,7 +448,7 @@ var command12 = {
|
|
|
448
448
|
});
|
|
449
449
|
},
|
|
450
450
|
handler: async (args) => {
|
|
451
|
-
const command16 = await import('./versionInfoCommand-
|
|
451
|
+
const command16 = await import('./versionInfoCommand-3NHIQCD4.js');
|
|
452
452
|
await command16.default(args);
|
|
453
453
|
}
|
|
454
454
|
};
|
|
@@ -462,7 +462,7 @@ var command13 = {
|
|
|
462
462
|
return argv;
|
|
463
463
|
},
|
|
464
464
|
handler: async (args) => {
|
|
465
|
-
const command16 = await import('./versionListCommand-
|
|
465
|
+
const command16 = await import('./versionListCommand-NYIQZT3U.js');
|
|
466
466
|
await command16.default(args);
|
|
467
467
|
}
|
|
468
468
|
};
|
|
@@ -536,7 +536,7 @@ var widgetset_default = command15;
|
|
|
536
536
|
|
|
537
537
|
// src/cli.ts
|
|
538
538
|
async function cli(args = process.argv) {
|
|
539
|
-
consola.info(`Palantir OSDK CLI ${"0.32.0
|
|
539
|
+
consola.info(`Palantir OSDK CLI ${"0.32.0"}
|
|
540
540
|
`);
|
|
541
541
|
const base = getYargsBase(args);
|
|
542
542
|
try {
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/configLoader.ts","../../src/yargs/logConfigFileMiddleware.ts","../../src/commands/site/deploy/logSiteDeployCommandConfigFileOverride.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/commands/widgetset/deploy/logWidgetSetDeployCommandConfigFileOverride.ts","../../src/commands/widgetset/deploy/index.ts","../../src/commands/widgetset/logWidgetSetCommandConfigFileOverride.ts","../../src/commands/widgetset/version/delete/index.ts","../../src/commands/widgetset/version/info/index.ts","../../src/commands/widgetset/version/list/index.ts","../../src/commands/widgetset/version/index.ts","../../src/commands/widgetset/index.ts","../../src/cli.ts"],"names":["command","consola","autoVersion","application","foundryUrl","YargsCheckError","deploy_default","delete_default","list_default","version_default","widgetSet","ExitProcessError"],"mappings":";;;;;;;;AAgBO,IAAM,OAAU,GAAA;AAAA,EACrB,OAAS,EAAA,OAAA;AAAA,EACT,QAAU,EAAA,qCAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAO,OAAA,IAAA,CAAK,OAAO,UAAY,EAAA;AAAA,MAC7B,KAAO,EAAA,eAAA;AAAA;AAAA,MAEP,IAAM,EAAA,QAAA;AAAA,MACN,YAAc,EAAA,IAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACX,CAAA;AAAA,GACH;AAAA,EACA,OAAA,EAAS,OAAM,IAAQ,KAAA;AACrB,IAAMA,MAAAA,SAAAA,GAAU,MAAM,OAAO,4BAA4B,CAAA;AACzD,IAAMA,MAAAA,SAAAA,CAAQ,QAAQ,IAAI,CAAA;AAAA;AAE9B,CAAA;AACA,IAAO,aAAQ,GAAA,OAAA;;;AChBf,IAAM,IAAO,GAAA;AA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,iBAAS,EAAE,OAAQ,CAAA;AAAA,MACzD,OAAS,EAAA,UAAA;AAAA,MACT,OAAA,EAAS,CAAC,cAAc,CAAA;AAAA,MACxB,QAAU,EAAA,mBAAA;AAAA,MACV,SAAS,CAAQ,IAAA,KAAA;AACf,QAAA,OAAO,KAAK,OAAQ,CAAA,UAAU,EAAE,OAAQ,CAAA,YAAI,EAAE,aAAc,EAAA;AAAA,OAC9D;AAAA,MACA,SAAS,CAAS,KAAA,KAAA;AAAA;AAAC,KACpB,EAAE,UAAW,EAAA;AAAA,WACP,GAAK,EAAA;AACZ,IAAA,IAAI,eAAeU,gBAAkB,EAAA;AACnC,MAAAV,OAAAA,CAAQ,MAAM,GAAG,CAAA;AAAA;AACnB;AAEJ","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport 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 { loadFoundryConfig } from \"@osdk/foundry-config-json\";\nlet siteConfigPromise = undefined;\nlet widgetSetConfigPromise = undefined;\nfunction getConfig(type) {\n if (type === \"site\") {\n return getSiteConfig();\n } else {\n return getWidgetSetConfig();\n }\n}\nfunction getSiteConfig() {\n if (siteConfigPromise == null) {\n siteConfigPromise = loadFoundryConfig(\"site\").catch(e => {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined);\n });\n }\n return siteConfigPromise;\n}\nfunction getWidgetSetConfig() {\n if (widgetSetConfigPromise == null) {\n widgetSetConfigPromise = loadFoundryConfig(\"widgetSet\").catch(e => {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined);\n });\n }\n return widgetSetConfigPromise;\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\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware(type) {\n if (firstTime) {\n firstTime = false;\n const config = getConfig(type);\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logSiteDeployCommandConfigFileOverride(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?.type === \"git-describe\" && config.autoVersion.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\n }\n if (config?.uploadOnly != null && args.uploadOnly !== config.uploadOnly) {\n consola.debug(`Overriding \"uploadOnly\" from config file with ${args.uploadOnly}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logSiteDeployCommandConfigFileOverride } from \"./logSiteDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader(\"site\");\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.type === \"git-describe\" ? autoVersion.tagPrefix : undefined;\n const uploadOnly = siteConfig?.uploadOnly;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: uploadOnly ?? false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\", \"package-json\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n },\n snapshot: {\n type: \"boolean\",\n description: \"Upload a snapshot version only with automatic retention\",\n default: false\n },\n snapshotId: {\n type: \"string\",\n description: \"Optional id to associate with snapshot version as an alias\"\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").group([\"snapshot\", \"snapshotId\"], \"Snapshot Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType != null && autoVersionType !== \"git-describe\" && autoVersionType !== \"package-json\") {\n throw new YargsCheckError(`Only 'git-describe' and 'package-json' are supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n if (args.uploadOnly && args.snapshot) {\n throw new YargsCheckError(`--uploadOnly and --snapshot cannot be enabled together`);\n }\n if (args.snapshotId != null && !args.snapshot) {\n throw new YargsCheckError(\"--snapshotId is only supported when --snapshot is enabled\");\n }\n return true;\n }).middleware(args => logSiteDeployCommandConfigFileOverride(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 delete\"\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 { logConfigFileMiddleware } from \"../../yargs/logConfigFileMiddleware.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(\"site\");\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 => {\n void logConfigFileMiddleware(\"site\");\n void logSiteCommandConfigFileOverride(args, config?.foundryConfig);\n }).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2025 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 function logWidgetSetDeployCommandConfigFileOverride(args, config) {\n if (config?.directory != null && args.directory !== config.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.repository != null && args.repository !== config.repository) {\n consola.debug(`Overriding \"repository\" from config file with ${args.repository}`);\n }\n}","/*\n * Copyright 2025 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 { MANIFEST_FILE_LOCATION } from \"@osdk/widget.api\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logWidgetSetDeployCommandConfigFileOverride } from \"./logWidgetSetDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: `Deploy a new widget set version\\n\\nThe widget set files must contain a ` + `valid manifest at ${MANIFEST_FILE_LOCATION} which determines the version` + ` to publish. The widget set files may be uploaded to the widget set` + ` itself, or to a separate code repository if it has been authorized to` + ` publish the widget set.`,\n builder: async argv => {\n const config = await configLoader(\"widgetSet\");\n const widgetSetConfig = config?.foundryConfig.widgetSet;\n const directory = widgetSetConfig?.directory;\n const repository = widgetSetConfig?.repository;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing widget set files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n repository: {\n type: \"string\",\n coerce: application => application,\n ...(repository ? {\n default: repository\n } : {}),\n description: \"Code repository resource identifier (rid) publishing the widget set\"\n }\n }).group([\"directory\", \"repository\"], \"Deploy Options\").middleware(args => logWidgetSetDeployCommandConfigFileOverride(args, widgetSetConfig));\n },\n handler: async args => {\n const command = await import(\"./widgetSetDeployCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2025 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 function logWidgetSetCommandConfigFileOverride(args, config) {\n if (config?.widgetSet.rid != null && args.widgetSet !== config.widgetSet.rid) {\n consola.debug(`Overriding \"rid\" from config file with ${args.widgetSet}`);\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 2025 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 widget set version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to delete\"\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 2025 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: \"info <version>\",\n describe: \"Load info about widget set version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to load\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionInfoCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2025 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 widget set 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 2025 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 info from \"./info/index.js\";\nimport list from \"./list/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage widget set versions\",\n builder: argv => {\n return argv.command(list).command(info).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2025 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 { logConfigFileMiddleware } from \"../../yargs/logConfigFileMiddleware.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logWidgetSetCommandConfigFileOverride } from \"./logWidgetSetCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"widgetset\",\n describe: \"Manage your widget set\",\n builder: async argv => {\n const config = await configLoader(\"widgetSet\");\n const widgetSet = config?.foundryConfig.widgetSet.rid;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n widgetSet: {\n type: \"string\",\n coerce: widgetSet => widgetSet,\n ...(widgetSet ? {\n default: widgetSet\n } : {\n demandOption: true\n }),\n description: \"Widget set 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([\"widgetSet\", \"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 => {\n void logConfigFileMiddleware(\"widgetSet\");\n logWidgetSetCommandConfigFileOverride(args, config?.foundryConfig);\n }).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 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 widgetSet from \"./commands/widgetset/index.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.command(site).command(widgetSet).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: argv => {\n return argv.command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/configLoader.ts","../../src/yargs/logConfigFileMiddleware.ts","../../src/commands/site/deploy/logSiteDeployCommandConfigFileOverride.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/commands/widgetset/deploy/logWidgetSetDeployCommandConfigFileOverride.ts","../../src/commands/widgetset/deploy/index.ts","../../src/commands/widgetset/logWidgetSetCommandConfigFileOverride.ts","../../src/commands/widgetset/version/delete/index.ts","../../src/commands/widgetset/version/info/index.ts","../../src/commands/widgetset/version/list/index.ts","../../src/commands/widgetset/version/index.ts","../../src/commands/widgetset/index.ts","../../src/cli.ts"],"names":["command","consola","autoVersion","application","foundryUrl","YargsCheckError","deploy_default","delete_default","list_default","version_default","widgetSet","ExitProcessError"],"mappings":";;;;;;;;AAgBO,IAAM,OAAU,GAAA;AAAA,EACrB,OAAS,EAAA,OAAA;AAAA,EACT,QAAU,EAAA,qCAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAO,OAAA,IAAA,CAAK,OAAO,UAAY,EAAA;AAAA,MAC7B,KAAO,EAAA,eAAA;AAAA;AAAA,MAEP,IAAM,EAAA,QAAA;AAAA,MACN,YAAc,EAAA,IAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACX,CAAA;AAAA,GACH;AAAA,EACA,OAAA,EAAS,OAAM,IAAQ,KAAA;AACrB,IAAMA,MAAAA,SAAAA,GAAU,MAAM,OAAO,4BAA4B,CAAA;AACzD,IAAMA,MAAAA,SAAAA,CAAQ,QAAQ,IAAI,CAAA;AAAA;AAE9B,CAAA;AACA,IAAO,aAAQ,GAAA,OAAA;;;AChBf,IAAM,IAAO,GAAA;AAAA,EACX,OAAS,EAAA,MAAA;AAAA,EACT,QAAU,EAAA,qBAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,UAAY,EAAA;AAAA,QACV,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,IAAA;AAAA,QACd,KAAO,EAAA,SAAA;AAAA;AAAA,QAEP,QAAU,EAAA;AAAA;AACZ,KACD,CAAA,CAAE,OAAQ,CAAA,aAAK,EAAE,aAAc,EAAA;AAAA,GAClC;AAAA,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AAA;AACZ,IAAA,IAAI,eAAeU,gBAAkB,EAAA;AACnC,MAAAV,OAAAA,CAAQ,MAAM,GAAG,CAAA;AAAA;AACnB;AAEJ","file":"index.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport 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 { loadFoundryConfig } from \"@osdk/foundry-config-json\";\nlet siteConfigPromise = undefined;\nlet widgetSetConfigPromise = undefined;\nfunction getConfig(type) {\n if (type === \"site\") {\n return getSiteConfig();\n } else {\n return getWidgetSetConfig();\n }\n}\nfunction getSiteConfig() {\n if (siteConfigPromise == null) {\n siteConfigPromise = loadFoundryConfig(\"site\").catch(e => {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined);\n });\n }\n return siteConfigPromise;\n}\nfunction getWidgetSetConfig() {\n if (widgetSetConfigPromise == null) {\n widgetSetConfigPromise = loadFoundryConfig(\"widgetSet\").catch(e => {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined);\n });\n }\n return widgetSetConfigPromise;\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\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware(type) {\n if (firstTime) {\n firstTime = false;\n const config = getConfig(type);\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logSiteDeployCommandConfigFileOverride(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?.type === \"git-describe\" && config.autoVersion.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\n }\n if (config?.uploadOnly != null && args.uploadOnly !== config.uploadOnly) {\n consola.debug(`Overriding \"uploadOnly\" from config file with ${args.uploadOnly}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logSiteDeployCommandConfigFileOverride } from \"./logSiteDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader(\"site\");\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.type === \"git-describe\" ? autoVersion.tagPrefix : undefined;\n const uploadOnly = siteConfig?.uploadOnly;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: uploadOnly ?? false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\", \"package-json\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n },\n snapshot: {\n type: \"boolean\",\n description: \"Upload a snapshot version only with automatic retention\",\n default: false\n },\n snapshotId: {\n type: \"string\",\n description: \"Optional id to associate with snapshot version as an alias\"\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").group([\"snapshot\", \"snapshotId\"], \"Snapshot Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType != null && autoVersionType !== \"git-describe\" && autoVersionType !== \"package-json\") {\n throw new YargsCheckError(`Only 'git-describe' and 'package-json' are supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n if (args.uploadOnly && args.snapshot) {\n throw new YargsCheckError(`--uploadOnly and --snapshot cannot be enabled together`);\n }\n if (args.snapshotId != null && !args.snapshot) {\n throw new YargsCheckError(\"--snapshotId is only supported when --snapshot is enabled\");\n }\n return true;\n }).middleware(args => logSiteDeployCommandConfigFileOverride(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 delete\"\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 { logConfigFileMiddleware } from \"../../yargs/logConfigFileMiddleware.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(\"site\");\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 => {\n void logConfigFileMiddleware(\"site\");\n void logSiteCommandConfigFileOverride(args, config?.foundryConfig);\n }).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2025 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 function logWidgetSetDeployCommandConfigFileOverride(args, config) {\n if (config?.directory != null && args.directory !== config.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.repository != null && args.repository !== config.repository) {\n consola.debug(`Overriding \"repository\" from config file with ${args.repository}`);\n }\n}","/*\n * Copyright 2025 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 { MANIFEST_FILE_LOCATION } from \"@osdk/widget.api\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logWidgetSetDeployCommandConfigFileOverride } from \"./logWidgetSetDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: `Deploy a new widget set version\\n\\nThe widget set files must contain a ` + `valid manifest at ${MANIFEST_FILE_LOCATION} which determines the version` + ` to publish. The widget set files may be uploaded to the widget set` + ` itself, or to a separate code repository if it has been authorized to` + ` publish the widget set.`,\n builder: async argv => {\n const config = await configLoader(\"widgetSet\");\n const widgetSetConfig = config?.foundryConfig.widgetSet;\n const directory = widgetSetConfig?.directory;\n const repository = widgetSetConfig?.repository;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing widget set files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n repository: {\n type: \"string\",\n coerce: application => application,\n ...(repository ? {\n default: repository\n } : {}),\n description: \"Code repository resource identifier (rid) publishing the widget set\"\n }\n }).group([\"directory\", \"repository\"], \"Deploy Options\").middleware(args => logWidgetSetDeployCommandConfigFileOverride(args, widgetSetConfig));\n },\n handler: async args => {\n const command = await import(\"./widgetSetDeployCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2025 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 function logWidgetSetCommandConfigFileOverride(args, config) {\n if (config?.widgetSet.rid != null && args.widgetSet !== config.widgetSet.rid) {\n consola.debug(`Overriding \"rid\" from config file with ${args.widgetSet}`);\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 2025 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 widget set version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to delete\"\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 2025 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: \"info <version>\",\n describe: \"Load info about widget set version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to load\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionInfoCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2025 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 widget set 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 2025 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 info from \"./info/index.js\";\nimport list from \"./list/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage widget set versions\",\n builder: argv => {\n return argv.command(list).command(info).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2025 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 { logConfigFileMiddleware } from \"../../yargs/logConfigFileMiddleware.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logWidgetSetCommandConfigFileOverride } from \"./logWidgetSetCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"widgetset\",\n describe: \"Manage your widget set\",\n builder: async argv => {\n const config = await configLoader(\"widgetSet\");\n const widgetSet = config?.foundryConfig.widgetSet.rid;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n widgetSet: {\n type: \"string\",\n coerce: widgetSet => widgetSet,\n ...(widgetSet ? {\n default: widgetSet\n } : {\n demandOption: true\n }),\n description: \"Widget set 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([\"widgetSet\", \"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 => {\n void logConfigFileMiddleware(\"widgetSet\");\n logWidgetSetCommandConfigFileOverride(args, config?.foundryConfig);\n }).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 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 widgetSet from \"./commands/widgetset/index.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.command(site).command(widgetSet).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: argv => {\n return argv.command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
import { ExitProcessError } from '@osdk/cli.common';
|
|
@@ -167,5 +167,5 @@ ${colorize("green", link)}`,
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
export { siteDeployCommand as default };
|
|
170
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
171
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
170
|
+
//# sourceMappingURL=siteDeployCommand-4RSVHCYL.js.map
|
|
171
|
+
//# sourceMappingURL=siteDeployCommand-4RSVHCYL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/maybeUpdateJemmaCustomMetadata.ts","../../src/commands/site/deploy/siteDeployCommand.mts"],"names":["consola","fs2"],"mappings":";;;;;;;;;;;;AAoBA,IAAM,8BAAiC,GAAA,gCAAA;AAehC,SAAS,8BAA+B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A,EAAA,WAAA,CAAY,aAAa,KAAO,EAAA;AAAA,MACrD,MAAQ,EAAA;AAAA,KACT,CAAC,CAAe,YAAA,EAAA,YAAA,CAAa,SAAS,CAAQ,MAAA,CAAA,CAAA;AAAA,GAChD,CAAA;AACH;AACA,SAAS,WAAA,CAAY,OAAO,IAAM,EAAA;AAChC,EAAAA,QAAQ,GAAI,CAAA;AAAA,IACV,OAAA,EAAS,GAAG,KAAK;;AAAA,EAAO,QAAA,CAAS,OAAS,EAAA,IAAI,CAAC,CAAA,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,CAAA;AAAA,MACT,WAAa,EAAA,OAAA;AAAA,MACb,WAAa,EAAA;AAAA;AACf,GACD,CAAA;AACH","file":"siteDeployCommand-Q3UL7QE6.js","sourcesContent":["/*\n * Copyright 2025 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 * as fs from \"node:fs\";\n\n// Environment variable names\nconst JEMMA_JOB_CUSTOM_METADATA_PATH = \"JEMMA_JOB_CUSTOM_METADATA_PATH\";\n\n/**\n * Writes the site link to the custom metadata file (if the path is provided by the JEMMA_JOB_CUSTOM_METADATA_PATH environment variable).\n *\n * The custom metadata file will be updated with the following format:\n *\n * {\n * \"siteLink\": \"https://example.com\",\n * \"siteVersion\": \"1.0.0\"\n * }\n *\n * @param siteLink The site link to write to the custom metadata file.\n * @param siteVersion The site version to write to the custom metadata file.\n */\nexport function maybeUpdateJemmaCustomMetadata({\n siteLink,\n siteVersion\n}) {\n const jemmaCustomMetadataFilePath = getJemmaCustomMetadataFilePath();\n if (jemmaCustomMetadataFilePath == null) {\n return;\n }\n try {\n // Read or create the custom metadata file\n const customMetadata = getOrCreateCustomMetadata(jemmaCustomMetadataFilePath);\n\n // Set the site link in the custom metadata\n customMetadata.siteLink = siteLink;\n customMetadata.siteVersion = siteVersion;\n\n // Write the custom metadata to the file\n writeCustomMetadata(jemmaCustomMetadataFilePath, customMetadata);\n } catch (err) {\n consola.error(`Failed to update custom metadata file at ${jemmaCustomMetadataFilePath}`);\n }\n}\nfunction getJemmaCustomMetadataFilePath() {\n return process.env[JEMMA_JOB_CUSTOM_METADATA_PATH];\n}\nfunction getOrCreateCustomMetadata(jemmaCustomMetadataFilePath) {\n try {\n const parsedValue = JSON.parse(fs.readFileSync(jemmaCustomMetadataFilePath, \"utf-8\"));\n return typeof parsedValue === \"object\" && parsedValue != null ? parsedValue : {};\n } catch (e) {\n return {};\n }\n}\nfunction writeCustomMetadata(jemmaCustomMetadataFilePath, customMetadata) {\n fs.writeFileSync(jemmaCustomMetadataFilePath, JSON.stringify(customMetadata, null, 2));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { autoVersion, AutoVersionError } from \"@osdk/foundry-config-json\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport prettyBytes from \"pretty-bytes\";\nimport { maybeUpdateJemmaCustomMetadata } from \"../../../util/maybeUpdateJemmaCustomMetadata.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n snapshot,\n snapshotId,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n if (snapshot) {\n await uploadSnapshot(clientCtx, application, siteVersion, snapshotId ?? \"\", archive);\n consola.info(\"Snapshot mode enabled, skipping deployment\");\n return;\n }\n await upload(clientCtx, application, siteVersion, archive);\n let siteLink;\n if (!uploadOnly) {\n const website = await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version: siteVersion\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n const domain = website.subdomains[0];\n if (domain != null) {\n siteLink = `https://${domain}`;\n logSiteLink(\"View live site:\", siteLink);\n }\n } else {\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const domain = website?.subdomains[0];\n consola.info(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n siteLink = `https://${domain}/.system/preview?previewVersion=${siteVersion}`;\n logSiteLink(\"Preview link:\", siteLink);\n }\n }\n\n // Write the site link and version to the custom metadata file when the site link is present\n if (siteLink != null) {\n maybeUpdateJemmaCustomMetadata({\n siteLink,\n siteVersion\n });\n }\n}\nasync function findAutoVersion(config) {\n try {\n return await autoVersion(config);\n } catch (e) {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined, e instanceof AutoVersionError ? e.tip : undefined);\n }\n}\nasync function uploadSnapshot(clientCtx, application, siteVersion, snapshotId, archive) {\n consola.start(\"Uploading snapshot site files\");\n await Promise.all([thirdPartyApplications.uploadSnapshotVersion(clientCtx, application, siteVersion, snapshotId, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Snapshot upload complete\");\n}\nasync function upload(clientCtx, application, siteVersion, archive) {\n consola.start(\"Uploading site files\");\n await Promise.all([thirdPartyApplications.uploadVersion(clientCtx, application, siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.info(`Zipped ${prettyBytes(archiveStats.bytes, {\n binary: true\n })} total over ${archiveStats.fileCount} files`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/util/maybeUpdateJemmaCustomMetadata.ts","../../src/commands/site/deploy/siteDeployCommand.mts"],"names":["consola","fs2"],"mappings":";;;;;;;;;;;;AAoBA,IAAM,8BAAiC,GAAA,gCAAA;AAehC,SAAS,8BAA+B,CAAA;AAAA,EAC7C,QAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,8BAA8B,8BAA+B,EAAA;AACnE,EAAA,IAAI,+BAA+B,IAAM,EAAA;AACvC,IAAA;AAAA;AAEF,EAAI,IAAA;AAEF,IAAM,MAAA,cAAA,GAAiB,0BAA0B,2BAA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AAAA,QAAQ,GAAI,CAAA;AAAA,IACV,OAAA,EAAS,GAAG,KAAK;;AAAA,EAAO,QAAA,CAAS,OAAS,EAAA,IAAI,CAAC,CAAA,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,CAAA;AAAA,MACT,WAAa,EAAA,OAAA;AAAA,MACb,WAAa,EAAA;AAAA;AACf,GACD,CAAA;AACH","file":"siteDeployCommand-4RSVHCYL.js","sourcesContent":["/*\n * Copyright 2025 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 * as fs from \"node:fs\";\n\n// Environment variable names\nconst JEMMA_JOB_CUSTOM_METADATA_PATH = \"JEMMA_JOB_CUSTOM_METADATA_PATH\";\n\n/**\n * Writes the site link to the custom metadata file (if the path is provided by the JEMMA_JOB_CUSTOM_METADATA_PATH environment variable).\n *\n * The custom metadata file will be updated with the following format:\n *\n * {\n * \"siteLink\": \"https://example.com\",\n * \"siteVersion\": \"1.0.0\"\n * }\n *\n * @param siteLink The site link to write to the custom metadata file.\n * @param siteVersion The site version to write to the custom metadata file.\n */\nexport function maybeUpdateJemmaCustomMetadata({\n siteLink,\n siteVersion\n}) {\n const jemmaCustomMetadataFilePath = getJemmaCustomMetadataFilePath();\n if (jemmaCustomMetadataFilePath == null) {\n return;\n }\n try {\n // Read or create the custom metadata file\n const customMetadata = getOrCreateCustomMetadata(jemmaCustomMetadataFilePath);\n\n // Set the site link in the custom metadata\n customMetadata.siteLink = siteLink;\n customMetadata.siteVersion = siteVersion;\n\n // Write the custom metadata to the file\n writeCustomMetadata(jemmaCustomMetadataFilePath, customMetadata);\n } catch (err) {\n consola.error(`Failed to update custom metadata file at ${jemmaCustomMetadataFilePath}`);\n }\n}\nfunction getJemmaCustomMetadataFilePath() {\n return process.env[JEMMA_JOB_CUSTOM_METADATA_PATH];\n}\nfunction getOrCreateCustomMetadata(jemmaCustomMetadataFilePath) {\n try {\n const parsedValue = JSON.parse(fs.readFileSync(jemmaCustomMetadataFilePath, \"utf-8\"));\n return typeof parsedValue === \"object\" && parsedValue != null ? parsedValue : {};\n } catch (e) {\n return {};\n }\n}\nfunction writeCustomMetadata(jemmaCustomMetadataFilePath, customMetadata) {\n fs.writeFileSync(jemmaCustomMetadataFilePath, JSON.stringify(customMetadata, null, 2));\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { autoVersion, AutoVersionError } from \"@osdk/foundry-config-json\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport prettyBytes from \"pretty-bytes\";\nimport { maybeUpdateJemmaCustomMetadata } from \"../../../util/maybeUpdateJemmaCustomMetadata.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n snapshot,\n snapshotId,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n if (snapshot) {\n await uploadSnapshot(clientCtx, application, siteVersion, snapshotId ?? \"\", archive);\n consola.info(\"Snapshot mode enabled, skipping deployment\");\n return;\n }\n await upload(clientCtx, application, siteVersion, archive);\n let siteLink;\n if (!uploadOnly) {\n const website = await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version: siteVersion\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n const domain = website.subdomains[0];\n if (domain != null) {\n siteLink = `https://${domain}`;\n logSiteLink(\"View live site:\", siteLink);\n }\n } else {\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const domain = website?.subdomains[0];\n consola.info(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n siteLink = `https://${domain}/.system/preview?previewVersion=${siteVersion}`;\n logSiteLink(\"Preview link:\", siteLink);\n }\n }\n\n // Write the site link and version to the custom metadata file when the site link is present\n if (siteLink != null) {\n maybeUpdateJemmaCustomMetadata({\n siteLink,\n siteVersion\n });\n }\n}\nasync function findAutoVersion(config) {\n try {\n return await autoVersion(config);\n } catch (e) {\n throw new ExitProcessError(2, e instanceof Error ? e.message : undefined, e instanceof AutoVersionError ? e.tip : undefined);\n }\n}\nasync function uploadSnapshot(clientCtx, application, siteVersion, snapshotId, archive) {\n consola.start(\"Uploading snapshot site files\");\n await Promise.all([thirdPartyApplications.uploadSnapshotVersion(clientCtx, application, siteVersion, snapshotId, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Snapshot upload complete\");\n}\nasync function upload(clientCtx, application, siteVersion, archive) {\n consola.start(\"Uploading site files\");\n await Promise.all([thirdPartyApplications.uploadVersion(clientCtx, application, siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.info(`Zipped ${prettyBytes(archiveStats.bytes, {\n binary: true\n })} total over ${archiveStats.fileCount} files`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-FQRKVHAE.js';
|
|
2
|
-
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-TUUWLZNZ.js';
|
|
3
3
|
import './chunk-PZ5AY32C.js';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
@@ -29,5 +29,5 @@ ${colorize("bold", "This action cannot be undone.")}`, {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { versionDeleteCommand as default };
|
|
32
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
33
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
32
|
+
//# sourceMappingURL=versionDeleteCommand-E7XUIDUE.js.map
|
|
33
|
+
//# sourceMappingURL=versionDeleteCommand-E7XUIDUE.js.map
|
package/build/esm/{versionDeleteCommand-EDZA5XO5.js.map → versionDeleteCommand-E7XUIDUE.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/widgetset/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAA,MAAM,SAAY,GAAA,MAAM,OAAQ,CAAA,MAAA,CAAO,+CAA+C,OAAO,CAAA;AAAA,EAAM,QAAS,CAAA,MAAA,EAAQ,+BAA+B,CAAC,CAAI,CAAA,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA;AAAA,KACT,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA;AAAA;AAE9B,EAAQ,OAAA,CAAA,KAAA,CAAM,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC3C,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,MAAM,uBAAe,CAAA,aAAA,CAAc,SAAW,EAAA,SAAA,EAAW,OAAO,CAAA;AAChE,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/widgetset/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAA,MAAM,SAAY,GAAA,MAAM,OAAQ,CAAA,MAAA,CAAO,+CAA+C,OAAO,CAAA;AAAA,EAAM,QAAS,CAAA,MAAA,EAAQ,+BAA+B,CAAC,CAAI,CAAA,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA;AAAA,KACT,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA;AAAA;AAE9B,EAAQ,OAAA,CAAA,KAAA,CAAM,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC3C,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,MAAM,uBAAe,CAAA,aAAA,CAAc,SAAW,EAAA,SAAA,EAAW,OAAO,CAAA;AAChE,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-E7XUIDUE.js","sourcesContent":["/*\n * Copyright 2025 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, widgetRegistry } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n widgetSet,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\",\n cancel: \"symbol\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await widgetRegistry.deleteRelease(clientCtx, widgetSet, version);\n consola.success(`Deleted version ${version}`);\n}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-FQRKVHAE.js';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
3
3
|
import './chunk-PZ5AY32C.js';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
@@ -29,5 +29,5 @@ ${colorize("bold", "This action cannot be undone.")}`, {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { versionDeleteCommand as default };
|
|
32
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
33
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
32
|
+
//# sourceMappingURL=versionDeleteCommand-ZDSYOJVF.js.map
|
|
33
|
+
//# sourceMappingURL=versionDeleteCommand-ZDSYOJVF.js.map
|
package/build/esm/{versionDeleteCommand-3OTXGFAR.js.map → versionDeleteCommand-ZDSYOJVF.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAA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,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA;AAAA,KACT,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA;AAAA;AAE9B,EAAQ,OAAA,CAAA,KAAA,CAAM,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC3C,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,MAAM,gCAAuB,CAAA,aAAA,CAAc,SAAW,EAAA,WAAA,EAAa,OAAO,CAAA;AAC1E,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-ZDSYOJVF.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\",\n cancel: \"symbol\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await thirdPartyApplications.deleteVersion(clientCtx, application, version);\n consola.success(`Deleted version ${version}`);\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
|
|
@@ -22,5 +22,5 @@ async function versionGetCommand({
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export { versionGetCommand as default };
|
|
25
|
-
//# sourceMappingURL=versionGetCommand-
|
|
26
|
-
//# sourceMappingURL=versionGetCommand-
|
|
25
|
+
//# sourceMappingURL=versionGetCommand-3FJSCGFI.js.map
|
|
26
|
+
//# sourceMappingURL=versionGetCommand-3FJSCGFI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAM,gCAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAA,OAAA,CAAQ,KAAK,0BAA0B,CAAA;AAAA,GAClC,MAAA;AACL,IAAQ,OAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA;AAAA;AAE7D","file":"versionGetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAM,gCAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAA,OAAA,CAAQ,KAAK,0BAA0B,CAAA;AAAA,GAClC,MAAA;AACL,IAAQ,OAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA;AAAA;AAE7D","file":"versionGetCommand-3FJSCGFI.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionGetCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Getting live version\");\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const deployedVersion = website?.deployedVersion;\n if (!deployedVersion) {\n consola.info(\"No live site version set\");\n } else {\n consola.success(`Live site version is ${deployedVersion}`);\n }\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
|
|
@@ -19,5 +19,5 @@ async function versionInfoCommand({
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export { versionInfoCommand as default };
|
|
22
|
-
//# sourceMappingURL=versionInfoCommand-
|
|
23
|
-
//# sourceMappingURL=versionInfoCommand-
|
|
22
|
+
//# sourceMappingURL=versionInfoCommand-3NHIQCD4.js.map
|
|
23
|
+
//# sourceMappingURL=versionInfoCommand-3NHIQCD4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/widgetset/version/info/versionInfoCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,OAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA;AACpC,EAAA,MAAM,WAAW,MAAM,uBAAA,CAAe,UAAW,CAAA,SAAA,EAAW,WAAW,OAAO,CAAA;AAC9E,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAA2B,wBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AACpD,EAAA,OAAA,CAAQ,IAAI,IAAK,CAAA,SAAA,CAAU,QAAU,EAAA,IAAA,EAAM,CAAC,CAAC,CAAA;AAC/C","file":"versionInfoCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/widgetset/version/info/versionInfoCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,OAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,sBAAsB,CAAA;AACpC,EAAA,MAAM,WAAW,MAAM,uBAAA,CAAe,UAAW,CAAA,SAAA,EAAW,WAAW,OAAO,CAAA;AAC9E,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAA2B,wBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AACpD,EAAA,OAAA,CAAQ,IAAI,IAAK,CAAA,SAAA,CAAU,QAAU,EAAA,IAAA,EAAM,CAAC,CAAC,CAAA;AAC/C","file":"versionInfoCommand-3NHIQCD4.js","sourcesContent":["/*\n * Copyright 2025 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, widgetRegistry } from \"#net\";\nimport { consola } from \"consola\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionInfoCommand({\n version,\n foundryUrl,\n widgetSet,\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(\"Loading version info\");\n const response = await widgetRegistry.getRelease(clientCtx, widgetSet, version);\n consola.success(`Loaded version info for ${version}`);\n consola.log(JSON.stringify(response, null, 2));\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
import { colorize } from 'consola/utils';
|
|
@@ -27,5 +27,5 @@ async function versionListCommand({
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { versionListCommand as default };
|
|
30
|
-
//# sourceMappingURL=versionListCommand-
|
|
31
|
-
//# sourceMappingURL=versionListCommand-
|
|
30
|
+
//# sourceMappingURL=versionListCommand-FN6U7DQW.js.map
|
|
31
|
+
//# sourceMappingURL=versionListCommand-FN6U7DQW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;AAoBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,UAAA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CAAA,CAAA;AAAA;AAE7I","file":"versionListCommand-FN6U7DQW.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { 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,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
|
|
@@ -26,5 +26,5 @@ async function versionListCommand({
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export { versionListCommand as default };
|
|
29
|
-
//# sourceMappingURL=versionListCommand-
|
|
30
|
-
//# sourceMappingURL=versionListCommand-
|
|
29
|
+
//# sourceMappingURL=versionListCommand-NYIQZT3U.js.map
|
|
30
|
+
//# sourceMappingURL=versionListCommand-NYIQZT3U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/widgetset/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,UAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,mBAAmB,CAAA;AACjC,EAAA,MAAM,QAAW,GAAA,MAAM,uBAAe,CAAA,YAAA,CAAa,WAAW,SAAS,CAAA;AACvE,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAA,OAAA,CAAQ,KAAK,8BAA8B,CAAA;AAC3C,IAAA;AAAA;AAEF,EAAA,OAAA,CAAQ,QAAQ,iBAAiB,CAAA;AACjC,EAAM,MAAA,MAAA,GAAS,MAAM,OAAO,QAAQ,CAAA;AACpC,EAAA,MAAM,iBAAiB,MAAO,CAAA,KAAA,CAAM,QAAS,CAAA,IAAA,CAAK,IAAI,CAAK,CAAA,KAAA,CAAA,CAAE,OAAO,CAAA,CAAE,OAAO,CAAK,CAAA,KAAA,MAAA,CAAO,KAAM,CAAA,CAAC,CAAC,CAAC,CAAA;AAClG,EAAA,KAAA,MAAW,WAAW,cAAgB,EAAA;AACpC,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAS,MAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAAA;AAElC","file":"versionListCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/widgetset/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,UAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,mBAAmB,CAAA;AACjC,EAAA,MAAM,QAAW,GAAA,MAAM,uBAAe,CAAA,YAAA,CAAa,WAAW,SAAS,CAAA;AACvE,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAA,OAAA,CAAQ,KAAK,8BAA8B,CAAA;AAC3C,IAAA;AAAA;AAEF,EAAA,OAAA,CAAQ,QAAQ,iBAAiB,CAAA;AACjC,EAAM,MAAA,MAAA,GAAS,MAAM,OAAO,QAAQ,CAAA;AACpC,EAAA,MAAM,iBAAiB,MAAO,CAAA,KAAA,CAAM,QAAS,CAAA,IAAA,CAAK,IAAI,CAAK,CAAA,KAAA,CAAA,CAAE,OAAO,CAAA,CAAE,OAAO,CAAK,CAAA,KAAA,MAAA,CAAO,KAAM,CAAA,CAAC,CAAC,CAAC,CAAA;AAClG,EAAA,KAAA,MAAW,WAAW,cAAgB,EAAA;AACpC,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAS,MAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAAA;AAElC","file":"versionListCommand-NYIQZT3U.js","sourcesContent":["/*\n * Copyright 2025 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, widgetRegistry } from \"#net\";\nimport { consola } from \"consola\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionListCommand({\n foundryUrl,\n widgetSet,\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\");\n const response = await widgetRegistry.listReleases(clientCtx, widgetSet);\n if (response.data.length === 0) {\n consola.info(\"No widget set versions found\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(response.data.map(v => v.version).filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}`);\n }\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { consola } from 'consola';
|
|
4
4
|
|
|
@@ -22,5 +22,5 @@ async function versionSetCommand({
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export { versionSetCommand as default };
|
|
25
|
-
//# sourceMappingURL=versionSetCommand-
|
|
26
|
-
//# sourceMappingURL=versionSetCommand-
|
|
25
|
+
//# sourceMappingURL=versionSetCommand-OZDYOLQB.js.map
|
|
26
|
+
//# sourceMappingURL=versionSetCommand-OZDYOLQB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,OAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAA,gCAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE;AAAA,KACD,CAAA;AAAA;AAEH,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAClD","file":"versionSetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,OAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAA,gCAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE;AAAA,KACD,CAAA;AAAA;AAEH,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA;AAClD","file":"versionSetCommand-OZDYOLQB.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { 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,5 +1,5 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-FQRKVHAE.js';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TUUWLZNZ.js';
|
|
3
3
|
import './chunk-PZ5AY32C.js';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
@@ -28,5 +28,5 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export { versionUnsetCommand as default };
|
|
31
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
32
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
31
|
+
//# sourceMappingURL=versionUnsetCommand-YRRYIK4E.js.map
|
|
32
|
+
//# sourceMappingURL=versionUnsetCommand-YRRYIK4E.js.map
|
package/build/esm/{versionUnsetCommand-SVRXQFWT.js.map → versionUnsetCommand-YRRYIK4E.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAM,MAAA,SAAA,GAAY,MAAM,OAAA,CAAQ,MAAO,CAAA,CAAA;AAAA,EAA0D,QAAS,CAAA,MAAA,EAAQ,8EAA8E,CAAC,CAAI,CAAA,EAAA;AAAA,MACnM,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA;AAAA,KACT,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA;AAAA;AAE9B,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,4BAA4B,CAAA;AAC1C,EAAM,MAAA,gCAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA;AACnE,EAAA,OAAA,CAAQ,QAAQ,2BAA2B,CAAA;AAC7C","file":"versionUnsetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAM,MAAA,SAAA,GAAY,MAAM,OAAA,CAAQ,MAAO,CAAA,CAAA;AAAA,EAA0D,QAAS,CAAA,MAAA,EAAQ,8EAA8E,CAAC,CAAI,CAAA,EAAA;AAAA,MACnM,IAAM,EAAA,SAAA;AAAA,MACN,MAAQ,EAAA;AAAA,KACT,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA;AAAA;AAE9B,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,4BAA4B,CAAA;AAC1C,EAAM,MAAA,gCAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA;AACnE,EAAA,OAAA,CAAQ,QAAQ,2BAA2B,CAAA;AAC7C","file":"versionUnsetCommand-YRRYIK4E.js","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { 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 cancel: \"symbol\"\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,4 +1,4 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-TUUWLZNZ.js';
|
|
2
2
|
import './chunk-PZ5AY32C.js';
|
|
3
3
|
import { ExitProcessError } from '@osdk/cli.common';
|
|
4
4
|
import { MANIFEST_FILE_LOCATION } from '@osdk/widget.api';
|
|
@@ -76,5 +76,5 @@ function logArchiveStats(archive) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { widgetSetDeployCommand as default };
|
|
79
|
-
//# sourceMappingURL=widgetSetDeployCommand-
|
|
80
|
-
//# sourceMappingURL=widgetSetDeployCommand-
|
|
79
|
+
//# sourceMappingURL=widgetSetDeployCommand-UE2GYNU4.js.map
|
|
80
|
+
//# sourceMappingURL=widgetSetDeployCommand-UE2GYNU4.js.map
|
package/build/esm/{widgetSetDeployCommand-EQGHAAOD.js.map → widgetSetDeployCommand-UE2GYNU4.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/widgetset/deploy/widgetSetDeployCommand.mts"],"names":[],"mappings":";;;;;;;;;;;AA0BA,eAAO,sBAA8C,CAAA;AAAA,EACnD,SAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO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AAA,IACjB,SAAW,EAAA,CAAA;AAAA,IACX,KAAO,EAAA;AAAA,GACT;AACA,EAAQ,OAAA,CAAA,EAAA,CAAG,YAAY,CAAY,QAAA,KAAA;AACjC,IAAe,YAAA,GAAA;AAAA,MACb,SAAA,EAAW,SAAS,OAAQ,CAAA,KAAA;AAAA,MAC5B,KAAA,EAAO,SAAS,EAAG,CAAA;AAAA,KACrB;AAAA,GACD,CAAA;AACD,EAAQ,OAAA,CAAA,EAAA,CAAG,UAAU,MAAM;AACzB,IAAA,OAAA,CAAQ,IAAK,CAAA,CAAA,OAAA,EAAU,WAAY,CAAA,YAAA,CAAa,KAAO,EAAA;AAAA,MACrD,MAAQ,EAAA;AAAA,KACT,CAAC,CAAe,YAAA,EAAA,YAAA,CAAa,SAAS,CAAQ,MAAA,CAAA,CAAA;AAAA,GAChD,CAAA;AACH","file":"widgetSetDeployCommand-UE2GYNU4.js","sourcesContent":["/*\n * Copyright 2025 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, widgetRegistry } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { MANIFEST_FILE_LOCATION } from \"@osdk/widget.api\";\nimport archiver from \"archiver\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport prettyBytes from \"pretty-bytes\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function widgetSetDeployCommand({\n widgetSet,\n foundryUrl,\n directory,\n repository,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.debug(`Using directory for widget set files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n const widgetSetVersion = await findWidgetSetVersion(directory);\n consola.info(`Found version from manifest: ${widgetSetVersion}`);\n consola.start(\"Zipping widget set files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n let deployRid = widgetSet;\n if (repository != null) {\n deployRid = repository;\n consola.debug(`Deploying to repository ${repository} for ${widgetSet}`);\n }\n consola.start(\"Publishing widget set files\");\n await Promise.all([widgetRegistry.publishRelease(clientCtx, deployRid, widgetSetVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Publish complete\");\n}\nasync function findWidgetSetVersion(directory) {\n try {\n const manifestContent = await fs.promises.readFile(path.resolve(directory, MANIFEST_FILE_LOCATION), \"utf8\");\n const manifest = JSON.parse(manifestContent);\n if (manifest.widgetSet == null || manifest.widgetSet.version == null) {\n throw new Error(`Unable to find widget set version in manifest`);\n }\n return manifest.widgetSet.version;\n } catch (e) {\n throw new ExitProcessError(2, `Unable to process manifest at ${MANIFEST_FILE_LOCATION}${e instanceof Error ? `: ${e.message}` : \"\"}`);\n }\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.info(`Zipped ${prettyBytes(archiveStats.bytes, {\n binary: true\n })} total over ${archiveStats.fileCount} files`);\n });\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.32.0
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@types/yargs": "^17.0.33",
|
|
44
44
|
"ts-expect": "^1.3.0",
|
|
45
45
|
"typescript": "~5.5.4",
|
|
46
|
-
"@osdk/cli.cmd.typescript": "~0.32.0
|
|
47
|
-
"@osdk/
|
|
48
|
-
"@osdk/foundry-config-json": "~1.7.0
|
|
49
|
-
"@osdk/shared.net.errors": "~2.8.0
|
|
50
|
-
"@osdk/
|
|
51
|
-
"@osdk/
|
|
52
|
-
"@osdk/
|
|
53
|
-
"@osdk/
|
|
46
|
+
"@osdk/cli.cmd.typescript": "~0.32.0",
|
|
47
|
+
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
48
|
+
"@osdk/foundry-config-json": "~1.7.0",
|
|
49
|
+
"@osdk/shared.net.errors": "~2.8.0",
|
|
50
|
+
"@osdk/cli.common": "~0.32.0",
|
|
51
|
+
"@osdk/shared.net.fetch": "~1.8.0",
|
|
52
|
+
"@osdk/widget.api": "~3.5.0",
|
|
53
|
+
"@osdk/monorepo.tsconfig": "~0.7.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|