@osdk/cli 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/build/js/{chunk-GTNZA5UY.mjs → chunk-CLAEREOL.mjs} +4 -2
  2. package/build/js/chunk-CLAEREOL.mjs.map +1 -0
  3. package/build/js/chunk-DQYIDDJN.cjs +17 -0
  4. package/build/js/chunk-DQYIDDJN.cjs.map +1 -0
  5. package/build/js/{chunk-XNYKWAIE.mjs → chunk-EZIJJWAA.mjs} +35 -16
  6. package/build/js/chunk-EZIJJWAA.mjs.map +1 -0
  7. package/build/js/chunk-GX2IOTA6.mjs +10 -0
  8. package/build/js/{chunk-N6K26UR4.mjs.map → chunk-GX2IOTA6.mjs.map} +1 -1
  9. package/build/js/{chunk-JFDXL5SV.mjs → chunk-HD6SVFKA.mjs} +5 -5
  10. package/build/js/chunk-HD6SVFKA.mjs.map +1 -0
  11. package/build/js/{chunk-HYF3CTKZ.cjs → chunk-HZ3XILMW.cjs} +4 -2
  12. package/build/js/chunk-HZ3XILMW.cjs.map +1 -0
  13. package/build/js/chunk-IV3QY3PZ.mjs +15 -0
  14. package/build/js/chunk-IV3QY3PZ.mjs.map +1 -0
  15. package/build/js/{chunk-D7QHLGEU.cjs → chunk-JFYC74FJ.cjs} +41 -22
  16. package/build/js/chunk-JFYC74FJ.cjs.map +1 -0
  17. package/build/js/{chunk-2DZBTS5E.cjs → chunk-TZGNA5WR.cjs} +5 -5
  18. package/build/js/chunk-TZGNA5WR.cjs.map +1 -0
  19. package/build/js/chunk-UE2TMWJL.cjs +12 -0
  20. package/build/js/{chunk-X2S4O5ZR.cjs.map → chunk-UE2TMWJL.cjs.map} +1 -1
  21. package/build/js/{handleGenerate-Q6EQWXFG.cjs → handleGenerate-GBN42PDO.cjs} +11 -11
  22. package/build/js/handleGenerate-GBN42PDO.cjs.map +1 -0
  23. package/build/js/{handleGenerate-ZUZV3IBI.mjs → handleGenerate-NQPMMKLX.mjs} +10 -10
  24. package/build/js/handleGenerate-NQPMMKLX.mjs.map +1 -0
  25. package/build/js/index.cjs +99 -55
  26. package/build/js/index.cjs.map +1 -1
  27. package/build/js/index.mjs +95 -51
  28. package/build/js/index.mjs.map +1 -1
  29. package/build/js/loginFlow-5ZAMXQKE.cjs +10 -0
  30. package/build/js/loginFlow-BWWZBM36.mjs +4 -0
  31. package/build/js/siteDeployCommand-7QTLGWZI.mjs +150 -0
  32. package/build/js/siteDeployCommand-7QTLGWZI.mjs.map +1 -0
  33. package/build/js/siteDeployCommand-HOXKQM56.cjs +176 -0
  34. package/build/js/siteDeployCommand-HOXKQM56.cjs.map +1 -0
  35. package/build/js/versionDeleteCommand-GDQEZLYA.cjs +38 -0
  36. package/build/js/versionDeleteCommand-GDQEZLYA.cjs.map +1 -0
  37. package/build/js/{versionDeleteCommand-6BJL5XLG.mjs → versionDeleteCommand-LQRGKTMH.mjs} +13 -3
  38. package/build/js/versionDeleteCommand-LQRGKTMH.mjs.map +1 -0
  39. package/build/js/{versionGetCommand-OR4RLOLM.mjs → versionGetCommand-NZAQX7U5.mjs} +3 -3
  40. package/build/js/{versionGetCommand-Y2VR2WKH.cjs → versionGetCommand-RU5LS3IG.cjs} +8 -8
  41. package/build/js/{versionListCommand-LPPGQCQF.mjs → versionListCommand-5N57YKEQ.mjs} +6 -4
  42. package/build/js/versionListCommand-5N57YKEQ.mjs.map +1 -0
  43. package/build/js/{versionListCommand-5KM5PFYL.cjs → versionListCommand-QYCTS6KU.cjs} +11 -9
  44. package/build/js/versionListCommand-QYCTS6KU.cjs.map +1 -0
  45. package/build/js/{versionSetCommand-VD3L5DOV.cjs → versionSetCommand-K4SDBPLB.cjs} +8 -8
  46. package/build/js/{versionSetCommand-LHOVVI6U.mjs → versionSetCommand-UWPAQ7NV.mjs} +3 -3
  47. package/build/js/versionUnsetCommand-INDJ26MO.cjs +36 -0
  48. package/build/js/versionUnsetCommand-INDJ26MO.cjs.map +1 -0
  49. package/build/js/{versionUnsetCommand-IJT4JWBN.mjs → versionUnsetCommand-PZRZPTPR.mjs} +13 -3
  50. package/build/js/versionUnsetCommand-PZRZPTPR.mjs.map +1 -0
  51. package/build/types/ExitProcessError.d.ts +3 -1
  52. package/build/types/commands/auth/CommonAuthArgs.d.ts +1 -1
  53. package/build/types/commands/auth/login/LoginArgs.d.ts +1 -1
  54. package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +2 -1
  55. package/build/types/commands/site/deploy/siteDeployCommand.d.mts +8 -1
  56. package/build/types/commands/site/version/delete/VersionDeleteArgs.d.ts +5 -0
  57. package/build/types/commands/site/version/delete/index.d.ts +2 -2
  58. package/build/types/commands/site/version/delete/versionDeleteCommand.d.mts +2 -2
  59. package/build/types/commands/site/version/get/VersionGetArgs.d.ts +3 -0
  60. package/build/types/commands/site/version/get/index.d.ts +2 -1
  61. package/build/types/commands/site/version/get/versionGetCommand.d.mts +2 -2
  62. package/build/types/commands/site/version/list/VersionListArgs.d.ts +3 -0
  63. package/build/types/commands/site/version/list/index.d.ts +2 -1
  64. package/build/types/commands/site/version/list/versionListCommand.d.mts +2 -2
  65. package/build/types/commands/site/version/set/VersionSetArgs.d.ts +4 -0
  66. package/build/types/commands/site/version/set/index.d.ts +2 -2
  67. package/build/types/commands/site/version/set/versionSetCommand.d.mts +2 -2
  68. package/build/types/commands/site/version/unset/VersionUnsetArgs.d.ts +4 -0
  69. package/build/types/commands/site/version/unset/index.d.ts +2 -1
  70. package/build/types/commands/site/version/unset/versionUnsetCommand.d.mts +2 -2
  71. package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +1 -1
  72. package/build/types/consola/handlePromptCancel.d.ts +1 -0
  73. package/build/types/net/UserAgent.d.ts +1 -0
  74. package/build/types/net/index.d.mts +1 -0
  75. package/build/types/util/config.d.ts +2 -2
  76. package/build/types/util/token.d.ts +2 -2
  77. package/changelog/0.6.0/pr-54.v2.yml +5 -0
  78. package/changelog/0.6.0/pr-56.v2.yml +5 -0
  79. package/changelog/0.6.0/pr-58.v2.yml +5 -0
  80. package/changelog/0.7.0/pr-50.v2.yml +5 -0
  81. package/changelog/0.7.0/pr-52.v2.yml +5 -0
  82. package/changelog/0.7.0/pr-55.v2.yml +5 -0
  83. package/changelog/0.7.0/pr-61.v2.yml +5 -0
  84. package/changelog/0.7.0/pr-63.v2.yml +5 -0
  85. package/package.json +9 -3
  86. package/build/js/chunk-2DZBTS5E.cjs.map +0 -1
  87. package/build/js/chunk-D7QHLGEU.cjs.map +0 -1
  88. package/build/js/chunk-GTNZA5UY.mjs.map +0 -1
  89. package/build/js/chunk-HYF3CTKZ.cjs.map +0 -1
  90. package/build/js/chunk-JFDXL5SV.mjs.map +0 -1
  91. package/build/js/chunk-N6K26UR4.mjs +0 -9
  92. package/build/js/chunk-X2S4O5ZR.cjs +0 -11
  93. package/build/js/chunk-XNYKWAIE.mjs.map +0 -1
  94. package/build/js/handleGenerate-Q6EQWXFG.cjs.map +0 -1
  95. package/build/js/handleGenerate-ZUZV3IBI.mjs.map +0 -1
  96. package/build/js/loginFlow-BZDDHHT5.cjs +0 -10
  97. package/build/js/loginFlow-KGLTXVZ6.mjs +0 -4
  98. package/build/js/siteDeployCommand-7GXJF5HF.mjs +0 -100
  99. package/build/js/siteDeployCommand-7GXJF5HF.mjs.map +0 -1
  100. package/build/js/siteDeployCommand-KUNL3GIW.cjs +0 -126
  101. package/build/js/siteDeployCommand-KUNL3GIW.cjs.map +0 -1
  102. package/build/js/versionDeleteCommand-6BJL5XLG.mjs.map +0 -1
  103. package/build/js/versionDeleteCommand-RLU7UUYD.cjs +0 -28
  104. package/build/js/versionDeleteCommand-RLU7UUYD.cjs.map +0 -1
  105. package/build/js/versionListCommand-5KM5PFYL.cjs.map +0 -1
  106. package/build/js/versionListCommand-LPPGQCQF.mjs.map +0 -1
  107. package/build/js/versionUnsetCommand-IJT4JWBN.mjs.map +0 -1
  108. package/build/js/versionUnsetCommand-XYBUQ6XB.cjs +0 -26
  109. package/build/js/versionUnsetCommand-XYBUQ6XB.cjs.map +0 -1
  110. package/build/types/commands/site/version/SiteVersionArgs.d.ts +0 -4
  111. /package/build/js/{loginFlow-BZDDHHT5.cjs.map → loginFlow-5ZAMXQKE.cjs.map} +0 -0
  112. /package/build/js/{loginFlow-KGLTXVZ6.mjs.map → loginFlow-BWWZBM36.mjs.map} +0 -0
  113. /package/build/js/{versionGetCommand-OR4RLOLM.mjs.map → versionGetCommand-NZAQX7U5.mjs.map} +0 -0
  114. /package/build/js/{versionGetCommand-Y2VR2WKH.cjs.map → versionGetCommand-RU5LS3IG.cjs.map} +0 -0
  115. /package/build/js/{versionSetCommand-LHOVVI6U.mjs.map → versionSetCommand-K4SDBPLB.cjs.map} +0 -0
  116. /package/build/js/{versionSetCommand-VD3L5DOV.cjs.map → versionSetCommand-UWPAQ7NV.mjs.map} +0 -0
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
4
+ var chunkJFYC74FJ_cjs = require('./chunk-JFYC74FJ.cjs');
5
+ require('./chunk-HZ3XILMW.cjs');
6
+ require('./chunk-HQDDGVB7.cjs');
7
+ var consola = require('consola');
8
+ var utils = require('consola/utils');
9
+
10
+ async function versionDeleteCommand({
11
+ version,
12
+ yes,
13
+ application,
14
+ foundryUrl,
15
+ token,
16
+ tokenFile
17
+ }) {
18
+ if (!yes) {
19
+ const confirmed = await consola.consola.prompt(`Are you sure you want to delete the version ${version}?
20
+ ${utils.colorize("bold", "This action cannot be undone.")}`, {
21
+ type: "confirm"
22
+ });
23
+ chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
24
+ }
25
+ consola.consola.start(`Deleting version ${version}`);
26
+ const loadedToken = await chunkJFYC74FJ_cjs.loadToken(token, tokenFile);
27
+ const tokenProvider = () => loadedToken;
28
+ const clientCtx = chunkJFYC74FJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
29
+ await chunkJFYC74FJ_cjs.artifacts_exports.SiteAssetArtifactsService.deleteSiteVersion(clientCtx, {
30
+ application,
31
+ version
32
+ });
33
+ consola.consola.success(`Deleted version ${version}`);
34
+ }
35
+
36
+ module.exports = versionDeleteCommand;
37
+ //# sourceMappingURL=out.js.map
38
+ //# sourceMappingURL=versionDeleteCommand-GDQEZLYA.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAGzB,eAAO,qBAA4C;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO,+CAA+C,OAAO;AAAA,EAAM,SAAS,QAAQ,+BAA+B,CAAC,IAAI;AAAA,MACtJ,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,UAAQ,MAAM,oBAAoB,OAAO,EAAE;AAC3C,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,QAAM,kBAAU,0BAA0B,kBAAkB,WAAW;AAAA,IACrE;AAAA,IACA;AAAA,EACF,CAAC;AACD,UAAQ,QAAQ,mBAAmB,OAAO,EAAE;AAC9C","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 { artifacts, createInternalClientContext } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await artifacts.SiteAssetArtifactsService.deleteSiteVersion(clientCtx, {\n application,\n version\n });\n consola.success(`Deleted version ${version}`);\n}"]}
@@ -1,15 +1,25 @@
1
- import { loadToken, createInternalClientContext, artifacts_exports } from './chunk-XNYKWAIE.mjs';
2
- import './chunk-GTNZA5UY.mjs';
1
+ import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
2
+ import { loadToken, createInternalClientContext, artifacts_exports } from './chunk-EZIJJWAA.mjs';
3
+ import './chunk-CLAEREOL.mjs';
3
4
  import './chunk-E2SEJZTC.mjs';
