@osdk/cli 0.24.10 → 0.24.12

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 (54) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/browser/{chunk-E6TNVHMG.js → chunk-VWVTH3NW.js} +51 -3
  3. package/build/browser/chunk-VWVTH3NW.js.map +1 -0
  4. package/build/{esm/handleGenerate-2ISEGQIX.js → browser/handleGenerate-YN6QGGOS.js} +30 -19
  5. package/build/browser/handleGenerate-YN6QGGOS.js.map +1 -0
  6. package/build/browser/index.js +24 -9
  7. package/build/browser/index.js.map +1 -1
  8. package/build/browser/{siteDeployCommand-MJLBRXU3.js → siteDeployCommand-FCVIETFI.js} +39 -14
  9. package/build/browser/siteDeployCommand-FCVIETFI.js.map +1 -0
  10. package/build/browser/{versionDeleteCommand-JJ6M5RJ2.js → versionDeleteCommand-3ZETURJH.js} +3 -3
  11. package/build/browser/{versionDeleteCommand-JJ6M5RJ2.js.map → versionDeleteCommand-3ZETURJH.js.map} +1 -1
  12. package/build/{esm/versionGetCommand-Q2X33XNW.js → browser/versionGetCommand-LPU4BQ7Q.js} +3 -3
  13. package/build/browser/{versionGetCommand-Q2X33XNW.js.map → versionGetCommand-LPU4BQ7Q.js.map} +1 -1
  14. package/build/{esm/versionListCommand-DDLD4NNY.js → browser/versionListCommand-WXD6FMJB.js} +3 -3
  15. package/build/browser/{versionListCommand-DDLD4NNY.js.map → versionListCommand-WXD6FMJB.js.map} +1 -1
  16. package/build/{esm/versionSetCommand-LXMFG2LH.js → browser/versionSetCommand-JKYD3NXK.js} +3 -3
  17. package/build/browser/{versionSetCommand-LXMFG2LH.js.map → versionSetCommand-JKYD3NXK.js.map} +1 -1
  18. package/build/browser/{versionUnsetCommand-CTWDGYV6.js → versionUnsetCommand-BKETJ2QW.js} +3 -3
  19. package/build/browser/{versionUnsetCommand-CTWDGYV6.js.map → versionUnsetCommand-BKETJ2QW.js.map} +1 -1
  20. package/build/esm/{chunk-E6TNVHMG.js → chunk-VWVTH3NW.js} +51 -3
  21. package/build/esm/chunk-VWVTH3NW.js.map +1 -0
  22. package/build/esm/commands/site/deploy/SiteDeployArgs.d.ts +2 -0
  23. package/build/esm/commands/site/deploy/SiteDeployArgs.d.ts.map +1 -1
  24. package/build/esm/commands/site/deploy/index.d.ts.map +1 -1
  25. package/build/esm/commands/site/deploy/siteDeployCommand.d.mts +2 -4
  26. package/build/esm/commands/site/deploy/siteDeployCommand.d.mts.map +1 -1
  27. package/build/{browser/handleGenerate-2ISEGQIX.js → esm/handleGenerate-YN6QGGOS.js} +30 -19
  28. package/build/esm/handleGenerate-YN6QGGOS.js.map +1 -0
  29. package/build/esm/index.js +24 -9
  30. package/build/esm/index.js.map +1 -1
  31. package/build/esm/net/createFetch.d.mts.map +1 -1
  32. package/build/esm/net/third-party-applications/index.d.mts +1 -0
  33. package/build/esm/net/third-party-applications/index.d.mts.map +1 -1
  34. package/build/esm/net/third-party-applications/uploadSnapshotVersion.d.mts +5 -0
  35. package/build/esm/net/third-party-applications/uploadSnapshotVersion.d.mts.map +1 -0
  36. package/build/esm/{siteDeployCommand-MJLBRXU3.js → siteDeployCommand-FCVIETFI.js} +39 -14
  37. package/build/esm/siteDeployCommand-FCVIETFI.js.map +1 -0
  38. package/build/esm/{versionDeleteCommand-JJ6M5RJ2.js → versionDeleteCommand-3ZETURJH.js} +3 -3
  39. package/build/esm/{versionDeleteCommand-JJ6M5RJ2.js.map → versionDeleteCommand-3ZETURJH.js.map} +1 -1
  40. package/build/{browser/versionGetCommand-Q2X33XNW.js → esm/versionGetCommand-LPU4BQ7Q.js} +3 -3
  41. package/build/esm/{versionGetCommand-Q2X33XNW.js.map → versionGetCommand-LPU4BQ7Q.js.map} +1 -1
  42. package/build/{browser/versionListCommand-DDLD4NNY.js → esm/versionListCommand-WXD6FMJB.js} +3 -3
  43. package/build/esm/{versionListCommand-DDLD4NNY.js.map → versionListCommand-WXD6FMJB.js.map} +1 -1
  44. package/build/{browser/versionSetCommand-LXMFG2LH.js → esm/versionSetCommand-JKYD3NXK.js} +3 -3
  45. package/build/esm/{versionSetCommand-LXMFG2LH.js.map → versionSetCommand-JKYD3NXK.js.map} +1 -1
  46. package/build/esm/{versionUnsetCommand-CTWDGYV6.js → versionUnsetCommand-BKETJ2QW.js} +3 -3
  47. package/build/esm/{versionUnsetCommand-CTWDGYV6.js.map → versionUnsetCommand-BKETJ2QW.js.map} +1 -1
  48. package/package.json +6 -5
  49. package/build/browser/chunk-E6TNVHMG.js.map +0 -1
  50. package/build/browser/handleGenerate-2ISEGQIX.js.map +0 -1
  51. package/build/browser/siteDeployCommand-MJLBRXU3.js.map +0 -1
  52. package/build/esm/chunk-E6TNVHMG.js.map +0 -1
  53. package/build/esm/handleGenerate-2ISEGQIX.js.map +0 -1
  54. package/build/esm/siteDeployCommand-MJLBRXU3.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":[],"mappings":";;;;;;;AAAA,cAAA,EAAA,CAAA;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,OAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAA,gCAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE,OAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACA,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAClD","file":"versionSetCommand-LXMFG2LH.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,CAAA;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,OAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAA,gCAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE,OAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACA,EAAQ,OAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAClD","file":"versionSetCommand-JKYD3NXK.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-6YTCOSZQ.js';
