@osdk/cli 0.2.0 → 0.4.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/build/js/{chunk-Z3LZT4RA.cjs → chunk-D7QHLGEU.cjs} +88 -24
- package/build/js/chunk-D7QHLGEU.cjs.map +1 -0
- package/build/js/chunk-N6K26UR4.mjs +9 -0
- package/build/js/chunk-N6K26UR4.mjs.map +1 -0
- package/build/js/chunk-X2S4O5ZR.cjs +11 -0
- package/build/js/chunk-X2S4O5ZR.cjs.map +1 -0
- package/build/js/{chunk-SFT3GWI4.mjs → chunk-XNYKWAIE.mjs} +84 -26
- package/build/js/chunk-XNYKWAIE.mjs.map +1 -0
- package/build/js/{handleGenerate-ER4YF43Z.mjs → handleGenerate-A7X2XAGW.mjs} +13 -5
- package/build/js/handleGenerate-A7X2XAGW.mjs.map +1 -0
- package/build/js/{handleGenerate-UTCLNZQO.cjs → handleGenerate-WOW33WYG.cjs} +13 -5
- package/build/js/handleGenerate-WOW33WYG.cjs.map +1 -0
- package/build/js/index.cjs +341 -116
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +342 -97
- package/build/js/index.mjs.map +1 -1
- package/build/js/siteDeployCommand-HSR3QDAT.mjs +82 -0
- package/build/js/siteDeployCommand-HSR3QDAT.mjs.map +1 -0
- package/build/js/siteDeployCommand-MXKGJFFB.cjs +107 -0
- package/build/js/siteDeployCommand-MXKGJFFB.cjs.map +1 -0
- package/build/js/versionDeleteCommand-6BJL5XLG.mjs +26 -0
- package/build/js/versionDeleteCommand-6BJL5XLG.mjs.map +1 -0
- package/build/js/versionDeleteCommand-RLU7UUYD.cjs +28 -0
- package/build/js/versionDeleteCommand-RLU7UUYD.cjs.map +1 -0
- package/build/js/versionGetCommand-OR4RLOLM.mjs +28 -0
- package/build/js/versionGetCommand-OR4RLOLM.mjs.map +1 -0
- package/build/js/versionGetCommand-Y2VR2WKH.cjs +30 -0
- package/build/js/versionGetCommand-Y2VR2WKH.cjs.map +1 -0
- package/build/js/versionListCommand-5KM5PFYL.cjs +34 -0
- package/build/js/versionListCommand-5KM5PFYL.cjs.map +1 -0
- package/build/js/versionListCommand-LPPGQCQF.mjs +32 -0
- package/build/js/versionListCommand-LPPGQCQF.mjs.map +1 -0
- package/build/js/versionSetCommand-LHOVVI6U.mjs +31 -0
- package/build/js/versionSetCommand-LHOVVI6U.mjs.map +1 -0
- package/build/js/versionSetCommand-VD3L5DOV.cjs +33 -0
- package/build/js/versionSetCommand-VD3L5DOV.cjs.map +1 -0
- package/build/js/versionUnsetCommand-IJT4JWBN.mjs +24 -0
- package/build/js/versionUnsetCommand-IJT4JWBN.mjs.map +1 -0
- package/build/js/versionUnsetCommand-XYBUQ6XB.cjs +26 -0
- package/build/js/versionUnsetCommand-XYBUQ6XB.cjs.map +1 -0
- package/build/types/YargsCheckError.d.ts +3 -0
- package/build/types/commands/site/CommonSiteArgs.d.ts +4 -2
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +5 -2
- package/build/types/commands/site/deploy/index.d.ts +1 -1
- package/build/types/commands/site/deploy/logDeployCommandConfigFileOverride.d.ts +4 -0
- package/build/types/commands/site/deploy/siteDeployCommand.d.mts +2 -0
- package/build/types/commands/site/index.d.ts +3 -3
- package/build/types/commands/site/logSiteCommandConfigFileOverride.d.ts +4 -0
- package/build/types/commands/site/version/SiteVersionArgs.d.ts +4 -0
- package/build/types/commands/site/version/delete/index.d.ts +5 -0
- package/build/types/commands/site/version/delete/versionDeleteCommand.d.mts +2 -0
- package/build/types/commands/site/version/get/index.d.ts +4 -0
- package/build/types/commands/site/version/get/versionGetCommand.d.mts +2 -0
- package/build/types/commands/site/{versions → version}/index.d.ts +1 -1
- package/build/types/commands/site/version/list/index.d.ts +4 -0
- package/build/types/commands/site/version/list/versionListCommand.d.mts +2 -0
- package/build/types/commands/site/version/set/index.d.ts +5 -0
- package/build/types/commands/site/version/set/versionSetCommand.d.mts +2 -0
- package/build/types/commands/site/version/unset/index.d.ts +4 -0
- package/build/types/commands/site/version/unset/versionUnsetCommand.d.mts +2 -0
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/DeleteSiteVersionRequest.d.mts +5 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/UploadZippedSiteAssetRequest.d.mts +6 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts +3 -2
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts +2 -1
- package/build/types/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts +3 -2
- package/build/types/net/createConjureContext.d.mts +1 -1
- package/build/types/net/createInternalClientContext.d.mts +2 -0
- package/build/types/net/index.d.mts +1 -0
- package/build/types/net/internalClientContext.d.mts +4 -0
- package/build/types/net/third-party-application-service/fetchWebsiteRepositoryRid.d.mts +2 -1
- package/build/types/util/autoVersion.d.ts +8 -0
- package/build/types/util/autoVersion.test.d.ts +1 -0
- package/build/types/util/config.d.ts +25 -0
- package/build/types/util/config.test.d.ts +1 -0
- package/build/types/util/configLoader.d.ts +3 -0
- package/build/types/util/isValidSemver.d.ts +1 -0
- package/build/types/util/isValidSemver.test.d.ts +1 -0
- package/build/types/util/token.d.ts +21 -0
- package/build/types/util/token.test.d.ts +1 -0
- package/build/types/yargs/logConfigFileMiddleware.d.ts +1 -0
- package/changelog/0.3.0/pr-20.v2.yml +5 -0
- package/changelog/0.4.0/pr-15.v2.yml +5 -0
- package/changelog/0.4.0/pr-17.v2.yml +5 -0
- package/changelog/0.4.0/pr-35.v2.yml +5 -0
- package/changelog/0.4.0/pr-41.v2.yml +5 -0
- package/changelog/0.4.0/pr-42.v2.yml +5 -0
- package/changelog/@unreleased/.gitkeep +0 -0
- package/package.json +8 -4
- package/build/js/chunk-SFT3GWI4.mjs.map +0 -1
- package/build/js/chunk-Z3LZT4RA.cjs.map +0 -1
- package/build/js/handleGenerate-ER4YF43Z.mjs.map +0 -1
- package/build/js/handleGenerate-UTCLNZQO.cjs.map +0 -1
- package/build/js/handleSiteDeploy-6FPVGWP5.mjs +0 -28
- package/build/js/handleSiteDeploy-6FPVGWP5.mjs.map +0 -1
- package/build/js/handleSiteDeploy-7RXIGPRZ.cjs +0 -30
- package/build/js/handleSiteDeploy-7RXIGPRZ.cjs.map +0 -1
- package/build/js/siteDeleteCommand-3Z6TWSAT.cjs +0 -15
- package/build/js/siteDeleteCommand-3Z6TWSAT.cjs.map +0 -1
- package/build/js/siteDeleteCommand-NWXMLEZE.mjs +0 -13
- package/build/js/siteDeleteCommand-NWXMLEZE.mjs.map +0 -1
- package/build/js/siteUploadCommand-EEFMEFF7.cjs +0 -58
- package/build/js/siteUploadCommand-EEFMEFF7.cjs.map +0 -1
- package/build/js/siteUploadCommand-F533LABS.mjs +0 -33
- package/build/js/siteUploadCommand-F533LABS.mjs.map +0 -1
- package/build/js/siteVersionsCommand-BYUHGHG7.mjs +0 -27
- package/build/js/siteVersionsCommand-BYUHGHG7.mjs.map +0 -1
- package/build/js/siteVersionsCommand-W72FXGBR.cjs +0 -29
- package/build/js/siteVersionsCommand-W72FXGBR.cjs.map +0 -1
- 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/handleSiteDeploy.d.mts +0 -2
- 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/siteVersionsCommand.d.mts +0 -2
- package/build/types/readCliVersionFromPackageJson.d.ts +0 -1
- /package/{CHANGELOG.md → CHANGELOG_OLD.md} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["conjureFetch","consola","fetch","LogLevels"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,SAAS,oBAAoB;AAQ7B,eAAsB,qBAAqB,KAAK,eAAe;AAC7D,SAAO,aAAa,KAAK,8BAA8B,aAAa,qBAAqB,QAAQ;AACnG;;;ACVA,SAAS,gBAAAA,qBAAoB;AAM7B,eAAsB,kCAAkC,KAAK,eAAe;AAC1E,SAAOA,cAAa,KAAK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AAY,MAAM,QAAQ,IAAI,sBAAsB;AAClE,QAAM,SAAS,MAAMA,OAAM,KAAK;AAAA,IAC9B,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,MACP,gBAAgB;AAAA,IAClB;AAAA,IACA,QAAQ;AAAA;AAAA,EACV,CAAC;AAED,MAAI,OAAO,UAAU,OAAO,OAAO,SAAS,KAAK;AAC/C,IAAAD,SAAQ,QAAQE,WAAU;AAC1B,IAAAF,SAAQ,MAAM,kBAAkB,OAAO,UAAU;AACjD,WAAO;AAAA,EACT,WAAW,OAAO,WAAW,KAAK;AAChC,UAAM,IAAI,iBAAiB,OAAO,QAAQ,wBAAwB;AAAA,EACpE,OAAO;AACL,UAAM,IAAI,iBAAiB,OAAO,QAAQ,4BAA4B,OAAO,MAAM,KAAK,OAAO,UAAU,GAAG;AAAA,EAC9G;AACF;;;AC1BO,SAAS,qBAAqB,SAAS,aAAa;AACzD,SAAO;AAAA,IACL,SAAS,YAAY,MAAM,QAAQ,IAAI,sBAAsB;AAAA,IAC7D;AAAA,IACA;AAAA,EACF;AACF;;;ACvBA;AAAA;AAAA;AAAA","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearDeployedVersion } from \"./ArtifactsSitesAdminV2Service/clearDeployedVersion.js\";\nexport { getContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.js\";\nexport { getDeployedVersion } from \"./ArtifactsSitesAdminV2Service/getDeployedVersion.js\";\nexport { getRegisteredSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.js\";\nexport { getRequestedSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRequestedSiteDomains.js\";\nexport { previewContentSecurityPolicy } from \"./ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.js\";\nexport { putContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.js\";\nexport { requestSiteDomainForRepository } from \"./ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.js\";\nexport { unregisterSiteDomain } from \"./ArtifactsSitesAdminV2Service/unregisterSiteDomain.js\";\nexport { updateDeployedVersion } from \"./ArtifactsSitesAdminV2Service/updateDeployedVersion.js\";","/*\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 { conjureFetch } from \"conjure-lite\";\n\n/**\n * Clears the deployed version while leaving the associated domain, visiting the associated domain in this state\n * will return an error.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get the CSP additions configured for a repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get the deployed version that will be served for a given siteasset repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been successfully registered with the given repository. Visiting a successfully\n * registered domain should serve the registered repository assets.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been requested for a given repository. For control panel domains that require\n * an approval, this will also include pending requests. Closed/rejected requests will only be included as long\n * as their domain hasn't been re-requested for another repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Preview what the CSP that will be served with the site looks like.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Set the CSP additions configured for a repository.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Requests the registration of a domain with the provided repository, this will result in an approvals task\n * getting created for approval by an admin.\n *\n * Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.\n *\n * Depending on how the domain for the repository was setup, this might also result in deleting the domain\n * itself.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Sets the asset version of the siteasset repository that will be served.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\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 * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\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 { createFetchHeaderMutator } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\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 function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\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 { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\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 { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\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 { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\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 { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["conjureFetch","consola","fetch","LogLevels"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,SAAS,oBAAoB;AAQ7B,eAAsB,qBAAqB,KAAK,eAAe;AAC7D,SAAO,aAAa,KAAK,8BAA8B,aAAa,qBAAqB,QAAQ;AACnG;;;ACVA,SAAS,gBAAAA,qBAAoB;AAM7B,eAAsB,kCAAkC,KAAK,eAAe;AAC1E,SAAOA,cAAa,KAAK,8BAA8B,aAAa,kBAAkB,KAAK;AAC7F;;;ACRA,SAAS,gBAAAA,qBAAoB;AAM7B,eAAsB,mBAAmB,KAAK,eAAe;AAC3D,SAAOA,cAAa,KAAK,8BAA8B,aAAa,qBAAqB,KAAK;AAChG;;;ACRA,SAAS,gBAAAA,qBAAoB;AAO7B,eAAsB,yBAAyB,KAAK,eAAe;AACjE,SAAOA,cAAa,KAAK,8BAA8B,aAAa,uBAAuB,KAAK;AACl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AF,SAAQ,MAAM,kBAAkB,OAAO,UAAU;AACjD,WAAO;AAAA,EACT,WAAW,OAAO,WAAW,KAAK;AAChC,UAAM,IAAI,iBAAiB,OAAO,QAAQ,wBAAwB;AAAA,EACpE,OAAO;AACL,UAAM,IAAI,iBAAiB,OAAO,QAAQ,4BAA4B,OAAO,MAAM,KAAK,OAAO,UAAU,GAAG;AAAA,EAC9G;AACF;;;AC1BO,SAAS,qBAAqB,SAAS,aAAa;AACzD,SAAO;AAAA,IACL,SAAS,YAAY,MAAM,QAAQ,IAAI,sBAAsB;AAAA,IAC7D;AAAA,IACA;AAAA,EACF;AACF;;;ACvBA;AAAA;AAAA;AAAA","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearDeployedVersion } from \"./ArtifactsSitesAdminV2Service/clearDeployedVersion.js\";\nexport { getContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.js\";\nexport { getDeployedVersion } from \"./ArtifactsSitesAdminV2Service/getDeployedVersion.js\";\nexport { getRegisteredSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.js\";\nexport { getRequestedSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRequestedSiteDomains.js\";\nexport { previewContentSecurityPolicy } from \"./ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.js\";\nexport { putContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.js\";\nexport { requestSiteDomainForRepository } from \"./ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.js\";\nexport { unregisterSiteDomain } from \"./ArtifactsSitesAdminV2Service/unregisterSiteDomain.js\";\nexport { updateDeployedVersion } from \"./ArtifactsSitesAdminV2Service/updateDeployedVersion.js\";","/*\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 { conjureFetch } from \"conjure-lite\";\n\n/**\n * Clears the deployed version while leaving the associated domain, visiting the associated domain in this state\n * will return an error.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get the CSP additions configured for a repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get the deployed version that will be served for a given siteasset repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been successfully registered with the given repository. Visiting a successfully\n * registered domain should serve the registered repository assets.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been requested for a given repository. For control panel domains that require\n * an approval, this will also include pending requests. Closed/rejected requests will only be included as long\n * as their domain hasn't been re-requested for another repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Preview what the CSP that will be served with the site looks like.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Set the CSP additions configured for a repository.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Requests the registration of a domain with the provided repository, this will result in an approvals task\n * getting created for approval by an admin.\n *\n * Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.\n *\n * Depending on how the domain for the repository was setup, this might also result in deleting the domain\n * itself.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\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 { conjureFetch } from \"conjure-lite\";\n/**\n * Sets the asset version of the siteasset repository that will be served.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\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 * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\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 { createFetchHeaderMutator } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\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 function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\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 { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\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 { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\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 { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\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 { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":[],"mappings":";;;;;;AAgBA,SAAS,yBAAyB,wBAAwB;AAC1D,SAAS,mCAAmC,4CAA4C;AACxF,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,YAAY,QAAQ;AAEpB,eAAO,eAAsC,MAAM;AACjD,MAAI,UAAU;AACd,MAAI,KAAK,cAAc;AACrB,cAAU,MAAM,sBAAsB,IAAI;AAAA,EAC5C,WAAW,KAAK,SAAS,KAAK,UAAU;AACtC,cAAU,MAAM,kBAAkB,IAAI;AAAA,EACxC,OAAO;AACL,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AACA,MAAI,SAAS;AACX,YAAQ,KAAK,iBAAiB;AAAA,EAChC;AACF;AACA,eAAe,sBAAsB,MAAM;AACzC,MAAI,CAAI,cAAW,KAAK,YAAY,GAAG;AACrC,YAAQ,MAAM,iCAAiC,KAAK,YAAY,EAAE;AAClE,WAAO;AAAA,EACT;AACA,QAAM,WAAW,KA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,MAAM;AACb,YAAM,qCAAqC,UAAU,WAAW,KAAK,QAAQ,KAAK,WAAW;AAAA,IAC/F,OAAO;AACL,YAAM,kCAAkC,UAAU,WAAW,KAAK,QAAQ,KAAK,WAAW;AAAA,IAC5F;AAAA,EACF,SAAS,GAAG;AACV,YAAQ,MAAM,0BAA0B,EAAE,OAAO;AACjD,WAAO;AAAA,EACT;AACA,SAAO;AACT","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 { getOntologyFullMetadata, listOntologiesV2 } from \"@osdk/gateway/requests\";\nimport { generateClientSdkVersionOneDotOne, generateClientSdkVersionTwoPointZero } from \"@osdk/generator\";\nimport { createClientContext, createOpenApiRequest } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport invokeLoginFlow from \"../../auth/login/loginFlow.js\";\nexport default async function handleGenerate(args) {\n let success = false;\n if (args.ontologyPath) {\n success = await generateFromLocalFile(args);\n } else if (args.stack && args.clientId) {\n success = await generateFromStack(args);\n } else {\n throw new Error(\"Must have specified ontologyPath or stack and clientId\");\n }\n if (success) {\n consola.info(\"OSDK Generated!\");\n }\n}\nasync function generateFromLocalFile(args) {\n if (!fs.existsSync(args.ontologyPath)) {\n consola.error(`Ontology file does not exist: ${args.ontologyPath}`);\n return false;\n }\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n return await generateClientSdk(ontology, args);\n}\nasync function generateFromStack(args) {\n const {\n stack,\n clientId,\n ontologyWritePath\n } = args;\n const token = await invokeLoginFlow({\n applicationId: clientId,\n baseUrl: stack,\n verbose: 0\n });\n const {\n fetch\n } = createClientContext({\n metadata: {\n userAgent: \"@osdk/cli/0.0.0 ()\"\n }\n }, args.stack, () => token.access_token);\n try {\n const ontologies = await listOntologiesV2(createOpenApiRequest(stack, fetch));\n if (ontologies.data.length !== 1) {\n consola.error(`Could not look up ontology with these credentials. Found ${ontologies.data.length} ontologies.`);\n return false;\n }\n const ontology = await getOntologyFullMetadata(createOpenApiRequest(stack, fetch), ontologies.data[0].apiName);\n if (ontologyWritePath) {\n fs.writeFileSync(ontologyWritePath, JSON.stringify(ontology, null, 2));\n }\n return await generateClientSdk(ontology, args);\n } catch (e) {\n consola.error(\"Failed to generate the ontology\", e);\n return false;\n }\n}\nasync function generateClientSdk(ontology, args) {\n const minimalFs = {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n },\n readdir: async path => fs.promises.readdir(path)\n };\n try {\n if (args.beta) {\n await generateClientSdkVersionTwoPointZero(ontology, minimalFs, args.outDir, args.packageType);\n } else {\n await generateClientSdkVersionOneDotOne(ontology, minimalFs, args.outDir, args.packageType);\n }\n } catch (e) {\n consola.error(\"OSDK generation failed\", e.message);\n return false;\n }\n return true;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":[],"mappings":";;;;;;AAgBA,SAAS,yBAAyB,wBAAwB;AAC1D,SAAS,mCAAmC,4CAA4C;AACxF,SAAS,qBAAqB,4BAA4B;AAC1D,SAAS,eAAe;AACxB,YAAY,QAAQ;AAEpB,eAAO,eAAsC,MAAM;AACjD,MAAI,UAAU;AACd,MAAI,KAAK,cAAc;AACrB,cAAU,MAAM,sBAAsB,IAAI;AAAA,EAC5C,WAAW,KAAK,SAAS,KAAK,UAAU;AACtC,cAAU,MAAM,kBAAkB,IAAI;AAAA,EACxC,OAAO;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AA,IAChB,WAAW,CAAC,MAAM,aAAa;AAC7B,aAAU,YAAS,UAAU,MAAM,UAAU,OAAO;AAAA,IACtD;AAAA,IACA,OAAO,OAAO,MAAM,YAAY;AAC9B,YAAS,YAAS,MAAM,MAAM,OAAO;AAAA,IACvC;AAAA,IACA,SAAS,OAAM,SAAW,YAAS,QAAQ,IAAI;AAAA,EACjD;AACA,MAAI;AACF,QAAI,KAAK,MAAM;AACb,YAAM,qCAAqC,UAAU,WAAW,KAAK,QAAQ,KAAK,WAAW;AAAA,IAC/F,OAAO;AACL,YAAM,kCAAkC,UAAU,WAAW,KAAK,QAAQ,KAAK,WAAW;AAAA,IAC5F;AAAA,EACF,SAAS,GAAG;AACV,YAAQ,MAAM,0BAA0B,EAAE,OAAO;AACjD,WAAO;AAAA,EACT;AACA,SAAO;AACT","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 { getOntologyFullMetadata, listOntologiesV2 } from \"@osdk/gateway/requests\";\nimport { generateClientSdkVersionOneDotOne, generateClientSdkVersionTwoPointZero } from \"@osdk/generator\";\nimport { createClientContext, createOpenApiRequest } from \"@osdk/shared.net\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport invokeLoginFlow from \"../../auth/login/loginFlow.js\";\nexport default async function handleGenerate(args) {\n let success = false;\n if (args.ontologyPath) {\n success = await generateFromLocalFile(args);\n } else if (args.stack && args.clientId) {\n success = await generateFromStack(args);\n } else {\n throw new Error(\"Must have specified ontologyPath or stack and clientId\");\n }\n if (success) {\n consola.info(\"OSDK Generated!\");\n }\n}\nasync function generateFromLocalFile(args) {\n if (!fs.existsSync(args.ontologyPath)) {\n consola.error(`Ontology file does not exist: ${args.ontologyPath}`);\n return false;\n }\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n return await generateClientSdk(ontology, args);\n}\nasync function generateFromStack(args) {\n const {\n stack,\n clientId,\n ontologyWritePath\n } = args;\n const token = await invokeLoginFlow({\n applicationId: clientId,\n baseUrl: stack,\n verbose: 0\n });\n const {\n fetch\n } = createClientContext({\n metadata: {\n userAgent: \"@osdk/cli/0.0.0 ()\"\n }\n }, args.stack, () => token.access_token);\n try {\n const ontologies = await listOntologiesV2(createOpenApiRequest(stack, fetch));\n if (ontologies.data.length !== 1) {\n consola.error(`Could not look up ontology with these credentials. Found ${ontologies.data.length} ontologies.`);\n return false;\n }\n const ontology = await getOntologyFullMetadata(createOpenApiRequest(stack, fetch), ontologies.data[0].apiName);\n if (ontologyWritePath) {\n fs.writeFileSync(ontologyWritePath, JSON.stringify(ontology, null, 2));\n }\n return await generateClientSdk(ontology, args);\n } catch (e) {\n consola.error(\"Failed to generate the ontology\", e);\n return false;\n }\n}\nasync function generateClientSdk(ontology, args) {\n const minimalFs = {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n },\n readdir: async path => fs.promises.readdir(path)\n };\n try {\n if (args.beta) {\n await generateClientSdkVersionTwoPointZero(ontology, minimalFs, args.outDir, args.packageType);\n } else {\n await generateClientSdkVersionOneDotOne(ontology, minimalFs, args.outDir, args.packageType);\n }\n } catch (e) {\n consola.error(\"OSDK generation failed\", e.message);\n return false;\n }\n return true;\n}"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-SFT3GWI4.mjs';
|
|
2
|
-
import './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-E2SEJZTC.mjs';
|
|
4
|
-
import { consola } from 'consola';
|
|
5
|
-
|
|
6
|
-
async function handleSiteDeploy({
|
|
7
|
-
siteVersion: version,
|
|
8
|
-
appRid,
|
|
9
|
-
baseUrl,
|
|
10
|
-
clearVersion
|
|
11
|
-
}) {
|
|
12
|
-
const repositoryRid = await third_party_application_service_exports.fetchWebsiteRepositoryRid(baseUrl, appRid);
|
|
13
|
-
const ctx = createConjureContext(baseUrl, "/artifacts/api");
|
|
14
|
-
if (version) {
|
|
15
|
-
await ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
|
|
16
|
-
siteVersion: {
|
|
17
|
-
version
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
} else if (clearVersion) {
|
|
21
|
-
await ArtifactsSitesAdminV2Service_exports.clearDeployedVersion(ctx, repositoryRid);
|
|
22
|
-
}
|
|
23
|
-
consola.success("Deploy successful");
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { handleSiteDeploy as default };
|
|
27
|
-
//# sourceMappingURL=out.js.map
|
|
28
|
-
//# sourceMappingURL=handleSiteDeploy-6FPVGWP5.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,SAAS,eAAe;AAExB,eAAO,iBAAwC;AAAA,EAC7C,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,SAAS,MAAM;AAClG,QAAM,MAAM,qBAAqB,SAAS,gBAAgB;AAC1D,MAAI,SAAS;AACX,UAAM,qCAA6B,sBAAsB,KAAK,eAAe;AAAA,MAC3E,aAAa;AAAA,QACX;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,WAAW,cAAc;AACvB,UAAM,qCAA6B,qBAAqB,KAAK,aAAa;AAAA,EAC5E;AACA,UAAQ,QAAQ,mBAAmB;AACrC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { ArtifactsSitesAdminV2Service, createConjureContext, thirdPartyApplicationService } from \"#net\";\nexport default async function handleSiteDeploy({\n siteVersion: version,\n appRid,\n baseUrl,\n clearVersion\n}) {\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n if (version) {\n await ArtifactsSitesAdminV2Service.updateDeployedVersion(ctx, repositoryRid, {\n siteVersion: {\n version\n }\n });\n } else if (clearVersion) {\n await ArtifactsSitesAdminV2Service.clearDeployedVersion(ctx, repositoryRid);\n }\n consola.success(\"Deploy successful\");\n}"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkZ3LZT4RA_cjs = require('./chunk-Z3LZT4RA.cjs');
|
|
4
|
-
require('./chunk-HYF3CTKZ.cjs');
|
|
5
|
-
require('./chunk-HQDDGVB7.cjs');
|
|
6
|
-
var consola = require('consola');
|
|
7
|
-
|
|
8
|
-
async function handleSiteDeploy({
|
|
9
|
-
siteVersion: version,
|
|
10
|
-
appRid,
|
|
11
|
-
baseUrl,
|
|
12
|
-
clearVersion
|
|
13
|
-
}) {
|
|
14
|
-
const repositoryRid = await chunkZ3LZT4RA_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(baseUrl, appRid);
|
|
15
|
-
const ctx = chunkZ3LZT4RA_cjs.createConjureContext(baseUrl, "/artifacts/api");
|
|
16
|
-
if (version) {
|
|
17
|
-
await chunkZ3LZT4RA_cjs.ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
|
|
18
|
-
siteVersion: {
|
|
19
|
-
version
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
} else if (clearVersion) {
|
|
23
|
-
await chunkZ3LZT4RA_cjs.ArtifactsSitesAdminV2Service_exports.clearDeployedVersion(ctx, repositoryRid);
|
|
24
|
-
}
|
|
25
|
-
consola.consola.success("Deploy successful");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
module.exports = handleSiteDeploy;
|
|
29
|
-
//# sourceMappingURL=out.js.map
|
|
30
|
-
//# sourceMappingURL=handleSiteDeploy-7RXIGPRZ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,SAAS,eAAe;AAExB,eAAO,iBAAwC;AAAA,EAC7C,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,gBAAgB,MAAM,wCAA6B,0BAA0B,SAAS,MAAM;AAClG,QAAM,MAAM,qBAAqB,SAAS,gBAAgB;AAC1D,MAAI,SAAS;AACX,UAAM,qCAA6B,sBAAsB,KAAK,eAAe;AAAA,MAC3E,aAAa;AAAA,QACX;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,WAAW,cAAc;AACvB,UAAM,qCAA6B,qBAAqB,KAAK,aAAa;AAAA,EAC5E;AACA,UAAQ,QAAQ,mBAAmB;AACrC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { ArtifactsSitesAdminV2Service, createConjureContext, thirdPartyApplicationService } from \"#net\";\nexport default async function handleSiteDeploy({\n siteVersion: version,\n appRid,\n baseUrl,\n clearVersion\n}) {\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n if (version) {\n await ArtifactsSitesAdminV2Service.updateDeployedVersion(ctx, repositoryRid, {\n siteVersion: {\n version\n }\n });\n } else if (clearVersion) {\n await ArtifactsSitesAdminV2Service.clearDeployedVersion(ctx, repositoryRid);\n }\n consola.success(\"Deploy successful\");\n}"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkZ3LZT4RA_cjs = require('./chunk-Z3LZT4RA.cjs');
|
|
4
|
-
require('./chunk-HYF3CTKZ.cjs');
|
|
5
|
-
require('./chunk-HQDDGVB7.cjs');
|
|
6
|
-
var consola = require('consola');
|
|
7
|
-
|
|
8
|
-
async function siteDeleteCommand(args) {
|
|
9
|
-
await chunkZ3LZT4RA_cjs.artifacts_exports.SiteAssetArtifactsService.deleteSiteVersion(args.baseUrl, args.appRid, args.siteVersion);
|
|
10
|
-
consola.consola.success("Delete successful");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
module.exports = siteDeleteCommand;
|
|
14
|
-
//# sourceMappingURL=out.js.map
|
|
15
|
-
//# sourceMappingURL=siteDeleteCommand-3Z6TWSAT.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":[],"mappings":";;;;;;;AAgBA,SAAS,eAAe;AAExB,eAAO,kBAAyC,MAAM;AACpD,QAAM,kBAAU,0BAA0B,kBAAkB,KAAK,SAAS,KAAK,QAAQ,KAAK,WAAW;AACvG,UAAQ,QAAQ,mBAAmB;AACrC","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 { artifacts } from \"../../../net/index.mjs\";\nexport default async function siteDeleteCommand(args) {\n await artifacts.SiteAssetArtifactsService.deleteSiteVersion(args.baseUrl, args.appRid, args.siteVersion);\n consola.success(\"Delete successful\");\n}"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { artifacts_exports } from './chunk-SFT3GWI4.mjs';
|
|
2
|
-
import './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-E2SEJZTC.mjs';
|
|
4
|
-
import { consola } from 'consola';
|
|
5
|
-
|
|
6
|
-
async function siteDeleteCommand(args) {
|
|
7
|
-
await artifacts_exports.SiteAssetArtifactsService.deleteSiteVersion(args.baseUrl, args.appRid, args.siteVersion);
|
|
8
|
-
consola.success("Delete successful");
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { siteDeleteCommand as default };
|
|
12
|
-
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=siteDeleteCommand-NWXMLEZE.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":[],"mappings":";;;;;;;AAgBA,SAAS,eAAe;AAExB,eAAO,kBAAyC,MAAM;AACpD,QAAM,kBAAU,0BAA0B,kBAAkB,KAAK,SAAS,KAAK,QAAQ,KAAK,WAAW;AACvG,UAAQ,QAAQ,mBAAmB;AACrC","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 { artifacts } from \"../../../net/index.mjs\";\nexport default async function siteDeleteCommand(args) {\n await artifacts.SiteAssetArtifactsService.deleteSiteVersion(args.baseUrl, args.appRid, args.siteVersion);\n consola.success(\"Delete successful\");\n}"]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkZ3LZT4RA_cjs = require('./chunk-Z3LZT4RA.cjs');
|
|
4
|
-
var chunkHYF3CTKZ_cjs = require('./chunk-HYF3CTKZ.cjs');
|
|
5
|
-
require('./chunk-HQDDGVB7.cjs');
|
|
6
|
-
var archiver = require('archiver');
|
|
7
|
-
var consola = require('consola');
|
|
8
|
-
var fs = require('fs');
|
|
9
|
-
var stream = require('stream');
|
|
10
|
-
|
|
11
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
function _interopNamespace(e) {
|
|
14
|
-
if (e && e.__esModule) return e;
|
|
15
|
-
var n = Object.create(null);
|
|
16
|
-
if (e) {
|
|
17
|
-
Object.keys(e).forEach(function (k) {
|
|
18
|
-
if (k !== 'default') {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return e[k]; }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
n.default = e;
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var archiver__default = /*#__PURE__*/_interopDefault(archiver);
|
|
32
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
33
|
-
|
|
34
|
-
async function invokeSiteUpload(args) {
|
|
35
|
-
if (args.dir == null) {
|
|
36
|
-
consola.consola.error("No directory specified");
|
|
37
|
-
throw new chunkHYF3CTKZ_cjs.ExitProcessError(1);
|
|
38
|
-
}
|
|
39
|
-
const stat = await fs__namespace.promises.stat(args.dir);
|
|
40
|
-
if (!stat.isDirectory()) {
|
|
41
|
-
consola.consola.error("Specified path is not a directory");
|
|
42
|
-
throw new chunkHYF3CTKZ_cjs.ExitProcessError(2);
|
|
43
|
-
}
|
|
44
|
-
consola.consola.start("Zippping site files");
|
|
45
|
-
const archive = archiver__default.default("zip").directory(args.dir, false);
|
|
46
|
-
await Promise.all([chunkZ3LZT4RA_cjs.artifacts_exports.SiteAssetArtifactsService.uploadZippedSiteAsset(
|
|
47
|
-
args.baseUrl,
|
|
48
|
-
args.appRid,
|
|
49
|
-
args.siteVersion,
|
|
50
|
-
stream.Readable.toWeb(archive)
|
|
51
|
-
// This cast is because the dom fetch doesnt align type wise with streams
|
|
52
|
-
), archive.finalize()]);
|
|
53
|
-
consola.consola.success("Upload complete");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
module.exports = invokeSiteUpload;
|
|
57
|
-
//# sourceMappingURL=out.js.map
|
|
58
|
-
//# sourceMappingURL=siteUploadCommand-EEFMEFF7.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,OAAO,cAAc;AACrB,SAAS,eAAe;AACxB,YAAY,QAAQ;AACpB,SAAS,gBAAgB;AAGzB,eAAO,iBAAwC,MAAM;AACnD,MAAI,KAAK,OAAO,MAAM;AACpB,YAAQ,MAAM,wBAAwB;AACtC,UAAM,IAAI,iBAAiB,CAAC;AAAA,EAC9B;AACA,QAAM,OAAO,MAAS,YAAS,KAAK,KAAK,GAAG;AAC5C,MAAI,CAAC,KAAK,YAAY,GAAG;AACvB,YAAQ,MAAM,mCAAmC;AACjD,UAAM,IAAI,iBAAiB,CAAC;AAAA,EAC9B;AACA,UAAQ,MAAM,qBAAqB;AACnC,QAAM,UAAU,SAAS,KAAK,EAAE,UAAU,KAAK,KAAK,KAAK;AACzD,QAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B;AAAA,IAAsB,KAAK;AAAA,IAAS,KAAK;AAAA,IAAQ,KAAK;AAAA,IAAa,SAAS,MAAM,OAAO;AAAA;AAAA,EAChJ,GAAG,QAAQ,SAAS,CAAC,CAAC;AACtB,UAAQ,QAAQ,iBAAiB;AACnC","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 archiver from \"archiver\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport { Readable } from \"node:stream\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function invokeSiteUpload(args) {\n if (args.dir == null) {\n consola.error(\"No directory specified\");\n throw new ExitProcessError(1);\n }\n const stat = await fs.promises.stat(args.dir);\n if (!stat.isDirectory()) {\n consola.error(\"Specified path is not a directory\");\n throw new ExitProcessError(2);\n }\n consola.start(\"Zippping site files\");\n const archive = archiver(\"zip\").directory(args.dir, false);\n await Promise.all([artifacts.SiteAssetArtifactsService.uploadZippedSiteAsset(args.baseUrl, args.appRid, args.siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesnt align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { artifacts_exports } from './chunk-SFT3GWI4.mjs';
|
|
2
|
-
import { ExitProcessError } from './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-E2SEJZTC.mjs';
|
|
4
|
-
import archiver from 'archiver';
|
|
5
|
-
import { consola } from 'consola';
|
|
6
|
-
import * as fs from 'fs';
|
|
7
|
-
import { Readable } from 'stream';
|
|
8
|
-
|
|
9
|
-
async function invokeSiteUpload(args) {
|
|
10
|
-
if (args.dir == null) {
|
|
11
|
-
consola.error("No directory specified");
|
|
12
|
-
throw new ExitProcessError(1);
|
|
13
|
-
}
|
|
14
|
-
const stat = await fs.promises.stat(args.dir);
|
|
15
|
-
if (!stat.isDirectory()) {
|
|
16
|
-
consola.error("Specified path is not a directory");
|
|
17
|
-
throw new ExitProcessError(2);
|
|
18
|
-
}
|
|
19
|
-
consola.start("Zippping site files");
|
|
20
|
-
const archive = archiver("zip").directory(args.dir, false);
|
|
21
|
-
await Promise.all([artifacts_exports.SiteAssetArtifactsService.uploadZippedSiteAsset(
|
|
22
|
-
args.baseUrl,
|
|
23
|
-
args.appRid,
|
|
24
|
-
args.siteVersion,
|
|
25
|
-
Readable.toWeb(archive)
|
|
26
|
-
// This cast is because the dom fetch doesnt align type wise with streams
|
|
27
|
-
), archive.finalize()]);
|
|
28
|
-
consola.success("Upload complete");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export { invokeSiteUpload as default };
|
|
32
|
-
//# sourceMappingURL=out.js.map
|
|
33
|
-
//# sourceMappingURL=siteUploadCommand-F533LABS.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":[],"mappings":";;;;;;;;;AAgBA,OAAO,cAAc;AACrB,SAAS,eAAe;AACxB,YAAY,QAAQ;AACpB,SAAS,gBAAgB;AAGzB,eAAO,iBAAwC,MAAM;AACnD,MAAI,KAAK,OAAO,MAAM;AACpB,YAAQ,MAAM,wBAAwB;AACtC,UAAM,IAAI,iBAAiB,CAAC;AAAA,EAC9B;AACA,QAAM,OAAO,MAAS,YAAS,KAAK,KAAK,GAAG;AAC5C,MAAI,CAAC,KAAK,YAAY,GAAG;AACvB,YAAQ,MAAM,mCAAmC;AACjD,UAAM,IAAI,iBAAiB,CAAC;AAAA,EAC9B;AACA,UAAQ,MAAM,qBAAqB;AACnC,QAAM,UAAU,SAAS,KAAK,EAAE,UAAU,KAAK,KAAK,KAAK;AACzD,QAAM,QAAQ,IAAI,CAAC,kBAAU,0BAA0B;AAAA,IAAsB,KAAK;AAAA,IAAS,KAAK;AAAA,IAAQ,KAAK;AAAA,IAAa,SAAS,MAAM,OAAO;AAAA;AAAA,EAChJ,GAAG,QAAQ,SAAS,CAAC,CAAC;AACtB,UAAQ,QAAQ,iBAAiB;AACnC","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 archiver from \"archiver\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport { Readable } from \"node:stream\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function invokeSiteUpload(args) {\n if (args.dir == null) {\n consola.error(\"No directory specified\");\n throw new ExitProcessError(1);\n }\n const stat = await fs.promises.stat(args.dir);\n if (!stat.isDirectory()) {\n consola.error(\"Specified path is not a directory\");\n throw new ExitProcessError(2);\n }\n consola.start(\"Zippping site files\");\n const archive = archiver(\"zip\").directory(args.dir, false);\n await Promise.all([artifacts.SiteAssetArtifactsService.uploadZippedSiteAsset(args.baseUrl, args.appRid, args.siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesnt align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-SFT3GWI4.mjs';
|
|
2
|
-
import './chunk-GTNZA5UY.mjs';
|
|
3
|
-
import './chunk-E2SEJZTC.mjs';
|
|
4
|
-
import { consola } from 'consola';
|
|
5
|
-
import { colorize } from 'consola/utils';
|
|
6
|
-
|
|
7
|
-
async function siteVersionsCommand({
|
|
8
|
-
baseUrl,
|
|
9
|
-
appRid
|
|
10
|
-
}) {
|
|
11
|
-
consola.start("Fetching versions & deployed version");
|
|
12
|
-
const repositoryRid = await third_party_application_service_exports.fetchWebsiteRepositoryRid(baseUrl, appRid);
|
|
13
|
-
const ctx = createConjureContext(baseUrl, "/artifacts/api");
|
|
14
|
-
const [versions, deployedVersion] = await Promise.all([artifacts_exports.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid)]);
|
|
15
|
-
if (versions.length == 0) {
|
|
16
|
-
consola.warn("Successfully connected to server, but no versions were found.");
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
consola.success("Found versions:");
|
|
20
|
-
for (const version of versions) {
|
|
21
|
-
consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize("green", ` (deployed)`) : ""}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { siteVersionsCommand as default };
|
|
26
|
-
//# sourceMappingURL=out.js.map
|
|
27
|
-
//# sourceMappingURL=siteVersionsCommand-BYUHGHG7.mjs.map
|
|
@@ -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,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkZ3LZT4RA_cjs = require('./chunk-Z3LZT4RA.cjs');
|
|
4
|
-
require('./chunk-HYF3CTKZ.cjs');
|
|
5
|
-
require('./chunk-HQDDGVB7.cjs');
|
|
6
|
-
var consola = require('consola');
|
|
7
|
-
var utils = require('consola/utils');
|
|
8
|
-
|
|
9
|
-
async function siteVersionsCommand({
|
|
10
|
-
baseUrl,
|
|
11
|
-
appRid
|
|
12
|
-
}) {
|
|
13
|
-
consola.consola.start("Fetching versions & deployed version");
|
|
14
|
-
const repositoryRid = await chunkZ3LZT4RA_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(baseUrl, appRid);
|
|
15
|
-
const ctx = chunkZ3LZT4RA_cjs.createConjureContext(baseUrl, "/artifacts/api");
|
|
16
|
-
const [versions, deployedVersion] = await Promise.all([chunkZ3LZT4RA_cjs.artifacts_exports.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), chunkZ3LZT4RA_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid)]);
|
|
17
|
-
if (versions.length == 0) {
|
|
18
|
-
consola.consola.warn("Successfully connected to server, but no versions were found.");
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
consola.consola.success("Found versions:");
|
|
22
|
-
for (const version of versions) {
|
|
23
|
-
consola.consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? utils.colorize("green", ` (deployed)`) : ""}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
module.exports = siteVersionsCommand;
|
|
28
|
-
//# sourceMappingURL=out.js.map
|
|
29
|
-
//# sourceMappingURL=siteVersionsCommand-W72FXGBR.cjs.map
|
|
@@ -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
|
-
export declare function readCliVersionFromPackageJson(): Promise<string>;
|
|
File without changes
|