@osdk/cli 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/build/js/chunk-2LNCUMIA.cjs +8 -0
- package/build/js/chunk-2LNCUMIA.cjs.map +1 -0
- package/build/js/chunk-AFLYFRYO.cjs +16 -0
- package/build/js/chunk-AFLYFRYO.cjs.map +1 -0
- package/build/js/chunk-LBGQDFFN.js +5 -0
- package/build/js/chunk-LBGQDFFN.js.map +1 -0
- package/build/js/chunk-NOVNYG3L.js +11 -0
- package/build/js/chunk-NOVNYG3L.js.map +1 -0
- package/build/js/handleSiteDeploy-2C2WC2A7.js +9 -0
- package/build/js/handleSiteDeploy-2C2WC2A7.js.map +1 -0
- package/build/js/handleSiteDeploy-4O4DUUB6.cjs +11 -0
- package/build/js/handleSiteDeploy-4O4DUUB6.cjs.map +1 -0
- package/build/js/index.cjs +35 -0
- package/build/js/index.cjs.map +1 -0
- package/build/js/index.js +6 -11
- package/build/js/index.js.map +1 -1
- package/build/js/siteDeleteCommand-GQCHP3EN.js +9 -0
- package/build/js/siteDeleteCommand-GQCHP3EN.js.map +1 -0
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs +11 -0
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs.map +1 -0
- package/build/js/siteUploadCommand-4ZL5TAIW.js +12 -0
- package/build/js/siteUploadCommand-4ZL5TAIW.js.map +1 -0
- package/build/js/siteUploadCommand-5AYNOXAT.cjs +37 -0
- package/build/js/siteUploadCommand-5AYNOXAT.cjs.map +1 -0
- package/build/js/siteVersionsCommand-ZUFBC6EH.js +10 -0
- package/build/js/siteVersionsCommand-ZUFBC6EH.js.map +1 -0
- package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs +12 -0
- package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs.map +1 -0
- package/build/types/CliCommonArgs.d.ts +3 -0
- package/build/types/cli.d.ts +1 -0
- package/build/types/commands/site/CommonSiteArgs.d.ts +6 -0
- package/build/types/commands/site/delete/DeleteArgs.d.ts +4 -0
- package/build/types/commands/site/delete/index.d.ts +5 -0
- package/build/types/commands/site/delete/siteDeleteCommand.d.mts +2 -0
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +5 -0
- package/build/types/commands/site/deploy/handleSiteDeploy.d.mts +2 -0
- package/build/types/commands/site/deploy/index.d.ts +5 -0
- package/build/types/commands/site/index.d.ts +5 -0
- package/build/types/commands/site/upload/UploadArgs.d.ts +1 -1
- package/build/types/commands/site/upload/index.d.ts +2 -2
- package/build/types/commands/site/versions/index.d.ts +1 -1
- package/build/types/commands/site/versions/siteVersionsCommand.d.mts +2 -2
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService.d.ts +2 -0
- package/build/types/generated/artifacts-admin/ClearDeletedUserRepositoriesRequest.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ContainerRegistryDomainResponse.d.ts +3 -0
- package/build/types/generated/artifacts-admin/index.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.d.ts +2 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +2 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +4 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +4 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts +10 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/DeploySiteRequest.d.ts +7 -0
- package/build/types/generated/artifacts-sites/DeploymentInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/DomainName.d.ts +3 -0
- package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SiteVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.d.ts +2 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts +7 -0
- package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/index.d.ts +18 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/net/artifacts/SiteAssetArtifactsService/SiteAssetVersions.d.mts +3 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts +2 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts +2 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/index.d.mts +4 -0
- package/build/types/net/{uploadSiteVersion.d.mts → artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts} +1 -4
- package/build/types/net/artifacts/index.d.mts +1 -0
- package/build/types/net/createConjureContext.d.mts +2 -0
- package/build/types/net/index.d.mts +4 -0
- package/build/types/net/{fetchWebsiteRepositoryRid.d.mts → third-party-application-service/fetchWebsiteRepositoryRid.d.mts} +2 -2
- package/build/types/net/third-party-application-service/index.d.mts +1 -0
- package/build/types/readCliVersionFromPackageJson.d.ts +1 -0
- package/build/types/yargs/logVersionMiddleware.d.ts +2 -0
- package/package.json +8 -2
- package/build/js/chunk-2DJZUIFP.js +0 -7
- package/build/js/chunk-2DJZUIFP.js.map +0 -1
- package/build/js/chunk-6PVNK2PW.js +0 -13
- package/build/js/chunk-6PVNK2PW.js.map +0 -1
- package/build/js/chunk-MGT3UGXW.mjs +0 -5
- package/build/js/chunk-MGT3UGXW.mjs.map +0 -1
- package/build/js/chunk-YEWM6TCR.mjs +0 -9
- package/build/js/chunk-YEWM6TCR.mjs.map +0 -1
- package/build/js/index.mjs +0 -9
- package/build/js/index.mjs.map +0 -1
- package/build/js/siteUploadCommand-36HAEYDG.js +0 -37
- package/build/js/siteUploadCommand-36HAEYDG.js.map +0 -1
- package/build/js/siteUploadCommand-L3QDNVWX.mjs +0 -12
- package/build/js/siteUploadCommand-L3QDNVWX.mjs.map +0 -1
- package/build/js/siteVersionsCommand-BQMPCMGZ.mjs +0 -10
- package/build/js/siteVersionsCommand-BQMPCMGZ.mjs.map +0 -1
- package/build/js/siteVersionsCommand-YSV7HQJK.js +0 -12
- package/build/js/siteVersionsCommand-YSV7HQJK.js.map +0 -1
- package/build/types/commands/site/addSiteCommand.d.ts +0 -7
- package/build/types/net/getSiteVersions.d.mts +0 -5
- /package/build/types/net/{getSiteAssetBaseUrl.d.mts → artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.d.mts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @osdk/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0860ae9]
|
|
8
|
+
- @osdk/api@0.0.9
|
|
9
|
+
|
|
10
|
+
## 0.0.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 1674b35: Releasing clients for integration
|
|
15
|
+
- Updated dependencies [1674b35]
|
|
16
|
+
- @osdk/api@0.0.8
|
|
17
|
+
|
|
3
18
|
## 0.0.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var t=Object.defineProperty;var c=(o,r)=>{for(var e in r)t(o,e,{get:r[e],enumerable:!0});};var s=class extends Error{constructor(r,e){super(e),this.errorCode=r;}};
|
|
4
|
+
|
|
5
|
+
exports.a = c;
|
|
6
|
+
exports.b = s;
|
|
7
|
+
//# sourceMappingURL=out.js.map
|
|
8
|
+
//# sourceMappingURL=chunk-2LNCUMIA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"0FAgBO,IAAMA,EAAN,cAA+B,KAAM,CAC1C,YAAYC,EAAWC,EAAK,CAC1B,MAAMA,CAAG,EACT,KAAK,UAAYD,CACnB,CACF","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 class ExitProcessError extends Error {\n constructor(errorCode, msg) {\n super(msg);\n this.errorCode = errorCode;\n }\n}"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2LNCUMIA_cjs = require('./chunk-2LNCUMIA.cjs');
|
|
4
|
+
var conjureLite = require('conjure-lite');
|
|
5
|
+
var consola = require('consola');
|
|
6
|
+
var utils = require('@osdk/api/utils');
|
|
7
|
+
|
|
8
|
+
var d={};chunk2LNCUMIA_cjs.a(d,{clearDeployedVersion:()=>x,getContentSecurityPolicyAdditions:()=>h,getDeployedVersion:()=>S,getRegisteredSiteDomains:()=>g,getRequestedSiteDomains:()=>D,previewContentSecurityPolicy:()=>T,putContentSecurityPolicyAdditions:()=>$,requestSiteDomainForRepository:()=>v,unregisterSiteDomain:()=>F,updateDeployedVersion:()=>R});async function x(e,t){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"DELETE")}async function h(e,t){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/additions`,"GET")}async function S(e,t){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"GET")}async function g(e,t){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/registered`,"GET")}async function D(e,t){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/requested`,"GET")}async function T(e,t,o){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/preview`,"POST",o)}async function $(e,t,o){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/additions`,"PUT",o)}async function v(e,t,o){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/submit-registration`,"POST",o)}async function F(e,t,o){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/unregister`,"POST",o)}async function R(e,t,o){return conjureLite.conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"PUT",o)}var P={};chunk2LNCUMIA_cjs.a(P,{SiteAssetArtifactsService:()=>l});var l={};chunk2LNCUMIA_cjs.a(l,{deleteSiteVersion:()=>A,fetchSiteVersions:()=>w,uploadZippedSiteAsset:()=>j});function n(e,t=fetch){return utils.createFetchHeaderMutator(z(t),async o=>{let r=await e();return o.set("Authorization",`Bearer ${r}`),o.set("Fetch-User-Agent",""),o})}function z(e=fetch){return function(o,r){return typeof o=="string"||o instanceof URL?consola.consola.debug(`${r?.method??"GET"}: ${o.toString().trim()}`):consola.consola.debug(`${o.method??"GET"}: ${o.url.toString().trim()}`),e(o,r).then(s=>(consola.consola.debug("Finished fetch"),s))}}async function a(e,t){let o=n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),r=`
|
|
9
|
+
${e}/third-party-application-service/api/application-websites/${t}`,s=await o(r);if(s.status>=200&&s.status<300){let i=await s.json();return consola.consola.debug(`Repository RID: ${i}`),i}throw new Error(`Unexpected response code ${s.status} (${s.statusText})`)}function m(e,t){return `${e}/artifacts/api/repositories/${t}/contents/release/siteasset`}async function A(e,t,o){let r=await a(e,t),s=`${m(e,r)}/versions/${o}`,c=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(s,{method:"DELETE"});if(c.status>=200&&c.status<300)return consola.consola.level=consola.LogLevels.debug,consola.consola.debug(`${c.status} - Status Text: '${c.statusText}'`),!0;throw new chunk2LNCUMIA_cjs.b(c.status,`Unexpected response code ${c.status} (${c.statusText})`)}async function w(e,t){let o=await a(e,t),r=`${m(e,o)}/versions`,i=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(r);if(i.status===200)return (await i.json()).versions;throw new Error(`Unexpected response code ${i.status} (${i.statusText})`)}async function j(e,t,o,r){let s=await a(e,t),i=`${m(e,s)}/versions/zip/${o}`,p=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"PUT",body:r,headers:{"Content-Type":"application/octet-stream"},duplex:"half"});if(p.status>=200&&p.status<300)return consola.consola.level=consola.LogLevels.debug,consola.consola.debug("Status Text: "+p.statusText),!0;throw p.status===409?new chunk2LNCUMIA_cjs.b(p.status,"Version already exists"):new chunk2LNCUMIA_cjs.b(p.status,`Unexpected response code ${p.status} (${p.statusText})`)}function M(e,t){return {fetchFn:n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),baseUrl:e,servicePath:t}}var V={};chunk2LNCUMIA_cjs.a(V,{fetchWebsiteRepositoryRid:()=>a});
|
|
10
|
+
|
|
11
|
+
exports.a = d;
|
|
12
|
+
exports.b = P;
|
|
13
|
+
exports.c = M;
|
|
14
|
+
exports.d = V;
|
|
15
|
+
//# sourceMappingURL=out.js.map
|
|
16
|
+
//# sourceMappingURL=chunk-AFLYFRYO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.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":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile","createConjureContext","servicePath","third_party_application_service_exports"],"mappings":"gDAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,sCAAAC,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,4BAAAC,EAAA,iCAAAC,EAAA,sCAAAC,EAAA,mCAAAC,EAAA,yBAAAC,EAAA,0BAAAC,ICgBA,OAAS,gBAAAC,MAAoB,eAC7B,eAAsBV,EAAqBW,EAAKC,EAAe,CAC7D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,QAAQ,CACnG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBT,EAAkCU,EAAKC,EAAe,CAC1E,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,KAAK,CAC7F,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBR,EAAmBS,EAAKC,EAAe,CAC3D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,KAAK,CAChG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBP,EAAyBQ,EAAKC,EAAe,CACjE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,sBAAuB,KAAK,CAClG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBN,EAAwBO,EAAKC,EAAe,CAChE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,qBAAsB,KAAK,CACjG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBL,EAA6BM,EAAKC,EAAeC,EAAS,CAC9E,OAAOH,EAAaC,EAAK,8BAA8BC,CAAa,eAAgB,OAAQC,CAAO,CACrG,CCHA,OAAS,gBAAAH,MAAoB,eAC7B,eAAsBJ,EAAkCK,EAAKC,EAAeE,EAAgC,CAC1G,OAAOJ,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,MAAOE,CAA8B,CAC7H,CCHA,OAAS,gBAAAJ,MAAo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EAA0BC,EAASC,CAAgB,EACzEE,EAAM,GAAGE,EAAoBL,EAAStB,CAAa,CAAC,YAEpD0B,EAAS,MADDd,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EACvCa,CAAG,EAC9B,GAAIC,EAAO,SAAW,IAEpB,OADiB,MAAMA,EAAO,KAAK,GACnB,SAEhB,MAAM,IAAI,MAAM,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEtF,CCdA,OAAS,WAAAjB,EAAS,aAAAC,MAAiB,UAKnC,eAAsBF,EAAsBc,EAASC,EAAkBpB,EAAS2B,EAAS,CACvF,IAAM9B,EAAgB,MAAMqB,EAA0BC,EAASC,CAAgB,EACzEE,EAAM,GAAGE,EAAoBL,EAAStB,CAAa,CAAC,iBAAiBG,CAAO,GAE5EuB,EAAS,MADDd,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EACvCa,EAAK,CAC9B,OAAQ,MACR,KAAMK,EACN,QAAS,CACP,eAAgB,0BAClB,EACA,OAAQ,MACV,CAAC,EAED,GAAIJ,EAAO,QAAU,KAAOA,EAAO,OAAS,IAC1C,OAAAjB,EAAQ,MAAQC,EAAU,MAC1BD,EAAQ,MAAM,gBAAkBiB,EAAO,UAAU,EAC1C,GACF,MAAIA,EAAO,SAAW,IACrB,IAAIG,EAAiBH,EAAO,OAAQ,wBAAwB,EAE5D,IAAIG,EAAiBH,EAAO,OAAQ,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEhH,CC1BO,SAASK,EAAqBT,EAASU,EAAa,CACzD,MAAO,CACL,QAASpB,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EAC7D,QAAAU,EACA,YAAAU,CACF,CACF,CCvBA,IAAAC,EAAA,GAAA9C,EAAA8C,EAAA,+BAAAZ","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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deleteSiteDeployment(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}`, \"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\";\nexport async function deploySite(ctx, deploySiteRequest) {\n return conjureFetch(ctx, `/sites/admin/deploy`, \"POST\", deploySiteRequest);\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\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}/deployedVersion`, \"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\";\nexport async function getRegisteredDomains(ctx) {\n return conjureFetch(ctx, `/sites/configRegisteredDomains/list`, \"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\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/api/utils\";\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\";"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var t=Object.defineProperty;var c=(o,r)=>{for(var e in r)t(o,e,{get:r[e],enumerable:!0});};var s=class extends Error{constructor(r,e){super(e),this.errorCode=r;}};
|
|
2
|
+
|
|
3
|
+
export { c as a, s as b };
|
|
4
|
+
//# sourceMappingURL=out.js.map
|
|
5
|
+
//# sourceMappingURL=chunk-LBGQDFFN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"0FAgBO,IAAMA,EAAN,cAA+B,KAAM,CAC1C,YAAYC,EAAWC,EAAK,CAC1B,MAAMA,CAAG,EACT,KAAK,UAAYD,CACnB,CACF","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 class ExitProcessError extends Error {\n constructor(errorCode, msg) {\n super(msg);\n this.errorCode = errorCode;\n }\n}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a as a$1, b } from './chunk-LBGQDFFN.js';
|
|
2
|
+
import { conjureFetch } from 'conjure-lite';
|
|
3
|
+
import { consola, LogLevels } from 'consola';
|
|
4
|
+
import { createFetchHeaderMutator } from '@osdk/api/utils';
|
|
5
|
+
|
|
6
|
+
var d={};a$1(d,{clearDeployedVersion:()=>x,getContentSecurityPolicyAdditions:()=>h,getDeployedVersion:()=>S,getRegisteredSiteDomains:()=>g,getRequestedSiteDomains:()=>D,previewContentSecurityPolicy:()=>T,putContentSecurityPolicyAdditions:()=>$,requestSiteDomainForRepository:()=>v,unregisterSiteDomain:()=>F,updateDeployedVersion:()=>R});async function x(e,t){return conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"DELETE")}async function h(e,t){return conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/additions`,"GET")}async function S(e,t){return conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"GET")}async function g(e,t){return conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/registered`,"GET")}async function D(e,t){return conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/requested`,"GET")}async function T(e,t,o){return conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/preview`,"POST",o)}async function $(e,t,o){return conjureFetch(e,`/sites/v2/admin/repository/${t}/csp/additions`,"PUT",o)}async function v(e,t,o){return conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/submit-registration`,"POST",o)}async function F(e,t,o){return conjureFetch(e,`/sites/v2/admin/repository/${t}/domains/unregister`,"POST",o)}async function R(e,t,o){return conjureFetch(e,`/sites/v2/admin/repository/${t}/deployed-version`,"PUT",o)}var P={};a$1(P,{SiteAssetArtifactsService:()=>l});var l={};a$1(l,{deleteSiteVersion:()=>A,fetchSiteVersions:()=>w,uploadZippedSiteAsset:()=>j});function n(e,t=fetch){return createFetchHeaderMutator(z(t),async o=>{let r=await e();return o.set("Authorization",`Bearer ${r}`),o.set("Fetch-User-Agent",""),o})}function z(e=fetch){return function(o,r){return typeof o=="string"||o instanceof URL?consola.debug(`${r?.method??"GET"}: ${o.toString().trim()}`):consola.debug(`${o.method??"GET"}: ${o.url.toString().trim()}`),e(o,r).then(s=>(consola.debug("Finished fetch"),s))}}async function a(e,t){let o=n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),r=`
|
|
7
|
+
${e}/third-party-application-service/api/application-websites/${t}`,s=await o(r);if(s.status>=200&&s.status<300){let i=await s.json();return consola.debug(`Repository RID: ${i}`),i}throw new Error(`Unexpected response code ${s.status} (${s.statusText})`)}function m(e,t){return `${e}/artifacts/api/repositories/${t}/contents/release/siteasset`}async function A(e,t,o){let r=await a(e,t),s=`${m(e,r)}/versions/${o}`,c=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(s,{method:"DELETE"});if(c.status>=200&&c.status<300)return consola.level=LogLevels.debug,consola.debug(`${c.status} - Status Text: '${c.statusText}'`),!0;throw new b(c.status,`Unexpected response code ${c.status} (${c.statusText})`)}async function w(e,t){let o=await a(e,t),r=`${m(e,o)}/versions`,i=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(r);if(i.status===200)return (await i.json()).versions;throw new Error(`Unexpected response code ${i.status} (${i.statusText})`)}async function j(e,t,o,r){let s=await a(e,t),i=`${m(e,s)}/versions/zip/${o}`,p=await n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"PUT",body:r,headers:{"Content-Type":"application/octet-stream"},duplex:"half"});if(p.status>=200&&p.status<300)return consola.level=LogLevels.debug,consola.debug("Status Text: "+p.statusText),!0;throw p.status===409?new b(p.status,"Version already exists"):new b(p.status,`Unexpected response code ${p.status} (${p.statusText})`)}function M(e,t){return {fetchFn:n(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),baseUrl:e,servicePath:t}}var V={};a$1(V,{fetchWebsiteRepositoryRid:()=>a});
|
|
8
|
+
|
|
9
|
+
export { d as a, P as b, M as c, V as d };
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
11
|
+
//# sourceMappingURL=chunk-NOVNYG3L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.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":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile","createConjureContext","servicePath","third_party_application_service_exports"],"mappings":"+CAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,sCAAAC,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,4BAAAC,EAAA,iCAAAC,EAAA,sCAAAC,EAAA,mCAAAC,EAAA,yBAAAC,EAAA,0BAAAC,ICgBA,OAAS,gBAAAC,MAAoB,eAC7B,eAAsBV,EAAqBW,EAAKC,EAAe,CAC7D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,QAAQ,CACnG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBT,EAAkCU,EAAKC,EAAe,CAC1E,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,KAAK,CAC7F,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBR,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Q,MACR,KAAMK,EACN,QAAS,CACP,eAAgB,0BAClB,EACA,OAAQ,MACV,CAAC,EAED,GAAIJ,EAAO,QAAU,KAAOA,EAAO,OAAS,IAC1C,OAAAjB,EAAQ,MAAQC,EAAU,MAC1BD,EAAQ,MAAM,gBAAkBiB,EAAO,UAAU,EAC1C,GACF,MAAIA,EAAO,SAAW,IACrB,IAAIG,EAAiBH,EAAO,OAAQ,wBAAwB,EAE5D,IAAIG,EAAiBH,EAAO,OAAQ,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEhH,CC1BO,SAASK,EAAqBT,EAASU,EAAa,CACzD,MAAO,CACL,QAASpB,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EAC7D,QAAAU,EACA,YAAAU,CACF,CACF,CCvBA,IAAAC,EAAA,GAAA9C,EAAA8C,EAAA,+BAAAZ","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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\";\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\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deleteSiteDeployment(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}`, \"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\";\nexport async function deploySite(ctx, deploySiteRequest) {\n return conjureFetch(ctx, `/sites/admin/deploy`, \"POST\", deploySiteRequest);\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\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}/deployedVersion`, \"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\";\nexport async function getRegisteredDomains(ctx) {\n return conjureFetch(ctx, `/sites/configRegisteredDomains/list`, \"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\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/api/utils\";\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\";"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { d, c, a } from './chunk-NOVNYG3L.js';
|
|
2
|
+
import './chunk-LBGQDFFN.js';
|
|
3
|
+
import { consola } from 'consola';
|
|
4
|
+
|
|
5
|
+
async function f({siteVersion:t,appRid:c$1,baseUrl:i,clearVersion:n}){let o=await d.fetchWebsiteRepositoryRid(i,c$1),s=c(i,"/artifacts/api");t?await a.updateDeployedVersion(s,o,{siteVersion:{version:t}}):n&&await a.clearDeployedVersion(s,o),consola.success("Deploy successful");}
|
|
6
|
+
|
|
7
|
+
export { f as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
9
|
+
//# sourceMappingURL=handleSiteDeploy-2C2WC2A7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":["consola","handleSiteDeploy","version","appRid","baseUrl","clearVersion","repositoryRid","third_party_application_service_exports","ctx","createConjureContext","ArtifactsSitesAdminV2Service_exports"],"mappings":"kFAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAwC,CAC7C,YAAaC,EACb,OAAAC,EACA,QAAAC,EACA,aAAAC,CACF,EAAG,CACD,IAAMC,EAAgB,MAAMC,EAA6B,0BAA0BH,EAASD,CAAM,EAC5FK,EAAMC,EAAqBL,EAAS,gBAAgB,EACtDF,EACF,MAAMQ,EAA6B,sBAAsBF,EAAKF,EAAe,CAC3E,YAAa,CACX,QAAAJ,CACF,CACF,CAAC,EACQG,GACT,MAAMK,EAA6B,qBAAqBF,EAAKF,CAAa,EAE5EN,EAAQ,QAAQ,mBAAmB,CACrC","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}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkAFLYFRYO_cjs = require('./chunk-AFLYFRYO.cjs');
|
|
4
|
+
require('./chunk-2LNCUMIA.cjs');
|
|
5
|
+
var consola = require('consola');
|
|
6
|
+
|
|
7
|
+
async function f({siteVersion:t,appRid:c,baseUrl:i,clearVersion:n}){let o=await chunkAFLYFRYO_cjs.d.fetchWebsiteRepositoryRid(i,c),s=chunkAFLYFRYO_cjs.c(i,"/artifacts/api");t?await chunkAFLYFRYO_cjs.a.updateDeployedVersion(s,o,{siteVersion:{version:t}}):n&&await chunkAFLYFRYO_cjs.a.clearDeployedVersion(s,o),consola.consola.success("Deploy successful");}
|
|
8
|
+
|
|
9
|
+
module.exports = f;
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
11
|
+
//# sourceMappingURL=handleSiteDeploy-4O4DUUB6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":["consola","handleSiteDeploy","version","appRid","baseUrl","clearVersion","repositoryRid","third_party_application_service_exports","ctx","createConjureContext","ArtifactsSitesAdminV2Service_exports"],"mappings":"oFAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAwC,CAC7C,YAAaC,EACb,OAAAC,EACA,QAAAC,EACA,aAAAC,CACF,EAAG,CACD,IAAMC,EAAgB,MAAMC,EAA6B,0BAA0BH,EAASD,CAAM,EAC5FK,EAAMC,EAAqBL,EAAS,gBAAgB,EACtDF,EACF,MAAMQ,EAA6B,sBAAsBF,EAAKF,EAAe,CAC3E,YAAa,CACX,QAAAJ,CACF,CACF,CAAC,EACQG,GACT,MAAMK,EAA6B,qBAAqBF,EAAKF,CAAa,EAE5EN,EAAQ,QAAQ,mBAAmB,CACrC","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}"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2LNCUMIA_cjs = require('./chunk-2LNCUMIA.cjs');
|
|
4
|
+
var v = require('yargs');
|
|
5
|
+
var helpers = require('yargs/helpers');
|
|
6
|
+
var m = require('fs');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var v__default = /*#__PURE__*/_interopDefault(v);
|
|
29
|
+
var m__namespace = /*#__PURE__*/_interopNamespace(m);
|
|
30
|
+
|
|
31
|
+
var u={command:"delete",describe:"Delete an uploaded version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteDeleteCommand-ZXXHDOOM.cjs')).default(o);}},t=u;var f={command:"deploy",describe:"Deploy an uploaded version",builder:o=>o.options({siteVersion:{type:"string",conflicts:"clearVersion"},undeploy:{alias:"clearVersion",description:"Causes the site to no longer be deployed",type:"boolean",conflicts:"siteVersion"}}).group(["siteVersion","clearVersion"],"Version To Deploy (requires one of)"),handler:async o=>{await(await import('./handleSiteDeploy-4O4DUUB6.cjs')).default(o);}},a=f;var g={command:"upload",describe:"Upload an application version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteUploadCommand-5AYNOXAT.cjs')).default(o);}},i=g;var y={command:"versions",describe:"List application versions",builder:o=>o,handler:async o=>{await(await import('./siteVersionsCommand-ZVHYGOAQ.cjs')).default(o);}},s=y;var b={command:"site",describe:"Manage your site",builder:o=>o.options({appRid:{type:"string",demandOption:!0,coerce:e=>e},baseUrl:{type:"string",demandOption:!0}}).group(["appRid","baseUrl"],"Common Arguments").command(s).command(i).command(t).command(a).demandCommand(),handler:async o=>{}},d=b;async function c(){let{findUp:o}=await import('find-up'),e=await o("package.json");if(!e)return "(unknown version. No package.json found)";let n=JSON.parse(await m__namespace.promises.readFile(e,"utf-8"));return n.version?`v${n.version}`:"(unknown version. No version in package.json found)"}var p=!0;async function l(o){if(p){let n=(await import('consola')).consola;n.info(`Palantir OSDK CLI ${await c()}`),n.level=3+o.verbose,n.level>3&&n.debug(`Verbose logging enabled (${n.level===4?"debug":"trace"})`),console.log(),p=!1;}}async function x(o=process.argv){let e=v__default.default(helpers.hideBin(o)).env("OSDK").version(!1).option("verbose",{alias:"v",type:"boolean",description:"Enable verbose logging",count:!0}).demandCommand().middleware(l,!0).strict().command(d);try{return e.parseAsync()}catch(n){n instanceof chunk2LNCUMIA_cjs.b&&(await import('consola')).consola.error(n.message);}}
|
|
32
|
+
|
|
33
|
+
exports.cli = x;
|
|
34
|
+
//# sourceMappingURL=out.js.map
|
|
35
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","e","ExitProcessError"],"mappings":"yCAgBA,OAAOA,MA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right 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command(site);\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\");\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson.js\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
|
package/build/js/index.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { b as b$1 } from './chunk-LBGQDFFN.js';
|
|
2
|
+
import v from 'yargs';
|
|
3
|
+
import { hideBin } from 'yargs/helpers';
|
|
4
|
+
import * as m from 'fs';
|
|
2
5
|
|
|
3
|
-
var
|
|
4
|
-
var c = require('yargs');
|
|
5
|
-
var helpers = require('yargs/helpers');
|
|
6
|
+
var u={command:"delete",describe:"Delete an uploaded version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteDeleteCommand-GQCHP3EN.js')).default(o);}},t=u;var f={command:"deploy",describe:"Deploy an uploaded version",builder:o=>o.options({siteVersion:{type:"string",conflicts:"clearVersion"},undeploy:{alias:"clearVersion",description:"Causes the site to no longer be deployed",type:"boolean",conflicts:"siteVersion"}}).group(["siteVersion","clearVersion"],"Version To Deploy (requires one of)"),handler:async o=>{await(await import('./handleSiteDeploy-2C2WC2A7.js')).default(o);}},a=f;var g={command:"upload",describe:"Upload an application version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteUploadCommand-4ZL5TAIW.js')).default(o);}},i=g;var y={command:"versions",describe:"List application versions",builder:o=>o,handler:async o=>{await(await import('./siteVersionsCommand-ZUFBC6EH.js')).default(o);}},s=y;var b={command:"site",describe:"Manage your site",builder:o=>o.options({appRid:{type:"string",demandOption:!0,coerce:e=>e},baseUrl:{type:"string",demandOption:!0}}).group(["appRid","baseUrl"],"Common Arguments").command(s).command(i).command(t).command(a).demandCommand(),handler:async o=>{}},d=b;async function c(){let{findUp:o}=await import('find-up'),e=await o("package.json");if(!e)return "(unknown version. No package.json found)";let n=JSON.parse(await m.promises.readFile(e,"utf-8"));return n.version?`v${n.version}`:"(unknown version. No version in package.json found)"}var p=!0;async function l(o){if(p){let n=(await import('consola')).consola;n.info(`Palantir OSDK CLI ${await c()}`),n.level=3+o.verbose,n.level>3&&n.debug(`Verbose logging enabled (${n.level===4?"debug":"trace"})`),console.log(),p=!1;}}async function x(o=process.argv){let e=v(hideBin(o)).env("OSDK").version(!1).option("verbose",{alias:"v",type:"boolean",description:"Enable verbose logging",count:!0}).demandCommand().middleware(l,!0).strict().command(d);try{return e.parseAsync()}catch(n){n instanceof b$1&&(await import('consola')).consola.error(n.message);}}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var c__default = /*#__PURE__*/_interopDefault(c);
|
|
10
|
-
|
|
11
|
-
var d={command:"upload",describe:"Upload an application version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteUploadCommand-36HAEYDG.js')).default(o);}},i=d;var s={command:"versions",describe:"List application versions",builder:o=>o,handler:async o=>{await(await import('./siteVersionsCommand-YSV7HQJK.js')).default(o);}},m=s;function a(o){return o.command("site","Manage your site",t=>{let r=t.options({appRid:{type:"string",demandOption:!0,coerce:n=>n},baseUrl:{type:"string",demandOption:!0}}).demandCommand();return r.command(m),r.command(i),r},t=>{})}async function u(o=process.argv){let t=c__default.default(helpers.hideBin(o)).env("OSDK"),r=await import('consola');a(t),t.demandCommand().strict();try{return t.parseAsync()}catch(n){n instanceof chunk2DJZUIFP_js.a&&r.consola.error(n.message);}}
|
|
12
|
-
|
|
13
|
-
exports.cli = u;
|
|
8
|
+
export { x as cli };
|
|
14
9
|
//# sourceMappingURL=out.js.map
|
|
15
10
|
//# sourceMappingURL=index.js.map
|
package/build/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/addSiteCommand.ts"],"names":["yargs","hideBin","command","argv","args","upload_default","versions_default","addSiteCommand","originalYargs","a","cli","base","Consola","e","ExitProcessError"],"mappings":"wCAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,gCACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,iCAAyB,GACxC,QAAQA,CAAI,CAC5B,CACF,EACOC,EAAQH,EChBR,IAAMA,EAAU,CACrB,QAAS,WACT,SAAU,4BACV,QAASC,GACAA,EAET,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,mCAA2B,GAC1C,QAAQA,CAAI,CAC5B,CACF,EACOE,EAAQJ,ECTA,SAARK,EAAgCP,EAAO,CAC5C,OAAOA,EAAM,QAAQ,OAAQ,mBAAoBQ,GAAiB,CAChE,IAAMR,EAAQQ,EAAc,QAAQ,CAClC,OAAQ,CACN,KAAM,SACN,aAAc,GACd,OAAQC,GAAKA,CACf,EACA,QAAS,CACP,KAAM,SACN,aAAc,EAChB,CACF,CAAC,EAAE,cAAc,EACjB,OAAAT,EAAM,QAAQM,CAAQ,EACtBN,EAAM,QAAQK,CAAM,EACbL,CACT,EAAGI,GAAQ,CAAC,CAAC,CACf,CHfA,eAAsBM,EAAIN,EAAO,QAAQ,KAAM,CAC7C,IAAMO,EAAOX,EAAMC,EAAQG,CAAI,CAAC,EAAE,IAAI,MAAM,EACtCQ,EAAU,KAAM,QAAO,SAAS,EAGtCL,EAAeI,CAAI,EACnBA,EAAK,cAAc,EAAE,OAAO,EAC5B,GAAI,CACF,OAAOA,EAAK,WAAW,CACzB,OAASE,EAAG,CACNA,aAAaC,GACfF,EAAQ,QAAQ,MAAMC,EAAE,OAAO,CAEnC,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport addSiteCommand from \"./commands/site/addSiteCommand\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\");\n const Consola = await import(\"consola\");\n // Consola.default.level = Consola.LogLevels.debug;\n\n addSiteCommand(base);\n base.demandCommand().strict();\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport upload from \"./upload\";\nimport versions from \"./versions\";\nexport default function addSiteCommand(yargs) {\n return yargs.command(\"site\", \"Manage your site\", originalYargs => {\n const yargs = originalYargs.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).demandCommand();\n yargs.command(versions);\n yargs.command(upload);\n return yargs;\n }, args => {});\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","e","ExitProcessError"],"mappings":"wCAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAE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,UAAYG,MAAQ,KACpB,eAAsBC,GAAgC,CACpD,GAAM,CACJ,OAAAC,CACF,EAAI,KAAM,QAAO,SAAS,EACpBC,EAAS,MAAMD,EAAO,cAAc,EAC1C,GAAI,CAACC,EACH,MAAO,2CAET,IAAMC,EAAc,KAAK,MAAM,MAAS,WAAS,SAASD,EAAQ,OAAO,CAAC,EAC1E,OAAIC,EAAY,QACP,IAAIA,EAAY,OAAO,GAEvB,qDAEX,CCdA,IAAIC,EAAY,GAChB,eAAsBC,EAAqBd,EAAM,CAC/C,GAAIa,EAAW,CAGb,IAAME,GAFU,KAAM,QAAO,SAAS,GAEd,QACxBA,EAAQ,KAAK,qBAAqB,MAAMN,EAA8B,CAAC,EAAE,EACzEM,EAAQ,MAAQ,EAAIf,EAAK,QACrBe,EAAQ,MAAQ,GAClBA,EAAQ,MAAM,4BAA4BA,EAAQ,QAAU,EAAI,QAAU,OAAO,GAAG,EAItF,QAAQ,IAAI,EACZF,EAAY,EACd,CACF,CPZA,eAAsBG,EAAIhB,EAAO,QAAQ,KAAM,CAC7C,IAAMiB,EAAOrB,EAAMC,EAAQG,CAAI,CAAC,EAAE,IAAI,MAAM,EAAE,QAAQ,EAAK,EAAE,OAAO,UAAW,CAC7E,MAAO,IACP,KAAM,UACN,YAAa,yBACb,MAAO,EACT,CAAC,EAAE,cAAc,EAAE,WAAWc,EAAsB,EAAI,EAAE,OAAO,EAAE,QAAQP,CAAI,EAC/E,GAAI,CACF,OAAOU,EAAK,WAAW,CACzB,OAASC,EAAG,CACNA,aAAaC,IACC,KAAM,QAAO,SAAS,GAC9B,QAAQ,MAAMD,EAAE,OAAO,CAEnC,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command(site);\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\");\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson.js\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { b } from './chunk-NOVNYG3L.js';
|
|
2
|
+
import './chunk-LBGQDFFN.js';
|
|
3
|
+
import { consola } from 'consola';
|
|
4
|
+
|
|
5
|
+
async function i(e){await b.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.success("Delete successful");}
|
|
6
|
+
|
|
7
|
+
export { i as default };
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
9
|
+
//# sourceMappingURL=siteDeleteCommand-GQCHP3EN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":["consola","siteDeleteCommand","args","artifacts_exports"],"mappings":"oEAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAyCC,EAAM,CACpD,MAAMC,EAAU,0BAA0B,kBAAkBD,EAAK,QAASA,EAAK,OAAQA,EAAK,WAAW,EACvGF,EAAQ,QAAQ,mBAAmB,CACrC","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}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkAFLYFRYO_cjs = require('./chunk-AFLYFRYO.cjs');
|
|
4
|
+
require('./chunk-2LNCUMIA.cjs');
|
|
5
|
+
var consola = require('consola');
|
|
6
|
+
|
|
7
|
+
async function i(e){await chunkAFLYFRYO_cjs.b.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.consola.success("Delete successful");}
|
|
8
|
+
|
|
9
|
+
module.exports = i;
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
11
|
+
//# sourceMappingURL=siteDeleteCommand-ZXXHDOOM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":["consola","siteDeleteCommand","args","artifacts_exports"],"mappings":"sEAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAyCC,EAAM,CACpD,MAAMC,EAAU,0BAA0B,kBAAkBD,EAAK,QAASA,EAAK,OAAQA,EAAK,WAAW,EACvGF,EAAQ,QAAQ,mBAAmB,CACrC","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}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { b as b$1 } from './chunk-NOVNYG3L.js';
|
|
2
|
+
import { b } from './chunk-LBGQDFFN.js';
|
|
3
|
+
import a from 'archiver';
|
|
4
|
+
import { consola } from 'consola';
|
|
5
|
+
import * as s from 'fs';
|
|
6
|
+
import { Readable } from 'stream';
|
|
7
|
+
|
|
8
|
+
async function c(i){if(i.dir==null)throw consola.error("No directory specified"),new b(1);if(!(await s.promises.stat(i.dir)).isDirectory())throw consola.error("Specified path is not a directory"),new b(2);consola.start("Zippping site files");let e=a("zip").directory(i.dir,!1);await Promise.all([b$1.SiteAssetArtifactsService.uploadZippedSiteAsset(i.baseUrl,i.appRid,i.siteVersion,Readable.toWeb(e)),e.finalize()]),consola.success("Upload complete");}
|
|
9
|
+
|
|
10
|
+
export { c as default };
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=siteUploadCommand-4ZL5TAIW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":["archiver","consola","fs","Readable","invokeSiteUpload","args","ExitProcessError","archive","artifacts_exports"],"mappings":"gFAgBA,OAAOA,MAAc,WACrB,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,OAAS,YAAAC,MAAgB,SAGzB,eAAOC,EAAwCC,EAAM,CACnD,GAAIA,EAAK,KAAO,KACd,MAAAJ,EAAQ,MAAM,wBAAwB,EAChC,IAAIK,EAAiB,CAAC,EAG9B,GAAI,EADS,MAAS,WAAS,KAAKD,EAAK,GAAG,GAClC,YAAY,EACpB,MAAAJ,EAAQ,MAAM,mCAAmC,EAC3C,IAAIK,EAAiB,CAAC,EAE9BL,EAAQ,MAAM,qBAAqB,EACnC,IAAMM,EAAUP,EAAS,KAAK,EAAE,UAAUK,EAAK,IAAK,EAAK,EACzD,MAAM,QAAQ,IAAI,CAACG,EAAU,0BAA0B,sBAAsBH,EAAK,QAASA,EAAK,OAAQA,EAAK,YAAaF,EAAS,MAAMI,CAAO,CAChJ,EAAGA,EAAQ,SAAS,CAAC,CAAC,EACtBN,EAAQ,QAAQ,iBAAiB,CACnC","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}"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkAFLYFRYO_cjs = require('./chunk-AFLYFRYO.cjs');
|
|
4
|
+
var chunk2LNCUMIA_cjs = require('./chunk-2LNCUMIA.cjs');
|
|
5
|
+
var a = require('archiver');
|
|
6
|
+
var consola = require('consola');
|
|
7
|
+
var s = require('fs');
|
|
8
|
+
var stream = require('stream');
|
|
9
|
+
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n.default = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var a__default = /*#__PURE__*/_interopDefault(a);
|
|
31
|
+
var s__namespace = /*#__PURE__*/_interopNamespace(s);
|
|
32
|
+
|
|
33
|
+
async function c(i){if(i.dir==null)throw consola.consola.error("No directory specified"),new chunk2LNCUMIA_cjs.b(1);if(!(await s__namespace.promises.stat(i.dir)).isDirectory())throw consola.consola.error("Specified path is not a directory"),new chunk2LNCUMIA_cjs.b(2);consola.consola.start("Zippping site files");let e=a__default.default("zip").directory(i.dir,!1);await Promise.all([chunkAFLYFRYO_cjs.b.SiteAssetArtifactsService.uploadZippedSiteAsset(i.baseUrl,i.appRid,i.siteVersion,stream.Readable.toWeb(e)),e.finalize()]),consola.consola.success("Upload complete");}
|
|
34
|
+
|
|
35
|
+
module.exports = c;
|
|
36
|
+
//# sourceMappingURL=out.js.map
|
|
37
|
+
//# sourceMappingURL=siteUploadCommand-5AYNOXAT.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":["archiver","consola","fs","Readable","invokeSiteUpload","args","ExitProcessError","archive","artifacts_exports"],"mappings":"kFAgBA,OAAOA,MAAc,WACrB,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,OAAS,YAAAC,MAAgB,SAGzB,eAAOC,EAAwCC,EAAM,CACnD,GAAIA,EAAK,KAAO,KACd,MAAAJ,EAAQ,MAAM,wBAAwB,EAChC,IAAIK,EAAiB,CAAC,EAG9B,GAAI,EADS,MAAS,WAAS,KAAKD,EAAK,GAAG,GAClC,YAAY,EACpB,MAAAJ,EAAQ,MAAM,mCAAmC,EAC3C,IAAIK,EAAiB,CAAC,EAE9BL,EAAQ,MAAM,qBAAqB,EACnC,IAAMM,EAAUP,EAAS,KAAK,EAAE,UAAUK,EAAK,IAAK,EAAK,EACzD,MAAM,QAAQ,IAAI,CAACG,EAAU,0BAA0B,sBAAsBH,EAAK,QAASA,EAAK,OAAQA,EAAK,YAAaF,EAAS,MAAMI,CAAO,CAChJ,EAAGA,EAAQ,SAAS,CAAC,CAAC,EACtBN,EAAQ,QAAQ,iBAAiB,CACnC","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}"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { d, c, b, a } from './chunk-NOVNYG3L.js';
|
|
2
|
+
import './chunk-LBGQDFFN.js';
|
|
3
|
+
import { consola } from 'consola';
|
|
4
|
+
import { colorize } from 'consola/utils';
|
|
5
|
+
|
|
6
|
+
async function v({baseUrl:o,appRid:t}){consola.start("Fetching versions & deployed version");let d$1=await d.fetchWebsiteRepositoryRid(o,t),l=c(o,"/artifacts/api"),[i,r]=await Promise.all([b.SiteAssetArtifactsService.fetchSiteVersions(o,t),a.getDeployedVersion(l,d$1)]);if(i.length==0){consola.warn("Successfully connected to server, but no versions were found.");return}consola.success("Found versions:");for(let s of i)consola.log(` - ${s}${r&&s===r.version?colorize("green"," (deployed)"):""}`);}
|
|
7
|
+
|
|
8
|
+
export { v as default };
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
10
|
+
//# sourceMappingURL=siteVersionsCommand-ZUFBC6EH.js.map
|