2
- import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-E6TNVHMG.js';
2
+ import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-VWVTH3NW.js';
3
3
  import './chunk-CDP3LF3Z.js';
4
4
  import './chunk-G6CPJEWR.js';
5
5
  import { init_esm_shims } from './chunk-TIWBVCHX.js';
@@ -31,5 +31,5 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
31
31
  }
32
32
 
33
33
  export { versionUnsetCommand as default };
34
- //# sourceMappingURL=versionUnsetCommand-CTWDGYV6.js.map
35
- //# sourceMappingURL=versionUnsetCommand-CTWDGYV6.js.map
34
+ //# sourceMappingURL=versionUnsetCommand-BKETJ2QW.js.map
35
+ //# sourceMappingURL=versionUnsetCommand-BKETJ2QW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;AAAA,cAAA,EAAA,CAAA;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;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,KACP,CAAA,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,4BAA4B,CAAA,CAAA;AAC1C,EAAM,MAAA,gCAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA,CAAA;AACnE,EAAA,OAAA,CAAQ,QAAQ,2BAA2B,CAAA,CAAA;AAC7C","file":"versionUnsetCommand-CTWDGYV6.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 });\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,CAAA;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;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,KACP,CAAA,CAAA;AACD,IAAA,kBAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,MAAM,WAAc,GAAA,MAAM,SAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAY,2BAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,OAAA,CAAQ,MAAM,4BAA4B,CAAA,CAAA;AAC1C,EAAM,MAAA,gCAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA,CAAA;AACnE,EAAA,OAAA,CAAQ,QAAQ,2BAA2B,CAAA,CAAA;AAC7C","file":"versionUnsetCommand-BKETJ2QW.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 });\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}"]}
@@ -2,6 +2,7 @@ import { PalantirApiError, createFetchHeaderMutator, createFetchOrThrow } from '
2
2
  import { ExitProcessError } from './chunk-G6CPJEWR.js';
