@osdk/cli 0.31.0 → 0.32.0-beta.2

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +3 -20
  2. package/build/esm/{chunk-TDNRRWOC.js → chunk-CKZAZPXC.js} +5 -2
  3. package/build/esm/chunk-CKZAZPXC.js.map +1 -0
  4. package/build/esm/{chunk-TSX7O7HY.js → chunk-YOTB5E2E.js} +6 -3
  5. package/build/esm/chunk-YOTB5E2E.js.map +1 -0
  6. package/build/esm/{handleGenerate-HZSOXAY7.js → handleGenerate-JM5HIHXW.js} +39 -31
  7. package/build/esm/handleGenerate-JM5HIHXW.js.map +1 -0
  8. package/build/esm/index.js +17 -13
  9. package/build/esm/index.js.map +1 -1
  10. package/build/esm/{siteDeployCommand-ZF3US2OO.js → siteDeployCommand-M5L2QJB3.js} +3 -3
  11. package/build/esm/{siteDeployCommand-ZF3US2OO.js.map → siteDeployCommand-M5L2QJB3.js.map} +1 -1
  12. package/build/esm/{versionDeleteCommand-GTGX4WSA.js → versionDeleteCommand-5UDQWHW7.js} +3 -3
  13. package/build/esm/{versionDeleteCommand-GTGX4WSA.js.map → versionDeleteCommand-5UDQWHW7.js.map} +1 -1
  14. package/build/esm/{versionDeleteCommand-KPDNFCLU.js → versionDeleteCommand-W4LWFTB7.js} +3 -3
  15. package/build/esm/{versionDeleteCommand-KPDNFCLU.js.map → versionDeleteCommand-W4LWFTB7.js.map} +1 -1
  16. package/build/esm/{versionGetCommand-CYPONYBC.js → versionGetCommand-LHHNHKGF.js} +3 -3
  17. package/build/esm/{versionGetCommand-CYPONYBC.js.map → versionGetCommand-LHHNHKGF.js.map} +1 -1
  18. package/build/esm/{versionInfoCommand-ZZ6GO7PX.js → versionInfoCommand-U3QJ7CJR.js} +3 -3
  19. package/build/esm/{versionInfoCommand-ZZ6GO7PX.js.map → versionInfoCommand-U3QJ7CJR.js.map} +1 -1
  20. package/build/esm/{versionListCommand-GMO5SYUE.js → versionListCommand-7EJ2J4JO.js} +3 -3
  21. package/build/esm/{versionListCommand-GMO5SYUE.js.map → versionListCommand-7EJ2J4JO.js.map} +1 -1
  22. package/build/esm/{versionListCommand-DAID4G25.js → versionListCommand-VQ5TRLAK.js} +3 -3
  23. package/build/esm/{versionListCommand-DAID4G25.js.map → versionListCommand-VQ5TRLAK.js.map} +1 -1
  24. package/build/esm/{versionSetCommand-3OJ335BU.js → versionSetCommand-LRLP7PHB.js} +3 -3
  25. package/build/esm/{versionSetCommand-3OJ335BU.js.map → versionSetCommand-LRLP7PHB.js.map} +1 -1
  26. package/build/esm/{versionUnsetCommand-57HRMYXS.js → versionUnsetCommand-GYOKECVD.js} +3 -3
  27. package/build/esm/{versionUnsetCommand-57HRMYXS.js.map → versionUnsetCommand-GYOKECVD.js.map} +1 -1
  28. package/build/esm/{widgetSetDeployCommand-JDUWKQMU.js → widgetSetDeployCommand-PWUXCOA7.js} +4 -4
  29. package/build/esm/{widgetSetDeployCommand-JDUWKQMU.js.map → widgetSetDeployCommand-PWUXCOA7.js.map} +1 -1
  30. package/package.json +9 -9
  31. package/build/esm/chunk-TDNRRWOC.js.map +0 -1
  32. package/build/esm/chunk-TSX7O7HY.js.map +0 -1
  33. package/build/esm/handleGenerate-HZSOXAY7.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
3
  import './chunk-BL3NTXLM.js';
