@osdk/cli 0.30.0-beta.4 → 0.30.0-beta.5
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 +2 -0
- package/build/esm/{chunk-N5LHEWKB.js → chunk-QF7ZE76L.js} +3 -3
- package/build/esm/{chunk-N5LHEWKB.js.map → chunk-QF7ZE76L.js.map} +1 -1
- package/build/esm/{handleGenerate-JPPLOV2Q.js → handleGenerate-2D5KHHGM.js} +27 -28
- package/build/esm/handleGenerate-2D5KHHGM.js.map +1 -0
- package/build/esm/index.js +12 -12
- package/build/esm/index.js.map +1 -1
- package/build/esm/{siteDeployCommand-RF4STCW4.js → siteDeployCommand-6YLGGGEI.js} +3 -3
- package/build/esm/{siteDeployCommand-RF4STCW4.js.map → siteDeployCommand-6YLGGGEI.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-2BWX5IXZ.js → versionDeleteCommand-DM4LX6CQ.js} +3 -3
- package/build/esm/{versionDeleteCommand-2BWX5IXZ.js.map → versionDeleteCommand-DM4LX6CQ.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-4RHUCT5B.js → versionDeleteCommand-TKG4KWL2.js} +3 -3
- package/build/esm/{versionDeleteCommand-4RHUCT5B.js.map → versionDeleteCommand-TKG4KWL2.js.map} +1 -1
- package/build/esm/{versionGetCommand-ASKCA5FI.js → versionGetCommand-VXQMS5WC.js} +3 -3
- package/build/esm/{versionGetCommand-ASKCA5FI.js.map → versionGetCommand-VXQMS5WC.js.map} +1 -1
- package/build/esm/{versionInfoCommand-6M4XX5AI.js → versionInfoCommand-ZYIUCNW4.js} +3 -3
- package/build/esm/{versionInfoCommand-6M4XX5AI.js.map → versionInfoCommand-ZYIUCNW4.js.map} +1 -1
- package/build/esm/{versionListCommand-CEHTZ4H7.js → versionListCommand-HLNKYD4F.js} +3 -3
- package/build/esm/{versionListCommand-CEHTZ4H7.js.map → versionListCommand-HLNKYD4F.js.map} +1 -1
- package/build/esm/{versionListCommand-GWE5VFPG.js → versionListCommand-RBFAVV6A.js} +3 -3
- package/build/esm/{versionListCommand-GWE5VFPG.js.map → versionListCommand-RBFAVV6A.js.map} +1 -1
- package/build/esm/{versionSetCommand-TTVBWEVF.js → versionSetCommand-2Z34Y3LX.js} +3 -3
- package/build/esm/{versionSetCommand-TTVBWEVF.js.map → versionSetCommand-2Z34Y3LX.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-AJDDKDSD.js → versionUnsetCommand-CTKP5I3X.js} +3 -3
- package/build/esm/{versionUnsetCommand-AJDDKDSD.js.map → versionUnsetCommand-CTKP5I3X.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-MGK7BTNO.js → widgetSetDeployCommand-MVO5GNL6.js} +3 -3
- package/build/esm/{widgetSetDeployCommand-MGK7BTNO.js.map → widgetSetDeployCommand-MVO5GNL6.js.map} +1 -1
- package/package.json +6 -6
- package/build/esm/handleGenerate-JPPLOV2Q.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -37,7 +37,7 @@ init_esm_shims();
|
|
|
37
37
|
|
|
38
38
|
// src/net/UserAgent.ts
|
|
39
39
|
init_esm_shims();
|
|
40
|
-
var USER_AGENT = `osdk-cli/${"0.30.0-beta.
|
|
40
|
+
var USER_AGENT = `osdk-cli/${"0.30.0-beta.5"}`;
|
|
41
41
|
|
|
42
42
|
// src/net/createFetch.mts
|
|
43
43
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -346,5 +346,5 @@ function isJWT(token) {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
export { createInternalClientContext, loadToken, third_party_applications_exports, widget_registry_exports };
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
350
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-QF7ZE76L.js.map
|
|
350
|
+
//# sourceMappingURL=chunk-QF7ZE76L.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/createInternalClientContext.mts","../../src/net/third-party-applications/index.mts","../../src/net/third-party-applications/deleteVersion.mts","../../src/net/createFetch.mts","../../src/net/UserAgent.ts","../../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/net/index.mts","../../src/util/token.ts"],"names":["fetch","consola","fsPromises"],"mappings":";;;;;;;;;;AAAA,cAAA,EAAA;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;AAAA,cAAA,EAAA;;;ACAA,cAAA,EAAA;;;ACAA,cAAA,EAAA;;;ACAA,cAAA,EAAA;AAgBO,IAAM,UAAA,GAAa,YAAY,eAA2B,CAAA,CAAA;;;ADO1D,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,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AAErE;AACA,SAAS,MAAM,KAAO,EAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,kDAAA;AACnB,EAAO,OAAA,UAAA,CAAW,KAAK,KAAK,CAAA;AAC9B","file":"chunk-N5LHEWKB.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 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 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 {\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 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function 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\nexport { createInternalClientContext } from \"./createInternalClientContext.mjs\";\nexport * as thirdPartyApplications from \"./third-party-applications/index.mjs\";\nexport * as widgetRegistry from \"./widget-registry/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { 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/third-party-applications/deleteVersion.mts","../../src/net/createFetch.mts","../../src/net/UserAgent.ts","../../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/net/index.mts","../../src/util/token.ts"],"names":["fetch","consola","fsPromises"],"mappings":";;;;;;;;;;AAAA,cAAA,EAAA;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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Q,MAAM,IAAK,EAAA;AAAA,WACZ,KAAO,EAAA;AACd,IAAA,MAAM,IAAI,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,IAAI,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-QF7ZE76L.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 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 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 {\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 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function 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\nexport { createInternalClientContext } from \"./createInternalClientContext.mjs\";\nexport * as thirdPartyApplications from \"./third-party-applications/index.mjs\";\nexport * as widgetRegistry from \"./widget-registry/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { 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}"]}
|
|
@@ -54,10 +54,10 @@ var require_fast_deep_equal = __commonJS({
|
|
|
54
54
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
55
55
|
init_esm_shims();
|
|
56
56
|
|
|
57
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
57
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
|
|
58
58
|
init_esm_shims();
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
60
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
61
61
|
init_esm_shims();
|
|
62
62
|
|
|
63
63
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
@@ -166,43 +166,43 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
166
166
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
169
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeFullMetadata.js
|
|
170
170
|
init_esm_shims();
|
|
171
171
|
|
|
172
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
172
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
173
173
|
init_esm_shims();
|
|
174
174
|
|
|
175
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
175
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
176
176
|
init_esm_shims();
|
|
177
177
|
|
|
178
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
178
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
179
179
|
init_esm_shims();
|
|
180
180
|
|
|
181
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
181
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/CipherTextProperty.js
|
|
182
182
|
init_esm_shims();
|
|
183
183
|
|
|
184
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
184
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
185
185
|
init_esm_shims();
|
|
186
186
|
|
|
187
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
187
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
188
188
|
init_esm_shims();
|
|
189
189
|
|
|
190
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
190
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
191
191
|
init_esm_shims();
|
|
192
192
|
|
|
193
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
193
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
194
194
|
init_esm_shims();
|
|
195
195
|
|
|
196
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
196
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
197
197
|
init_esm_shims();
|
|
198
198
|
|
|
199
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
199
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
200
200
|
init_esm_shims();
|
|
201
201
|
|
|
202
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
202
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
|
|
203
203
|
init_esm_shims();
|
|
204
204
|
|
|
205
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
205
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
206
206
|
var OntologyV2_exports = {};
|
|
207
207
|
__export(OntologyV2_exports, {
|
|
208
208
|
get: () => get,
|
|
@@ -228,19 +228,19 @@ function loadMetadata($ctx, ...args) {
|
|
|
228
228
|
return foundryPlatformFetch($ctx, _loadMetadata, ...args);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
231
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyValueType.js
|
|
232
232
|
init_esm_shims();
|
|
233
233
|
|
|
234
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
234
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
235
235
|
init_esm_shims();
|
|
236
236
|
|
|
237
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
237
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
238
238
|
init_esm_shims();
|
|
239
239
|
|
|
240
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
240
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
241
241
|
init_esm_shims();
|
|
242
242
|
|
|
243
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
243
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.41.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
244
244
|
init_esm_shims();
|
|
245
245
|
|
|
246
246
|
// ../generator/build/esm/index.js
|
|
@@ -965,8 +965,7 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
|
|
|
965
965
|
return {
|
|
966
966
|
array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
|
|
967
967
|
type: "array",
|
|
968
|
-
nullable: isNullableQueryDataType(input.subType)
|
|
969
|
-
multiplicity: true
|
|
968
|
+
nullable: isNullableQueryDataType(input.subType)
|
|
970
969
|
};
|
|
971
970
|
case "set":
|
|
972
971
|
return {
|
|
@@ -19035,7 +19034,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
19035
19034
|
|
|
19036
19035
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
19037
19036
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
19038
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.30.0-beta.
|
|
19037
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.30.0-beta.5"}`;
|
|
19039
19038
|
async function handleGenerate(args) {
|
|
19040
19039
|
let success = false;
|
|
19041
19040
|
if (args.ontologyPath) {
|
|
@@ -19175,7 +19174,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
19175
19174
|
}
|
|
19176
19175
|
return true;
|
|
19177
19176
|
}
|
|
19178
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.30.0-beta.
|
|
19177
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.30.0-beta.5", args.externalObjects, args.externalInterfaces);
|
|
19179
19178
|
return true;
|
|
19180
19179
|
} catch (e) {
|
|
19181
19180
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -19202,8 +19201,8 @@ async function getDependencyVersions() {
|
|
|
19202
19201
|
typescriptVersion,
|
|
19203
19202
|
tslibVersion,
|
|
19204
19203
|
areTheTypesWrongVersion,
|
|
19205
|
-
osdkApiVersion: `^${"2.6.0-beta.
|
|
19206
|
-
osdkClientVersion: `^${"2.6.0-beta.
|
|
19204
|
+
osdkApiVersion: `^${"2.6.0-beta.13"}`,
|
|
19205
|
+
osdkClientVersion: `^${"2.6.0-beta.13"}`,
|
|
19207
19206
|
osdkLegacyClientVersion
|
|
19208
19207
|
};
|
|
19209
19208
|
}
|
|
@@ -19242,5 +19241,5 @@ function createNormalFs() {
|
|
|
19242
19241
|
}
|
|
19243
19242
|
|
|
19244
19243
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
19245
|
-
//# sourceMappingURL=handleGenerate-
|
|
19246
|
-
//# sourceMappingURL=handleGenerate-
|
|
19244
|
+
//# sourceMappingURL=handleGenerate-2D5KHHGM.js.map
|
|
19245
|
+
//# sourceMappingURL=handleGenerate-2D5KHHGM.js.map
|