3
3
  import { init_esm_shims, __export } from './chunk-TIWBVCHX.js';
4
4
  import { consola } from 'consola';
5
+ import prettyBytes from 'pretty-bytes';
5
6
  import { promises } from 'fs';
6
7
  import path from 'path';
7
8
 
@@ -22,6 +23,7 @@ __export(third_party_applications_exports, {
22
23
  getWebsite: () => getWebsite,
23
24
  listVersions: () => listVersions,
24
25
  undeployWebsite: () => undeployWebsite,
26
+ uploadSnapshotVersion: () => uploadSnapshotVersion,
25
27
  uploadVersion: () => uploadVersion
26
28
  });
27
29
  init_esm_shims();
@@ -34,7 +36,7 @@ init_esm_shims();
34
36
 
35
37
  // src/net/UserAgent.ts
36
38
  init_esm_shims();
37
- var USER_AGENT = `osdk-cli/${"0.24.10"}`;
39
+ var USER_AGENT = `osdk-cli/${"0.24.12"}`;
38
40
 
39
41
  // src/net/createFetch.mts
40
42
  function createFetch(tokenProvider, fetchFn = fetch) {
@@ -72,6 +74,35 @@ function handleFetchError(e) {
72
74
  message = "The site version already exists";
73
75
  } else if (e.errorName === "VersionNotFound") {
74
76
  message = "The site version could not be found";
77
+ } else if (e.errorName === "VersionLimitExceeded") {
78
+ const {
79
+ versionLimit
80
+ } = e.parameters ?? {};
81
+ const versionLimitPart = versionLimit != null ? ` (Limit: ${versionLimit} versions)` : "";
82
+ message = `The site contains too many versions${versionLimitPart}`;
83
+ tip = "Run the `site version delete` command to delete an old version and try again";
84
+ } else if (e.errorName === "FileCountLimitExceeded") {
85
+ const {
86
+ fileCountLimit
87
+ } = e.parameters ?? {};
88
+ const fileCountLimitPart = fileCountLimit != null ? ` (Limit: ${fileCountLimit} files)` : "";
89
+ message = `The .zip file contains too many files${fileCountLimitPart}`;
90
+ tip = "Reduce the number of files in the production build to below the limit";
91
+ } else if (e.errorName === "FileSizeLimitExceeded") {
92
+ const {
93
+ currentFilePath,
94
+ currentFileSizeBytes,
95
+ fileSizeBytesLimit
96
+ } = e.parameters ?? {};
97
+ const currentFilePathPart = currentFilePath != null ? ` "${currentFilePath}"` : "";
98
+ const currentFileSizePart = currentFileSizeBytes != null ? ` (${prettyBytes(parseInt(currentFileSizeBytes), {
99
+ binary: true
100
+ })})` : "";
101
+ const fileSizeLimitPart = fileSizeBytesLimit != null ? ` (Limit: ${prettyBytes(parseInt(fileSizeBytesLimit), {
102
+ binary: true
103
+ })})` : "";
104
+ message = `The .zip file contains a file${currentFilePathPart}${currentFileSizePart} that is too large${fileSizeLimitPart}`;
105
+ tip = "Ensure all files in the production build are below the size limit";
75
106
  } else {
76
107
  const {
77
108
  errorCode,
@@ -160,6 +191,23 @@ async function undeployWebsite(ctx, thirdPartyAppRid) {
160
191
  });
161
192
  }
162
193
 
194
+ // src/net/third-party-applications/uploadSnapshotVersion.mts
195
+ init_esm_shims();
196
+ async function uploadSnapshotVersion(ctx, thirdPartyAppRid, version, snapshotId, zipFile) {
197
+ const fetch2 = createFetch(ctx.tokenProvider);
198
+ const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/uploadSnapshot?version=${version}&preview=true${snapshotId !== "" ? `&snapshotIdentifier=${snapshotId}` : ""}`;
199
+ const result = await fetch2(url, {
200
+ method: "POST",
201
+ body: zipFile,
202
+ headers: {
203
+ "Content-Type": "application/octet-stream"
204
+ },
205
+ duplex: "half"
206
+ // Node hates me
207
+ });
208
+ return result.json();
209
+ }
210
+
163
211
  // src/net/third-party-applications/uploadVersion.mts
164
212
  init_esm_shims();
165
213
  async function uploadVersion(ctx, thirdPartyAppRid, version, zipFile) {
@@ -234,5 +282,5 @@ function isJWT(token) {
234
282
  }
235
283
 
236
284
  export { createInternalClientContext, loadToken, third_party_applications_exports };
237
- //# sourceMappingURL=chunk-E6TNVHMG.js.map
238
- //# sourceMappingURL=chunk-E6TNVHMG.js.map
285
+ //# sourceMappingURL=chunk-VWVTH3NW.js.map
286
+ //# sourceMappingURL=chunk-VWVTH3NW.js.map
@@ -0,0 +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/index.mts","../../src/util/token.ts"],"names":["fetch","consola","fsPromises"],"mappings":";;;;;;;;;AAAA,cAAA,EAAA,CAAA;AAgBO,SAAS,2BAAA,CAA4B,YAAY,aAAe,EAAA;AACrE,EAAO,OAAA;AAAA,IACL,aAAA;AAAA,IACA,UAAA;AAAA,GACF,CAAA;AACF,CAAA;;;ACrBA,IAAA,gCAAA,GAAA,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;AAAA,CAAA,CAAA,CAAA;AAAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AAgBO,IAAM,UAAA,GAAa,YAAY,SAA2B,CAAA,CAAA,CAAA;;;ADK1D,SAAS,WAAA,CAAY,aAAe,EAAA,OAAA,GAAU,KAAO,EAAA;AAC1D,EAAO,OAAA,wBAAA,CAAyB,0BAA0B,uBAAwB,C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IAAI,gBAAiB,CAAA,CAAA,EAAG,CAAmC,iCAAA,CAAA,CAAA,CAAA;AAAA,GACnE;AACF,CAAA;AACA,SAAS,MAAM,KAAO,EAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,kDAAA,CAAA;AACnB,EAAO,OAAA,UAAA,CAAW,KAAK,KAAK,CAAA,CAAA;AAC9B","file":"chunk-VWVTH3NW.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/${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 { createFetchHeaderMutator, createFetchOrThrow, PalantirApiError } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\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 const {\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n } = e;\n // Include extra info about the original API error in CLI error messages\n // https://www.palantir.com/docs/foundry/api/general/overview/errors/\n message = `${e.message}\\n\\n${JSON.stringify({\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n }, null, 2)}`;\n }\n throw new ExitProcessError(1, message, tip, e);\n}\nfunction createRequestLoggingFetch(fetchFn = fetch) {\n return function requestLoggingFetch(input, init) {\n const requestLog = typeof input === \"string\" || input instanceof URL ? `${init?.method ?? \"GET\"}: ${input.toString().trim()}` : `${input.method ?? \"GET\"}: ${input.url.toString().trim()}`;\n consola.trace(requestLog);\n return fetchFn(input, init).then(a => {\n consola.trace(`FINISH ${requestLog}`);\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function 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\";\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 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=${version}&preview=true${snapshotId !== \"\" ? `&snapshotIdentifier=${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=${version}&preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n return result.json();\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { createInternalClientContext } from \"./createInternalClientContext.mjs\";\nexport * as thirdPartyApplications from \"./third-party-applications/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}"]}
@@ -6,5 +6,7 @@ export interface SiteDeployArgs extends CommonSiteArgs {
6
6
  uploadOnly: boolean;
7
7
  autoVersion?: AutoVersionConfigType;
8
8
  gitTagPrefix?: string;
9
+ snapshot: boolean;
10
+ snapshotId?: string;
9
11
  }
10
12
  //# sourceMappingURL=SiteDeployArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SiteDeployArgs.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/SiteDeployArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"SiteDeployArgs.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/SiteDeployArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,OAAO,EAAE,aAAa,CAC1B,cAAc,EACd,cAAc,CA+Gf,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,OAAO,EAAE,aAAa,CAC1B,cAAc,EACd,cAAc,CA0If,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,10 +1,8 @@
1
1
  import type { AutoVersionConfig } from "../../../util/config.js";
2
2
  import type { SiteDeployArgs } from "./SiteDeployArgs.js";
3
- interface SiteDeployInternalArgs extends Omit<SiteDeployArgs, "version" | "autoVersion"> {
3
+ interface SiteDeployInternalArgs extends Omit<SiteDeployArgs, "version" | "autoVersion" | "gitTagPrefix"> {
4
4
  selectedVersion: string | AutoVersionConfig;
5
- directory: string;
6
- uploadOnly: boolean;
7
5
  }
8
- export default function siteDeployCommand({ selectedVersion, application, foundryUrl, uploadOnly, directory, token, tokenFile, }: SiteDeployInternalArgs): Promise<void>;
6
+ export default function siteDeployCommand({ selectedVersion, application, foundryUrl, uploadOnly, snapshot, snapshotId, directory, token, tokenFile, }: SiteDeployInternalArgs): Promise<void>;
9
7
  export {};
10
8
  //# sourceMappingURL=siteDeployCommand.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"siteDeployCommand.d.mts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/siteDeployCommand.mts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,UAAU,sBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,CAAC;IAEvD,eAAe,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAA8B,iBAAiB,CAC7C,EACE,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,iBAqE1B"}
1
+ {"version":3,"file":"siteDeployCommand.d.mts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/siteDeployCommand.mts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,UAAU,sBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,GAAG,cAAc,CAAC;IAExE,eAAe,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAC7C;AAED,wBAA8B,iBAAiB,CAC7C,EACE,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,iBA4E1B"}
@@ -6,6 +6,7 @@ import * as fs8 from 'fs';
6
6
  import fs8__default, { realpathSync, statSync, Stats } from 'fs';
7
7
  import * as path9 from 'path';
8
8
  import path9__default, { dirname } from 'path';
9
+ import { consola } from 'consola';
9
10
  import { createRequire, builtinModules } from 'module';
10
11
  import url, { fileURLToPath, pathToFileURL, URL as URL$1 } from 'url';
11
12
  import process3 from 'process';
@@ -15,7 +16,6 @@ import fs from 'fs/promises';
15
16
  import assert2 from 'assert';
16
17
  import v8 from 'v8';
17
18
  import { format, inspect } from 'util';
18
- import { consola } from 'consola';
19
19
  import { findUp } from 'find-up';
20
20
 
21
21
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
@@ -160,6 +160,10 @@ init_esm_shims();
160
160
  // ../generator-converters/build/esm/wirePropertyV2ToSdkPropertyDefinition.js
161
161
  init_esm_shims();
162
162
  function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
163
+ const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType);
164
+ if (sdkPropDefinition == null) {
165
+ return void 0;
166
+ }
163
167
  switch (input.dataType.type) {
164
168
  case "integer":
165
169
  case "string":
@@ -181,7 +185,7 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
181
185
  displayName: input.displayName,
182
186
  multiplicity: false,
183
187
  description: input.description,
184
- type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
188
+ type: sdkPropDefinition,
185
189
  nullable: input.nullable == null ? isNullable : input.nullable
186
190
  };
187
191
  case "array": {
@@ -189,15 +193,18 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
189
193
  displayName: input.displayName,
190
194
  multiplicity: true,
191
195
  description: input.description,
192
- type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
196
+ type: sdkPropDefinition,
193
197
  nullable: true
194
198
  };
195
199
  }