4
5
  import { consola } from 'consola';
6
+ import { colorize } from 'consola/utils';
5
7
 
6
8
  async function versionDeleteCommand({
7
9
  version,
10
+ yes,
8
11
  application,
9
12
  foundryUrl,
10
13
  token,
11
14
  tokenFile
12
15
  }) {
16
+ if (!yes) {
17
+ const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?
18
+ ${colorize("bold", "This action cannot be undone.")}`, {
19
+ type: "confirm"
20
+ });
21
+ handlePromptCancel(confirmed);
22
+ }
13
23
  consola.start(`Deleting version ${version}`);
14
24
  const loadedToken = await loadToken(token, tokenFile);
15
25
  const tokenProvider = () => loadedToken;
@@ -23,4 +33,4 @@ async function versionDeleteCommand({
23
33
 
24
34
  export { versionDeleteCommand as default };
25
35
  //# sourceMappingURL=out.js.map
26
- //# sourceMappingURL=versionDeleteCommand-6BJL5XLG.mjs.map
36
+ //# sourceMappingURL=versionDeleteCommand-LQRGKTMH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAGzB,eAAO,qBAA4C;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO,+CAA+C,OAAO;AAAA,EAAM,SAAS,QAAQ,+BAA+B,CAAC,IAAI;AAAA,MACtJ,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,UAAQ,MAAM,oBAAoB,OAAO,EAAE;AAC3C,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,QAAM,kBAAU,0BAA0B,kBAAkB,WAAW;AAAA,IACrE;AAAA,IACA;AAAA,EACF,CAAC;AACD,UAAQ,QAAQ,mBAAmB,OAAO,EAAE;AAC9C","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 { artifacts, createInternalClientContext } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await artifacts.SiteAssetArtifactsService.deleteSiteVersion(clientCtx, {\n application,\n version\n });\n consola.success(`Deleted version ${version}`);\n}"]}
@@ -1,5 +1,5 @@
1
- import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-XNYKWAIE.mjs';
2
- import './chunk-GTNZA5UY.mjs';
1
+ import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-EZIJJWAA.mjs';
2
+ import './chunk-CLAEREOL.mjs';
3
3
  import './chunk-E2SEJZTC.mjs';
4
4
  import { consola } from 'consola';
5
5
 
@@ -25,4 +25,4 @@ async function versionGetCommand({
25
25
 
26
26
  export { versionGetCommand as default };
27
27
  //# sourceMappingURL=out.js.map
28
- //# sourceMappingURL=versionGetCommand-OR4RLOLM.mjs.map
28
+ //# sourceMappingURL=versionGetCommand-NZAQX7U5.mjs.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkD7QHLGEU_cjs = require('./chunk-D7QHLGEU.cjs');
4
- require('./chunk-HYF3CTKZ.cjs');
3
+ var chunkJFYC74FJ_cjs = require('./chunk-JFYC74FJ.cjs');
4
+ require('./chunk-HZ3XILMW.cjs');
5
5
  require('./chunk-HQDDGVB7.cjs');
6
6
  var consola = require('consola');
7
7
 
@@ -11,13 +11,13 @@ async function versionGetCommand({
11
11
  token,
12
12
  tokenFile
13
13
  }) {
14
- const loadedToken = await chunkD7QHLGEU_cjs.loadToken(token, tokenFile);
14
+ const loadedToken = await chunkJFYC74FJ_cjs.loadToken(token, tokenFile);
15
15
  const tokenProvider = () => loadedToken;
16
- const clientCtx = chunkD7QHLGEU_cjs.createInternalClientContext(foundryUrl, tokenProvider);
16
+ const clientCtx = chunkJFYC74FJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
17
17
  consola.consola.start("Getting live version");
18
- const repositoryRid = await chunkD7QHLGEU_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
19
- const ctx = chunkD7QHLGEU_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
20
- const deployedVersion = await chunkD7QHLGEU_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid);
18
+ const repositoryRid = await chunkJFYC74FJ_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
19
+ const ctx = chunkJFYC74FJ_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
20
+ const deployedVersion = await chunkJFYC74FJ_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid);
21
21
  if (!deployedVersion) {
22
22
  consola.consola.info("No live site version set");
23
23
  } else {
@@ -27,4 +27,4 @@ async function versionGetCommand({
27
27
 
28
28
  module.exports = versionGetCommand;
29
29
  //# sourceMappingURL=out.js.map
30
- //# sourceMappingURL=versionGetCommand-Y2VR2WKH.cjs.map
30
+ //# sourceMappingURL=versionGetCommand-RU5LS3IG.cjs.map
@@ -1,5 +1,5 @@
1
- import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-XNYKWAIE.mjs';
2
- import './chunk-GTNZA5UY.mjs';
1
+ import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-EZIJJWAA.mjs';
2
+ import './chunk-CLAEREOL.mjs';
3
3
  import './chunk-E2SEJZTC.mjs';
4
4
  import { consola } from 'consola';
5
5
  import { colorize } from 'consola/utils';
@@ -22,11 +22,13 @@ async function versionListCommand({
22
22
  return;
23
23
  }
24
24
  consola.success("Found versions:");
25
- for (const version of versions) {
25
+ const semver = await import('semver');
26
+ const sortedVersions = semver.rsort(versions.filter((v) => semver.valid(v)));
27
+ for (const version of sortedVersions) {
26
28
  consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize("green", ` (deployed)`) : ""}`);
27
29
  }
