@osdk/cli 0.0.20 → 0.1.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.
- package/CHANGELOG.md +14 -0
- package/bin/osdk.mjs +1 -1
- package/build/{js/chunk-HQDDGVB7.cjs → cjs/chunk-7G2FSZUY.cjs} +1 -1
- package/build/{js/chunk-Z3LZT4RA.cjs → cjs/chunk-J5TXVYYM.cjs} +6 -6
- package/build/{js/handleGenerate-UTCLNZQO.cjs → cjs/handleGenerate-MNCDSJ6T.cjs} +2 -2
- package/build/{js/handleSiteDeploy-7RXIGPRZ.cjs → cjs/handleSiteDeploy-CT4IWYMB.cjs} +7 -7
- package/build/{js/handleSiteDeploy-6FPVGWP5.mjs.map → cjs/handleSiteDeploy-CT4IWYMB.cjs.map} +1 -1
- package/build/{js → cjs}/index.cjs +7 -7
- package/build/{js → cjs}/index.cjs.map +1 -1
- package/build/{types/cli.d.ts → cjs/index.d.cts} +3 -1
- package/build/{js/loginFlow-BZDDHHT5.cjs → cjs/loginFlow-HJZRKA26.cjs} +2 -2
- package/build/cjs/package.json +1 -0
- package/build/{js/siteDeleteCommand-3Z6TWSAT.cjs → cjs/siteDeleteCommand-SECMIIXM.cjs} +4 -4
- package/build/{js/siteUploadCommand-EEFMEFF7.cjs → cjs/siteUploadCommand-G7O6HVUR.cjs} +4 -4
- package/build/{js/siteVersionsCommand-W72FXGBR.cjs → cjs/siteVersionsCommand-3WGBUAVW.cjs} +6 -6
- package/build/cjs/siteVersionsCommand-3WGBUAVW.cjs.map +1 -0
- package/build/{js/chunk-SFT3GWI4.mjs → esm/chunk-LQH5K3SG.mjs} +2 -2
- package/build/{js/chunk-E2SEJZTC.mjs → esm/chunk-ZSTKOCBT.mjs} +1 -1
- package/build/{js/handleGenerate-ER4YF43Z.mjs → esm/handleGenerate-TDSDERL2.mjs} +2 -2
- package/build/{js/handleSiteDeploy-6FPVGWP5.mjs → esm/handleSiteDeploy-WCFGPYWE.mjs} +3 -3
- package/build/{js/handleSiteDeploy-7RXIGPRZ.cjs.map → esm/handleSiteDeploy-WCFGPYWE.mjs.map} +1 -1
- package/build/esm/index.d.ts +8 -0
- package/build/{js → esm}/index.mjs +7 -7
- package/build/{js → esm}/index.mjs.map +1 -1
- package/build/{js/loginFlow-KGLTXVZ6.mjs → esm/loginFlow-AGZNMIRQ.mjs} +2 -2
- package/build/{js/siteDeleteCommand-NWXMLEZE.mjs → esm/siteDeleteCommand-VE3ELAWW.mjs} +3 -3
- package/build/{js/siteUploadCommand-F533LABS.mjs → esm/siteUploadCommand-3PARIRON.mjs} +3 -3
- package/build/{js/siteVersionsCommand-BYUHGHG7.mjs → esm/siteVersionsCommand-Y3HZFE6A.mjs} +3 -3
- package/build/esm/siteVersionsCommand-Y3HZFE6A.mjs.map +1 -0
- package/package.json +28 -19
- package/build/js/siteVersionsCommand-BYUHGHG7.mjs.map +0 -1
- package/build/js/siteVersionsCommand-W72FXGBR.cjs.map +0 -1
- package/build/types/CliCommonArgs.d.ts +0 -3
- package/build/types/ExitProcessError.d.ts +0 -4
- package/build/types/commands/auth/CommonAuthArgs.d.ts +0 -4
- package/build/types/commands/auth/index.d.ts +0 -5
- package/build/types/commands/auth/login/LoginArgs.d.ts +0 -4
- package/build/types/commands/auth/login/index.d.ts +0 -5
- package/build/types/commands/auth/login/loginFlow.d.ts +0 -2
- package/build/types/commands/auth/login/token.d.ts +0 -12
- package/build/types/commands/site/CommonSiteArgs.d.ts +0 -6
- package/build/types/commands/site/delete/DeleteArgs.d.ts +0 -4
- package/build/types/commands/site/delete/index.d.ts +0 -5
- package/build/types/commands/site/delete/siteDeleteCommand.d.mts +0 -2
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +0 -5
- package/build/types/commands/site/deploy/handleSiteDeploy.d.mts +0 -2
- package/build/types/commands/site/deploy/index.d.ts +0 -5
- package/build/types/commands/site/index.d.ts +0 -5
- package/build/types/commands/site/upload/UploadArgs.d.ts +0 -5
- package/build/types/commands/site/upload/index.d.ts +0 -5
- package/build/types/commands/site/upload/siteUploadCommand.d.mts +0 -2
- package/build/types/commands/site/versions/index.d.ts +0 -4
- package/build/types/commands/site/versions/siteVersionsCommand.d.mts +0 -2
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +0 -9
- package/build/types/commands/typescript/generate/generate.d.ts +0 -4
- package/build/types/commands/typescript/generate/handleGenerate.d.mts +0 -2
- package/build/types/commands/typescript/index.d.ts +0 -4
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +0 -7
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +0 -6
- package/build/types/generated/artifacts-admin/ArtifactsAdminService.d.ts +0 -2
- package/build/types/generated/artifacts-admin/ClearDeletedUserRepositoriesRequest.d.ts +0 -3
- package/build/types/generated/artifacts-admin/ContainerRegistryDomainResponse.d.ts +0 -3
- package/build/types/generated/artifacts-admin/index.d.ts +0 -3
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +0 -8
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +0 -8
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +0 -8
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +0 -9
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +0 -10
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +0 -9
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +0 -8
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +0 -12
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +0 -11
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +0 -8
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts +0 -10
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +0 -5
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts +0 -1
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts +0 -1
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts +0 -1
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +0 -12
- package/build/types/generated/artifacts-sites/DomainName.d.ts +0 -3
- package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts +0 -4
- package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts +0 -6
- package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts +0 -1
- package/build/types/generated/artifacts-sites/SiteVersion.d.ts +0 -3
- package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts +0 -7
- package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts +0 -4
- package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts +0 -4
- package/build/types/generated/artifacts-sites/index.d.ts +0 -14
- package/build/types/index.d.ts +0 -1
- package/build/types/net/RepositoryRid.d.ts +0 -1
- package/build/types/net/ThirdPartyAppRid.d.ts +0 -1
- package/build/types/net/artifacts/SiteAssetArtifactsService/SiteAssetVersions.d.mts +0 -3
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts +0 -2
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts +0 -2
- package/build/types/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.d.mts +0 -1
- package/build/types/net/artifacts/SiteAssetArtifactsService/index.d.mts +0 -4
- package/build/types/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts +0 -2
- package/build/types/net/artifacts/index.d.mts +0 -1
- package/build/types/net/createConjureContext.d.mts +0 -2
- package/build/types/net/createFetch.d.mts +0 -1
- package/build/types/net/index.d.mts +0 -4
- package/build/types/net/third-party-application-service/fetchWebsiteRepositoryRid.d.mts +0 -3
- package/build/types/net/third-party-application-service/index.d.mts +0 -1
- package/build/types/readCliVersionFromPackageJson.d.ts +0 -1
- package/build/types/yargs/logVersionMiddleware.d.ts +0 -2
- /package/build/{js → cjs}/chunk-2DZBTS5E.cjs +0 -0
- /package/build/{js → cjs}/chunk-2DZBTS5E.cjs.map +0 -0
- /package/build/{js/chunk-E2SEJZTC.mjs.map → cjs/chunk-7G2FSZUY.cjs.map} +0 -0
- /package/build/{js → cjs}/chunk-HYF3CTKZ.cjs +0 -0
- /package/build/{js → cjs}/chunk-HYF3CTKZ.cjs.map +0 -0
- /package/build/{js/chunk-SFT3GWI4.mjs.map → cjs/chunk-J5TXVYYM.cjs.map} +0 -0
- /package/build/{js/handleGenerate-ER4YF43Z.mjs.map → cjs/handleGenerate-MNCDSJ6T.cjs.map} +0 -0
- /package/build/{js/loginFlow-BZDDHHT5.cjs.map → cjs/loginFlow-HJZRKA26.cjs.map} +0 -0
- /package/build/{js/siteDeleteCommand-3Z6TWSAT.cjs.map → cjs/siteDeleteCommand-SECMIIXM.cjs.map} +0 -0
- /package/build/{js/siteUploadCommand-EEFMEFF7.cjs.map → cjs/siteUploadCommand-G7O6HVUR.cjs.map} +0 -0
- /package/build/{js → esm}/chunk-GTNZA5UY.mjs +0 -0
- /package/build/{js → esm}/chunk-GTNZA5UY.mjs.map +0 -0
- /package/build/{js → esm}/chunk-JFDXL5SV.mjs +0 -0
- /package/build/{js → esm}/chunk-JFDXL5SV.mjs.map +0 -0
- /package/build/{js/chunk-Z3LZT4RA.cjs.map → esm/chunk-LQH5K3SG.mjs.map} +0 -0
- /package/build/{js/chunk-HQDDGVB7.cjs.map → esm/chunk-ZSTKOCBT.mjs.map} +0 -0
- /package/build/{js/handleGenerate-UTCLNZQO.cjs.map → esm/handleGenerate-TDSDERL2.mjs.map} +0 -0
- /package/build/{js/loginFlow-KGLTXVZ6.mjs.map → esm/loginFlow-AGZNMIRQ.mjs.map} +0 -0
- /package/build/{js/siteDeleteCommand-NWXMLEZE.mjs.map → esm/siteDeleteCommand-VE3ELAWW.mjs.map} +0 -0
- /package/build/{js/siteUploadCommand-F533LABS.mjs.map → esm/siteUploadCommand-3PARIRON.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.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/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["command","site","argv"],"mappings":";;;;;;AAgBA,OAAO,WAAW;AAClB,SAAS,eAAe;;;ACDjB,IAAM,UAAU;AAAA,EACrB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,OAAO,iBAAiB;AAAA,MAClC,MAAM;AAAA,MACN,cAAc;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,SAAS,OAAM,SAAQ;AACrB,UAAMA,WAAU,MAAM,OAAO,0BAAgB;AAC7C,UAAMA,SAAQ,QAAQ,IAAI;AAAA,EAC5B;AACF;AACA,IAAO,gBAAQ;;;ACbf,IAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,SAAS;AAAA,QACP,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,IACF,CAAC,EAAE,QAAQ,aAAK,EAAE,cAAc;AAAA,EAClC;AAAA,EACA,SAAS,OAAM,SAAQ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AAO,SAAS;AACtC,cAAQ,QAAQ,MAAM,EAAE,OAAO;AAAA,IACjC;AAAA,EACF;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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n builder: async argv => {\n return argv.command(site).command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n });\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: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"applicationId\", {\n type: \"string\",\n demandOption: true\n });\n },\n handler: async args => {\n const command = await import(\"./loginFlow.js\");\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 login from \"./login/index.js\";\nconst site = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).command(login).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\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/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\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\nexport const command = {\n command: \"generate\",\n describe: \"Generate typescript from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"stack\", \"clientId\"]\n },\n stack: {\n description: \"the URL to the stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\"\n },\n clientId: {\n description: \"the application's client id\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"stack\"\n },\n ontologyWritePath: {\n description: \"path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n }\n }).group([\"ontologyPath\", \"outDir\"], \"Generate from a local file\").group([\"stack\", \"clientId\", \"outDir\", \"ontologyWritePath\"], \"OR Generate from a stack\").check(argv => {\n if (argv.ontologyPath || argv.stack) {\n return true;\n } else {\n throw new Error(\"Error: Must specify either ontologyPath or stack and clientId\");\n }\n });\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.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 generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).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\";\nimport { dirname } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const __dirname = dirname(fileURLToPath(import.meta.url));\n const result = await findUp(\"package.json\", {\n cwd: __dirname\n });\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.js\";\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
|
+
{"version":3,"sources":["../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.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/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["command","site","argv"],"mappings":";;;;;;AAgBA,OAAO,WAAW;AAClB,SAAS,eAAe;;;ACDjB,IAAM,UAAU;AAAA,EACrB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,OAAO,iBAAiB;AAAA,MAClC,MAAM;AAAA,MACN,cAAc;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,SAAS,OAAM,SAAQ;AACrB,UAAMA,WAAU,MAAM,OAAO,0BAAgB;AAC7C,UAAMA,SAAQ,QAAQ,IAAI;AAAA,EAC5B;AACF;AACA,IAAO,gBAAQ;;;ACbf,IAAM,OAAO;AAAA,EACX,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,SAAS;AAAA,QACP,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,IACF,CAAC,EAAE,QAAQ,aAAK,EAAE,cAAc;AAAA,EAClC;AAAA,EACA,SAAS,OAAM,SAAQ;AAAA,E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;AACtC,cAAQ,QAAQ,MAAM,EAAE,OAAO;AAAA,IACjC;AAAA,EACF;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 yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\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({\n command: \"unstable\",\n aliases: [\"experimental\"],\n builder: async argv => {\n return argv.command(site).command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n });\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: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"applicationId\", {\n type: \"string\",\n demandOption: true\n });\n },\n handler: async args => {\n const command = await import(\"./loginFlow.js\");\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 login from \"./login/index.js\";\nconst site = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).command(login).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\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/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\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\nexport const command = {\n command: \"generate\",\n describe: \"Generate typescript from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"stack\", \"clientId\"]\n },\n stack: {\n description: \"the URL to the stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\"\n },\n clientId: {\n description: \"the application's client id\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"stack\"\n },\n ontologyWritePath: {\n description: \"path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n }\n }).group([\"ontologyPath\", \"outDir\"], \"Generate from a local file\").group([\"stack\", \"clientId\", \"outDir\", \"ontologyWritePath\"], \"OR Generate from a stack\").check(argv => {\n if (argv.ontologyPath || argv.stack) {\n return true;\n } else {\n throw new Error(\"Error: Must specify either ontologyPath or stack and clientId\");\n }\n });\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.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 generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).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\";\nimport { dirname } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n // it is safe to use find-up for package.json because the entry point to the cli is osdk.mjs\n // so this file will be in build/esm and will not see the package.json in build/cjs/package.json\n const __dirname = dirname(fileURLToPath(import.meta.url));\n const result = await findUp(\"package.json\", {\n cwd: __dirname\n });\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.js\";\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,6 +1,6 @@
|
|
|
1
|
-
import { artifacts_exports } from './chunk-
|
|
1
|
+
import { artifacts_exports } from './chunk-LQH5K3SG.mjs';
|
|
2
2
|
import './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-ZSTKOCBT.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
6
6
|
async function siteDeleteCommand(args) {
|
|
@@ -10,4 +10,4 @@ async function siteDeleteCommand(args) {
|
|
|
10
10
|
|
|
11
11
|
export { siteDeleteCommand as default };
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=siteDeleteCommand-
|
|
13
|
+
//# sourceMappingURL=siteDeleteCommand-VE3ELAWW.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { artifacts_exports } from './chunk-
|
|
1
|
+
import { artifacts_exports } from './chunk-LQH5K3SG.mjs';
|
|
2
2
|
import { ExitProcessError } from './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-ZSTKOCBT.mjs';
|
|
4
4
|
import archiver from 'archiver';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
6
|
import * as fs from 'fs';
|
|
@@ -30,4 +30,4 @@ async function invokeSiteUpload(args) {
|
|
|
30
30
|
|
|
31
31
|
export { invokeSiteUpload as default };
|
|
32
32
|
//# sourceMappingURL=out.js.map
|
|
33
|
-
//# sourceMappingURL=siteUploadCommand-
|
|
33
|
+
//# sourceMappingURL=siteUploadCommand-3PARIRON.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-
|
|
1
|
+
import { third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-LQH5K3SG.mjs';
|
|
2
2
|
import './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-ZSTKOCBT.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
6
6
|
|
|
@@ -24,4 +24,4 @@ async function siteVersionsCommand({
|
|
|
24
24
|
|
|
25
25
|
export { siteVersionsCommand as default };
|
|
26
26
|
//# sourceMappingURL=out.js.map
|
|
27
|
-
//# sourceMappingURL=siteVersionsCommand-
|
|
27
|
+
//# sourceMappingURL=siteVersionsCommand-Y3HZFE6A.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":[],"mappings":";;;;;;;;;;AAgBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sCAAsC;AACpD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,SAAS,MAAM;AAClG,QAAM,MAAM,qBAAqB,SAAS,gBAAgB;AAC1D,QAAM,CAAC,UAAU,eAAe,IAAI,MAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B,kBAAkB,SAAS,MAAM,GAAG,qCAA6B,mBAAmB,KAAK,aAAa,CAAC,CAAC;AACnM,MAAI,SAAS,UAAU,GAAG;AACxB,YAAQ,KAAK,+DAA+D;AAC5E;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,aAAW,WAAW,UAAU;AAC9B,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 { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, thirdPartyApplicationService } from \"../../../net/index.mjs\";\nexport default async function siteVersionsCommand({\n baseUrl,\n appRid\n}) {\n consola.start(\"Fetching versions & deployed version\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), 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 for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
package/package.json
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./build/esm/index.d.ts",
|
|
11
|
+
"default": "./build/esm/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./build/cjs/index.d.cts",
|
|
15
|
+
"default": "./build/cjs/index.cjs"
|
|
16
|
+
}
|
|
12
17
|
},
|
|
13
18
|
"./*": {
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./build/esm/public/*.d.ts",
|
|
21
|
+
"default": "./build/esm/public/*.mjs"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./build/cjs/public/*.d.cts",
|
|
25
|
+
"default": "./build/cjs/public/*.cjs"
|
|
26
|
+
}
|
|
17
27
|
}
|
|
18
28
|
},
|
|
19
29
|
"dependencies": {
|
|
@@ -23,10 +33,10 @@
|
|
|
23
33
|
"find-up": "^6.3.0",
|
|
24
34
|
"open": "^9.1.0",
|
|
25
35
|
"yargs": "^17.7.2",
|
|
26
|
-
"@osdk/api": "1.0
|
|
27
|
-
"@osdk/gateway": "1.0
|
|
28
|
-
"@osdk/generator": "1.0
|
|
29
|
-
"@osdk/shared.net": "1.0
|
|
36
|
+
"@osdk/api": "1.1.0",
|
|
37
|
+
"@osdk/gateway": "1.1.0",
|
|
38
|
+
"@osdk/generator": "1.1.0",
|
|
39
|
+
"@osdk/shared.net": "1.1.0"
|
|
30
40
|
},
|
|
31
41
|
"devDependencies": {
|
|
32
42
|
"@types/archiver": "^6.0.0",
|
|
@@ -39,29 +49,28 @@
|
|
|
39
49
|
"publishConfig": {
|
|
40
50
|
"access": "public"
|
|
41
51
|
},
|
|
42
|
-
"imports": {
|
|
43
|
-
"#net": "./src/net/index.mts"
|
|
44
|
-
},
|
|
45
52
|
"keywords": [],
|
|
46
53
|
"bin": {
|
|
47
54
|
"osdk": "./bin/osdk.mjs"
|
|
48
55
|
},
|
|
49
56
|
"files": [
|
|
50
|
-
"build/
|
|
51
|
-
"build/
|
|
57
|
+
"build/cjs",
|
|
58
|
+
"build/esm",
|
|
52
59
|
"CHANGELOG.md",
|
|
53
60
|
"package.json",
|
|
54
61
|
"*.d.ts"
|
|
55
62
|
],
|
|
56
|
-
"main": "./build/
|
|
57
|
-
"module": "./build/
|
|
58
|
-
"types": "./build/
|
|
63
|
+
"main": "./build/cjs/index.cjs",
|
|
64
|
+
"module": "./build/esm/index.mjs",
|
|
65
|
+
"types": "./build/cjs/index.d.cts",
|
|
59
66
|
"type": "module",
|
|
60
67
|
"scripts": {
|
|
61
68
|
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
|
|
62
69
|
"dev:transpile": "tsup --watch",
|
|
63
70
|
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
|
|
64
71
|
"lint": "eslint . && dprint check --config $(find-up dprint.json)",
|
|
72
|
+
"test:bin": "./bin/osdk.mjs --help",
|
|
73
|
+
"test:package-types": "if [ -d src/public ]; then ls src/public | sed -e 's/\\(.*\\).ts/--include-entrypoints=\\1/' | xargs pnpm attw --pack .; else pnpm attw --pack .; fi",
|
|
65
74
|
"test:watch": "vitest",
|
|
66
75
|
"transpile": "tsup",
|
|
67
76
|
"transpileWatch": "tsup --watch",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":[],"mappings":";;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sCAAsC;AACpD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,SAAS,MAAM;AAClG,QAAM,MAAM,qBAAqB,SAAS,gBAAgB;AAC1D,QAAM,CAAC,UAAU,eAAe,IAAI,MAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B,kBAAkB,SAAS,MAAM,GAAG,qCAA6B,mBAAmB,KAAK,aAAa,CAAC,CAAC;AACnM,MAAI,SAAS,UAAU,GAAG;AACxB,YAAQ,KAAK,+DAA+D;AAC5E;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,aAAW,WAAW,UAAU;AAC9B,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, thirdPartyApplicationService } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nexport default async function siteVersionsCommand({\n baseUrl,\n appRid\n}) {\n consola.start(\"Fetching versions & deployed version\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), 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 for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":[],"mappings":";;;;;;;;;;AAiBA,SAAS,eAAe;AACxB,SAAS,gBAAgB;AACzB,eAAO,oBAA2C;AAAA,EAChD;AAAA,EACA;AACF,GAAG;AACD,UAAQ,MAAM,sCAAsC;AACpD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,SAAS,MAAM;AAClG,QAAM,MAAM,qBAAqB,SAAS,gBAAgB;AAC1D,QAAM,CAAC,UAAU,eAAe,IAAI,MAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B,kBAAkB,SAAS,MAAM,GAAG,qCAA6B,mBAAmB,KAAK,aAAa,CAAC,CAAC;AACnM,MAAI,SAAS,UAAU,GAAG;AACxB,YAAQ,KAAK,+DAA+D;AAC5E;AAAA,EACF;AACA,UAAQ,QAAQ,iBAAiB;AACjC,aAAW,WAAW,UAAU;AAC9B,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, thirdPartyApplicationService } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nexport default async function siteVersionsCommand({\n baseUrl,\n appRid\n}) {\n consola.start(\"Fetching versions & deployed version\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), 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 for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface TokenSuccessResponse {
|
|
2
|
-
access_token: string;
|
|
3
|
-
token_type: string;
|
|
4
|
-
refresh_token: string;
|
|
5
|
-
expires_in: number;
|
|
6
|
-
}
|
|
7
|
-
export interface TokenErrorResponse {
|
|
8
|
-
error: string;
|
|
9
|
-
error_description: string;
|
|
10
|
-
}
|
|
11
|
-
export type TokenResponse = TokenErrorResponse | TokenSuccessResponse;
|
|
12
|
-
export declare function isTokenErrorResponse(response: TokenSuccessResponse | TokenErrorResponse): response is TokenErrorResponse;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { ClearDeletedUserRepositoriesRequest } from "../ClearDeletedUserRepositoriesRequest.js";
|
|
3
|
-
/**
|
|
4
|
-
* Kicks off a background task that will iterate over all Stemma repositories and delete all contents from
|
|
5
|
-
* user repositories that no longer exist in Stemma.
|
|
6
|
-
*/
|
|
7
|
-
export declare function clearDeletedUserRepositories(ctx: ConjureContext, request: ClearDeletedUserRepositoriesRequest): Promise<void>;
|
package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { ContainerRegistryDomainResponse } from "../ContainerRegistryDomainResponse.js";
|
|
3
|
-
/**
|
|
4
|
-
* Get the container registry domain, e.g, papaya-container-registry.palantircloud.com
|
|
5
|
-
*/
|
|
6
|
-
export declare function getContainerRegistryDomain(ctx: ConjureContext): Promise<ContainerRegistryDomainResponse>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
/**
|
|
3
|
-
* Clears the deployed version while leaving the associated domain, visiting the associated domain in this state
|
|
4
|
-
* will return an error.
|
|
5
|
-
*
|
|
6
|
-
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearDeployedVersion(ctx: ConjureContext, repositoryRid: string): Promise<void>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
-
/**
|
|
4
|
-
* Get the CSP additions configured for a repository.
|
|
5
|
-
*
|
|
6
|
-
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string): Promise<ContentSecurityPolicyAdditions>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { SiteVersion } from "../SiteVersion.js";
|
|
3
|
-
/**
|
|
4
|
-
* Get the deployed version that will be served for a given siteasset repository.
|
|
5
|
-
*
|
|
6
|
-
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getDeployedVersion(ctx: ConjureContext, repositoryRid: string): Promise<SiteVersion | undefined>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
-
/**
|
|
4
|
-
* Get domains that have been successfully registered with the given repository. Visiting a successfully
|
|
5
|
-
* registered domain should serve the registered repository assets.
|
|
6
|
-
*
|
|
7
|
-
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getRegisteredSiteDomains(ctx: ConjureContext, repositoryRid: string): Promise<Array<SiteDomainInfo>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
-
/**
|
|
4
|
-
* Get domains that have been requested for a given repository. For control panel domains that require
|
|
5
|
-
* an approval, this will also include pending requests. Closed/rejected requests will only be included as long
|
|
6
|
-
* as their domain hasn't been re-requested for another repository.
|
|
7
|
-
*
|
|
8
|
-
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getRequestedSiteDomains(ctx: ConjureContext, repositoryRid: string): Promise<Array<SiteDomainInfo>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { ContentSecurityPolicyHeaderValue } from "../ContentSecurityPolicyHeaderValue.js";
|
|
3
|
-
import type { PreviewContentSecurityPolicyRequest } from "../PreviewContentSecurityPolicyRequest.js";
|
|
4
|
-
/**
|
|
5
|
-
* Preview what the CSP that will be served with the site looks like.
|
|
6
|
-
*
|
|
7
|
-
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
8
|
-
*/
|
|
9
|
-
export declare function previewContentSecurityPolicy(ctx: ConjureContext, repositoryRid: string, request: PreviewContentSecurityPolicyRequest): Promise<ContentSecurityPolicyHeaderValue>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
-
/**
|
|
4
|
-
* Set the CSP additions configured for a repository.
|
|
5
|
-
*
|
|
6
|
-
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export declare function putContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string, contentSecurityPolicyAdditions: ContentSecurityPolicyAdditions): Promise<void>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
-
import type { SubmitDomainRegistrationRequest } from "../SubmitDomainRegistrationRequest.js";
|
|
4
|
-
/**
|
|
5
|
-
* Requests the registration of a domain with the provided repository, this will result in an approvals task
|
|
6
|
-
* getting created for approval by an admin.
|
|
7
|
-
*
|
|
8
|
-
* Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.
|
|
9
|
-
*
|
|
10
|
-
* artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.
|
|
11
|
-
*/
|
|
12
|
-
export declare function requestSiteDomainForRepository(ctx: ConjureContext, repositoryRid: string, request: SubmitDomainRegistrationRequest): Promise<SiteDomainInfo>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { UnregisterDomainRequest } from "../UnregisterDomainRequest.js";
|
|
3
|
-
/**
|
|
4
|
-
* Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.
|
|
5
|
-
*
|
|
6
|
-
* Depending on how the domain for the repository was setup, this might also result in deleting the domain
|
|
7
|
-
* itself.
|
|
8
|
-
*
|
|
9
|
-
* artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.
|
|
10
|
-
*/
|
|
11
|
-
export declare function unregisterSiteDomain(ctx: ConjureContext, repositoryRid: string, request: UnregisterDomainRequest): Promise<void>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ConjureContext } from "conjure-lite";
|
|
2
|
-
import type { UpdateDeployedVersionRequest } from "../UpdateDeployedVersionRequest.js";
|
|
3
|
-
/**
|
|
4
|
-
* Sets the asset version of the siteasset repository that will be served.
|
|
5
|
-
*
|
|
6
|
-
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
-
*/
|
|
8
|
-
export declare function updateDeployedVersion(ctx: ConjureContext, repositoryRid: string, version: UpdateDeployedVersionRequest): Promise<void>;
|