@osdk/cli 0.0.4 → 0.0.6

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 (103) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/js/{chunk-B2HWA3VZ.mjs → chunk-2LNCUMIA.cjs} +5 -2
  3. package/build/js/chunk-AFLYFRYO.cjs +16 -0
  4. package/build/js/chunk-AFLYFRYO.cjs.map +1 -0
  5. package/build/js/chunk-LBGQDFFN.js +1 -4
  6. package/build/js/chunk-NOVNYG3L.js +11 -0
  7. package/build/js/chunk-NOVNYG3L.js.map +1 -0
  8. package/build/js/handleSiteDeploy-2C2WC2A7.js +9 -0
  9. package/build/js/handleSiteDeploy-2C2WC2A7.js.map +1 -0
  10. package/build/js/handleSiteDeploy-4O4DUUB6.cjs +11 -0
  11. package/build/js/handleSiteDeploy-4O4DUUB6.cjs.map +1 -0
  12. package/build/js/index.cjs +35 -0
  13. package/build/js/index.cjs.map +1 -0
  14. package/build/js/index.js +6 -31
  15. package/build/js/index.js.map +1 -1
  16. package/build/js/siteDeleteCommand-GQCHP3EN.js +9 -0
  17. package/build/js/siteDeleteCommand-ZXXHDOOM.cjs +11 -0
  18. package/build/js/{siteUploadCommand-F37O2BSG.mjs → siteUploadCommand-4ZL5TAIW.js} +4 -4
  19. package/build/js/{siteUploadCommand-SK4GDXFX.js → siteUploadCommand-5AYNOXAT.cjs} +4 -4
  20. package/build/js/siteVersionsCommand-ZUFBC6EH.js +10 -0
  21. package/build/js/siteVersionsCommand-ZUFBC6EH.js.map +1 -0
  22. package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs +12 -0
  23. package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs.map +1 -0
  24. package/build/types/commands/site/delete/DeleteArgs.d.ts +1 -1
  25. package/build/types/commands/site/delete/index.d.ts +2 -2
  26. package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +1 -1
  27. package/build/types/commands/site/deploy/handleSiteDeploy.d.mts +1 -1
  28. package/build/types/commands/site/deploy/index.d.ts +2 -2
  29. package/build/types/commands/site/upload/UploadArgs.d.ts +1 -1
  30. package/build/types/commands/site/upload/index.d.ts +2 -2
  31. package/build/types/commands/site/versions/siteVersionsCommand.d.mts +1 -1
  32. package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +3 -0
  33. package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +3 -0
  34. package/build/types/generated/artifacts-admin/ArtifactsAdminService.d.ts +2 -0
  35. package/build/types/generated/artifacts-admin/ClearDeletedUserRepositoriesRequest.d.ts +3 -0
  36. package/build/types/generated/artifacts-admin/ContainerRegistryDomainResponse.d.ts +3 -0
  37. package/build/types/generated/artifacts-admin/index.d.ts +3 -0
  38. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.d.ts +2 -0
  39. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.d.ts +3 -0
  40. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.d.ts +3 -0
  41. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService.d.ts +3 -0
  42. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +2 -0
  43. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +3 -0
  44. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +3 -0
  45. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +3 -0
  46. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +3 -0
  47. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +4 -0
  48. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +3 -0
  49. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +4 -0
  50. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +3 -0
  51. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +3 -0
  52. package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts +10 -0
  53. package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +3 -0
  54. package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts +1 -0
  55. package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts +1 -0
  56. package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts +1 -0
  57. package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +6 -0
  58. package/build/types/generated/artifacts-sites/DeploySiteRequest.d.ts +7 -0
  59. package/build/types/generated/artifacts-sites/DeploymentInfo.d.ts +6 -0
  60. package/build/types/generated/artifacts-sites/DomainName.d.ts +3 -0
  61. package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts +4 -0
  62. package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts +6 -0
  63. package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts +1 -0
  64. package/build/types/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.d.ts +2 -0
  65. package/build/types/generated/artifacts-sites/SitesDomainRegistryService.d.ts +1 -0
  66. package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts +7 -0
  67. package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts +4 -0
  68. package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts +4 -0
  69. package/build/types/generated/artifacts-sites/index.d.ts +18 -0
  70. package/build/types/index.d.ts +1 -1
  71. package/build/types/net/artifacts/index.d.mts +0 -1
  72. package/build/types/net/createConjureContext.d.mts +2 -0
  73. package/build/types/net/index.d.mts +2 -0
  74. package/build/types/yargs/logVersionMiddleware.d.ts +1 -1
  75. package/package.json +7 -2
  76. package/build/js/chunk-3T6ZEX2P.js +0 -12
  77. package/build/js/chunk-3T6ZEX2P.js.map +0 -1
  78. package/build/js/chunk-V7N7LKX3.mjs +0 -10
  79. package/build/js/chunk-V7N7LKX3.mjs.map +0 -1
  80. package/build/js/handleSiteDeploy-75PKAAEV.js +0 -11
  81. package/build/js/handleSiteDeploy-75PKAAEV.js.map +0 -1
  82. package/build/js/handleSiteDeploy-MCIRO5BB.mjs +0 -9
  83. package/build/js/handleSiteDeploy-MCIRO5BB.mjs.map +0 -1
  84. package/build/js/index.mjs +0 -10
  85. package/build/js/index.mjs.map +0 -1
  86. package/build/js/siteDeleteCommand-7QIAJLKJ.mjs +0 -9
  87. package/build/js/siteDeleteCommand-QIT2NBQ5.js +0 -11
  88. package/build/js/siteVersionsCommand-K6M7GBIK.mjs +0 -10
  89. package/build/js/siteVersionsCommand-K6M7GBIK.mjs.map +0 -1
  90. package/build/js/siteVersionsCommand-LJJ3SJNM.js +0 -12
  91. package/build/js/siteVersionsCommand-LJJ3SJNM.js.map +0 -1
  92. package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/clearSiteVersion.d.mts +0 -2
  93. package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/deploySiteVersion.d.mts +0 -5
  94. package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/fetchDeployedVersion.d.mts +0 -3
  95. package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/getSitesAdminV2ServiceBaseUrl.d.mts +0 -1
  96. package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/index.d.mts +0 -5
  97. package/build/types/net/artifacts/conjure/index.d.mts +0 -1
  98. /package/build/js/{chunk-B2HWA3VZ.mjs.map → chunk-2LNCUMIA.cjs.map} +0 -0
  99. /package/build/js/{siteDeleteCommand-QIT2NBQ5.js.map → siteDeleteCommand-GQCHP3EN.js.map} +0 -0
  100. /package/build/js/{siteDeleteCommand-7QIAJLKJ.mjs.map → siteDeleteCommand-ZXXHDOOM.cjs.map} +0 -0
  101. /package/build/js/{siteUploadCommand-SK4GDXFX.js.map → siteUploadCommand-4ZL5TAIW.js.map} +0 -0
  102. /package/build/js/{siteUploadCommand-F37O2BSG.mjs.map → siteUploadCommand-5AYNOXAT.cjs.map} +0 -0
  103. /package/build/types/{net/artifacts/conjure/ArtifactsSitesAdminV2Service/SiteVersion.d.mts → generated/artifacts-sites/SiteVersion.d.ts} +0 -0