28
30
  }
29
31
 
30
32
  export { versionListCommand as default };
31
33
  //# sourceMappingURL=out.js.map
32
- //# sourceMappingURL=versionListCommand-LPPGQCQF.mjs.map
34
+ //# sourceMappingURL=versionListCommand-5N57YKEQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,eAAO,mBAA0C;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,sCAAsC;AACpD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,WAAW,WAAW;AACzG,QAAM,MAAM,qBAAqB,YAAY,kBAAkB,aAAa;AAC5E,QAAM,CAAC,UAAU,eAAe,IAAI,MAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B,kBAAkB,WAAW,WAAW,GAAG,qCAA6B,mBAAmB,KAAK,aAAa,CAAC,CAAC;AAC1M,MAAI,SAAS,WAAW,GAAG;AACzB,YAAQ,KAAK,+DAA+D;AAC5E;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,QAAM,SAAS,MAAM,OAAO,QAAQ;AACpC,QAAM,iBAAiB,OAAO,MAAM,SAAS,OAAO,OAAK,OAAO,MAAM,CAAC,CAAC,CAAC;AACzE,aAAW,WAAW,gBAAgB;AACpC,YAAQ,IAAI,SAAS,OAAO,GAAG,mBAAmB,YAAY,gBAAgB,UAAU,SAAS,SAAS,aAAa,IAAI,EAAE,EAAE;AAAA,EACjI;AACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } 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 repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(clientCtx, application), ArtifactsSitesAdminV2Service.getDeployedVersion(ctx, repositoryRid)]);\n if (versions.length === 0) {\n consola.warn(\"Successfully connected to server, but no versions were found.\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(versions.filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkD7QHLGEU_cjs = require('./chunk-D7QHLGEU.cjs');
4
- require('./chunk-HYF3CTKZ.cjs');
3
+ var chunkJFYC74FJ_cjs = require('./chunk-JFYC74FJ.cjs');
4
+ require('./chunk-HZ3XILMW.cjs');
5
5
  require('./chunk-HQDDGVB7.cjs');
