@osdk/cli 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/{chunk-MS72SCKG.cjs → chunk-2KJDB4YP.cjs} +13 -13
- package/build/js/{chunk-MS72SCKG.cjs.map → chunk-2KJDB4YP.cjs.map} +1 -1
- package/build/js/chunk-AX5HH3ZN.cjs +73 -0
- package/build/js/chunk-AX5HH3ZN.cjs.map +1 -0
- package/build/js/{chunk-TZGNA5WR.cjs → chunk-EVW4VRJL.cjs} +3 -7
- package/build/js/chunk-EVW4VRJL.cjs.map +1 -0
- package/build/js/{chunk-4ZJAXFFT.mjs → chunk-JTZ7GUB4.mjs} +3 -3
- package/build/js/{chunk-4ZJAXFFT.mjs.map → chunk-JTZ7GUB4.mjs.map} +1 -1
- package/build/js/chunk-MTJA6DOB.mjs +64 -0
- package/build/js/chunk-MTJA6DOB.mjs.map +1 -0
- package/build/js/{chunk-HD6SVFKA.mjs → chunk-SFL6QONJ.mjs} +3 -7
- package/build/js/chunk-SFL6QONJ.mjs.map +1 -0
- package/build/js/handleGenerate-XC5RBDDW-DL73JJG6.cjs +255 -0
- package/build/js/handleGenerate-XC5RBDDW-DL73JJG6.cjs.map +1 -0
- package/build/js/handleGenerate-XC5RBDDW-T333WMC4.mjs +230 -0
- package/build/js/handleGenerate-XC5RBDDW-T333WMC4.mjs.map +1 -0
- package/build/js/index.cjs +140 -165
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +131 -152
- package/build/js/index.mjs.map +1 -1
- package/build/js/loginFlow-QTUKYZEL.cjs +10 -0
- package/build/js/loginFlow-ZFVT2AFZ.mjs +4 -0
- package/build/js/{siteDeployCommand-XWGLYIMU.cjs → siteDeployCommand-FTCDKKU4.cjs} +17 -18
- package/build/js/siteDeployCommand-FTCDKKU4.cjs.map +1 -0
- package/build/js/{siteDeployCommand-OKFLCN7L.mjs → siteDeployCommand-WHR7PIJE.mjs} +3 -4
- package/build/js/siteDeployCommand-WHR7PIJE.mjs.map +1 -0
- package/build/js/{versionDeleteCommand-MGKK73ZV.cjs → versionDeleteCommand-KQCJ7CHQ.cjs} +6 -6
- package/build/js/{versionDeleteCommand-NJFRYKFM.mjs → versionDeleteCommand-YFVUCYVQ.mjs} +3 -3
- package/build/js/{versionGetCommand-IHMNJSVC.cjs → versionGetCommand-45C2JZC4.cjs} +8 -8
- package/build/js/{versionGetCommand-JEYADJ77.mjs → versionGetCommand-AKPCEBQZ.mjs} +3 -3
- package/build/js/{versionListCommand-5C57X7XC.cjs → versionListCommand-4TM6YYNJ.cjs} +8 -8
- package/build/js/{versionListCommand-PKRL3YOJ.mjs → versionListCommand-6OVL7FF2.mjs} +3 -3
- package/build/js/{versionSetCommand-GNNIGVJO.mjs → versionSetCommand-BD3O7OAX.mjs} +3 -3
- package/build/js/{versionSetCommand-N2RZ26BU.cjs → versionSetCommand-FIWT6CFW.cjs} +8 -8
- package/build/js/{versionUnsetCommand-ADQMB7SL.cjs → versionUnsetCommand-BZ2SAFEM.cjs} +8 -8
- package/build/js/{versionUnsetCommand-QE6SPGJQ.mjs → versionUnsetCommand-W7ACW5O3.mjs} +3 -3
- package/build/types/cli.d.ts +1 -0
- package/build/types/cli.d.ts.map +1 -0
- package/build/types/commands/auth/index.d.ts +4 -4
- package/build/types/commands/auth/index.d.ts.map +1 -0
- package/build/types/commands/auth/login/index.d.ts +2 -2
- package/build/types/commands/auth/login/index.d.ts.map +1 -0
- package/build/types/commands/site/CommonSiteArgs.d.ts +2 -1
- package/build/types/commands/site/CommonSiteArgs.d.ts.map +1 -0
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +1 -0
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts.map +1 -0
- package/build/types/commands/site/deploy/index.d.ts +1 -0
- package/build/types/commands/site/deploy/index.d.ts.map +1 -0
- package/build/types/commands/site/deploy/logDeployCommandConfigFileOverride.d.ts +1 -0
- package/build/types/commands/site/deploy/logDeployCommandConfigFileOverride.d.ts.map +1 -0
- package/build/types/commands/site/deploy/siteDeployCommand.d.mts +1 -0
- package/build/types/commands/site/deploy/siteDeployCommand.d.mts.map +1 -0
- package/build/types/commands/site/index.d.ts +2 -1
- package/build/types/commands/site/index.d.ts.map +1 -0
- package/build/types/commands/site/logSiteCommandConfigFileOverride.d.ts +1 -0
- package/build/types/commands/site/logSiteCommandConfigFileOverride.d.ts.map +1 -0
- package/build/types/commands/site/version/delete/VersionDeleteArgs.d.ts +1 -0
- package/build/types/commands/site/version/delete/VersionDeleteArgs.d.ts.map +1 -0
- package/build/types/commands/site/version/delete/index.d.ts +1 -0
- package/build/types/commands/site/version/delete/index.d.ts.map +1 -0
- package/build/types/commands/site/version/delete/versionDeleteCommand.d.mts +1 -0
- package/build/types/commands/site/version/delete/versionDeleteCommand.d.mts.map +1 -0
- package/build/types/commands/site/version/get/VersionGetArgs.d.ts +1 -0
- package/build/types/commands/site/version/get/VersionGetArgs.d.ts.map +1 -0
- package/build/types/commands/site/version/get/index.d.ts +1 -0
- package/build/types/commands/site/version/get/index.d.ts.map +1 -0
- package/build/types/commands/site/version/get/versionGetCommand.d.mts +1 -0
- package/build/types/commands/site/version/get/versionGetCommand.d.mts.map +1 -0
- package/build/types/commands/site/version/index.d.ts +1 -0
- package/build/types/commands/site/version/index.d.ts.map +1 -0
- package/build/types/commands/site/version/list/VersionListArgs.d.ts +1 -0
- package/build/types/commands/site/version/list/VersionListArgs.d.ts.map +1 -0
- package/build/types/commands/site/version/list/index.d.ts +1 -0
- package/build/types/commands/site/version/list/index.d.ts.map +1 -0
- package/build/types/commands/site/version/list/versionListCommand.d.mts +1 -0
- package/build/types/commands/site/version/list/versionListCommand.d.mts.map +1 -0
- package/build/types/commands/site/version/set/VersionSetArgs.d.ts +1 -0
- package/build/types/commands/site/version/set/VersionSetArgs.d.ts.map +1 -0
- package/build/types/commands/site/version/set/index.d.ts +1 -0
- package/build/types/commands/site/version/set/index.d.ts.map +1 -0
- package/build/types/commands/site/version/set/versionSetCommand.d.mts +1 -0
- package/build/types/commands/site/version/set/versionSetCommand.d.mts.map +1 -0
- package/build/types/commands/site/version/unset/VersionUnsetArgs.d.ts +1 -0
- package/build/types/commands/site/version/unset/VersionUnsetArgs.d.ts.map +1 -0
- package/build/types/commands/site/version/unset/index.d.ts +1 -0
- package/build/types/commands/site/version/unset/index.d.ts.map +1 -0
- package/build/types/commands/site/version/unset/versionUnsetCommand.d.mts +1 -0
- package/build/types/commands/site/version/unset/versionUnsetCommand.d.mts.map +1 -0
- package/build/types/consola/handlePromptCancel.d.ts +1 -0
- package/build/types/consola/handlePromptCancel.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/DomainName.d.ts +1 -0
- package/build/types/generated/artifacts-sites/DomainName.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts +1 -0
- package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/SiteVersion.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SiteVersion.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts +1 -0
- package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts +1 -0
- package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts.map +1 -0
- package/build/types/generated/artifacts-sites/index.d.ts +1 -0
- package/build/types/generated/artifacts-sites/index.d.ts.map +1 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/net/RepositoryRid.d.ts +1 -0
- package/build/types/net/RepositoryRid.d.ts.map +1 -0
- package/build/types/net/ThirdPartyAppRid.d.ts +1 -0
- package/build/types/net/ThirdPartyAppRid.d.ts.map +1 -0
- package/build/types/net/UserAgent.d.ts +1 -0
- package/build/types/net/UserAgent.d.ts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/DeleteSiteVersionRequest.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/DeleteSiteVersionRequest.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/SiteAssetVersions.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/SiteAssetVersions.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/UploadZippedSiteAssetRequest.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/UploadZippedSiteAssetRequest.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/index.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/index.d.mts.map +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts +1 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts.map +1 -0
- package/build/types/net/artifacts/index.d.mts +1 -0
- package/build/types/net/artifacts/index.d.mts.map +1 -0
- package/build/types/net/createConjureContext.d.mts +1 -0
- package/build/types/net/createConjureContext.d.mts.map +1 -0
- package/build/types/net/createFetch.d.mts +1 -0
- package/build/types/net/createFetch.d.mts.map +1 -0
- package/build/types/net/createInternalClientContext.d.mts +1 -0
- package/build/types/net/createInternalClientContext.d.mts.map +1 -0
- package/build/types/net/index.d.mts +1 -0
- package/build/types/net/index.d.mts.map +1 -0
- package/build/types/net/internalClientContext.d.mts +1 -0
- package/build/types/net/internalClientContext.d.mts.map +1 -0
- package/build/types/net/third-party-application-service/fetchWebsiteRepositoryRid.d.mts +1 -0
- package/build/types/net/third-party-application-service/fetchWebsiteRepositoryRid.d.mts.map +1 -0
- package/build/types/net/third-party-application-service/index.d.mts +1 -0
- package/build/types/net/third-party-application-service/index.d.mts.map +1 -0
- package/build/types/util/autoVersion.d.ts +1 -0
- package/build/types/util/autoVersion.d.ts.map +1 -0
- package/build/types/util/autoVersion.test.d.ts +1 -0
- package/build/types/util/autoVersion.test.d.ts.map +1 -0
- package/build/types/util/config.d.ts +1 -0
- package/build/types/util/config.d.ts.map +1 -0
- package/build/types/util/config.test.d.ts +1 -0
- package/build/types/util/config.test.d.ts.map +1 -0
- package/build/types/util/configLoader.d.ts +1 -0
- package/build/types/util/configLoader.d.ts.map +1 -0
- package/build/types/util/isValidSemver.test.d.ts +1 -0
- package/build/types/util/isValidSemver.test.d.ts.map +1 -0
- package/build/types/util/token.d.ts +1 -0
- package/build/types/util/token.d.ts.map +1 -0
- package/build/types/util/token.test.d.ts +1 -0
- package/build/types/util/token.test.d.ts.map +1 -0
- package/build/types/yargs/logConfigFileMiddleware.d.ts +1 -0
- package/build/types/yargs/logConfigFileMiddleware.d.ts.map +1 -0
- package/changelog/0.15.0/pr-131.v2.yml +5 -0
- package/changelog/0.15.0/pr-140.v2.yml +5 -0
- package/changelog/0.15.0/pr-141.v2.yml +5 -0
- package/changelog/0.16.0/pr-143.v2.yml +5 -0
- package/package.json +11 -8
- package/build/js/chunk-CCA2T5YW.cjs +0 -12
- package/build/js/chunk-CCA2T5YW.cjs.map +0 -1
- package/build/js/chunk-CLAEREOL.mjs +0 -13
- package/build/js/chunk-CLAEREOL.mjs.map +0 -1
- package/build/js/chunk-GX2IOTA6.mjs +0 -10
- package/build/js/chunk-GX2IOTA6.mjs.map +0 -1
- package/build/js/chunk-HD6SVFKA.mjs.map +0 -1
- package/build/js/chunk-HZ3XILMW.cjs +0 -15
- package/build/js/chunk-HZ3XILMW.cjs.map +0 -1
- package/build/js/chunk-MU5KWUEI.mjs +0 -10
- package/build/js/chunk-MU5KWUEI.mjs.map +0 -1
- package/build/js/chunk-TZGNA5WR.cjs.map +0 -1
- package/build/js/chunk-UE2TMWJL.cjs +0 -12
- package/build/js/chunk-UE2TMWJL.cjs.map +0 -1
- package/build/js/handleGenerate-SKQROGSR.cjs +0 -123
- package/build/js/handleGenerate-SKQROGSR.cjs.map +0 -1
- package/build/js/handleGenerate-YUTYPPAT.mjs +0 -101
- package/build/js/handleGenerate-YUTYPPAT.mjs.map +0 -1
- package/build/js/loginFlow-5ZAMXQKE.cjs +0 -10
- package/build/js/loginFlow-BWWZBM36.mjs +0 -4
- package/build/js/siteDeployCommand-OKFLCN7L.mjs.map +0 -1
- package/build/js/siteDeployCommand-XWGLYIMU.cjs.map +0 -1
- package/build/types/CliCommonArgs.d.ts +0 -3
- package/build/types/ExitProcessError.d.ts +0 -6
- package/build/types/YargsCheckError.d.ts +0 -3
- package/build/types/commands/auth/CommonAuthArgs.d.ts +0 -4
- package/build/types/commands/auth/login/LoginArgs.d.ts +0 -4
- package/build/types/commands/auth/login/loginFlow.d.ts +0 -2
- package/build/types/commands/auth/login/token.d.ts +0 -12
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +0 -10
- package/build/types/commands/typescript/generate/generate.d.ts +0 -4
- package/build/types/commands/typescript/generate/handleGenerate.d.mts +0 -2
- package/build/types/commands/typescript/index.d.ts +0 -4
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +0 -7
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +0 -6
- package/build/types/generated/artifacts-admin/ArtifactsAdminService.d.ts +0 -2
- package/build/types/generated/artifacts-admin/ClearDeletedUserRepositoriesRequest.d.ts +0 -3
- package/build/types/generated/artifacts-admin/ContainerRegistryDomainResponse.d.ts +0 -3
- package/build/types/generated/artifacts-admin/index.d.ts +0 -3
- package/build/types/util/isValidSemver.d.ts +0 -1
- package/build/types/yargs/logLevelMiddleware.d.ts +0 -2
- /package/build/js/{loginFlow-5ZAMXQKE.cjs.map → loginFlow-QTUKYZEL.cjs.map} +0 -0
- /package/build/js/{loginFlow-BWWZBM36.mjs.map → loginFlow-ZFVT2AFZ.mjs.map} +0 -0
- /package/build/js/{versionDeleteCommand-MGKK73ZV.cjs.map → versionDeleteCommand-KQCJ7CHQ.cjs.map} +0 -0
- /package/build/js/{versionDeleteCommand-NJFRYKFM.mjs.map → versionDeleteCommand-YFVUCYVQ.mjs.map} +0 -0
- /package/build/js/{versionGetCommand-IHMNJSVC.cjs.map → versionGetCommand-45C2JZC4.cjs.map} +0 -0
- /package/build/js/{versionGetCommand-JEYADJ77.mjs.map → versionGetCommand-AKPCEBQZ.mjs.map} +0 -0
- /package/build/js/{versionListCommand-5C57X7XC.cjs.map → versionListCommand-4TM6YYNJ.cjs.map} +0 -0
- /package/build/js/{versionListCommand-PKRL3YOJ.mjs.map → versionListCommand-6OVL7FF2.mjs.map} +0 -0
- /package/build/js/{versionSetCommand-GNNIGVJO.mjs.map → versionSetCommand-BD3O7OAX.mjs.map} +0 -0
- /package/build/js/{versionSetCommand-N2RZ26BU.cjs.map → versionSetCommand-FIWT6CFW.cjs.map} +0 -0
- /package/build/js/{versionUnsetCommand-ADQMB7SL.cjs.map → versionUnsetCommand-BZ2SAFEM.cjs.map} +0 -0
- /package/build/js/{versionUnsetCommand-QE6SPGJQ.mjs.map → versionUnsetCommand-W7ACW5O3.mjs.map} +0 -0
package/build/js/index.cjs
CHANGED
|
@@ -1,19 +1,110 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkUE2TMWJL_cjs = require('./chunk-UE2TMWJL.cjs');
|
|
5
|
-
var chunkHZ3XILMW_cjs = require('./chunk-HZ3XILMW.cjs');
|
|
3
|
+
var chunkAX5HH3ZN_cjs = require('./chunk-AX5HH3ZN.cjs');
|
|
6
4
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
5
|
var consola = require('consola');
|
|
8
|
-
var utils = require('consola/utils');
|
|
9
|
-
var yargs = require('yargs');
|
|
10
|
-
var helpers = require('yargs/helpers');
|
|
11
6
|
var fs = require('fs');
|
|
12
7
|
var path = require('path');
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
var generateCommand = {
|
|
10
|
+
command: "generate",
|
|
11
|
+
describe: "Generate TypeScript SDK from ontology",
|
|
12
|
+
builder: (argv) => {
|
|
13
|
+
return argv.options({
|
|
14
|
+
outDir: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "Where to place the generated files",
|
|
17
|
+
demandOption: true
|
|
18
|
+
},
|
|
19
|
+
ontologyPath: {
|
|
20
|
+
description: "Path to the ontology wire json",
|
|
21
|
+
type: "string",
|
|
22
|
+
demandOption: false,
|
|
23
|
+
conflicts: ["foundryUrl", "clientId"]
|
|
24
|
+
},
|
|
25
|
+
foundryUrl: {
|
|
26
|
+
description: "URL for the foundry stack that contains the ontology",
|
|
27
|
+
type: "string",
|
|
28
|
+
demandOption: false,
|
|
29
|
+
conflicts: "ontologyPath",
|
|
30
|
+
implies: "clientId",
|
|
31
|
+
alias: "stack"
|
|
32
|
+
// for backwards compatibility
|
|
33
|
+
},
|
|
34
|
+
clientId: {
|
|
35
|
+
description: "OAuth client ID for application",
|
|
36
|
+
type: "string",
|
|
37
|
+
demandOption: false,
|
|
38
|
+
conflicts: "ontologyPath",
|
|
39
|
+
implies: "foundryUrl"
|
|
40
|
+
},
|
|
41
|
+
ontologyRid: {
|
|
42
|
+
description: "Limit requests to this ontology rid only",
|
|
43
|
+
type: "string",
|
|
44
|
+
demandOption: false
|
|
45
|
+
},
|
|
46
|
+
ontologyWritePath: {
|
|
47
|
+
description: "Path to write the ontology wire json",
|
|
48
|
+
type: "string",
|
|
49
|
+
demandOption: false,
|
|
50
|
+
conflicts: ["ontologyPath"]
|
|
51
|
+
},
|
|
52
|
+
beta: {
|
|
53
|
+
type: "boolean",
|
|
54
|
+
description: "Should generate beta sdk",
|
|
55
|
+
demandOption: false
|
|
56
|
+
},
|
|
57
|
+
packageType: {
|
|
58
|
+
default: "commonjs",
|
|
59
|
+
choices: ["commonjs", "module"]
|
|
60
|
+
},
|
|
61
|
+
version: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Version of the generated code, or 'dev'",
|
|
64
|
+
demandOption: true
|
|
65
|
+
},
|
|
66
|
+
packageName: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Name of the package to generate"
|
|
69
|
+
},
|
|
70
|
+
asPackage: {
|
|
71
|
+
type: "boolean",
|
|
72
|
+
description: "Generate as a package (makes a package.json and co)"
|
|
73
|
+
},
|
|
74
|
+
clean: {
|
|
75
|
+
type: "boolean",
|
|
76
|
+
description: "Clean the output directory before generating"
|
|
77
|
+
}
|
|
78
|
+
}).group(["ontologyPath", "outDir", "version"], "Generate from a local file").group(["foundryUrl", "clientId", "outDir", "ontologyWritePath", "version"], "OR Generate from Foundry").group(["packageName", "as"], "Package generation options").check((args) => {
|
|
79
|
+
if (!args.ontologyPath && !args.foundryUrl) {
|
|
80
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("Must specify either ontologyPath or foundryUrl and clientId");
|
|
81
|
+
}
|
|
82
|
+
if (args.version !== "dev" && !chunkAX5HH3ZN_cjs.isValidSemver(args.version)) {
|
|
83
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("Version must be 'dev' or a valid semver version");
|
|
84
|
+
}
|
|
85
|
+
if (args.asPackage && !args.packageName) {
|
|
86
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("Must specify packageName when generating as a package");
|
|
87
|
+
}
|
|
88
|
+
if (args.asPackage && !args.version) {
|
|
89
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("Must specify version when generating as a package");
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
handler: async (args) => {
|
|
95
|
+
const command10 = await import('./handleGenerate-XC5RBDDW-DL73JJG6.cjs');
|
|
96
|
+
await command10.handleGenerate(args);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var typescriptCommand = {
|
|
100
|
+
command: "typescript",
|
|
101
|
+
describe: "Manage code",
|
|
102
|
+
builder: (argv) => {
|
|
103
|
+
return argv.command(generateCommand).demandCommand();
|
|
104
|
+
},
|
|
105
|
+
handler: async (args) => {
|
|
106
|
+
}
|
|
107
|
+
};
|
|
17
108
|
|
|
18
109
|
// src/commands/auth/login/index.ts
|
|
19
110
|
var command = {
|
|
@@ -29,14 +120,14 @@ var command = {
|
|
|
29
120
|
});
|
|
30
121
|
},
|
|
31
122
|
handler: async (args) => {
|
|
32
|
-
const
|
|
33
|
-
await
|
|
123
|
+
const command10 = await import('./loginFlow-QTUKYZEL.cjs');
|
|
124
|
+
await command10.default(args);
|
|
34
125
|
}
|
|
35
126
|
};
|
|
36
127
|
var login_default = command;
|
|
37
128
|
|
|
38
129
|
// src/commands/auth/index.ts
|
|
39
|
-
var
|
|
130
|
+
var auth = {
|
|
40
131
|
command: "auth",
|
|
41
132
|
describe: "Manage your session",
|
|
42
133
|
builder: (argv) => {
|
|
@@ -53,7 +144,7 @@ var site = {
|
|
|
53
144
|
handler: async (args) => {
|
|
54
145
|
}
|
|
55
146
|
};
|
|
56
|
-
var auth_default =
|
|
147
|
+
var auth_default = auth;
|
|
57
148
|
var CONFIG_FILE_NAMES = ["foundry.config.json"];
|
|
58
149
|
var CONFIG_FILE_SCHEMA = {
|
|
59
150
|
type: "object",
|
|
@@ -75,11 +166,11 @@ var CONFIG_FILE_SCHEMA = {
|
|
|
75
166
|
nullable: true,
|
|
76
167
|
oneOf: [{
|
|
77
168
|
properties: {
|
|
78
|
-
|
|
169
|
+
type: {
|
|
79
170
|
const: "git-describe",
|
|
80
171
|
type: "string"
|
|
81
172
|
},
|
|
82
|
-
|
|
173
|
+
tagPrefix: {
|
|
83
174
|
type: "string",
|
|
84
175
|
nullable: true
|
|
85
176
|
}
|
|
@@ -111,10 +202,10 @@ async function loadFoundryConfig() {
|
|
|
111
202
|
const fileContent = await fs.promises.readFile(configFilePath, "utf-8");
|
|
112
203
|
foundryConfig = parseConfigFile(fileContent, configFilePath);
|
|
113
204
|
} catch (error) {
|
|
114
|
-
throw new
|
|
205
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);
|
|
115
206
|
}
|
|
116
207
|
if (!validate(foundryConfig)) {
|
|
117
|
-
throw new
|
|
208
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);
|
|
118
209
|
}
|
|
119
210
|
return {
|
|
120
211
|
foundryConfig,
|
|
@@ -129,7 +220,7 @@ function parseConfigFile(fileContent, configFilePath) {
|
|
|
129
220
|
case ".json":
|
|
130
221
|
return JSON.parse(fileContent);
|
|
131
222
|
default:
|
|
132
|
-
throw new
|
|
223
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);
|
|
133
224
|
}
|
|
134
225
|
}
|
|
135
226
|
|
|
@@ -206,24 +297,24 @@ var command2 = {
|
|
|
206
297
|
}
|
|
207
298
|
}).group(["directory", "version", "uploadOnly"], "Deploy Options").group(["autoVersion", "gitTagPrefix"], "Auto Version Options").check((args) => {
|
|
208
299
|
if (autoVersion == null && args.autoVersion == null && args.version == null) {
|
|
209
|
-
throw new
|
|
300
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("One of --version or --autoVersion must be specified");
|
|
210
301
|
}
|
|
211
|
-
if (args.version != null && !
|
|
212
|
-
throw new
|
|
302
|
+
if (args.version != null && !chunkAX5HH3ZN_cjs.isValidSemver(args.version)) {
|
|
303
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError(`--version "${args.version}" must be a valid SemVer string`);
|
|
213
304
|
}
|
|
214
305
|
const autoVersionType = args.autoVersion ?? autoVersion;
|
|
215
306
|
if (autoVersionType !== "git-describe") {
|
|
216
|
-
throw new
|
|
307
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError(`Only 'git-describe' is supported for autoVersion`);
|
|
217
308
|
}
|
|
218
309
|
const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;
|
|
219
310
|
if (gitTagPrefixValue != null && autoVersionType !== "git-describe") {
|
|
220
|
-
throw new
|
|
311
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);
|
|
221
312
|
}
|
|
222
313
|
return true;
|
|
223
314
|
}).middleware((args) => logDeployCommandConfigFileOverride(args, siteConfig));
|
|
224
315
|
},
|
|
225
316
|
handler: async (args) => {
|
|
226
|
-
const
|
|
317
|
+
const command10 = await import('./siteDeployCommand-FTCDKKU4.cjs');
|
|
227
318
|
const {
|
|
228
319
|
version,
|
|
229
320
|
autoVersion,
|
|
@@ -234,7 +325,7 @@ var command2 = {
|
|
|
234
325
|
type: args.autoVersion,
|
|
235
326
|
tagPrefix: args.gitTagPrefix
|
|
236
327
|
};
|
|
237
|
-
await
|
|
328
|
+
await command10.default({
|
|
238
329
|
...restArgs,
|
|
239
330
|
selectedVersion
|
|
240
331
|
});
|
|
@@ -266,8 +357,8 @@ var command3 = {
|
|
|
266
357
|
}).group(["yes"], "Delete Options");
|
|
267
358
|
},
|
|
268
359
|
handler: async (args) => {
|
|
269
|
-
const
|
|
270
|
-
await
|
|
360
|
+
const command10 = await import('./versionDeleteCommand-KQCJ7CHQ.cjs');
|
|
361
|
+
await command10.default(args);
|
|
271
362
|
}
|
|
272
363
|
};
|
|
273
364
|
var delete_default = command3;
|
|
@@ -280,8 +371,8 @@ var command4 = {
|
|
|
280
371
|
return argv;
|
|
281
372
|
},
|
|
282
373
|
handler: async (args) => {
|
|
283
|
-
const
|
|
284
|
-
await
|
|
374
|
+
const command10 = await import('./versionGetCommand-45C2JZC4.cjs');
|
|
375
|
+
await command10.default(args);
|
|
285
376
|
}
|
|
286
377
|
};
|
|
287
378
|
var get_default = command4;
|
|
@@ -294,8 +385,8 @@ var command5 = {
|
|
|
294
385
|
return argv;
|
|
295
386
|
},
|
|
296
387
|
handler: async (args) => {
|
|
297
|
-
const
|
|
298
|
-
await
|
|
388
|
+
const command10 = await import('./versionListCommand-4TM6YYNJ.cjs');
|
|
389
|
+
await command10.default(args);
|
|
299
390
|
}
|
|
300
391
|
};
|
|
301
392
|
var list_default = command5;
|
|
@@ -312,8 +403,8 @@ var command6 = {
|
|
|
312
403
|
});
|
|
313
404
|
},
|
|
314
405
|
handler: async (args) => {
|
|
315
|
-
const
|
|
316
|
-
await
|
|
406
|
+
const command10 = await import('./versionSetCommand-FIWT6CFW.cjs');
|
|
407
|
+
await command10.default(args);
|
|
317
408
|
}
|
|
318
409
|
};
|
|
319
410
|
var set_default = command6;
|
|
@@ -330,8 +421,8 @@ var command7 = {
|
|
|
330
421
|
}).group(["yes"], "Unset Options");
|
|
331
422
|
},
|
|
332
423
|
handler: async (args) => {
|
|
333
|
-
const
|
|
334
|
-
await
|
|
424
|
+
const command10 = await import('./versionUnsetCommand-BZ2SAFEM.cjs');
|
|
425
|
+
await command10.default(args);
|
|
335
426
|
}
|
|
336
427
|
};
|
|
337
428
|
var unset_default = command7;
|
|
@@ -389,7 +480,7 @@ var command9 = {
|
|
|
389
480
|
}
|
|
390
481
|
}).group(["application", "foundryUrl", "token", "tokenFile"], "Common Options").command(version_default).command(deploy_default).check((args) => {
|
|
391
482
|
if (!args.foundryUrl.startsWith("https://")) {
|
|
392
|
-
throw new
|
|
483
|
+
throw new chunkAX5HH3ZN_cjs.YargsCheckError("foundryUrl must start with https://");
|
|
393
484
|
}
|
|
394
485
|
return true;
|
|
395
486
|
}).middleware((args) => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();
|
|
@@ -398,88 +489,6 @@ var command9 = {
|
|
|
398
489
|
}
|
|
399
490
|
};
|
|
400
491
|
var site_default = command9;
|
|
401
|
-
|
|
402
|
-
// src/commands/typescript/generate/generate.ts
|
|
403
|
-
var command10 = {
|
|
404
|
-
command: "generate",
|
|
405
|
-
describe: "Generate TypeScript SDK from ontology",
|
|
406
|
-
builder: (argv) => {
|
|
407
|
-
return argv.options({
|
|
408
|
-
"outDir": {
|
|
409
|
-
type: "string",
|
|
410
|
-
description: "Where to place the generated files",
|
|
411
|
-
demandOption: true
|
|
412
|
-
},
|
|
413
|
-
ontologyPath: {
|
|
414
|
-
description: "Path to the ontology wire json",
|
|
415
|
-
type: "string",
|
|
416
|
-
demandOption: false,
|
|
417
|
-
conflicts: ["foundryUrl", "clientId"]
|
|
418
|
-
},
|
|
419
|
-
foundryUrl: {
|
|
420
|
-
description: "URL for the foundry stack that contains the ontology",
|
|
421
|
-
type: "string",
|
|
422
|
-
demandOption: false,
|
|
423
|
-
conflicts: "ontologyPath",
|
|
424
|
-
implies: "clientId",
|
|
425
|
-
alias: "stack"
|
|
426
|
-
// for backwards compatibility
|
|
427
|
-
},
|
|
428
|
-
clientId: {
|
|
429
|
-
description: "OAuth client ID for application",
|
|
430
|
-
type: "string",
|
|
431
|
-
demandOption: false,
|
|
432
|
-
conflicts: "ontologyPath",
|
|
433
|
-
implies: "foundryUrl"
|
|
434
|
-
},
|
|
435
|
-
ontologyWritePath: {
|
|
436
|
-
description: "Path to write the ontology wire json",
|
|
437
|
-
type: "string",
|
|
438
|
-
demandOption: false,
|
|
439
|
-
conflicts: ["ontologyPath"]
|
|
440
|
-
},
|
|
441
|
-
beta: {
|
|
442
|
-
type: "boolean",
|
|
443
|
-
description: "Should generate beta sdk",
|
|
444
|
-
demandOption: false
|
|
445
|
-
},
|
|
446
|
-
packageType: {
|
|
447
|
-
default: "commonjs",
|
|
448
|
-
choices: ["commonjs", "module"]
|
|
449
|
-
},
|
|
450
|
-
version: {
|
|
451
|
-
type: "string",
|
|
452
|
-
description: "Version of the generated code, or 'dev'",
|
|
453
|
-
demandOption: true
|
|
454
|
-
}
|
|
455
|
-
}).group(["ontologyPath", "outDir", "version"], "Generate from a local file").group(["foundryUrl", "clientId", "outDir", "ontologyWritePath", "version"], "OR Generate from Foundry").check((args) => {
|
|
456
|
-
if (!args.ontologyPath && !args.foundryUrl) {
|
|
457
|
-
throw new chunkCCA2T5YW_cjs.YargsCheckError("Must specify either ontologyPath or foundryUrl and clientId");
|
|
458
|
-
}
|
|
459
|
-
if (args.version !== "dev" && !chunkUE2TMWJL_cjs.isValidSemver(args.version)) {
|
|
460
|
-
throw new chunkCCA2T5YW_cjs.YargsCheckError("Version must be 'dev' or a valid semver version");
|
|
461
|
-
}
|
|
462
|
-
return true;
|
|
463
|
-
});
|
|
464
|
-
},
|
|
465
|
-
handler: async (args) => {
|
|
466
|
-
const command11 = await import('./handleGenerate-SKQROGSR.cjs');
|
|
467
|
-
await command11.default(args);
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
var generate_default = command10;
|
|
471
|
-
|
|
472
|
-
// src/commands/typescript/index.ts
|
|
473
|
-
var site2 = {
|
|
474
|
-
command: "typescript",
|
|
475
|
-
describe: "Manage code",
|
|
476
|
-
builder: (argv) => {
|
|
477
|
-
return argv.command(generate_default).demandCommand();
|
|
478
|
-
},
|
|
479
|
-
handler: async (args) => {
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
var typescript_default = site2;
|
|
483
492
|
var firstTime = true;
|
|
484
493
|
async function logConfigFileMiddleware() {
|
|
485
494
|
if (firstTime) {
|
|
@@ -491,59 +500,25 @@ async function logConfigFileMiddleware() {
|
|
|
491
500
|
}
|
|
492
501
|
}
|
|
493
502
|
}
|
|
494
|
-
var firstTime2 = true;
|
|
495
|
-
async function logLevelMiddleware(args) {
|
|
496
|
-
if (firstTime2) {
|
|
497
|
-
firstTime2 = false;
|
|
498
|
-
consola.consola.level = 3 + args.verbose;
|
|
499
|
-
if (consola.consola.level > 3) {
|
|
500
|
-
consola.consola.debug(`Verbose logging enabled (${consola.consola.level === 4 ? "debug" : "trace"})
|
|
501
|
-
`);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
503
|
|
|
506
504
|
// src/cli.ts
|
|
507
505
|
async function cli(args = process.argv) {
|
|
508
|
-
consola.consola.info(`Palantir OSDK CLI ${"0.
|
|
506
|
+
consola.consola.info(`Palantir OSDK CLI ${"0.16.0"}
|
|
509
507
|
`);
|
|
510
|
-
const base =
|
|
511
|
-
alias: "v",
|
|
512
|
-
type: "boolean",
|
|
513
|
-
description: "Enable verbose logging",
|
|
514
|
-
count: true
|
|
515
|
-
}).demandCommand().middleware(logLevelMiddleware, true).middleware(logConfigFileMiddleware).strict().command({
|
|
516
|
-
command: "unstable",
|
|
517
|
-
aliases: ["experimental"],
|
|
518
|
-
describe: "Unstable commands",
|
|
519
|
-
builder: async (argv) => {
|
|
520
|
-
return argv.command(site_default).command(typescript_default).command(auth_default).demandCommand();
|
|
521
|
-
},
|
|
522
|
-
handler: (_args) => {
|
|
523
|
-
}
|
|
524
|
-
}).fail(async (msg, err, argv) => {
|
|
525
|
-
if (err instanceof chunkHZ3XILMW_cjs.ExitProcessError) {
|
|
526
|
-
consola.consola.error(err.message);
|
|
527
|
-
if (err.tip != null) {
|
|
528
|
-
consola.consola.log(utils.colorize("bold", `\u{1F4A1} Tip: ${err.tip}`));
|
|
529
|
-
consola.consola.log("");
|
|
530
|
-
}
|
|
531
|
-
consola.consola.debug(err.stack);
|
|
532
|
-
} else {
|
|
533
|
-
if (err && err instanceof chunkCCA2T5YW_cjs.YargsCheckError === false) {
|
|
534
|
-
throw err;
|
|
535
|
-
} else {
|
|
536
|
-
argv.showHelp();
|
|
537
|
-
consola.consola.log("");
|
|
538
|
-
consola.consola.error(msg);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
process.exit(1);
|
|
542
|
-
});
|
|
508
|
+
const base = chunkAX5HH3ZN_cjs.getYargsBase(args);
|
|
543
509
|
try {
|
|
544
|
-
return await base.
|
|
510
|
+
return await base.middleware(logConfigFileMiddleware).command({
|
|
511
|
+
command: "unstable",
|
|
512
|
+
aliases: ["experimental"],
|
|
513
|
+
describe: "Unstable commands",
|
|
514
|
+
builder: async (argv) => {
|
|
515
|
+
return argv.command(site_default).command(typescriptCommand).command(auth_default).demandCommand();
|
|
516
|
+
},
|
|
517
|
+
handler: (_args) => {
|
|
518
|
+
}
|
|
519
|
+
}).parseAsync();
|
|
545
520
|
} catch (err) {
|
|
546
|
-
if (err instanceof
|
|
521
|
+
if (err instanceof chunkAX5HH3ZN_cjs.ExitProcessError) {
|
|
547
522
|
consola.consola.error(err);
|
|
548
523
|
}
|
|
549
524
|
}
|
package/build/js/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.ts","../../src/commands/site/version/delete/index.ts","../../src/commands/site/version/get/index.ts","../../src/commands/site/version/list/index.ts","../../src/commands/site/version/set/index.ts","../../src/commands/site/version/unset/index.ts","../../src/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/commands/typescript/generate/generate.ts","../../src/commands/typescript/index.ts","../../src/yargs/logConfigFileMiddleware.ts","../../src/yargs/logLevelMiddleware.ts"],"names":["consola","command","autoVersion","application","foundryUrl","site","firstTime"],"mappings":";;;;;;;;;;;;AAgBA,SAAS,WAAAA,gBAAe;AACxB,SAAS,gBAAgB;AACzB,OAAO,WAAW;AAClB,SAAS,eAAe;;;ACHjB,IAAM,UAAU;AAAA,EACrB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,OAAO,YAAY;AAAA,MAC7B,OAAO;AAAA;AAAA,MAEP,MAAM;AAAA,MACN,cAAc;AAAA,MACd,UAAU;AAAA,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,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,IAAI,OAAO;AACzB,UAAI,IAAI,OAAO,MAAM;AACnB,QAAAA,SAAQ,IAAI,SAAS,QAAQ,kBAAW,IAAI,GAAG,EAAE,CAAC;AAClD,QAAAA,SAAQ,IAAI,EAAE;AAAA,MAChB;AACA,MAAAA,SAAQ,MAAM,IAAI,KAAK;AAAA,IACzB,OAAO;AACL,UAAI,OAAO,eAAe,oBAAoB,OAAO;AACnD,cAAM;AAAA,MACR,OAAO;AACL,aAAK,SAAS;AACd,QAAAA,SAAQ,IAAI,EAAE;AACd,QAAAA,SAAQ,MAAM,GAAG;AAAA,MACnB;AAAA,IACF;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB,CAAC;AAGD,MAAI;AACF,WAAO,MAAM,KAAK,WAAW;AAAA,EAC/B,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport typescript from \"./commands/typescript/index.js\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nimport { logConfigFileMiddleware } from \"./yargs/logConfigFileMiddleware.js\";\nimport { logLevelMiddleware } from \"./yargs/logLevelMiddleware.js\";\nimport { YargsCheckError } from \"./YargsCheckError.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${process.env.PACKAGE_VERSION}\\n`);\n const base = yargs(hideBin(args)).wrap(Math.min(150, yargs().terminalWidth())).env(\"OSDK\").version(false).option(\"verbose\", {\n alias: \"v\",\n type: \"boolean\",\n description: \"Enable verbose logging\",\n count: true\n }).demandCommand().middleware(logLevelMiddleware, true).middleware(logConfigFileMiddleware).strict().command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).fail(async (msg, err, argv) => {\n if (err instanceof ExitProcessError) {\n consola.error(err.message);\n if (err.tip != null) {\n consola.log(colorize(\"bold\", `💡 Tip: ${err.tip}`));\n consola.log(\"\");\n }\n consola.debug(err.stack);\n } else {\n if (err && err instanceof YargsCheckError === false) {\n throw err;\n } else {\n argv.showHelp();\n consola.log(\"\");\n consola.error(msg);\n }\n }\n process.exit(1);\n });\n\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"clientId\", {\n alias: \"applicationId\",\n // for backwards compatibility\n type: \"string\",\n demandOption: true,\n describe: \"OAuth client ID for application\"\n });\n },\n handler: async args => {\n const command = await import(\"./loginFlow.js\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport login from \"./login/index.js\";\nconst site = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n foundryUrl: {\n type: \"string\",\n demandOption: true,\n alias: \"baseUrl\",\n // for backwards compatibility\n describe: \"URL for the Foundry stack\"\n }\n }).command(login).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nimport { ExitProcessError } from \"../ExitProcessError.js\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst CONFIG_FILE_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n \"type\": {\n const: \"git-describe\",\n type: \"string\"\n },\n \"tagPrefix\": {\n type: \"string\",\n nullable: true\n }\n }\n }],\n required: [\"type\"]\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\nexport async function loadFoundryConfig() {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(CONFIG_FILE_SCHEMA);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);\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 { loadFoundryConfig } from \"./config.js\";\nlet configPromise = undefined;\nfunction getConfig() {\n if (configPromise == null) {\n configPromise = loadFoundryConfig();\n }\n return configPromise;\n}\nexport default getConfig;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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\";\nexport async function logDeployCommandConfigFileOverride(args, config) {\n if (config?.autoVersion != null && args.autoVersion !== config?.autoVersion.type) {\n consola.debug(`Overriding \"autoVersion\" from config file with ${args.autoVersion}`);\n }\n if (config?.directory != null && args.directory !== config?.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config?.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\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 configLoader from \"../../../util/configLoader.js\";\nimport { isValidSemver } from \"../../../util/isValidSemver.js\";\nimport { YargsCheckError } from \"../../../YargsCheckError.js\";\nimport { logDeployCommandConfigFileOverride } from \"./logDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader();\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.tagPrefix;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`Only 'git-describe' is supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n // Future proofing for when we support other autoVersion types\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n return true;\n }).middleware(args => logDeployCommandConfigFileOverride(args, siteConfig));\n },\n handler: async args => {\n const command = await import(\"./siteDeployCommand.mjs\");\n const {\n version,\n autoVersion,\n gitTagPrefix,\n ...restArgs\n } = args;\n const selectedVersion = args.version != null ? args.version : {\n type: args.autoVersion,\n tagPrefix: args.gitTagPrefix\n };\n await command.default({\n ...restArgs,\n selectedVersion\n });\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 { consola } from \"consola\";\nexport async function logSiteCommandConfigFileOverride(args, config) {\n if (config?.site.application != null && args.application !== config.site.application) {\n consola.debug(`Overriding \"application\" from config file with ${args.application}`);\n }\n if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {\n consola.debug(`Overriding \"foundryUrl\" from config file with ${args.foundryUrl}`);\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\nconst command = {\n command: \"delete <version>\",\n describe: \"Delete site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n }).option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Delete Options\");\n },\n handler: async args => {\n const command = await import(\"./versionDeleteCommand.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\nconst command = {\n command: \"get\",\n describe: \"Get live site version\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionGetCommand.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\nconst command = {\n command: \"list\",\n describe: \"List site versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionListCommand.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\nconst command = {\n command: \"set <version>\",\n describe: \"Set live site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionSetCommand.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\nconst command = {\n command: \"unset\",\n describe: \"Clear live site version\",\n builder: argv => {\n return argv.option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Unset Options\");\n },\n handler: async args => {\n const command = await import(\"./versionUnsetCommand.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 deleteCmd from \"./delete/index.js\";\nimport get from \"./get/index.js\";\nimport list from \"./list/index.js\";\nimport set from \"./set/index.js\";\nimport unset from \"./unset/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage site versions\",\n builder: argv => {\n return argv.command(list).command(get).command(set).command(unset).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\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 configLoader from \"../../util/configLoader.js\";\nimport { YargsCheckError } from \"../../YargsCheckError.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logSiteCommandConfigFileOverride } from \"./logSiteCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: async argv => {\n const config = await configLoader();\n const application = config?.foundryConfig.site.application;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n application: {\n type: \"string\",\n coerce: application => application,\n ...(application ? {\n default: application\n } : {\n demandOption: true\n }),\n description: \"Application resource identifier (rid)\"\n },\n foundryUrl: {\n coerce: foundryUrl => foundryUrl.replace(/\\/$/, \"\"),\n type: \"string\",\n ...(foundryUrl ? {\n default: foundryUrl\n } : {\n demandOption: true\n }),\n description: \"URL for the Foundry stack\"\n },\n token: {\n type: \"string\",\n conflicts: \"tokenFile\",\n description: \"Foundry API token\"\n },\n tokenFile: {\n type: \"string\",\n conflicts: \"token\",\n description: \"Path to file containing Foundry API token\"\n }\n }).group([\"application\", \"foundryUrl\", \"token\", \"tokenFile\"], \"Common Options\").command(version).command(deploy).check(args => {\n if (!args.foundryUrl.startsWith(\"https://\")) {\n throw new YargsCheckError(\"foundryUrl must start with https://\");\n }\n return true;\n }).middleware(args => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();\n },\n handler: async args => {}\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 { isValidSemver } from \"../../../util/isValidSemver.js\";\nimport { YargsCheckError } from \"../../../YargsCheckError.js\";\nexport const command = {\n command: \"generate\",\n describe: \"Generate TypeScript SDK from ontology\",\n builder: argv => {\n return argv.options({\n \"outDir\": {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"Path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"foundryUrl\", \"clientId\"]\n },\n foundryUrl: {\n description: \"URL for the foundry stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\",\n alias: \"stack\" // for backwards compatibility\n },\n clientId: {\n description: \"OAuth client ID for application\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"foundryUrl\"\n },\n ontologyWritePath: {\n description: \"Path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n },\n version: {\n type: \"string\",\n description: \"Version of the generated code, or 'dev'\",\n demandOption: true\n }\n }).group([\"ontologyPath\", \"outDir\", \"version\"], \"Generate from a local file\").group([\"foundryUrl\", \"clientId\", \"outDir\", \"ontologyWritePath\", \"version\"], \"OR Generate from Foundry\").check(args => {\n if (!args.ontologyPath && !args.foundryUrl) {\n throw new YargsCheckError(\"Must specify either ontologyPath or foundryUrl and clientId\");\n }\n if (args.version !== \"dev\" && !isValidSemver(args.version)) {\n throw new YargsCheckError(\"Version must be 'dev' or a valid semver version\");\n }\n return true;\n });\n },\n handler: async args => {\n const command = await import(\"./handleGenerate.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport generate from \"./generate/generate.js\";\nconst site = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generate).demandCommand();\n },\n handler: async args => {}\n};\nexport default site;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware() {\n if (firstTime) {\n firstTime = false;\n const config = getConfig();\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\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\";\nlet firstTime = true;\nexport async function logLevelMiddleware(args) {\n if (firstTime) {\n firstTime = false;\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 }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../cli.cmd.typescript/build/js/index.mjs","../../src/cli.ts","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.ts","../../src/commands/site/version/delete/index.ts","../../src/commands/site/version/get/index.ts","../../src/commands/site/version/list/index.ts","../../src/commands/site/version/set/index.ts","../../src/commands/site/version/unset/index.ts","../../src/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts"],"names":["command","consola","autoVersion","application","foundryUrl"],"mappings":";;;;;;;;;AACA,SAAS,eAAe;AAGxB,IAAI,kBAAkB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,UAAQ;AACf,WAAO,KAAK,QAAQ;AAAA,MAClB,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW,CAAC,cAAc,UAAU;AAAA,MACtC;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,MAAM;AAAA,QACN,cAAc;AAAA,QACd,WAAW;AAAA,QACX,SAAS;AAAA,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CAAC,KAAK,WAAW,WAAW,UAAU,GAAG;AAC3C,cAAM,IAAI,gBAAgB,qCAAqC;AAAA,MACjE;AACA,aAAO;AAAA,IACT,CAAC,EAAE,WAAW,UAAQ,iCAAiC,MAAM,QAAQ,aAAa,CAAC,EAAE,cAAc;AAAA,EACrG;AAAA,EACA,SAAS,OAAM,SAAQ;AAAA,EAAC;AAC1B;AACA,IAAO,eAAQJ;;;ACpDf,SAAS,WAAAC,gBAAe;AAExB,IAAI,YAAY;AAChB,eAAsB,0BAA0B;AAC9C,MAAI,WAAW;AACb,gBAAY;AACZ,UAAM,SAAS,qBAAU;AACzB,UAAM,kBAAkB,MAAM,SAAS;AACvC,QAAI,gBAAgB;AAClB,MAAAA,SAAQ,MAAM,mCAAmC,cAAc,GAAG;AAAA,IACpE;AAAA,EACF;AACF;;;AfNA,eAAsB,IAAI,OAAO,QAAQ,MAAM;AAC7C,EAAAA,SAAQ,KAAK,qBAAqB,QAA2B;AAAA,CAAI;AACjE,QAAM,OAAO,aAAa,IAAI;AAG9B,MAAI;AACF,WAAO,MAAM,KAAK,WAAW,uBAAuB,EAAE,QAAQ;AAAA,MAC5D,SAAS;AAAA,MACT,SAAS,CAAC,cAAc;AAAA,MACxB,UAAU;AAAA,MACV,SAAS,OAAM,SAAQ;AACrB,eAAO,KAAK,QAAQ,YAAI,EAAE,QAAQ,iBAAU,EAAE,QAAQ,YAAI,EAAE,cAAc;AAAA,MAC5E;AAAA,MACA,SAAS,WAAS;AAAA,MAAC;AAAA,IACrB,CAAC,EAAE,WAAW;AAAA,EAChB,SAAS,KAAK;AACZ,QAAI,eAAe,kBAAkB;AACnC,MAAAA,SAAQ,MAAM,GAAG;AAAA,IACnB;AAAA,EACF;AACF","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar generateCommand = {\n command: \"generate\",\n describe: \"Generate TypeScript SDK from ontology\",\n builder: argv => {\n return argv.options({\n outDir: {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"Path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"foundryUrl\", \"clientId\"]\n },\n foundryUrl: {\n description: \"URL for the foundry stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\",\n alias: \"stack\"\n // for backwards compatibility\n },\n clientId: {\n description: \"OAuth client ID for application\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"foundryUrl\"\n },\n ontologyRid: {\n description: \"Limit requests to this ontology rid only\",\n type: \"string\",\n demandOption: false\n },\n ontologyWritePath: {\n description: \"Path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n },\n version: {\n type: \"string\",\n description: \"Version of the generated code, or 'dev'\",\n demandOption: true\n },\n packageName: {\n type: \"string\",\n description: \"Name of the package to generate\"\n },\n asPackage: {\n type: \"boolean\",\n description: \"Generate as a package (makes a package.json and co)\"\n },\n clean: {\n type: \"boolean\",\n description: \"Clean the output directory before generating\"\n }\n }).group([\"ontologyPath\", \"outDir\", \"version\"], \"Generate from a local file\").group([\"foundryUrl\", \"clientId\", \"outDir\", \"ontologyWritePath\", \"version\"], \"OR Generate from Foundry\").group([\"packageName\", \"as\"], \"Package generation options\").check(args => {\n if (!args.ontologyPath && !args.foundryUrl) {\n throw new YargsCheckError(\"Must specify either ontologyPath or foundryUrl and clientId\");\n }\n if (args.version !== \"dev\" && !isValidSemver(args.version)) {\n throw new YargsCheckError(\"Version must be 'dev' or a valid semver version\");\n }\n if (args.asPackage && !args.packageName) {\n throw new YargsCheckError(\"Must specify packageName when generating as a package\");\n }\n if (args.asPackage && !args.version) {\n throw new YargsCheckError(\"Must specify version when generating as a package\");\n }\n return true;\n });\n },\n handler: async args => {\n const command = await import('./handleGenerate-XC5RBDDW.mjs');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.0.0\"}\n`);\n const base = getYargsBase(args);\n try {\n return await base.command(generateCommand).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}\n\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 typescript from \"@osdk/cli.cmd.typescript\";\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport { logConfigFileMiddleware } from \"./yargs/logConfigFileMiddleware.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${process.env.PACKAGE_VERSION}\\n`);\n const base = getYargsBase(args);\n\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.middleware(logConfigFileMiddleware).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(site).command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"clientId\", {\n alias: \"applicationId\",\n // for backwards compatibility\n type: \"string\",\n demandOption: true,\n describe: \"OAuth client ID for application\"\n });\n },\n handler: async args => {\n const command = await import(\"@osdk/cli.common/loginFlow\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport login from \"./login/index.js\";\nconst auth = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n foundryUrl: {\n type: \"string\",\n demandOption: true,\n alias: \"baseUrl\",\n // for backwards compatibility\n describe: \"URL for the Foundry stack\"\n }\n }).command(login).demandCommand();\n },\n handler: async args => {}\n};\nexport default auth;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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 { ExitProcessError } from \"@osdk/cli.common\";\nimport { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst CONFIG_FILE_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n type: {\n const: \"git-describe\",\n type: \"string\"\n },\n tagPrefix: {\n type: \"string\",\n nullable: true\n }\n }\n }],\n required: [\"type\"]\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\nexport async function loadFoundryConfig() {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(CONFIG_FILE_SCHEMA);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);\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 { loadFoundryConfig } from \"./config.js\";\nlet configPromise = undefined;\nfunction getConfig() {\n if (configPromise == null) {\n configPromise = loadFoundryConfig();\n }\n return configPromise;\n}\nexport default getConfig;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF 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\";\nexport async function logDeployCommandConfigFileOverride(args, config) {\n if (config?.autoVersion != null && args.autoVersion !== config?.autoVersion.type) {\n consola.debug(`Overriding \"autoVersion\" from config file with ${args.autoVersion}`);\n }\n if (config?.directory != null && args.directory !== config?.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config?.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\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 { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logDeployCommandConfigFileOverride } from \"./logDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader();\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.tagPrefix;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`Only 'git-describe' is supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n // Future proofing for when we support other autoVersion types\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n return true;\n }).middleware(args => logDeployCommandConfigFileOverride(args, siteConfig));\n },\n handler: async args => {\n const command = await import(\"./siteDeployCommand.mjs\");\n const {\n version,\n autoVersion,\n gitTagPrefix,\n ...restArgs\n } = args;\n const selectedVersion = args.version != null ? args.version : {\n type: args.autoVersion,\n tagPrefix: args.gitTagPrefix\n };\n await command.default({\n ...restArgs,\n selectedVersion\n });\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 { consola } from \"consola\";\nexport async function logSiteCommandConfigFileOverride(args, config) {\n if (config?.site.application != null && args.application !== config.site.application) {\n consola.debug(`Overriding \"application\" from config file with ${args.application}`);\n }\n if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {\n consola.debug(`Overriding \"foundryUrl\" from config file with ${args.foundryUrl}`);\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\nconst command = {\n command: \"delete <version>\",\n describe: \"Delete site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n }).option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Delete Options\");\n },\n handler: async args => {\n const command = await import(\"./versionDeleteCommand.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\nconst command = {\n command: \"get\",\n describe: \"Get live site version\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionGetCommand.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\nconst command = {\n command: \"list\",\n describe: \"List site versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionListCommand.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\nconst command = {\n command: \"set <version>\",\n describe: \"Set live site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionSetCommand.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\nconst command = {\n command: \"unset\",\n describe: \"Clear live site version\",\n builder: argv => {\n return argv.option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Unset Options\");\n },\n handler: async args => {\n const command = await import(\"./versionUnsetCommand.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 deleteCmd from \"./delete/index.js\";\nimport get from \"./get/index.js\";\nimport list from \"./list/index.js\";\nimport set from \"./set/index.js\";\nimport unset from \"./unset/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage site versions\",\n builder: argv => {\n return argv.command(list).command(get).command(set).command(unset).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\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 { YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../util/configLoader.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logSiteCommandConfigFileOverride } from \"./logSiteCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: async argv => {\n const config = await configLoader();\n const application = config?.foundryConfig.site.application;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n application: {\n type: \"string\",\n coerce: application => application,\n ...(application ? {\n default: application\n } : {\n demandOption: true\n }),\n description: \"Application resource identifier (rid)\"\n },\n foundryUrl: {\n coerce: foundryUrl => foundryUrl.replace(/\\/$/, \"\"),\n type: \"string\",\n ...(foundryUrl ? {\n default: foundryUrl\n } : {\n demandOption: true\n }),\n description: \"URL for the Foundry stack\"\n },\n token: {\n type: \"string\",\n conflicts: \"tokenFile\",\n description: \"Foundry API token\"\n },\n tokenFile: {\n type: \"string\",\n conflicts: \"token\",\n description: \"Path to file containing Foundry API token\"\n }\n }).group([\"application\", \"foundryUrl\", \"token\", \"tokenFile\"], \"Common Options\").command(version).command(deploy).check(args => {\n if (!args.foundryUrl.startsWith(\"https://\")) {\n throw new YargsCheckError(\"foundryUrl must start with https://\");\n }\n return true;\n }).middleware(args => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();\n },\n handler: async args => {}\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 { consola } from \"consola\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware() {\n if (firstTime) {\n firstTime = false;\n const config = getConfig();\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}"]}
|