196
- case "geotimeSeriesReference":
197
- throw new Error(`Unsupported data type ${JSON.stringify(input.dataType)}`);
200
+ case "geotimeSeriesReference": {
201
+ consola.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);
202
+ return void 0;
203
+ }
198
204
  default:
199
205
  input.dataType;
200
- throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);
206
+ consola.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);
207
+ return void 0;
201
208
  }
202
209
  }
203
210
  function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
@@ -226,10 +233,14 @@ function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
226
233
  return "stringTimeseries";
227
234
  }
228
235
  return "numericTimeseries";
229
- case "geotimeSeriesReference":
230
- throw new Error(`Unsupported data type ${JSON.stringify(propertyType)}`);
231
- default:
232
- throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);
236
+ case "geotimeSeriesReference": {
237
+ consola.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);
238
+ return void 0;
239
+ }
240
+ default: {
241
+ consola.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);
242
+ return void 0;
243
+ }
233
244
  }
234
245
  }
235
246
 
@@ -244,7 +255,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType) {
244
255
  implements: interfaceType.extendsInterfaces,
245
256
  properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key2, value]) => {
246
257
  return [key2, wirePropertyV2ToSdkPropertyDefinition(value, true)];
247
- })),
258
+ }).filter(([key2, value]) => value != null)),
248
259
  links: {}