6
6
  var consola = require('consola');
7
7
  var utils = require('consola/utils');
@@ -12,23 +12,25 @@ async function versionListCommand({
12
12
  token,
13
13
  tokenFile
14
14
  }) {
15
- const loadedToken = await chunkD7QHLGEU_cjs.loadToken(token, tokenFile);
15
+ const loadedToken = await chunkJFYC74FJ_cjs.loadToken(token, tokenFile);
16
16
  const tokenProvider = () => loadedToken;
17
- const clientCtx = chunkD7QHLGEU_cjs.createInternalClientContext(foundryUrl, tokenProvider);
17
+ const clientCtx = chunkJFYC74FJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
18
18
  consola.consola.start("Fetching versions & deployed version");
19
- const repositoryRid = await chunkD7QHLGEU_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
20
- const ctx = chunkD7QHLGEU_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
21
- const [versions, deployedVersion] = await Promise.all([chunkD7QHLGEU_cjs.artifacts_exports.SiteAssetArtifactsService.fetchSiteVersions(clientCtx, application), chunkD7QHLGEU_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid)]);
19
+ const repositoryRid = await chunkJFYC74FJ_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
20
+ const ctx = chunkJFYC74FJ_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
21
+ const [versions, deployedVersion] = await Promise.all([chunkJFYC74FJ_cjs.artifacts_exports.SiteAssetArtifactsService.fetchSiteVersions(clientCtx, application), chunkJFYC74FJ_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid)]);
22
22
  if (versions.length === 0) {
23
23
  consola.consola.warn("Successfully connected to server, but no versions were found.");
24
24
  return;
25
25
  }
