@osdk/cli 0.0.14 → 0.0.15
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 +9 -0
- package/bin/osdk.mjs +1 -1
- package/build/js/{chunk-2DJZUIFP.js → chunk-MGT3UGXW.mjs} +1 -1
- package/build/js/{chunk-FE6HR4TN.js → chunk-TSZWWATC.mjs} +4 -4
- package/build/js/chunk-TSZWWATC.mjs.map +1 -0
- package/build/js/{chunk-KSJ4QHUS.cjs → chunk-UOKM237I.cjs} +3 -3
- package/build/js/chunk-UOKM237I.cjs.map +1 -0
- package/build/js/{chunk-4D6JZ4TL.js → chunk-XIJ2ZQRX.mjs} +1 -1
- package/build/js/handleGenerate-XM72AL6J.cjs +32 -0
- package/build/js/handleGenerate-XM72AL6J.cjs.map +1 -0
- package/build/js/handleGenerate-ZHO53G62.mjs +10 -0
- package/build/js/handleGenerate-ZHO53G62.mjs.map +1 -0
- package/build/js/handleSiteDeploy-257ZNTYA.cjs +12 -0
- package/build/js/{handleSiteDeploy-YNRVWKWR.js → handleSiteDeploy-QCMJWAYI.mjs} +4 -4
- package/build/js/{handleSiteDeploy-YNRVWKWR.js.map → handleSiteDeploy-QCMJWAYI.mjs.map} +1 -1
- package/build/js/index.cjs +2 -2
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +11 -0
- package/build/js/index.mjs.map +1 -0
- package/build/js/{siteDeleteCommand-XZF4TDGA.cjs → siteDeleteCommand-NY5W7NE3.cjs} +3 -3
- package/build/js/{siteDeleteCommand-PN2LUAZA.js → siteDeleteCommand-ZKHKGVVF.mjs} +4 -4
- package/build/js/{siteDeleteCommand-PN2LUAZA.js.map → siteDeleteCommand-ZKHKGVVF.mjs.map} +1 -1
- package/build/js/{siteUploadCommand-LF4U2XI6.cjs → siteUploadCommand-OHSOCUL6.cjs} +3 -3
- package/build/js/{siteUploadCommand-MCV3ZQAW.js → siteUploadCommand-PZEJVKRE.mjs} +4 -4
- package/build/js/{siteUploadCommand-MCV3ZQAW.js.map → siteUploadCommand-PZEJVKRE.mjs.map} +1 -1
- package/build/js/{siteVersionsCommand-N33FEMLE.cjs → siteVersionsCommand-IE5QH56U.cjs} +3 -3
- package/build/js/{siteVersionsCommand-ZAZVGVKV.js → siteVersionsCommand-NVJD5BDH.mjs} +4 -4
- package/build/js/{siteVersionsCommand-ZAZVGVKV.js.map → siteVersionsCommand-NVJD5BDH.mjs.map} +1 -1
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +2 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +4 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +6 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +6 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +7 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +8 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +8 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +1 -1
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.d.ts +3 -0
- package/package.json +7 -6
- package/build/js/chunk-FE6HR4TN.js.map +0 -1
- package/build/js/chunk-KSJ4QHUS.cjs.map +0 -1
- package/build/js/handleGenerate-BUJOID4C.js +0 -10
- package/build/js/handleGenerate-BUJOID4C.js.map +0 -1
- package/build/js/handleGenerate-SY3UD5UA.cjs +0 -32
- package/build/js/handleGenerate-SY3UD5UA.cjs.map +0 -1
- package/build/js/handleSiteDeploy-F77NQQTE.cjs +0 -12
- package/build/js/index.js +0 -11
- package/build/js/index.js.map +0 -1
- package/build/types/generated/object-set-watcher/AllPropertiesPropertySet.d.ts +0 -2
- package/build/types/generated/object-set-watcher/Arg.d.ts +0 -4
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeRequests.d.ts +0 -4
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeResponse.d.ts +0 -1
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeResponses.d.ts +0 -4
- package/build/types/generated/object-set-watcher/BaseVersion.d.ts +0 -1
- package/build/types/generated/object-set-watcher/BatchEnableWatcherRequest.d.ts +0 -4
- package/build/types/generated/object-set-watcher/Error.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ErrorName.d.ts +0 -1
- package/build/types/generated/object-set-watcher/FilterValue.d.ts +0 -1
- package/build/types/generated/object-set-watcher/Message.d.ts +0 -11
- package/build/types/generated/object-set-watcher/ObjectSetChanged.d.ts +0 -5
- package/build/types/generated/object-set-watcher/ObjectSetContext.d.ts +0 -4
- package/build/types/generated/object-set-watcher/ObjectSetFilterContext.d.ts +0 -5
- package/build/types/generated/object-set-watcher/ObjectSetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/ObjectSetStreamSubscribeRequest.d.ts +0 -8
- package/build/types/generated/object-set-watcher/ObjectSetStreamSubscribeRequests.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeRequest.d.ts +0 -7
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeRequests.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeResponse.d.ts +0 -16
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeResponses.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetUpdates.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetWatchService/batchEnableWatcher.d.ts +0 -3
- package/build/types/generated/object-set-watcher/ObjectSetWatchService.d.ts +0 -1
- package/build/types/generated/object-set-watcher/ObjectTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PatchOffset.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertyId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertySelection.d.ts +0 -6
- package/build/types/generated/object-set-watcher/PropertySet.d.ts +0 -11
- package/build/types/generated/object-set-watcher/PropertyTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertyTypeRidPropertySelection.d.ts +0 -4
- package/build/types/generated/object-set-watcher/QosError.d.ts +0 -2
- package/build/types/generated/object-set-watcher/RefreshObjectSet.d.ts +0 -4
- package/build/types/generated/object-set-watcher/RequestId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/SelectedPropertiesPropertySet.d.ts +0 -4
- package/build/types/generated/object-set-watcher/StreamMessage.d.ts +0 -16
- package/build/types/generated/object-set-watcher/SubscriptionError.d.ts +0 -4
- package/build/types/generated/object-set-watcher/SubscriptionId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/SubscriptionSuccess.d.ts +0 -4
- package/build/types/generated/object-set-watcher/UnresolvedFilterParameterId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/index.d.ts +0 -41
- package/build/types/generated/object-set-watcher/object/DatasourceRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/FoundryObject.d.ts +0 -14
- package/build/types/generated/object-set-watcher/object/ObjectKey.d.ts +0 -3
- package/build/types/generated/object-set-watcher/object/ObjectTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/ObjectVersion.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/PropertyRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/PropertyValue.d.ts +0 -2
- package/build/types/generated/object-set-watcher/object/index.d.ts +0 -7
- package/build/types/generated/object-set-watcher/types/Attachment.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Byte.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/CatalogFileReference.d.ts +0 -7
- package/build/types/generated/object-set-watcher/types/Ciphertext.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/DatasetFileReference.d.ts +0 -5
- package/build/types/generated/object-set-watcher/types/DatasetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Date.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Decimal.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/DecimalType.d.ts +0 -4
- package/build/types/generated/object-set-watcher/types/Float.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Geohash.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Geoshape.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesIntegrationRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/Long.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Marking.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MarkingType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaItemReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/MediaItemRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/MediaSetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaSetViewRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaValueReference.d.ts +0 -16
- package/build/types/generated/object-set-watcher/types/MediaViewItemReference.d.ts +0 -8
- package/build/types/generated/object-set-watcher/types/MimeType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Null.d.ts +0 -2
- package/build/types/generated/object-set-watcher/types/PrimitiveType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Short.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Timestamp.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/TransactionRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Value.d.ts +0 -105
- package/build/types/generated/object-set-watcher/types/ValueType.d.ts +0 -25
- package/build/types/generated/object-set-watcher/types/Vector.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/VectorType.d.ts +0 -3
- package/build/types/generated/object-set-watcher/types/index.d.ts +0 -35
- /package/build/js/{chunk-2DJZUIFP.js.map → chunk-MGT3UGXW.mjs.map} +0 -0
- /package/build/js/{chunk-4D6JZ4TL.js.map → chunk-XIJ2ZQRX.mjs.map} +0 -0
- /package/build/js/{handleSiteDeploy-F77NQQTE.cjs.map → handleSiteDeploy-257ZNTYA.cjs.map} +0 -0
- /package/build/js/{siteDeleteCommand-XZF4TDGA.cjs.map → siteDeleteCommand-NY5W7NE3.cjs.map} +0 -0
- /package/build/js/{siteUploadCommand-LF4U2XI6.cjs.map → siteUploadCommand-OHSOCUL6.cjs.map} +0 -0
- /package/build/js/{siteVersionsCommand-N33FEMLE.cjs.map → siteVersionsCommand-IE5QH56U.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
package/bin/osdk.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as a$2 } from './chunk-
|
|
2
|
-
import { a as a$1 } from './chunk-
|
|
1
|
+
import { a as a$2 } from './chunk-MGT3UGXW.mjs';
|
|
2
|
+
import { a as a$1 } from './chunk-XIJ2ZQRX.mjs';
|
|
3
3
|
import { conjureFetch } from 'conjure-lite';
|
|
4
4
|
import { consola, LogLevels } from 'consola';
|
|
5
|
-
import { createFetchHeaderMutator } from '@osdk/
|
|
5
|
+
import { createFetchHeaderMutator } from '@osdk/shared.net';
|
|
6
6
|
|
|
7
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=`
|
|
8
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});
|
|
9
9
|
|
|
10
10
|
export { d as a, P as b, M as c, V as d };
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-TSZWWATC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile","createConjureContext","servicePath","third_party_application_service_exports"],"mappings":"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,ICgBA,OAAS,gBAAAC,MAAoB,eAQ7B,eAAsBV,EAAqBW,EAAKC,EAAe,CAC7D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,QAAQ,CACnG,CCVA,OAAS,gBAAAF,MAAoB,eAM7B,eAAsBT,EAAkCU,EAAKC,EAAe,CAC1E,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,KAAK,CAC7F,CCRA,OAAS,gBAAAF,MAAoB,eAM7B,eAAsBR,EAAmBS,EAAKC,EAAe,CAC3D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,KAAK,CAChG,CCRA,OAAS,gBAAAF,MAAoB,eAO7B,eAAsBP,EAAyBQ,EAAKC,EAAe,CACjE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,sBAAuB,KAAK,CAClG,CCTA,OAAS,gBAA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,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\";\n\n/**\n * Clears the deployed version while leaving the associated domain, visiting the associated domain in this state\n * will return an error.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get the CSP additions configured for a repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get the deployed version that will be served for a given siteasset repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been successfully registered with the given repository. Visiting a successfully\n * registered domain should serve the registered repository assets.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been requested for a given repository. For control panel domains that require\n * an approval, this will also include pending requests. Closed/rejected requests will only be included as long\n * as their domain hasn't been re-requested for another repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Preview what the CSP that will be served with the site looks like.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Set the CSP additions configured for a repository.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Requests the registration of a domain with the provided repository, this will result in an approvals task\n * getting created for approval by an admin.\n *\n * Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.\n *\n * Depending on how the domain for the repository was setup, this might also result in deleting the domain\n * itself.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Sets the asset version of the siteasset repository that will be served.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\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\";\n\n/**\n * Get all registered domains regardless of whether they're in use or not.\n */\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/shared.net\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -4,9 +4,9 @@ var chunkV4QJCMF6_cjs = require('./chunk-V4QJCMF6.cjs');
|
|
|
4
4
|
var chunkX6QW63OH_cjs = require('./chunk-X6QW63OH.cjs');
|
|
5
5
|
var conjureLite = require('conjure-lite');
|
|
6
6
|
var consola = require('consola');
|
|
7
|
-
var
|
|
7
|
+
var shared_net = require('@osdk/shared.net');
|
|
8
8
|
|
|
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
|
|
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 shared_net.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
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});
|
|
11
11
|
|
|
12
12
|
exports.a = d;
|
|
@@ -14,4 +14,4 @@ exports.b = P;
|
|
|
14
14
|
exports.c = M;
|
|
15
15
|
exports.d = V;
|
|
16
16
|
//# sourceMappingURL=out.js.map
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-UOKM237I.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile","createConjureContext","servicePath","third_party_application_service_exports"],"mappings":"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,ICgBA,OAAS,gBAAAC,MAAoB,eAQ7B,eAAsBV,EAAqBW,EAAKC,EAAe,CAC7D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,QAAQ,CACnG,CCVA,OAAS,gBAAAF,MAAoB,eAM7B,eAAsBT,EAAkCU,EAAKC,EAAe,CAC1E,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,KAAK,CAC7F,CCRA,OAAS,gBAAAF,MAAoB,eAM7B,eAAsBR,EAAmBS,EAAKC,EAAe,CAC3D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,KAAK,CAChG,CCRA,OAAS,gBAAAF,MAAoB,eAO7B,eAAsBP,EAAyBQ,EAAKC,EAAe,CACjE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,sBAAuB,KAAK,CAClG,CCTA,OAAS,gBAAAF,MAAoB,eAQ7B,eAAsBN,EAAwBO,EAAKC,EAAe,CAChE,OAAOF,EAAaC,EAAK,8BAA8B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,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\";\n\n/**\n * Clears the deployed version while leaving the associated domain, visiting the associated domain in this state\n * will return an error.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get the CSP additions configured for a repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get the deployed version that will be served for a given siteasset repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been successfully registered with the given repository. Visiting a successfully\n * registered domain should serve the registered repository assets.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Get domains that have been requested for a given repository. For control panel domains that require\n * an approval, this will also include pending requests. Closed/rejected requests will only be included as long\n * as their domain hasn't been re-requested for another repository.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Preview what the CSP that will be served with the site looks like.\n *\n * artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Set the CSP additions configured for a repository.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Requests the registration of a domain with the provided repository, this will result in an approvals task\n * getting created for approval by an admin.\n *\n * Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.\n *\n * Depending on how the domain for the repository was setup, this might also result in deleting the domain\n * itself.\n *\n * artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.\n */\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\n/**\n * Sets the asset version of the siteasset repository that will be served.\n *\n * artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.\n */\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\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\";\n\n/**\n * Get all registered domains regardless of whether they're in use or not.\n */\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/shared.net\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -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 o = 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 o__namespace = /*#__PURE__*/_interopNamespace(o);
|
|
27
|
+
|
|
28
|
+
async function f(t){let r=JSON.parse(await o__namespace.promises.readFile(t.ontologyPath,"utf-8"));t.beta?await generator.generateClientSdkVersionTwoPointZero(r,{writeFile:(e,i)=>o__namespace.promises.writeFile(e,i,"utf-8"),mkdir:async(e,i)=>{await o__namespace.promises.mkdir(e,i);}},t.outDir,t.packageType):await generator.generateClientSdkVersionOneDotOne(r,{writeFile:(e,i)=>o__namespace.promises.writeFile(e,i,"utf-8"),mkdir:async(e,i)=>{await o__namespace.promises.mkdir(e,i);}},t.outDir,t.packageType),consola.consola.info("OSDK Generated!");}
|
|
29
|
+
|
|
30
|
+
module.exports = f;
|
|
31
|
+
//# sourceMappingURL=out.js.map
|
|
32
|
+
//# sourceMappingURL=handleGenerate-XM72AL6J.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","generateClientSdkVersionTwoPointZero","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"6BAgBA,OAAS,qCAAAA,EAAmC,wCAAAC,MAA4C,kBACxF,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAC9EA,EAAK,KACP,MAAMJ,EAAqCK,EAAU,CACnD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,OAAQA,EAAK,WAAW,EAEhC,MAAML,EAAkCM,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,OAAQA,EAAK,WAAW,EAElCH,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, generateClientSdkVersionTwoPointZero } 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 if (args.beta) {\n await generateClientSdkVersionTwoPointZero(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, args.packageType);\n } else {\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, args.packageType);\n }\n consola.info(\"OSDK Generated!\");\n}"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
2
|
+
import { generateClientSdkVersionTwoPointZero, generateClientSdkVersionOneDotOne } from '@osdk/generator';
|
|
3
|
+
import { consola } from 'consola';
|
|
4
|
+
import * as o from 'fs';
|
|
5
|
+
|
|
6
|
+
async function f(t){let r=JSON.parse(await o.promises.readFile(t.ontologyPath,"utf-8"));t.beta?await generateClientSdkVersionTwoPointZero(r,{writeFile:(e,i)=>o.promises.writeFile(e,i,"utf-8"),mkdir:async(e,i)=>{await o.promises.mkdir(e,i);}},t.outDir,t.packageType):await generateClientSdkVersionOneDotOne(r,{writeFile:(e,i)=>o.promises.writeFile(e,i,"utf-8"),mkdir:async(e,i)=>{await o.promises.mkdir(e,i);}},t.outDir,t.packageType),consola.info("OSDK Generated!");}
|
|
7
|
+
|
|
8
|
+
export { f as default };
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
10
|
+
//# sourceMappingURL=handleGenerate-ZHO53G62.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","generateClientSdkVersionTwoPointZero","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"6BAgBA,OAAS,qCAAAA,EAAmC,wCAAAC,MAA4C,kBACxF,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAC9EA,EAAK,KACP,MAAMJ,EAAqCK,EAAU,CACnD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,OAAQA,EAAK,WAAW,EAEhC,MAAML,EAAkCM,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,OAAQA,EAAK,WAAW,EAElCH,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, generateClientSdkVersionTwoPointZero } 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 if (args.beta) {\n await generateClientSdkVersionTwoPointZero(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, args.packageType);\n } else {\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, args.packageType);\n }\n consola.info(\"OSDK Generated!\");\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkUOKM237I_cjs = require('./chunk-UOKM237I.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 chunkUOKM237I_cjs.d.fetchWebsiteRepositoryRid(i,c),s=chunkUOKM237I_cjs.c(i,"/artifacts/api");t?await chunkUOKM237I_cjs.a.updateDeployedVersion(s,o,{siteVersion:{version:t}}):n&&await chunkUOKM237I_cjs.a.clearDeployedVersion(s,o),consola.consola.success("Deploy successful");}
|
|
9
|
+
|
|
10
|
+
module.exports = f;
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=handleSiteDeploy-257ZNTYA.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d, c, a } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { d, c, a } from './chunk-TSZWWATC.mjs';
|
|
2
|
+
import './chunk-MGT3UGXW.mjs';
|
|
3
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
6
6
|
async function f({siteVersion:t,appRid:c$1,baseUrl:i,clearVersion:n}){let o=await d.fetchWebsiteRepositoryRid(i,c$1),s=c(i,"/artifacts/api");t?await a.updateDeployedVersion(s,o,{siteVersion:{version:t}}):n&&await a.clearDeployedVersion(s,o),consola.success("Deploy successful");}
|
|
7
7
|
|
|
8
8
|
export { f as default };
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=handleSiteDeploy-
|
|
10
|
+
//# sourceMappingURL=handleSiteDeploy-QCMJWAYI.mjs.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}"]}
|
package/build/js/index.cjs
CHANGED
|
@@ -30,8 +30,8 @@ function _interopNamespace(e) {
|
|
|
30
30
|
var V__default = /*#__PURE__*/_interopDefault(V);
|
|
31
31
|
var p__namespace = /*#__PURE__*/_interopNamespace(p);
|
|
32
32
|
|
|
33
|
-
var g={command:"delete",describe:"Delete an uploaded version",builder:e=>e.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async e=>{await(await import('./siteDeleteCommand-
|
|
33
|
+
var g={command:"delete",describe:"Delete an uploaded version",builder:e=>e.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async e=>{await(await import('./siteDeleteCommand-NY5W7NE3.cjs')).default(e);}},r=g;var y={command:"deploy",describe:"Deploy an uploaded version",builder:e=>e.options({siteVersion:{type:"string",conflicts:"clearVersion"},undeploy:{alias:"clearVersion",description:"Causes the site to no longer be deployed",type:"boolean",conflicts:"siteVersion"}}).group(["siteVersion","clearVersion"],"Version To Deploy (requires one of)"),handler:async e=>{await(await import('./handleSiteDeploy-257ZNTYA.cjs')).default(e);}},a=y;var b={command:"upload",describe:"Upload an application version",builder:e=>e.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async e=>{await(await import('./siteUploadCommand-OHSOCUL6.cjs')).default(e);}},i=b;var w={command:"versions",describe:"List application versions",builder:e=>e,handler:async e=>{await(await import('./siteVersionsCommand-IE5QH56U.cjs')).default(e);}},s=w;var v={command:"site",describe:"Manage your site",builder:e=>e.options({appRid:{type:"string",demandOption:!0,coerce:n=>n},baseUrl:{type:"string",demandOption:!0}}).group(["appRid","baseUrl"],"Common Arguments").command(s).command(i).command(r).command(a).demandCommand(),handler:async e=>{}},d=v;var h={command:"generate",describe:"Generate typescript from ontology",builder:e=>e.options({outDir:{type:"string",description:"Where to place the generated files",demandOption:!0},ontologyPath:{description:"path to the ontology wire json",type:"string",demandOption:!0},beta:{type:"boolean",description:"Should generate beta sdk",demandOption:!1},packageType:{default:"commonjs",choices:["commonjs","module"]}}).group(["outDir","ontologyPath"],"Version To Deploy (requires one of)"),handler:async e=>{await(await import('./handleGenerate-XM72AL6J.cjs')).default(e);}},m=h;var x={command:"typescript",describe:"Manage code",builder:e=>e.command(m).demandCommand(),handler:async e=>{}},c=x;async function l(){let{findUp:e}=await import('find-up'),n=await e("package.json",{cwd:(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href))});if(!n)return "(unknown version. No package.json found)";let o=JSON.parse(await p__namespace.promises.readFile(n,"utf-8"));return o.version?`v${o.version}`:"(unknown version. No version in package.json found)"}var u=!0;async function f(e){if(u){let o=(await import('consola')).consola;o.info(`Palantir OSDK CLI ${await l()}`),o.level=3+e.verbose,o.level>3&&o.debug(`Verbose logging enabled (${o.level===4?"debug":"trace"})`),console.log(),u=!1;}}async function k(e=process.argv){let n=V__default.default(helpers.hideBin(e)).env("OSDK").version(!1).option("verbose",{alias:"v",type:"boolean",description:"Enable verbose logging",count:!0}).demandCommand().middleware(f,!0).strict().command({command:"unstable",aliases:["experimental"],builder:async o=>o.command(d).command(c).demandCommand(),handler:o=>{}});try{return n.parseAsync()}catch(o){o instanceof chunkV4QJCMF6_cjs.a&&(await import('consola')).consola.error(o.message);}}
|
|
34
34
|
|
|
35
|
-
exports.cli =
|
|
35
|
+
exports.cli = k;
|
|
36
36
|
//# sourceMappingURL=out.js.map
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|
package/build/js/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","generate_default","typescript_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","_args","e","ExitProcessError"],"mappings":"sEAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,kCAAyB,GACxC,QAAQA,CAAI,CAC5B,CACF,EACOC,EAAQH,EChBR,IAAMA,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,QAAQ,CAClB,YAAe,CACb,KAAM,SACN,UAAW,cAGb,EAEA,SAAU,CACR,MAAO,eACP,YAAa,2CACb,KAAM,UACN,UAAW,aAGb,CACF,CAAC,EAAE,MAAM,CAAC,cAAe,cAAc,EAAG,qCAAqC,EAejF,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,iCAAwB,GACvC,QAAQA,CAAI,CAC5B,CACF,EACOE,EAAQJ,ECxCR,IAAMA,EAAU,CACrB,QAAS,SACT,SAAU,gCACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,kCAAyB,GACxC,QAAQA,CAAI,CAC5B,CACF,EACOG,EAAQL,EChBR,IAAMA,EAAU,CACrB,QAAS,WACT,SAAU,4BACV,QAASC,GACAA,EAET,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,oCAA2B,GAC1C,QAAQA,CAAI,CAC5B,CACF,EACOI,EAAQN,ECPf,IAAMO,EAAO,CACX,QAAS,OACT,SAAU,mBACV,QAASN,GACAA,EAAK,QAAQ,CAClB,OAAQ,CACN,KAAM,SACN,aA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AE,EACzEM,EAAQ,MAAQ,EAAIjB,EAAK,QACrBiB,EAAQ,MAAQ,GAClBA,EAAQ,MAAM,4BAA4BA,EAAQ,QAAU,EAAI,QAAU,OAAO,GAAG,EAItF,QAAQ,IAAI,EACZF,EAAY,EACd,CACF,CTXA,eAAsBG,EAAIlB,EAAO,QAAQ,KAAM,CAC7C,IAAMmB,EAAOvB,EAAMC,EAAQG,CAAI,CAAC,EAAE,IAAI,MAAM,EAAE,QAAQ,EAAK,EAAE,OAAO,UAAW,CAC7E,MAAO,IACP,KAAM,UACN,YAAa,yBACb,MAAO,EACT,CAAC,EAAE,cAAc,EAAE,WAAWgB,EAAsB,EAAI,EAAE,OAAO,EAAE,QAAQ,CACzE,QAAS,WACT,QAAS,CAAC,cAAc,EACxB,QAAS,MAAMjB,GACNA,EAAK,QAAQQ,CAAI,EAAE,QAAQE,CAAU,EAAE,cAAc,EAE9D,QAASW,GAAS,CAAC,CACrB,CAAC,EACD,GAAI,CACF,OAAOD,EAAK,WAAW,CACzB,OAASE,EAAG,CACNA,aAAaC,IACC,KAAM,QAAO,SAAS,GAC9B,QAAQ,MAAMD,EAAE,OAAO,CAEnC,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n builder: async argv => {\n return argv.command(site).command(typescript).demandCommand();\n },\n handler: _args => {}\n });\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"generate\",\n describe: \"Generate typescript from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"path to the ontology wire json\",\n type: \"string\",\n demandOption: true\n }\n }).group([\"outDir\", \"ontologyPath\"], \"Version To Deploy (requires one of)\");\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\", {\n cwd: import.meta.url\n });\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson.js\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","generate_default","typescript_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","_args","e","ExitProcessError"],"mappings":"sEAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAA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ACF,CTXA,eAAsBG,EAAIlB,EAAO,QAAQ,KAAM,CAC7C,IAAMmB,EAAOvB,EAAMC,EAAQG,CAAI,CAAC,EAAE,IAAI,MAAM,EAAE,QAAQ,EAAK,EAAE,OAAO,UAAW,CAC7E,MAAO,IACP,KAAM,UACN,YAAa,yBACb,MAAO,EACT,CAAC,EAAE,cAAc,EAAE,WAAWgB,EAAsB,EAAI,EAAE,OAAO,EAAE,QAAQ,CACzE,QAAS,WACT,QAAS,CAAC,cAAc,EACxB,QAAS,MAAMjB,GACNA,EAAK,QAAQQ,CAAI,EAAE,QAAQE,CAAU,EAAE,cAAc,EAE9D,QAASW,GAAS,CAAC,CACrB,CAAC,EACD,GAAI,CACF,OAAOD,EAAK,WAAW,CACzB,OAASE,EAAG,CACNA,aAAaC,IACC,KAAM,QAAO,SAAS,GAC9B,QAAQ,MAAMD,EAAE,OAAO,CAEnC,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n builder: async argv => {\n return argv.command(site).command(typescript).demandCommand();\n },\n handler: _args => {}\n });\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"generate\",\n describe: \"Generate typescript from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"path to the ontology wire json\",\n type: \"string\",\n demandOption: true\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n }\n }).group([\"outDir\", \"ontologyPath\"], \"Version To Deploy (requires one of)\");\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\", {\n cwd: import.meta.url\n });\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson.js\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a as a$1 } from './chunk-MGT3UGXW.mjs';
|
|
2
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
3
|
+
import V from 'yargs';
|
|
4
|
+
import { hideBin } from 'yargs/helpers';
|
|
5
|
+
import * as p from 'fs';
|
|
6
|
+
|
|
7
|
+
var g={command:"delete",describe:"Delete an uploaded version",builder:e=>e.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async e=>{await(await import('./siteDeleteCommand-ZKHKGVVF.mjs')).default(e);}},r=g;var y={command:"deploy",describe:"Deploy an uploaded version",builder:e=>e.options({siteVersion:{type:"string",conflicts:"clearVersion"},undeploy:{alias:"clearVersion",description:"Causes the site to no longer be deployed",type:"boolean",conflicts:"siteVersion"}}).group(["siteVersion","clearVersion"],"Version To Deploy (requires one of)"),handler:async e=>{await(await import('./handleSiteDeploy-QCMJWAYI.mjs')).default(e);}},a=y;var b={command:"upload",describe:"Upload an application version",builder:e=>e.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async e=>{await(await import('./siteUploadCommand-PZEJVKRE.mjs')).default(e);}},i=b;var w={command:"versions",describe:"List application versions",builder:e=>e,handler:async e=>{await(await import('./siteVersionsCommand-NVJD5BDH.mjs')).default(e);}},s=w;var v={command:"site",describe:"Manage your site",builder:e=>e.options({appRid:{type:"string",demandOption:!0,coerce:n=>n},baseUrl:{type:"string",demandOption:!0}}).group(["appRid","baseUrl"],"Common Arguments").command(s).command(i).command(r).command(a).demandCommand(),handler:async e=>{}},d=v;var h={command:"generate",describe:"Generate typescript from ontology",builder:e=>e.options({outDir:{type:"string",description:"Where to place the generated files",demandOption:!0},ontologyPath:{description:"path to the ontology wire json",type:"string",demandOption:!0},beta:{type:"boolean",description:"Should generate beta sdk",demandOption:!1},packageType:{default:"commonjs",choices:["commonjs","module"]}}).group(["outDir","ontologyPath"],"Version To Deploy (requires one of)"),handler:async e=>{await(await import('./handleGenerate-ZHO53G62.mjs')).default(e);}},m=h;var x={command:"typescript",describe:"Manage code",builder:e=>e.command(m).demandCommand(),handler:async e=>{}},c=x;async function l(){let{findUp:e}=await import('find-up'),n=await e("package.json",{cwd:import.meta.url});if(!n)return "(unknown version. No package.json found)";let o=JSON.parse(await p.promises.readFile(n,"utf-8"));return o.version?`v${o.version}`:"(unknown version. No version in package.json found)"}var u=!0;async function f(e){if(u){let o=(await import('consola')).consola;o.info(`Palantir OSDK CLI ${await l()}`),o.level=3+e.verbose,o.level>3&&o.debug(`Verbose logging enabled (${o.level===4?"debug":"trace"})`),console.log(),u=!1;}}async function k(e=process.argv){let n=V(hideBin(e)).env("OSDK").version(!1).option("verbose",{alias:"v",type:"boolean",description:"Enable verbose logging",count:!0}).demandCommand().middleware(f,!0).strict().command({command:"unstable",aliases:["experimental"],builder:async o=>o.command(d).command(c).demandCommand(),handler:o=>{}});try{return n.parseAsync()}catch(o){o instanceof a$1&&(await import('consola')).consola.error(o.message);}}
|
|
8
|
+
|
|
9
|
+
export { k as cli };
|
|
10
|
+
//# sourceMappingURL=out.js.map
|
|
11
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/delete/index.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/index.ts","../../src/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/readCliVersionFromPackageJson.ts","../../src/yargs/logVersionMiddleware.ts"],"names":["yargs","hideBin","command","argv","args","delete_default","deploy_default","upload_default","versions_default","site","a","site_default","generate_default","typescript_default","fs","readCliVersionFromPackageJson","findUp","result","packageJson","firstTime","logVersionMiddleware","consola","cli","base","_args","e","ExitProcessError"],"mappings":"sEAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,kCAAyB,GACxC,QAAQA,CAAI,CAC5B,CACF,EACOC,EAAQH,EChBR,IAAMA,EAAU,CACrB,QAAS,SACT,SAAU,6BACV,QAASC,GACAA,EAAK,QAAQ,CAClB,YAAe,CACb,KAAM,SACN,UAAW,cAGb,EAEA,SAAU,CACR,MAAO,eACP,YAAa,2CACb,KAAM,UACN,UAAW,aAGb,CACF,CAAC,EAAE,MAAM,CAAC,cAAe,cAAc,EAAG,qCAAqC,EAejF,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,iCAAwB,GACvC,QAAQA,CAAI,CAC5B,CACF,EACOE,EAAQJ,ECxCR,IAAMA,EAAU,CACrB,QAAS,SACT,SAAU,gCACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,M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F","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logVersionMiddleware } from \"./yargs/logVersionMiddleware.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logVersionMiddleware, true).strict().command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n builder: async argv => {\n return argv.command(site).command(typescript).demandCommand();\n },\n handler: _args => {}\n });\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n const Consola = await import(\"consola\");\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"delete\",\n describe: \"Delete an uploaded version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"deploy\",\n describe: \"Deploy an uploaded version\",\n builder: argv => {\n return argv.options({\n \"siteVersion\": {\n type: \"string\",\n conflicts: \"clearVersion\"\n // group: \"Deploy Version\",\n // implies: { \"clearVersion\": \"false\" },\n },\n\n undeploy: {\n alias: \"clearVersion\",\n description: \"Causes the site to no longer be deployed\",\n type: \"boolean\",\n conflicts: \"siteVersion\"\n // group: \"Deploy Version\",\n // implies: { \"siteVersion\": \"\" },\n }\n }).group([\"siteVersion\", \"clearVersion\"], \"Version To Deploy (requires one of)\");\n\n // .check((args) => {\n // if (\n // (args.siteVersion && args.clearVersion)\n // || (!args.siteVersion && args.clearVersion == undefined)\n // ) {\n // // consola.error(\"Only one of --siteVersion or --clearVersion may be provided\");\n // throw new Error(\n // \"Only one of --siteVersion or --clearVersion may be provided\",\n // );\n // }\n // });\n },\n\n handler: async args => {\n const command = await import(\"./handleSiteDeploy.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport siteDelete from \"./delete/index.js\";\nimport siteDeploy from \"./deploy/index.js\";\nimport upload from \"./upload/index.js\";\nimport versions from \"./versions/index.js\";\nconst site = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: argv => {\n return argv.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).group([\"appRid\", \"baseUrl\"], \"Common Arguments\").command(versions).command(upload).command(siteDelete).command(siteDeploy).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"generate\",\n describe: \"Generate typescript from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"path to the ontology wire json\",\n type: \"string\",\n demandOption: true\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n }\n }).group([\"outDir\", \"ontologyPath\"], \"Version To Deploy (requires one of)\");\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as fs from \"node:fs\";\nexport async function readCliVersionFromPackageJson() {\n const {\n findUp\n } = await import(\"find-up\");\n const result = await findUp(\"package.json\", {\n cwd: import.meta.url\n });\n if (!result) {\n return \"(unknown version. No package.json found)\";\n }\n const packageJson = JSON.parse(await fs.promises.readFile(result, \"utf-8\"));\n if (packageJson.version) {\n return `v${packageJson.version}`;\n } else {\n return \"(unknown version. No version in package.json found)\";\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { readCliVersionFromPackageJson } from \"../readCliVersionFromPackageJson.js\";\nlet firstTime = true;\nexport async function logVersionMiddleware(args) {\n if (firstTime) {\n const Consola = await import(\"consola\");\n // This will be called before any command is executed\n const consola = Consola.consola;\n consola.info(`Palantir OSDK CLI ${await readCliVersionFromPackageJson()}`);\n consola.level = 3 + args.verbose; // so 1 -v is debug logs and -vv is trace\n if (consola.level > 3) {\n consola.debug(`Verbose logging enabled (${consola.level === 4 ? \"debug\" : \"trace\"})`);\n }\n\n // eslint-disable-next-line no-console\n console.log(); // Not consola. Just want a blank line\n firstTime = false;\n }\n}"]}
|