4
4
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -26,5 +26,5 @@ async function versionGetCommand({
26
26
  }
27
27
 
28
28
  export { versionGetCommand as default };
29
- //# sourceMappingURL=versionGetCommand-CYPONYBC.js.map
30
- //# sourceMappingURL=versionGetCommand-CYPONYBC.js.map
29
+ //# sourceMappingURL=versionGetCommand-LHHNHKGF.js.map
30
+ //# sourceMappingURL=versionGetCommand-LHHNHKGF.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-CYPONYBC.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
+ {"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-LHHNHKGF.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-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
3
  import './chunk-BL3NTXLM.js';
4
4
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -23,5 +23,5 @@ async function versionInfoCommand({
23
23
  }
24
24
 
25
25
  export { versionInfoCommand as default };
26
- //# sourceMappingURL=versionInfoCommand-ZZ6GO7PX.js.map
27
- //# sourceMappingURL=versionInfoCommand-ZZ6GO7PX.js.map
26
+ //# sourceMappingURL=versionInfoCommand-U3QJ7CJR.js.map
27
+ //# sourceMappingURL=versionInfoCommand-U3QJ7CJR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/widgetset/version/info/versionInfoCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-ZZ6GO7PX.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
+ {"version":3,"sources":["../../src/commands/widgetset/version/info/versionInfoCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-U3QJ7CJR.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-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
3
  import './chunk-BL3NTXLM.js';
4
4
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -31,5 +31,5 @@ async function versionListCommand({
31
31
  }
32
32
 
33
33
  export { versionListCommand as default };
34
- //# sourceMappingURL=versionListCommand-GMO5SYUE.js.map
35
- //# sourceMappingURL=versionListCommand-GMO5SYUE.js.map
34
+ //# sourceMappingURL=versionListCommand-7EJ2J4JO.js.map
35
+ //# sourceMappingURL=versionListCommand-7EJ2J4JO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;AAAA,cAAA,EAAA;AAoBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,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,sCAAsC,CAAA;AACpD,EAAA,MAAM,CAAC,QAAU,EAAA,OAAO,IAAI,MAAM,OAAA,CAAQ,IAAI,CAAC,gCAAA,CAAuB,YAAa,CAAA,SAAA,EAAW,WAAW,CAAG,EAAA,gCAAA,CAAuB,WAAW,SAAW,EAAA,WAAW,CAAC,CAAC,CAAA;AACtK,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAA,OAAA,CAAQ,KAAK,wBAAwB,CAAA;AACrC,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,IAAA,OAAA,CAAQ,GAAI,CAAA,CAAA,MAAA,EAAS,OAAO,CAAA,EAAG,SAAS,eAAmB,IAAA,OAAA,KAAY,OAAS,EAAA,eAAA,GAAkB,QAAS,CAAA,OAAA,EAAS,CAAa,WAAA,CAAA,CAAA,GAAI,EAAE,CAAE,CAAA,CAAA;AAAA;AAE7I","file":"versionListCommand-GMO5SYUE.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
+ {"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;AAAA,cAAA,EAAA;AAoBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,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,sCAAsC,CAAA;AACpD,EAAA,MAAM,CAAC,QAAU,EAAA,OAAO,IAAI,MAAM,OAAA,CAAQ,IAAI,CAAC,gCAAA,CAAuB,YAAa,CAAA,SAAA,EAAW,WAAW,CAAG,EAAA,gCAAA,CAAuB,WAAW,SAAW,EAAA,WAAW,CAAC,CAAC,CAAA;AACtK,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAA,OAAA,CAAQ,KAAK,wBAAwB,CAAA;AACrC,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,IAAA,OAAA,CAAQ,GAAI,CAAA,CAAA,MAAA,EAAS,OAAO,CAAA,EAAG,SAAS,eAAmB,IAAA,OAAA,KAAY,OAAS,EAAA,eAAA,GAAkB,QAAS,CAAA,OAAA,EAAS,CAAa,WAAA,CAAA,CAAA,GAAI,EAAE,CAAE,CAAA,CAAA;AAAA;AAE7I","file":"versionListCommand-7EJ2J4JO.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-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
3
  import './chunk-BL3NTXLM.js';
4
4
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -30,5 +30,5 @@ async function versionListCommand({
30
30
  }
31
31
 
32
32
  export { versionListCommand as default };
33
- //# sourceMappingURL=versionListCommand-DAID4G25.js.map
34
- //# sourceMappingURL=versionListCommand-DAID4G25.js.map
33
+ //# sourceMappingURL=versionListCommand-VQ5TRLAK.js.map
34
+ //# sourceMappingURL=versionListCommand-VQ5TRLAK.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/widgetset/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-DAID4G25.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
+ {"version":3,"sources":["../../src/commands/widgetset/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-VQ5TRLAK.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-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
3
  import './chunk-BL3NTXLM.js';
4
4
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -26,5 +26,5 @@ async function versionSetCommand({
26
26
  }
27
27
 
28
28
  export { versionSetCommand as default };
29
- //# sourceMappingURL=versionSetCommand-3OJ335BU.js.map
30
- //# sourceMappingURL=versionSetCommand-3OJ335BU.js.map
29
+ //# sourceMappingURL=versionSetCommand-LRLP7PHB.js.map
30
+ //# sourceMappingURL=versionSetCommand-LRLP7PHB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-3OJ335BU.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
+ {"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA;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-LRLP7PHB.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-4L3JS54F.js';
2
- import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-TSX7O7HY.js';
2
+ import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-YOTB5E2E.js';
3
3
  import './chunk-W7U4ETYH.js';
4
4
  import './chunk-BL3NTXLM.js';
5
5
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
@@ -32,5 +32,5 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
32
32
  }
33
33
 
34
34
  export { versionUnsetCommand as default };
35
- //# sourceMappingURL=versionUnsetCommand-57HRMYXS.js.map
36
- //# sourceMappingURL=versionUnsetCommand-57HRMYXS.js.map
35
+ //# sourceMappingURL=versionUnsetCommand-GYOKECVD.js.map
36
+ //# sourceMappingURL=versionUnsetCommand-GYOKECVD.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAAA,cAAA,EAAA;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-57HRMYXS.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
+ {"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAAA,cAAA,EAAA;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-GYOKECVD.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,6 +1,6 @@
1
- import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-TSX7O7HY.js';
1
+ import { loadToken, createInternalClientContext, widget_registry_exports } from './chunk-YOTB5E2E.js';
2
2
  import './chunk-W7U4ETYH.js';
3
- import { MANIFEST_FILE_LOCATION } from './chunk-TDNRRWOC.js';
3
+ import { MANIFEST_FILE_LOCATION } from './chunk-CKZAZPXC.js';
4
4
  import { ExitProcessError } from './chunk-BL3NTXLM.js';
5
5
  import { init_esm_shims } from './chunk-CINFOKVJ.js';
6
6
  import archiver from 'archiver';
@@ -79,5 +79,5 @@ function logArchiveStats(archive) {
79
79
  }
80
80
 
81
81
  export { widgetSetDeployCommand as default };
82
- //# sourceMappingURL=widgetSetDeployCommand-JDUWKQMU.js.map
83
- //# sourceMappingURL=widgetSetDeployCommand-JDUWKQMU.js.map
82
+ //# sourceMappingURL=widgetSetDeployCommand-PWUXCOA7.js.map
83
+ //# sourceMappingURL=widgetSetDeployCommand-PWUXCOA7.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/widgetset/deploy/widgetSetDeployCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,cAAA,EAAA;A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AS,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-JDUWKQMU.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}"]}
1
+ {"version":3,"sources":["../../src/commands/widgetset/deploy/widgetSetDeployCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,cAAA,EAAA;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,SAAS,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,W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YAAA,CAAa,SAAS,CAAQ,MAAA,CAAA,CAAA;AAAA,GAChD,CAAA;AACH","file":"widgetSetDeployCommand-PWUXCOA7.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.31.0",
3
+ "version": "0.32.0-beta.2",
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.31.0",
47
- "@osdk/monorepo.tsconfig": "~0.6.0",
48
- "@osdk/cli.common": "~0.31.0",
49
- "@osdk/foundry-config-json": "~1.6.0",
50
- "@osdk/shared.net.fetch": "~1.7.0",
51
- "@osdk/widget.api": "~3.4.0",
52
- "@osdk/shared.net.errors": "~2.7.0",
53
- "@osdk/monorepo.api-extractor": "~0.6.0"
46
+ "@osdk/cli.cmd.typescript": "~0.32.0-beta.2",
47
+ "@osdk/cli.common": "~0.32.0-beta.2",
48
+ "@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
49
+ "@osdk/foundry-config-json": "~1.7.0-beta.1",
50
+ "@osdk/shared.net.errors": "~2.8.0-beta.1",
51
+ "@osdk/shared.net.fetch": "~1.8.0-beta.1",
52
+ "@osdk/widget.api": "~3.5.0-beta.9",
53
+ "@osdk/monorepo.tsconfig": "~0.7.0-beta.1"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../widget.api/build/esm/manifest.js","../../../widget.api/build/esm/index.js","../../../widget.api/build/esm/config.js","../../../widget.api/build/esm/messages/hostMessages.js","../../../widget.api/build/esm/messages/widgetMessages.js"],"names":[],"mappings":";;;AAAA,cAAA,EAAA;AAgBO,IAAM,sBAAyB,GAAA;;;AChBtC,cAAA,EAAA;;;ACAA,cAAA,EAAA;;;ACAA,cAAA,EAAA;AAgBO,IAAI,WAAA;AAAA,CACV,SAAU,YAAc,EAAA;AACvB,EAAA,YAAA,CAAa,OAAU,GAAA,OAAA;AACzB,CAAG,EAAA,WAAA,KAAgB,WAAc,GAAA,EAAG,CAAA,CAAA;;;ACnBpC,cAAA,EAAA","file":"chunk-TDNRRWOC.js","sourcesContent":["/*\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 const MANIFEST_FILE_LOCATION = \".palantir/widgets.config.json\";","/*\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 { defineConfig } from \"./config.js\";\nexport { MANIFEST_FILE_LOCATION } from \"./manifest.js\";\nexport { HostMessage, isHostParametersUpdatedMessage, visitHostMessage } from \"./messages/hostMessages.js\";\nexport { isWidgetEmitEventMessage, isWidgetReadyMessage, isWidgetResizeMessage, visitWidgetMessage } from \"./messages/widgetMessages.js\";","/*\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\n/**\n * Extracts the parameter ID strings as types from the given ParameterConfig.\n */\n\n/**\n * Extracts a map of parameter IDs to their async-wrapped value types from the given ParameterConfig.\n */\n\n/**\n * Extracts a map of parameter IDs to the raw parameter values from the given ParameterConfig.\n */\n\n/**\n * Extracts a list of strongly-typed parameter IDs from the given WidgetConfig for a given event ID.\n * If a parameter ID is referenced by an event but does not exist, its type will be never\n */\n\n/**\n * Extracts a map of event IDs to their raw parameter value types from the given WidgetConfig.\n */\n\nexport function defineConfig(c) {\n return c;\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// Interfaces and type guards for messages passed from the host Foundry UI to the widget\nexport let HostMessage;\n(function (_HostMessage) {\n _HostMessage.Version = \"1.0.0\";\n})(HostMessage || (HostMessage = {}));\nexport function isHostParametersUpdatedMessage(event) {\n return event.type === \"host.update-parameters\";\n}\n/**\n * Strongly typed visitor to handle every type of host message\n */\nexport function visitHostMessage(message, visitor) {\n const {\n type,\n payload\n } = message;\n const handler = visitor[type];\n if (handler) {\n // Typescript creates an & of the parameters instead of a union\n handler(payload);\n } else {\n visitor._unknown(type);\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// Interfaces and type guards for messages passed from the widget to the host Foundry UI\nexport let WidgetMessage;\nexport function isWidgetReadyMessage(event) {\n return event.type === \"widget.ready\";\n}\nexport function isWidgetResizeMessage(event) {\n return event.type === \"widget.resize\";\n}\nexport function isWidgetEmitEventMessage(event) {\n return event.type === \"widget.emit-event\";\n}\nexport function visitWidgetMessage(message, visitor) {\n const {\n type,\n payload\n } = message;\n const handler = visitor[type];\n if (handler) {\n // Typescript creates an & of the parameters instead of a union\n handler(payload);\n } else {\n visitor._unknown(type);\n }\n}"]}
@@ -1 +0,0 @@
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,QAA2B,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,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,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\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}"]}