249
260
  };
250
261
  }
@@ -402,7 +413,7 @@ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {
402
413
  targetType: linkType.objectTypeApiName
403
414
  }];
404
415
  })),
405
- properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2))])),
416
+ properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2))]).filter(([key2, value]) => value != null)),
406
417
  implements: objectTypeWithLink.implementsInterfaces,
407
418
  interfaceMap,
408
419
  inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
@@ -21125,7 +21136,7 @@ function formatTs(contents) {
21125
21136
  }
21126
21137
 
21127
21138
  // ../generator/build/esm/v2.0/generateMetadata.js
21128
- var ExpectedOsdkVersion = "2.0.10";
21139
+ var ExpectedOsdkVersion = "2.0.12";
21129
21140
  async function generateOntologyMetadataFile({
21130
21141
  fs: fs9,
21131
21142
  outDir,
@@ -22385,7 +22396,7 @@ init_esm_shims();
22385
22396
 
22386
22397
  // ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
22387
22398
  var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
22388
- var USER_AGENT = `osdk-cli.cmd.typescript/${"0.24.10"}`;
22399
+ var USER_AGENT = `osdk-cli.cmd.typescript/${"0.24.12"}`;
22389
22400
  async function handleGenerate(args) {
22390
22401
  let success = false;
22391
22402
  if (args.ontologyPath) {
@@ -22521,7 +22532,7 @@ async function generateClientSdk(ontology, args) {
22521
22532
  }
22522
22533
  return true;
22523
22534
  }
22524
- await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.24.10", args.externalObjects, args.externalInterfaces);
22535
+ await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.24.12", args.externalObjects, args.externalInterfaces);
22525
22536
  return true;
22526
22537
  } catch (e) {
22527
22538
  consola.error("OSDK generation failed", e.message, e.stack);
@@ -22543,8 +22554,8 @@ async function getDependencyVersions() {
22543
22554
  const typescriptVersion = ourPackageJson.devDependencies.typescript;
22544
22555
  const tslibVersion = ourPackageJson.dependencies.tslib;
22545
22556
  const areTheTypesWrongVersion = ourPackageJson.dependencies["@arethetypeswrong/cli"];
22546
- const osdkClientVersion = `^${"2.0.10"}`;
22547
- const osdkApiVersion = `^${"2.0.10"}`;
22557
+ const osdkClientVersion = `^${"2.0.12"}`;
22558
+ const osdkApiVersion = `^${"2.0.12"}`;
22548
22559
  const osdkLegacyClientVersion = `^${process.env.PACKAGE_LEGACY_CLIENT_VERSION}`;
22549
22560
  return {
22550
22561
  typescriptVersion,
@@ -22590,5 +22601,5 @@ function createNormalFs() {
22590
22601
  }
22591
22602
 
22592
22603
  export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
22593
- //# sourceMappingURL=handleGenerate-2ISEGQIX.js.map
22594
- //# sourceMappingURL=handleGenerate-2ISEGQIX.js.map
22604
+ //# sourceMappingURL=handleGenerate-YN6QGGOS.js.map
22605
+ //# sourceMappingURL=handleGenerate-YN6QGGOS.js.map