26
26
  consola.consola.success("Found versions:");
27
- for (const version of versions) {
27
+ const semver = await import('semver');
28
+ const sortedVersions = semver.rsort(versions.filter((v) => semver.valid(v)));
29
+ for (const version of sortedVersions) {
28
30
  consola.consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? utils.colorize("green", ` (deployed)`) : ""}`);
29
31
  }
30
32
  }
31
33
 
32
34
  module.exports = versionListCommand;
33
35
  //# sourceMappingURL=out.js.map
34
- //# sourceMappingURL=versionListCommand-5KM5PFYL.cjs.map
36
+ //# sourceMappingURL=versionListCommand-QYCTS6KU.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,eAAO,mBAA0C;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,sCAAsC;AACpD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,WAAW,WAAW;AACzG,QAAM,MAAM,qBAAqB,YAAY,kBAAkB,aAAa;AAC5E,QAAM,CAAC,UAAU,eAAe,IAAI,MAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B,kBAAkB,WAAW,WAAW,GAAG,qCAA6B,mBAAmB,KAAK,aAAa,CAAC,CAAC;AAC1M,MAAI,SAAS,WAAW,GAAG;AACzB,YAAQ,KAAK,+DAA+D;AAC5E;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,QAAM,SAAS,MAAM,OAAO,QAAQ;AACpC,QAAM,iBAAiB,OAAO,MAAM,SAAS,OAAO,OAAK,OAAO,MAAM,CAAC,CAAC,CAAC;AACzE,aAAW,WAAW,gBAAgB;AACpC,YAAQ,IAAI,SAAS,OAAO,GAAG,mBAAmB,YAAY,gBAAgB,UAAU,SAAS,SAAS,aAAa,IAAI,EAAE,EAAE;AAAA,EACjI;AACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } 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 repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(clientCtx, application), ArtifactsSitesAdminV2Service.getDeployedVersion(ctx, repositoryRid)]);\n if (versions.length === 0) {\n consola.warn(\"Successfully connected to server, but no versions were found.\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(versions.filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkD7QHLGEU_cjs = require('./chunk-D7QHLGEU.cjs');
4
- require('./chunk-HYF3CTKZ.cjs');
3
+ var chunkJFYC74FJ_cjs = require('./chunk-JFYC74FJ.cjs');
4
+ require('./chunk-HZ3XILMW.cjs');
5
5
  require('./chunk-HQDDGVB7.cjs');
6
6
  var consola = require('consola');
7
7
 
@@ -13,13 +13,13 @@ async function versionSetCommand({
13
13
  tokenFile
14
14
  }) {
15
15
  consola.consola.start(`Setting live version`);
16
- const loadedToken = await chunkD7QHLGEU_cjs.loadToken(token, tokenFile);
16
+ const loadedToken = await chunkJFYC74FJ_cjs.loadToken(token, tokenFile);
17
17
  const tokenProvider = () => loadedToken;
18
- const clientCtx = chunkD7QHLGEU_cjs.createInternalClientContext(foundryUrl, tokenProvider);
19
- const repositoryRid = await chunkD7QHLGEU_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
20
- const ctx = chunkD7QHLGEU_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
18
+ const clientCtx = chunkJFYC74FJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
19
+ const repositoryRid = await chunkJFYC74FJ_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
20
+ const ctx = chunkJFYC74FJ_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
21
21
  if (version) {
22
- await chunkD7QHLGEU_cjs.ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
22
+ await chunkJFYC74FJ_cjs.ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
23
23
  siteVersion: {
24
24
  version
25
25
  }
@@ -30,4 +30,4 @@ async function versionSetCommand({
30
30
 
31
31
  module.exports = versionSetCommand;
32
32
  //# sourceMappingURL=out.js.map
33
- //# sourceMappingURL=versionSetCommand-VD3L5DOV.cjs.map
33
+ //# sourceMappingURL=versionSetCommand-K4SDBPLB.cjs.map
@@ -1,5 +1,5 @@
1
- import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-XNYKWAIE.mjs';
2
- import './chunk-GTNZA5UY.mjs';
1
+ import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-EZIJJWAA.mjs';
2
+ import './chunk-CLAEREOL.mjs';
3
3
  import './chunk-E2SEJZTC.mjs';
4
4
  import { consola } from 'consola';
5
5
 
@@ -28,4 +28,4 @@ async function versionSetCommand({
28
28
 
29
29
  export { versionSetCommand as default };
30
30
  //# sourceMappingURL=out.js.map
31
- //# sourceMappingURL=versionSetCommand-LHOVVI6U.mjs.map
31
+ //# sourceMappingURL=versionSetCommand-UWPAQ7NV.mjs.map
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
4
+ var chunkJFYC74FJ_cjs = require('./chunk-JFYC74FJ.cjs');
5
+ require('./chunk-HZ3XILMW.cjs');
6
+ require('./chunk-HQDDGVB7.cjs');
7
+ var consola = require('consola');
8
+ var utils = require('consola/utils');
9
+
10
+ async function versionUnsetCommand({
11
+ yes,
12
+ application,
13
+ foundryUrl,
14
+ token,
15
+ tokenFile
16
+ }) {
17
+ if (!yes) {
18
+ const confirmed = await consola.consola.prompt(`Are you sure you want to clear the live site version?
19
+ ${utils.colorize("bold", "Your site will no longer be accessible until a new live site version is set.")}`, {
20
+ type: "confirm"
21
+ });
22
+ chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
23
+ }
24
+ const loadedToken = await chunkJFYC74FJ_cjs.loadToken(token, tokenFile);
25
+ const tokenProvider = () => loadedToken;
26
+ const clientCtx = chunkJFYC74FJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
27
+ consola.consola.start("Clearing live site version");
28
+ const repositoryRid = await chunkJFYC74FJ_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
29
+ const ctx = chunkJFYC74FJ_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
30
+ await chunkJFYC74FJ_cjs.ArtifactsSitesAdminV2Service_exports.clearDeployedVersion(ctx, repositoryRid);
31
+ consola.consola.success("Cleared live site version");
32
+ }
33
+
34
+ module.exports = versionUnsetCommand;
35
+ //# sourceMappingURL=out.js.map
36
+ //# sourceMappingURL=versionUnsetCommand-INDJ26MO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,WAAW,WAAW;AACzG,QAAM,MAAM,qBAAqB,YAAY,kBAAkB,aAAa;AAC5E,QAAM,qCAA6B,qBAAqB,KAAK,aAAa;AAC1E,UAAQ,QAAQ,2BAA2B;AAC7C","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } 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 const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n await ArtifactsSitesAdminV2Service.clearDeployedVersion(ctx, repositoryRid);\n consola.success(\"Cleared live site version\");\n}"]}
@@ -1,14 +1,24 @@
1
- import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-XNYKWAIE.mjs';
2
- import './chunk-GTNZA5UY.mjs';
1
+ import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
2
+ import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-EZIJJWAA.mjs';
3
+ import './chunk-CLAEREOL.mjs';
3
4
  import './chunk-E2SEJZTC.mjs';
4
5
  import { consola } from 'consola';
6
+ import { colorize } from 'consola/utils';
5
7
 
6
8
  async function versionUnsetCommand({
9
+ yes,
7
10
  application,
8
11
  foundryUrl,
9
12
  token,
10
13
  tokenFile
11
14
  }) {
15
+ if (!yes) {
16
+ const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?
17
+ ${colorize("bold", "Your site will no longer be accessible until a new live site version is set.")}`, {
18
+ type: "confirm"
19
+ });
20
+ handlePromptCancel(confirmed);
21
+ }
12
22
  const loadedToken = await loadToken(token, tokenFile);
