@osdk/cli 0.0.6 → 0.0.8
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 +19 -0
- package/bin/osdk.mjs +5 -0
- package/build/js/chunk-2DJZUIFP.js +5 -0
- package/build/js/chunk-2DJZUIFP.js.map +1 -0
- package/build/js/chunk-4D6JZ4TL.js +5 -0
- package/build/js/chunk-4D6JZ4TL.js.map +1 -0
- package/build/js/{chunk-NOVNYG3L.js → chunk-FE6HR4TN.js} +4 -3
- package/build/js/{chunk-NOVNYG3L.js.map → chunk-FE6HR4TN.js.map} +1 -1
- package/build/js/{chunk-AFLYFRYO.cjs → chunk-KSJ4QHUS.cjs} +5 -4
- package/build/js/{chunk-AFLYFRYO.cjs.map → chunk-KSJ4QHUS.cjs.map} +1 -1
- package/build/js/chunk-V4QJCMF6.cjs +7 -0
- package/build/js/chunk-V4QJCMF6.cjs.map +1 -0
- package/build/js/chunk-X6QW63OH.cjs +7 -0
- package/build/js/chunk-X6QW63OH.cjs.map +1 -0
- package/build/js/handleGenerate-BUJOID4C.js +10 -0
- package/build/js/handleGenerate-BUJOID4C.js.map +1 -0
- package/build/js/handleGenerate-SY3UD5UA.cjs +32 -0
- package/build/js/handleGenerate-SY3UD5UA.cjs.map +1 -0
- package/build/js/handleSiteDeploy-F77NQQTE.cjs +12 -0
- package/build/js/{handleSiteDeploy-2C2WC2A7.js.map → handleSiteDeploy-F77NQQTE.cjs.map} +1 -1
- package/build/js/{handleSiteDeploy-2C2WC2A7.js → handleSiteDeploy-YNRVWKWR.js} +4 -3
- package/build/js/{handleSiteDeploy-4O4DUUB6.cjs.map → handleSiteDeploy-YNRVWKWR.js.map} +1 -1
- package/build/js/index.cjs +8 -7
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.js +6 -5
- package/build/js/index.js.map +1 -1
- package/build/js/{siteDeleteCommand-GQCHP3EN.js → siteDeleteCommand-PN2LUAZA.js} +4 -3
- package/build/js/{siteDeleteCommand-GQCHP3EN.js.map → siteDeleteCommand-PN2LUAZA.js.map} +1 -1
- package/build/js/siteDeleteCommand-XZF4TDGA.cjs +12 -0
- package/build/js/{siteDeleteCommand-ZXXHDOOM.cjs.map → siteDeleteCommand-XZF4TDGA.cjs.map} +1 -1
- package/build/js/{siteUploadCommand-5AYNOXAT.cjs → siteUploadCommand-LF4U2XI6.cjs} +5 -4
- package/build/js/{siteUploadCommand-4ZL5TAIW.js.map → siteUploadCommand-LF4U2XI6.cjs.map} +1 -1
- package/build/js/{siteUploadCommand-4ZL5TAIW.js → siteUploadCommand-MCV3ZQAW.js} +6 -5
- package/build/js/{siteUploadCommand-5AYNOXAT.cjs.map → siteUploadCommand-MCV3ZQAW.js.map} +1 -1
- package/build/js/{siteVersionsCommand-ZVHYGOAQ.cjs → siteVersionsCommand-N33FEMLE.cjs} +5 -4
- package/build/js/{siteVersionsCommand-ZUFBC6EH.js.map → siteVersionsCommand-N33FEMLE.cjs.map} +1 -1
- package/build/js/{siteVersionsCommand-ZUFBC6EH.js → siteVersionsCommand-ZAZVGVKV.js} +4 -3
- package/build/js/{siteVersionsCommand-ZVHYGOAQ.cjs.map → siteVersionsCommand-ZAZVGVKV.js.map} +1 -1
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +4 -0
- package/build/types/commands/typescript/generate/generate.d.ts +4 -0
- package/build/types/commands/typescript/generate/handleGenerate.d.mts +2 -0
- package/build/types/commands/typescript/index.d.ts +4 -0
- package/package.json +4 -4
- package/build/js/chunk-2LNCUMIA.cjs +0 -8
- package/build/js/chunk-2LNCUMIA.cjs.map +0 -1
- package/build/js/chunk-LBGQDFFN.js +0 -5
- package/build/js/chunk-LBGQDFFN.js.map +0 -1
- package/build/js/handleSiteDeploy-4O4DUUB6.cjs +0 -11
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @osdk/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dfc2b94: Fix OAuth login process
|
|
8
|
+
- Updated dependencies [dfc2b94]
|
|
9
|
+
- @osdk/generator@0.0.10
|
|
10
|
+
- @osdk/api@0.0.12
|
|
11
|
+
|
|
12
|
+
## 0.0.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- f3120fb: Move 2.0 client into @osdk/client to fix typescript 4.9 compatability in @osdk/api"
|
|
17
|
+
- 848404c: Handle conflicts between object, action, and query names
|
|
18
|
+
- Updated dependencies [f3120fb]
|
|
19
|
+
- Updated dependencies [848404c]
|
|
20
|
+
- @osdk/api@0.0.11
|
|
21
|
+
|
|
3
22
|
## 0.0.6
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/bin/osdk.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"AAgBO,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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as a$
|
|
1
|
+
import { a as a$2 } from './chunk-2DJZUIFP.js';
|
|
2
|
+
import { a as a$1 } from './chunk-4D6JZ4TL.js';
|
|
2
3
|
import { conjureFetch } from 'conjure-lite';
|
|
3
4
|
import { consola, LogLevels } from 'consola';
|
|
4
5
|
import { createFetchHeaderMutator } from '@osdk/api/utils';
|
|
5
6
|
|
|
6
7
|
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
|
|
8
|
+
${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 a$2(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 a$2(p.status,"Version already exists"):new a$2(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
|
|
|
9
10
|
export { d as a, P as b, M as c, V as d };
|
|
10
11
|
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-FE6HR4TN.js.map
|
|
@@ -1 +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,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AAS,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\";"]}
|
|
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":"gFAAA,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,C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AS,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\";"]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV4QJCMF6_cjs = require('./chunk-V4QJCMF6.cjs');
|
|
4
|
+
var chunkX6QW63OH_cjs = require('./chunk-X6QW63OH.cjs');
|
|
4
5
|
var conjureLite = require('conjure-lite');
|
|
5
6
|
var consola = require('consola');
|
|
6
7
|
var utils = require('@osdk/api/utils');
|
|
7
8
|
|
|
8
|
-
var d={};
|
|
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
|
|
9
|
+
var d={};chunkX6QW63OH_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={};chunkX6QW63OH_cjs.a(P,{SiteAssetArtifactsService:()=>l});var l={};chunkX6QW63OH_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=`
|
|
10
|
+
${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 chunkV4QJCMF6_cjs.a(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 chunkV4QJCMF6_cjs.a(p.status,"Version already exists"):new chunkV4QJCMF6_cjs.a(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={};chunkX6QW63OH_cjs.a(V,{fetchWebsiteRepositoryRid:()=>a});
|
|
10
11
|
|
|
11
12
|
exports.a = d;
|
|
12
13
|
exports.b = P;
|
|
13
14
|
exports.c = M;
|
|
14
15
|
exports.d = V;
|
|
15
16
|
//# sourceMappingURL=out.js.map
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-KSJ4QHUS.cjs.map
|
|
@@ -1 +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,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MvB,EAAgB,MAAMqB,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\";"]}
|
|
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":"kFAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,sCAAAC,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,4BAAAC,EAAA,iCAAAC,EAAA,sCAAAC,EAAA,mCAAAC,EAAA,yBAAAC,EAAA,0BAAAC,IC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AAG,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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"AAgBO,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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './chunk-4D6JZ4TL.js';
|
|
2
|
+
import { generateClientSdkVersionOneDotOne } from '@osdk/generator';
|
|
3
|
+
import { consola } from 'consola';
|
|
4
|
+
import * as e from 'fs';
|
|
5
|
+
|
|
6
|
+
async function s(r){let i=JSON.parse(await e.promises.readFile(r.ontologyPath,"utf-8"));await generateClientSdkVersionOneDotOne(i,{writeFile:(o,t)=>e.promises.writeFile(o,t,"utf-8"),mkdir:async(o,t)=>{await e.promises.mkdir(o,t);}},r.outDir),consola.info("OSDK Generated!");}
|
|
7
|
+
|
|
8
|
+
export { s as default };
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
10
|
+
//# sourceMappingURL=handleGenerate-BUJOID4C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"4BAgBA,OAAS,qCAAAA,MAAyC,kBAClD,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAClF,MAAMJ,EAAkCK,EAAU,CAChD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,MAAM,EACdH,EAAQ,KAAK,iBAAiB,CAChC","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 { generateClientSdkVersionOneDotOne } from \"@osdk/generator\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nexport default async function handleGenerate(args) {\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n await generateClientSdkVersionOneDotOne(ontology, {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n }\n }, args.outDir);\n consola.info(\"OSDK Generated!\");\n}"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./chunk-X6QW63OH.cjs');
|
|
4
|
+
var generator = require('@osdk/generator');
|
|
5
|
+
var consola = require('consola');
|
|
6
|
+
var e = require('fs');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var e__namespace = /*#__PURE__*/_interopNamespace(e);
|
|
27
|
+
|
|
28
|
+
async function s(r){let i=JSON.parse(await e__namespace.promises.readFile(r.ontologyPath,"utf-8"));await generator.generateClientSdkVersionOneDotOne(i,{writeFile:(o,t)=>e__namespace.promises.writeFile(o,t,"utf-8"),mkdir:async(o,t)=>{await e__namespace.promises.mkdir(o,t);}},r.outDir),consola.consola.info("OSDK Generated!");}
|
|
29
|
+
|
|
30
|
+
module.exports = s;
|
|
31
|
+
//# sourceMappingURL=out.js.map
|
|
32
|
+
//# sourceMappingURL=handleGenerate-SY3UD5UA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"6BAgBA,OAAS,qCAAAA,MAAyC,kBAClD,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAClF,MAAMJ,EAAkCK,EAAU,CAChD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,MAAM,EACdH,EAAQ,KAAK,iBAAiB,CAChC","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 { generateClientSdkVersionOneDotOne } from \"@osdk/generator\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nexport default async function handleGenerate(args) {\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n await generateClientSdkVersionOneDotOne(ontology, {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n }\n }, args.outDir);\n consola.info(\"OSDK Generated!\");\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKSJ4QHUS_cjs = require('./chunk-KSJ4QHUS.cjs');
|
|
4
|
+
require('./chunk-V4QJCMF6.cjs');
|
|
5
|
+
require('./chunk-X6QW63OH.cjs');
|
|
6
|
+
var consola = require('consola');
|
|
7
|
+
|
|
8
|
+
async function f({siteVersion:t,appRid:c,baseUrl:i,clearVersion:n}){let o=await chunkKSJ4QHUS_cjs.d.fetchWebsiteRepositoryRid(i,c),s=chunkKSJ4QHUS_cjs.c(i,"/artifacts/api");t?await chunkKSJ4QHUS_cjs.a.updateDeployedVersion(s,o,{siteVersion:{version:t}}):n&&await chunkKSJ4QHUS_cjs.a.clearDeployedVersion(s,o),consola.consola.success("Deploy successful");}
|
|
9
|
+
|
|
10
|
+
module.exports = f;
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=handleSiteDeploy-F77NQQTE.cjs.map
|
|
@@ -1 +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":"
|
|
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":"iHAgBA,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}"]}
|