@@ -1,10 +0,0 @@
1
- import { b as b$1 } from './chunk-B2HWA3VZ.mjs';
2
- import v from 'yargs';
3
- import { hideBin } from 'yargs/helpers';
4
- import * as m from 'fs';
5
-
6
- var u={command:"delete",describe:"Delete an uploaded version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteDeleteCommand-7QIAJLKJ.mjs')).default(o);}},t=u;var f={command:"deploy",describe:"Deploy an uploaded version",builder:o=>o.options({siteVersion:{type:"string",conflicts:"clearVersion"},undeploy:{alias:"clearVersion",description:"Causes the site to no longer be deployed",type:"boolean",conflicts:"siteVersion"}}).group(["siteVersion","clearVersion"],"Version To Deploy (requires one of)"),handler:async o=>{await(await import('./handleSiteDeploy-MCIRO5BB.mjs')).default(o);}},a=f;var g={command:"upload",describe:"Upload an application version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteUploadCommand-F37O2BSG.mjs')).default(o);}},i=g;var y={command:"versions",describe:"List application versions",builder:o=>o,handler:async o=>{await(await import('./siteVersionsCommand-K6M7GBIK.mjs')).default(o);}},s=y;var b={command:"site",describe:"Manage your site",builder:o=>o.options({appRid:{type:"string",demandOption:!0,coerce:e=>e},baseUrl:{type:"string",demandOption:!0}}).group(["appRid","baseUrl"],"Common Arguments").command(s).command(i).command(t).command(a).demandCommand(),handler:async o=>{}},d=b;async function c(){let{findUp:o}=await import('find-up'),e=await o("package.json");if(!e)return "(unknown version. No package.json found)";let n=JSON.parse(await m.promises.readFile(e,"utf-8"));return n.version?`v${n.version}`:"(unknown version. No version in package.json found)"}var p=!0;async function l(o){if(p){let n=(await import('consola')).consola;n.info(`Palantir OSDK CLI ${await c()}`),n.level=3+o.verbose,n.level>3&&n.debug(`Verbose logging enabled (${n.level===4?"debug":"trace"})`),console.log(),p=!1;}}async function x(o=process.argv){let e=v(hideBin(o)).env("OSDK").version(!1).option("verbose",{alias:"v",type:"boolean",description:"Enable verbose logging",count:!0}).demandCommand().middleware(l,!0).strict().command(d);try{return e.parseAsync()}catch(n){n instanceof b$1&&(await import('consola')).consola.error(n.message);}}
7
-
8
- export { x as cli };
9
- //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","e","ExitProcessError"],"mappings":"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","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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command(site);\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\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 command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete\";\nimport siteDeploy from \"./deploy\";\nimport upload from \"./upload\";\nimport versions from \"./versions\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\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 * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\");\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\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 { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
@@ -1,9 +0,0 @@
1
- import { a } from './chunk-V7N7LKX3.mjs';
2
- import './chunk-B2HWA3VZ.mjs';
3
- import { consola } from 'consola';
4
-
5
- async function i(e){await a.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.success("Delete successful");}
6
-
7
- export { i as default };
8
- //# sourceMappingURL=out.js.map
9
- //# sourceMappingURL=siteDeleteCommand-7QIAJLKJ.mjs.map
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk3T6ZEX2P_js = require('./chunk-3T6ZEX2P.js');
4
- require('./chunk-LBGQDFFN.js');
5
- var consola = require('consola');
6
-
7
- async function i(e){await chunk3T6ZEX2P_js.a.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.consola.success("Delete successful");}
8
-
9
- module.exports = i;
10
- //# sourceMappingURL=out.js.map
11
- //# sourceMappingURL=siteDeleteCommand-QIT2NBQ5.js.map
@@ -1,10 +0,0 @@
1
- import { a } from './chunk-V7N7LKX3.mjs';
2
- import './chunk-B2HWA3VZ.mjs';
3
- import { consola } from 'consola';
4
- import { colorize } from 'consola/utils';
5
-
6
- async function c(e){consola.start("Fetching versions & deployed version");let[r,i]=await Promise.all([a.SiteAssetArtifactsService.fetchSiteVersions(e.baseUrl,e.appRid),a.conjure.ArtifactsSitesAdminV2Service.fetchDeployedVersion(e.baseUrl,e.appRid)]);if(r.length==0){consola.warn("Successfully connected to server, but no versions were found.");return}consola.success("Found versions:");for(let n of r)consola.log(` - ${n}${i&&n===i.version?colorize("green"," (deployed)"):""}`);}
7
-
8
- export { c as default };
9
- //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=siteVersionsCommand-K6M7GBIK.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":["consola","colorize","siteVersionsCommand","args","versions","deployedVersion","artifacts_exports","version"],"mappings":"sEAgBA,OAAS,WAAAA,MAAe,UACxB,OAAS,YAAAC,MAAgB,gBAEzB,eAAOC,EAA2CC,EAAM,CACtDH,EAAQ,MAAM,sCAAsC,EACpD,GAAM,CAACI,EAAUC,CAAe,EAAI,MAAM,QAAQ,IAAI,CAACC,EAAU,0BAA0B,kBAAkBH,EAAK,QAASA,EAAK,MAAM,EAAGG,EAAU,QAAQ,6BAA6B,qBAAqBH,EAAK,QAASA,EAAK,MAAM,CAAC,CAAC,EACxO,GAAIC,EAAS,QAAU,EAAG,CACxBJ,EAAQ,KAAK,+DAA+D,EAC5E,MACF,CACAA,EAAQ,QAAQ,iBAAiB,EACjC,QAAWO,KAAWH,EACpBJ,EAAQ,IAAI,SAASO,CAAO,GAAGF,GAAmBE,IAAYF,EAAgB,QAAUJ,EAAS,QAAS,aAAa,EAAI,EAAE,EAAE,CAEnI","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 { colorize } from \"consola/utils\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function siteVersionsCommand(args) {\n consola.start(\"Fetching versions & deployed version\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(args.baseUrl, args.appRid), artifacts.conjure.ArtifactsSitesAdminV2Service.fetchDeployedVersion(args.baseUrl, args.appRid)]);\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 for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk3T6ZEX2P_js = require('./chunk-3T6ZEX2P.js');
4
- require('./chunk-LBGQDFFN.js');
5
- var consola = require('consola');
6
- var utils = require('consola/utils');
7
-
8
- async function c(e){consola.consola.start("Fetching versions & deployed version");let[r,i]=await Promise.all([chunk3T6ZEX2P_js.a.SiteAssetArtifactsService.fetchSiteVersions(e.baseUrl,e.appRid),chunk3T6ZEX2P_js.a.conjure.ArtifactsSitesAdminV2Service.fetchDeployedVersion(e.baseUrl,e.appRid)]);if(r.length==0){consola.consola.warn("Successfully connected to server, but no versions were found.");return}consola.consola.success("Found versions:");for(let n of r)consola.consola.log(` - ${n}${i&&n===i.version?utils.colorize("green"," (deployed)"):""}`);}
9
-
10
- module.exports = c;
11
- //# sourceMappingURL=out.js.map
12
- //# sourceMappingURL=siteVersionsCommand-LJJ3SJNM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":["consola","colorize","siteVersionsCommand","args","versions","deployedVersion","artifacts_exports","version"],"mappings":"oEAgBA,OAAS,WAAAA,MAAe,UACxB,OAAS,YAAAC,MAAgB,gBAEzB,eAAOC,EAA2CC,EAAM,CACtDH,EAAQ,MAAM,sCAAsC,EACpD,GAAM,CAACI,EAAUC,CAAe,EAAI,MAAM,QAAQ,IAAI,CAACC,EAAU,0BAA0B,kBAAkBH,EAAK,QAASA,EAAK,MAAM,EAAGG,EAAU,QAAQ,6BAA6B,qBAAqBH,EAAK,QAASA,EAAK,MAAM,CAAC,CAAC,EACxO,GAAIC,EAAS,QAAU,EAAG,CACxBJ,EAAQ,KAAK,+DAA+D,EAC5E,MACF,CACAA,EAAQ,QAAQ,iBAAiB,EACjC,QAAWO,KAAWH,EACpBJ,EAAQ,IAAI,SAASO,CAAO,GAAGF,GAAmBE,IAAYF,EAAgB,QAAUJ,EAAS,QAAS,aAAa,EAAI,EAAE,EAAE,CAEnI","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 { colorize } from \"consola/utils\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function siteVersionsCommand(args) {\n consola.start(\"Fetching versions & deployed version\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(args.baseUrl, args.appRid), artifacts.conjure.ArtifactsSitesAdminV2Service.fetchDeployedVersion(args.baseUrl, args.appRid)]);\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 for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
@@ -1,2 +0,0 @@
1
- import type { ThirdPartyAppRid } from "../../../ThirdPartyAppRid.js";
2
- export declare function clearSiteVersion(baseUrl: string, thirdPartyAppRid: ThirdPartyAppRid): Promise<boolean>;
@@ -1,5 +0,0 @@
1
- import type { ThirdPartyAppRid } from "../../../ThirdPartyAppRid.js";
2
- export interface SiteAssetVersions {
3
- versions: string[];
4
- }
5
- export declare function deploySiteVersion(baseUrl: string, thirdPartyAppRid: ThirdPartyAppRid, version: string): Promise<boolean>;
@@ -1,3 +0,0 @@
1
- import type { ThirdPartyAppRid } from "../../../ThirdPartyAppRid.js";
2
- import type { SiteVersion } from "./SiteVersion.mjs";
3
- export declare function fetchDeployedVersion(baseUrl: string, thirdPartyAppRid: ThirdPartyAppRid): Promise<SiteVersion | undefined>;
@@ -1 +0,0 @@
1
- export declare function getSitesAdminV2ServiceBaseUrl(baseUrl: string): string;
@@ -1,5 +0,0 @@
1
- export { clearSiteVersion } from "./clearSiteVersion.mjs";
2
- export { deploySiteVersion } from "./deploySiteVersion.mjs";
3
- export type { SiteAssetVersions } from "./deploySiteVersion.mjs";
4
- export { fetchDeployedVersion } from "./fetchDeployedVersion.mjs";
5
- export type { SiteVersion } from "./SiteVersion.mjs";
@@ -1 +0,0 @@
1
- export * as ArtifactsSitesAdminV2Service from "./ArtifactsSitesAdminV2Service/index.mjs";