13
23
  const tokenProvider = () => loadedToken;
14
24
  const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
@@ -21,4 +31,4 @@ async function versionUnsetCommand({
21
31
 
22
32
  export { versionUnsetCommand as default };
23
33
  //# sourceMappingURL=out.js.map
24
- //# sourceMappingURL=versionUnsetCommand-IJT4JWBN.mjs.map
34
+ //# sourceMappingURL=versionUnsetCommand-PZRZPTPR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":[],"mappings":";;;;;;;;;;;;;;AAgBA,SAAS,eAAe;AAExB,SAAS,gBAAgB;AAGzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,KAAK;AACR,UAAM,YAAY,MAAM,QAAQ,OAAO;AAAA,EAA0D,SAAS,QAAQ,8EAA8E,CAAC,IAAI;AAAA,MACnM,MAAM;AAAA,IACR,CAAC;AACD,uBAAmB,SAAS;AAAA,EAC9B;AACA,QAAM,cAAc,MAAM,UAAU,OAAO,SAAS;AACpD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,YAAY,4BAA4B,YAAY,aAAa;AACvE,UAAQ,MAAM,4BAA4B;AAC1C,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,WAAW,WAAW;AACzG,QAAM,MAAM,qBAAqB,YAAY,kBAAkB,aAAa;AAC5E,QAAM,qCAA6B,qBAAqB,KAAK,aAAa;AAC1E,UAAQ,QAAQ,2BAA2B;AAC7C","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } 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 const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n await ArtifactsSitesAdminV2Service.clearDeployedVersion(ctx, repositoryRid);\n consola.success(\"Cleared live site version\");\n}"]}
@@ -1,4 +1,6 @@
1
1
  export declare class ExitProcessError extends Error {
2
2
  readonly errorCode: number;
3
- constructor(errorCode: number, msg?: string);
3
+ readonly msg?: string | undefined;
4
+ readonly tip?: string | undefined;
5
+ constructor(errorCode: number, msg?: string | undefined, tip?: string | undefined);
4
6
  }
@@ -1,4 +1,4 @@
1
1
  import type { CliCommonArgs } from "../../CliCommonArgs.js";
2
2
  export interface CommonAuthArgs extends CliCommonArgs {
3
- baseUrl: string;
3
+ foundryUrl: string;
4
4
  }
@@ -1,4 +1,4 @@
1
1
  import type { CommonAuthArgs } from "../CommonAuthArgs.js";
2
2
  export interface LoginArgs extends CommonAuthArgs {
3
- applicationId: string;
3
+ clientId: string;
4
4
  }
@@ -1,8 +1,9 @@
1
+ import type { AutoVersionConfigType } from "../../../util/config.js";
1
2
  import type { CommonSiteArgs } from "../CommonSiteArgs.js";
2
3
  export interface SiteDeployArgs extends CommonSiteArgs {
3
4
  version?: string;
4
5
  directory: string;
5
6
  uploadOnly: boolean;
6
- autoVersion?: string;
7
+ autoVersion?: AutoVersionConfigType;
7
8
  gitTagPrefix?: string;
8
9
  }
@@ -1,2 +1,9 @@
1
+ import type { AutoVersionConfig } from "../../../util/config.js";
1
2
  import type { SiteDeployArgs } from "./SiteDeployArgs.js";
2
- export default function siteDeployCommand({ version, application, foundryUrl, autoVersion, gitTagPrefix, uploadOnly, directory, token, tokenFile, }: SiteDeployArgs): Promise<void>;
3
+ interface SiteDeployInternalArgs extends Omit<SiteDeployArgs, "version" | "autoVersion"> {
4
+ selectedVersion: string | AutoVersionConfig;
5
+ directory: string;
6
+ uploadOnly: boolean;
7
+ }
8
+ export default function siteDeployCommand({ selectedVersion, application, foundryUrl, uploadOnly, directory, token, tokenFile, }: SiteDeployInternalArgs): Promise<void>;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
+ export interface VersionDeleteArgs extends CommonSiteArgs {
3
+ version: string;
4
+ yes?: boolean;
5
+ }
@@ -1,5 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
2
  import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
3
- import type { SiteVersionArgs } from "../SiteVersionArgs.js";
4
- declare const command: CommandModule<CommonSiteArgs, SiteVersionArgs>;
3
+ import type { VersionDeleteArgs } from "./VersionDeleteArgs.js";
4
+ declare const command: CommandModule<CommonSiteArgs, VersionDeleteArgs>;
5
5
  export default command;
@@ -1,2 +1,2 @@
1
- import type { SiteVersionArgs } from "../SiteVersionArgs.js";
2
- export default function versionDeleteCommand({ version, application, foundryUrl, token, tokenFile }: SiteVersionArgs): Promise<void>;
1
+ import type { VersionDeleteArgs } from "./VersionDeleteArgs.js";
2
+ export default function versionDeleteCommand({ version, yes, application, foundryUrl, token, tokenFile }: VersionDeleteArgs): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
+ export interface VersionGetArgs extends CommonSiteArgs {
3
+ }
@@ -1,4 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
2
  import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
3
- declare const command: CommandModule<CommonSiteArgs, CommonSiteArgs>;
3
+ import type { VersionGetArgs } from "./VersionGetArgs.js";
4
+ declare const command: CommandModule<CommonSiteArgs, VersionGetArgs>;
4
5
  export default command;
@@ -1,2 +1,2 @@
1
- import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
- export default function versionGetCommand({ foundryUrl, application, token, tokenFile }: CommonSiteArgs): Promise<void>;
1
+ import type { VersionGetArgs } from "./VersionGetArgs.js";
2
+ export default function versionGetCommand({ foundryUrl, application, token, tokenFile }: VersionGetArgs): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
+ export interface VersionListArgs extends CommonSiteArgs {
3
+ }
@@ -1,4 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
2
  import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
3
- declare const command: CommandModule<CommonSiteArgs, CommonSiteArgs>;
3
+ import type { VersionListArgs } from "./VersionListArgs.js";
4
+ declare const command: CommandModule<CommonSiteArgs, VersionListArgs>;
4
5
  export default command;
@@ -1,2 +1,2 @@
1
- import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
- export default function versionListCommand({ foundryUrl, application, token, tokenFile }: CommonSiteArgs): Promise<void>;
1
+ import type { VersionListArgs } from "./VersionListArgs.js";
2
+ export default function versionListCommand({ foundryUrl, application, token, tokenFile }: VersionListArgs): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
+ export interface VersionSetArgs extends CommonSiteArgs {
3
+ version: string;
4
+ }
@@ -1,5 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
2
  import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
3
- import type { SiteVersionArgs } from "../SiteVersionArgs.js";
4
- declare const command: CommandModule<CommonSiteArgs, SiteVersionArgs>;
3
+ import type { VersionSetArgs } from "./VersionSetArgs.js";
4
+ declare const command: CommandModule<CommonSiteArgs, VersionSetArgs>;
5
5
  export default command;
@@ -1,2 +1,2 @@
1
- import type { SiteVersionArgs } from "../SiteVersionArgs.js";
2
- export default function versionSetCommand({ version, application, foundryUrl, token, tokenFile }: SiteVersionArgs): Promise<void>;
1
+ import type { VersionSetArgs } from "./VersionSetArgs.js";
2
+ export default function versionSetCommand({ version, application, foundryUrl, token, tokenFile }: VersionSetArgs): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
+ export interface VersionUnsetArgs extends CommonSiteArgs {
3
+ yes?: boolean;
4
+ }
@@ -1,4 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
2
  import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
3
- declare const command: CommandModule<CommonSiteArgs, CommonSiteArgs>;
3
+ import type { VersionUnsetArgs } from "./VersionUnsetArgs.js";
4
+ declare const command: CommandModule<CommonSiteArgs, VersionUnsetArgs>;
4
5
  export default command;
@@ -1,2 +1,2 @@
1
- import type { CommonSiteArgs } from "../../CommonSiteArgs.js";
2
- export default function versionUnsetCommand({ application, foundryUrl, token, tokenFile }: CommonSiteArgs): Promise<void>;
1
+ import type { VersionUnsetArgs } from "./VersionUnsetArgs.js";
2
+ export default function versionUnsetCommand({ yes, application, foundryUrl, token, tokenFile }: VersionUnsetArgs): Promise<void>;
@@ -2,7 +2,7 @@ export interface TypescriptGenerateArgs {
2
2
  outDir: string;
3
3
  ontologyPath?: string;
4
4
  ontologyWritePath?: string;
5
- stack?: string;
5
+ foundryUrl?: string;
6
6
  clientId?: string;
7
7
  beta?: boolean;
8
8
  packageType: "commonjs" | "module";
@@ -0,0 +1 @@
1
+ export declare function handlePromptCancel(promptResponse: any): void;
@@ -0,0 +1 @@
1
+ export declare const USER_AGENT: string;
@@ -1,4 +1,5 @@
1
1
  export { ArtifactsSitesAdminV2Service } from "../generated/artifacts-sites/index.js";
2
+ export type { SiteDomainInfo } from "../generated/artifacts-sites/SiteDomainInfo.js";
2
3
  export * as artifacts from "./artifacts/index.mjs";
3
4
  export { createConjureContext } from "./createConjureContext.mjs";
4
5
  export { createInternalClientContext } from "./createInternalClientContext.mjs";
@@ -2,7 +2,8 @@ export interface GitDescribeAutoVersionConfig {
2
2
  type: "git-describe";
3
3
  tagPrefix?: string;
4
4
  }
5
- type AutoVersionConfig = GitDescribeAutoVersionConfig;
5
+ export type AutoVersionConfig = GitDescribeAutoVersionConfig;
6
+ export type AutoVersionConfigType = AutoVersionConfig["type"];
6
7
  export interface SiteConfig {
7
8
  application: string;
8
9
  directory: string;
@@ -22,4 +23,3 @@ export interface LoadedFoundryConfig {
22
23
  * @throws Will throw an error if the configuration file is found but cannot be read or parsed.
23
24
  */
24
25
  export declare function loadFoundryConfig(): Promise<LoadedFoundryConfig | undefined>;
25
- export {};
@@ -11,10 +11,10 @@ interface LoadedToken {
11
11
  token: string;
12
12
  }
13
13
  /**
14
- * Synchronously reads a JWT Auth Token from a file.
14
+ * Reads a JWT Auth Token from a file.
15
15
  * @param filePath The path to the token file.
16
16
  * @returns The token as a string.
17
- * @throws An error if the file cannot be read or if the file does not contain a valid JWT.
17
+ * @throws An error if the file cannot be read.
18
18
  */
19
19
  export declare function loadTokenFile(filePath: string): Promise<LoadedToken>;
20
20
  export declare function validate(token: string): void;
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Review CLI docs wording
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/54
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Prompt user for destructive CLI commands
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/56
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Display site link after CLI site deploy command
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/58
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Harmonize usage of optional `foundryUrl` across all cli commands
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/50
@@ -0,0 +1,5 @@
1
+ type: improvement
2
+ improvement:
3
+ description: Handle version/autoVersion selection in the parsing layer
4
+ links:
5
+ - https://github.com/palantir/osdk-ts/pull/52