@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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var chunkHZ3XILMW_cjs = require('./chunk-HZ3XILMW.cjs');
|
|
3
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
4
|
+
var chunkAX5HH3ZN_cjs = require('./chunk-AX5HH3ZN.cjs');
|
|
6
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
6
|
var consola = require('consola');
|
|
8
7
|
var archiver = require('archiver');
|
|
@@ -41,8 +40,8 @@ async function autoVersion(tagPrefix = "") {
|
|
|
41
40
|
const [matchPrefix, prefixRegex] = tagPrefix !== "" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [void 0, new RegExp(`^v?`)];
|
|
42
41
|
const gitVersion = await gitDescribe(matchPrefix);
|
|
43
42
|
const version = gitVersion.trim().replace(prefixRegex, "");
|
|
44
|
-
if (!
|
|
45
|
-
throw new
|
|
43
|
+
if (!chunkAX5HH3ZN_cjs.isValidSemver(version)) {
|
|
44
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);
|
|
46
45
|
}
|
|
47
46
|
return version;
|
|
48
47
|
}
|
|
@@ -60,16 +59,16 @@ async function gitDescribe(matchPrefix) {
|
|
|
60
59
|
if (error instanceof Error) {
|
|
61
60
|
const errorMessage = error.message.toLowerCase();
|
|
62
61
|
if (errorMessage.includes("not recognized") || errorMessage.includes("command not found") || errorMessage.includes("no such file or directory")) {
|
|
63
|
-
throw new
|
|
62
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, "Unable to determine auto version using git-describe as git is not installed or found in the PATH.", `You can set up git and try again or supply a --version option to set the version manually`);
|
|
64
63
|
}
|
|
65
64
|
if (errorMessage.includes("fatal: not a git repository")) {
|
|
66
|
-
throw new
|
|
65
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);
|
|
67
66
|
}
|
|
68
67
|
if (errorMessage.includes("fatal: no names found, cannot describe anything.")) {
|
|
69
|
-
throw new
|
|
68
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
throw new
|
|
71
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);
|
|
73
72
|
}
|
|
74
73
|
return gitVersion;
|
|
75
74
|
}
|
|
@@ -84,10 +83,10 @@ async function siteDeployCommand({
|
|
|
84
83
|
token,
|
|
85
84
|
tokenFile
|
|
86
85
|
}) {
|
|
87
|
-
const loadedToken = await
|
|
86
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
88
87
|
const tokenProvider = () => loadedToken;
|
|
89
|
-
const clientCtx =
|
|
90
|
-
const ctx =
|
|
88
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
89
|
+
const ctx = chunk2KJDB4YP_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
|
|
91
90
|
let siteVersion;
|
|
92
91
|
if (typeof selectedVersion === "string") {
|
|
93
92
|
siteVersion = selectedVersion;
|
|
@@ -98,24 +97,24 @@ async function siteDeployCommand({
|
|
|
98
97
|
consola.consola.debug(`Using directory for site files: "${path__default.default.resolve(directory)}`);
|
|
99
98
|
const stat = await fs__namespace.promises.stat(directory);
|
|
100
99
|
if (!stat.isDirectory()) {
|
|
101
|
-
throw new
|
|
100
|
+
throw new chunkAX5HH3ZN_cjs.ExitProcessError(2, "Specified path exists but is not a directory");
|
|
102
101
|
}
|
|
103
102
|
consola.consola.start("Zipping site files");
|
|
104
103
|
const archive = archiver__default.default("zip").directory(directory, false);
|
|
105
104
|
logArchiveStats(archive);
|
|
106
105
|
consola.consola.start("Uploading site files");
|
|
107
|
-
await Promise.all([
|
|
106
|
+
await Promise.all([chunk2KJDB4YP_cjs.artifacts_exports.SiteAssetArtifactsService.uploadZippedSiteAsset(clientCtx, {
|
|
108
107
|
application,
|
|
109
108
|
version: siteVersion,
|
|
110
109
|
zipFile: stream.Readable.toWeb(archive)
|
|
111
110
|
// This cast is because the dom fetch doesnt align type wise with streams
|
|
112
111
|
}), archive.finalize()]);
|
|
113
112
|
consola.consola.success("Upload complete");
|
|
114
|
-
const repositoryRid = await
|
|
115
|
-
const registeredSiteDomains = await
|
|
113
|
+
const repositoryRid = await chunk2KJDB4YP_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
|
|
114
|
+
const registeredSiteDomains = await chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.getRegisteredSiteDomains(ctx, repositoryRid);
|
|
116
115
|
const domain = getFirstSiteDomain(registeredSiteDomains);
|
|
117
116
|
if (!uploadOnly) {
|
|
118
|
-
await
|
|
117
|
+
await chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
|
|
119
118
|
siteVersion: {
|
|
120
119
|
version: siteVersion
|
|
121
120
|
}
|
|
@@ -173,4 +172,4 @@ function getFirstSiteDomain(domains) {
|
|
|
173
172
|
|
|
174
173
|
module.exports = siteDeployCommand;
|
|
175
174
|
//# sourceMappingURL=out.js.map
|
|
176
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
175
|
+
//# sourceMappingURL=siteDeployCommand-FTCDKKU4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/deploy/siteDeployCommand.mts","../../src/util/autoVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAS,eAAe;AAGxB,OAAO,cAAc;AACrB,SAAS,gBAAgB;AACzB,YAAY,QAAQ;AACpB,OAAO,UAAU;AACjB,SAAS,gBAAgB;;;ACNzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAS1B,eAAsB,YAAY,YAAY,IAAI;AAChD,QAAM,CAAC,aAAa,WAAW,IAAI,cAAc,KAAK,CAAC,WAAW,IAAI,OAAO,IAAI,SAAS,EAAE,CAAC,IAAI,CAAC,QAAW,IAAI,OAAO,KAAK,CAAC;AAC9H,QAAM,aAAa,MAAM,YAAY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AAS,gBAAgB,SAAS;AAChC,MAAI,eAAe;AAAA,IACjB,WAAW;AAAA,IACX,OAAO;AAAA,EACT;AACA,UAAQ,GAAG,YAAY,cAAY;AACjC,mBAAe;AAAA,MACb,WAAW,SAAS,QAAQ;AAAA,MAC5B,OAAO,SAAS,GAAG;AAAA,IACrB;AAAA,EACF,CAAC;AACD,UAAQ,GAAG,UAAU,MAAM;AACzB,YAAQ,MAAM,UAAU,aAAa,SAAS,cAAc,aAAa,KAAK,QAAQ;AAAA,EACxF,CAAC;AACH;AACA,SAAS,YAAY,OAAO,MAAM;AAChC,UAAQ,IAAI;AAAA,IACV,SAAS,GAAG,KAAK;AAAA;AAAA,EAAO,SAAS,SAAS,IAAI,CAAC;AAAA,IAC/C,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,EACF,CAAC;AACH;AACA,SAAS,mBAAmB,SAAS;AACnC,MAAI,QAAQ,WAAW,GAAG;AACxB,YAAQ,KAAK,sCAAsC;AACnD,WAAO;AAAA,EACT;AACA,UAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,IACvB,KAAK;AACH,aAAO,QAAQ,CAAC,EAAE,oBAAoB,WAAW;AAAA,IACnD;AACE,YAAM,IAAI,QAAQ,CAAC,EAAE;AAAA,EACzB;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 { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport { autoVersion as findAutoVersion } from \"../../../util/autoVersion.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion.tagPrefix);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n consola.start(\"Uploading site files\");\n await Promise.all([artifacts.SiteAssetArtifactsService.uploadZippedSiteAsset(clientCtx, {\n application,\n version: siteVersion,\n zipFile: Readable.toWeb(archive) // This cast is because the dom fetch doesnt align type wise with streams\n }), archive.finalize()]);\n consola.success(\"Upload complete\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const registeredSiteDomains = await ArtifactsSitesAdminV2Service.getRegisteredSiteDomains(ctx, repositoryRid);\n const domain = getFirstSiteDomain(registeredSiteDomains);\n if (!uploadOnly) {\n await ArtifactsSitesAdminV2Service.updateDeployedVersion(ctx, repositoryRid, {\n siteVersion: {\n version: siteVersion\n }\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n if (domain != null) {\n logSiteLink(\"View live site:\", `https://${domain}`);\n }\n } else {\n consola.debug(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n logSiteLink(\"Preview link:\", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);\n }\n }\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.debug(`Zipped ${archiveStats.fileCount} files and ${archiveStats.bytes} bytes`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}\nfunction getFirstSiteDomain(domains) {\n if (domains.length === 0) {\n consola.warn(\"No registered domains for site found\");\n return undefined;\n }\n switch (domains[0].type) {\n case \"controlPanelManaged\":\n return domains[0].controlPanelManaged.siteDomain.domain;\n default:\n const _ = domains[0].type;\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 { ExitProcessError, isValidSemver } from \"@osdk/cli.common\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n if (!isValidSemver(version)) {\n throw new ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);\n }\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new ExitProcessError(2, \"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\n}"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ExitProcessError } from './chunk-CLAEREOL.mjs';
|
|
1
|
+
import { loadToken, createInternalClientContext, createConjureContext, artifacts_exports, third_party_application_service_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-JTZ7GUB4.mjs';
|
|
2
|
+
import { ExitProcessError, isValidSemver } from './chunk-MTJA6DOB.mjs';
|
|
4
3
|
import './chunk-E2SEJZTC.mjs';
|
|
5
4
|
import { consola } from 'consola';
|
|
6
5
|
import archiver from 'archiver';
|
|
@@ -147,4 +146,4 @@ function getFirstSiteDomain(domains) {
|
|
|
147
146
|
|
|
148
147
|
export { siteDeployCommand as default };
|
|
149
148
|
//# sourceMappingURL=out.js.map
|
|
150
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
149
|
+
//# sourceMappingURL=siteDeployCommand-WHR7PIJE.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/deploy/siteDeployCommand.mts","../../src/util/autoVersion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAS,eAAe;AAGxB,OAAO,cAAc;AACrB,SAAS,gBAAgB;AACzB,YAAY,QAAQ;AACpB,OAAO,UAAU;AACjB,SAAS,gBAAgB;;;ACNzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAS1B,eAAsB,YAAY,YAAY,IAAI;AAChD,QAAM,CAAC,aAAa,WAAW,IAAI,cAAc,KAAK,CAAC,WAAW,IAAI,OAAO,IAAI,SAAS,EAAE,CAAC,IAAI,CAAC,QAAW,IAAI,OAAO,KAAK,CAAC;AAC9H,QAAM,aAAa,MAAM,YAAY,WAAW;AAChD,QAAM,UAAU,WAAW,KAAK,EAAE,QAAQ,aAAa,EAAE;AACzD,MAAI,CAAC,cAAc,OAAO,GAAG;AAC3B,UAAM,IAAI,iBAAiB,GAAG,sBAAsB,OAAO,2BAA2B;AAAA,EACxF;AACA,SAAO;AACT;AACA,eAAe,YAAY,aAAa;AACtC,MAAI;AACJ,MAAI;AACF,UAAM,YAAY,UAAU,IAAI;AAChC,UAAM;AAAA,MACJ;AAAA,IACF,IAAI,MAAM,UAAU,6CAA6C,eAAe,OAAO,aAAa,WAAW,OAAO,EAAE,IAAI;AAAA,MAC1H,UAAU;AAAA,IACZ,CAAC;AACD,iBAAa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AAA;AAAA,EAAO,SAAS,SAAS,IAAI,CAAC;AAAA,IAC/C,OAAO;AAAA,MACL,SAAS;AAAA,MACT,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,EACF,CAAC;AACH;AACA,SAAS,mBAAmB,SAAS;AACnC,MAAI,QAAQ,WAAW,GAAG;AACxB,YAAQ,KAAK,sCAAsC;AACnD,WAAO;AAAA,EACT;AACA,UAAQ,QAAQ,CAAC,EAAE,MAAM;AAAA,IACvB,KAAK;AACH,aAAO,QAAQ,CAAC,EAAE,oBAAoB,WAAW;AAAA,IACnD;AACE,YAAM,IAAI,QAAQ,CAAC,EAAE;AAAA,EACzB;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 { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, createInternalClientContext, thirdPartyApplicationService } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport { autoVersion as findAutoVersion } from \"../../../util/autoVersion.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n const ctx = createConjureContext(foundryUrl, \"/artifacts/api\", tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion.tagPrefix);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n consola.start(\"Uploading site files\");\n await Promise.all([artifacts.SiteAssetArtifactsService.uploadZippedSiteAsset(clientCtx, {\n application,\n version: siteVersion,\n zipFile: Readable.toWeb(archive) // This cast is because the dom fetch doesnt align type wise with streams\n }), archive.finalize()]);\n consola.success(\"Upload complete\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(clientCtx, application);\n const registeredSiteDomains = await ArtifactsSitesAdminV2Service.getRegisteredSiteDomains(ctx, repositoryRid);\n const domain = getFirstSiteDomain(registeredSiteDomains);\n if (!uploadOnly) {\n await ArtifactsSitesAdminV2Service.updateDeployedVersion(ctx, repositoryRid, {\n siteVersion: {\n version: siteVersion\n }\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n if (domain != null) {\n logSiteLink(\"View live site:\", `https://${domain}`);\n }\n } else {\n consola.debug(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n logSiteLink(\"Preview link:\", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);\n }\n }\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.debug(`Zipped ${archiveStats.fileCount} files and ${archiveStats.bytes} bytes`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}\nfunction getFirstSiteDomain(domains) {\n if (domains.length === 0) {\n consola.warn(\"No registered domains for site found\");\n return undefined;\n }\n switch (domains[0].type) {\n case \"controlPanelManaged\":\n return domains[0].controlPanelManaged.siteDomain.domain;\n default:\n const _ = domains[0].type;\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 { ExitProcessError, isValidSemver } from \"@osdk/cli.common\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n if (!isValidSemver(version)) {\n throw new ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);\n }\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new ExitProcessError(2, \"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\n}"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
5
|
+
require('./chunk-AX5HH3ZN.cjs');
|
|
6
6
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
8
8
|
var utils = require('consola/utils');
|
|
@@ -23,10 +23,10 @@ ${utils.colorize("bold", "This action cannot be undone.")}`, {
|
|
|
23
23
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
24
24
|
}
|
|
25
25
|
consola.consola.start(`Deleting version ${version}`);
|
|
26
|
-
const loadedToken = await
|
|
26
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
27
27
|
const tokenProvider = () => loadedToken;
|
|
28
|
-
const clientCtx =
|
|
29
|
-
await
|
|
28
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
29
|
+
await chunk2KJDB4YP_cjs.artifacts_exports.SiteAssetArtifactsService.deleteSiteVersion(clientCtx, {
|
|
30
30
|
application,
|
|
31
31
|
version
|
|
32
32
|
});
|
|
@@ -35,4 +35,4 @@ ${utils.colorize("bold", "This action cannot be undone.")}`, {
|
|
|
35
35
|
|
|
36
36
|
module.exports = versionDeleteCommand;
|
|
37
37
|
//# sourceMappingURL=out.js.map
|
|
38
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
38
|
+
//# sourceMappingURL=versionDeleteCommand-KQCJ7CHQ.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
|
|
2
|
-
import { loadToken, createInternalClientContext, artifacts_exports } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, artifacts_exports } from './chunk-JTZ7GUB4.mjs';
|
|
3
|
+
import './chunk-MTJA6DOB.mjs';
|
|
4
4
|
import './chunk-E2SEJZTC.mjs';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
6
|
import { colorize } from 'consola/utils';
|
|
@@ -33,4 +33,4 @@ ${colorize("bold", "This action cannot be undone.")}`, {
|
|
|
33
33
|
|
|
34
34
|
export { versionDeleteCommand as default };
|
|
35
35
|
//# sourceMappingURL=out.js.map
|
|
36
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
36
|
+
//# sourceMappingURL=versionDeleteCommand-YFVUCYVQ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
4
|
+
require('./chunk-AX5HH3ZN.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
|
|
@@ -11,13 +11,13 @@ async function versionGetCommand({
|
|
|
11
11
|
token,
|
|
12
12
|
tokenFile
|
|
13
13
|
}) {
|
|
14
|
-
const loadedToken = await
|
|
14
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
15
15
|
const tokenProvider = () => loadedToken;
|
|
16
|
-
const clientCtx =
|
|
16
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
17
17
|
consola.consola.start("Getting live version");
|
|
18
|
-
const repositoryRid = await
|
|
19
|
-
const ctx =
|
|
20
|
-
const deployedVersion = await
|
|
18
|
+
const repositoryRid = await chunk2KJDB4YP_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
|
|
19
|
+
const ctx = chunk2KJDB4YP_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
|
|
20
|
+
const deployedVersion = await chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid);
|
|
21
21
|
if (!deployedVersion) {
|
|
22
22
|
consola.consola.info("No live site version set");
|
|
23
23
|
} else {
|
|
@@ -27,4 +27,4 @@ async function versionGetCommand({
|
|
|
27
27
|
|
|
28
28
|
module.exports = versionGetCommand;
|
|
29
29
|
//# sourceMappingURL=out.js.map
|
|
30
|
-
//# sourceMappingURL=versionGetCommand-
|
|
30
|
+
//# sourceMappingURL=versionGetCommand-45C2JZC4.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-JTZ7GUB4.mjs';
|
|
2
|
+
import './chunk-MTJA6DOB.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
@@ -25,4 +25,4 @@ async function versionGetCommand({
|
|
|
25
25
|
|
|
26
26
|
export { versionGetCommand as default };
|
|
27
27
|
//# sourceMappingURL=out.js.map
|
|
28
|
-
//# sourceMappingURL=versionGetCommand-
|
|
28
|
+
//# sourceMappingURL=versionGetCommand-AKPCEBQZ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
4
|
+
require('./chunk-AX5HH3ZN.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
var utils = require('consola/utils');
|
|
@@ -12,13 +12,13 @@ async function versionListCommand({
|
|
|
12
12
|
token,
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
|
-
const loadedToken = await
|
|
15
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
16
16
|
const tokenProvider = () => loadedToken;
|
|
17
|
-
const clientCtx =
|
|
17
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
18
18
|
consola.consola.start("Fetching versions & deployed version");
|
|
19
|
-
const repositoryRid = await
|
|
20
|
-
const ctx =
|
|
21
|
-
const [versions, deployedVersion] = await Promise.all([
|
|
19
|
+
const repositoryRid = await chunk2KJDB4YP_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
|
|
20
|
+
const ctx = chunk2KJDB4YP_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
|
|
21
|
+
const [versions, deployedVersion] = await Promise.all([chunk2KJDB4YP_cjs.artifacts_exports.SiteAssetArtifactsService.fetchSiteVersions(clientCtx, application), chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.getDeployedVersion(ctx, repositoryRid)]);
|
|
22
22
|
if (versions.length === 0) {
|
|
23
23
|
consola.consola.info("No site versions found");
|
|
24
24
|
return;
|
|
@@ -33,4 +33,4 @@ async function versionListCommand({
|
|
|
33
33
|
|
|
34
34
|
module.exports = versionListCommand;
|
|
35
35
|
//# sourceMappingURL=out.js.map
|
|
36
|
-
//# sourceMappingURL=versionListCommand-
|
|
36
|
+
//# sourceMappingURL=versionListCommand-4TM6YYNJ.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, artifacts_exports, ArtifactsSitesAdminV2Service_exports } from './chunk-JTZ7GUB4.mjs';
|
|
2
|
+
import './chunk-MTJA6DOB.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
@@ -31,4 +31,4 @@ async function versionListCommand({
|
|
|
31
31
|
|
|
32
32
|
export { versionListCommand as default };
|
|
33
33
|
//# sourceMappingURL=out.js.map
|
|
34
|
-
//# sourceMappingURL=versionListCommand-
|
|
34
|
+
//# sourceMappingURL=versionListCommand-6OVL7FF2.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-JTZ7GUB4.mjs';
|
|
2
|
+
import './chunk-MTJA6DOB.mjs';
|
|
3
3
|
import './chunk-E2SEJZTC.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
@@ -28,4 +28,4 @@ async function versionSetCommand({
|
|
|
28
28
|
|
|
29
29
|
export { versionSetCommand as default };
|
|
30
30
|
//# sourceMappingURL=out.js.map
|
|
31
|
-
//# sourceMappingURL=versionSetCommand-
|
|
31
|
+
//# sourceMappingURL=versionSetCommand-BD3O7OAX.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
4
|
+
require('./chunk-AX5HH3ZN.cjs');
|
|
5
5
|
require('./chunk-HQDDGVB7.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
|
|
@@ -13,13 +13,13 @@ async function versionSetCommand({
|
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
15
|
consola.consola.start(`Setting live version`);
|
|
16
|
-
const loadedToken = await
|
|
16
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
17
17
|
const tokenProvider = () => loadedToken;
|
|
18
|
-
const clientCtx =
|
|
19
|
-
const repositoryRid = await
|
|
20
|
-
const ctx =
|
|
18
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
19
|
+
const repositoryRid = await chunk2KJDB4YP_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
|
|
20
|
+
const ctx = chunk2KJDB4YP_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
|
|
21
21
|
if (version) {
|
|
22
|
-
await
|
|
22
|
+
await chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.updateDeployedVersion(ctx, repositoryRid, {
|
|
23
23
|
siteVersion: {
|
|
24
24
|
version
|
|
25
25
|
}
|
|
@@ -30,4 +30,4 @@ async function versionSetCommand({
|
|
|
30
30
|
|
|
31
31
|
module.exports = versionSetCommand;
|
|
32
32
|
//# sourceMappingURL=out.js.map
|
|
33
|
-
//# sourceMappingURL=versionSetCommand-
|
|
33
|
+
//# sourceMappingURL=versionSetCommand-FIWT6CFW.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var chunk2KJDB4YP_cjs = require('./chunk-2KJDB4YP.cjs');
|
|
5
|
+
require('./chunk-AX5HH3ZN.cjs');
|
|
6
6
|
require('./chunk-HQDDGVB7.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
8
8
|
var utils = require('consola/utils');
|
|
@@ -21,16 +21,16 @@ ${utils.colorize("bold", "Your site will no longer be accessible until a new liv
|
|
|
21
21
|
});
|
|
22
22
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
23
23
|
}
|
|
24
|
-
const loadedToken = await
|
|
24
|
+
const loadedToken = await chunk2KJDB4YP_cjs.loadToken(token, tokenFile);
|
|
25
25
|
const tokenProvider = () => loadedToken;
|
|
26
|
-
const clientCtx =
|
|
26
|
+
const clientCtx = chunk2KJDB4YP_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
27
27
|
consola.consola.start("Clearing live site version");
|
|
28
|
-
const repositoryRid = await
|
|
29
|
-
const ctx =
|
|
30
|
-
await
|
|
28
|
+
const repositoryRid = await chunk2KJDB4YP_cjs.third_party_application_service_exports.fetchWebsiteRepositoryRid(clientCtx, application);
|
|
29
|
+
const ctx = chunk2KJDB4YP_cjs.createConjureContext(foundryUrl, "/artifacts/api", tokenProvider);
|
|
30
|
+
await chunk2KJDB4YP_cjs.ArtifactsSitesAdminV2Service_exports.clearDeployedVersion(ctx, repositoryRid);
|
|
31
31
|
consola.consola.success("Cleared live site version");
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
module.exports = versionUnsetCommand;
|
|
35
35
|
//# sourceMappingURL=out.js.map
|
|
36
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
36
|
+
//# sourceMappingURL=versionUnsetCommand-BZ2SAFEM.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { handlePromptCancel } from './chunk-IV3QY3PZ.mjs';
|
|
2
|
-
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { loadToken, createInternalClientContext, third_party_application_service_exports, createConjureContext, ArtifactsSitesAdminV2Service_exports } from './chunk-JTZ7GUB4.mjs';
|
|
3
|
+
import './chunk-MTJA6DOB.mjs';
|
|
4
4
|
import './chunk-E2SEJZTC.mjs';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
6
|
import { colorize } from 'consola/utils';
|
|
@@ -31,4 +31,4 @@ ${colorize("bold", "Your site will no longer be accessible until a new live site
|
|
|
31
31
|
|
|
32
32
|
export { versionUnsetCommand as default };
|
|
33
33
|
//# sourceMappingURL=out.js.map
|
|
34
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
34
|
+
//# sourceMappingURL=versionUnsetCommand-W7ACW5O3.mjs.map
|
package/build/types/cli.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAyBA,wBAAsB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB;;;;;eA6BtD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { CliCommonArgs, CommonAuthArgs } from "@osdk/cli.common";
|
|
1
2
|
import type * as yargs from "yargs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default site;
|
|
3
|
+
declare const auth: yargs.CommandModule<CliCommonArgs, CommonAuthArgs>;
|
|
4
|
+
export default auth;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAkB5D,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { CommonAuthArgs, LoginArgs } from "@osdk/cli.common";
|
|
1
2
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonAuthArgs } from "../CommonAuthArgs.js";
|
|
3
|
-
import type { LoginArgs } from "./LoginArgs.js";
|
|
4
3
|
export declare const command: CommandModule<CommonAuthArgs, LoginArgs>;
|
|
5
4
|
export default command;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/auth/login/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,aAAa,CACjC,cAAc,EACd,SAAS,CAiBV,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CliCommonArgs } from "
|
|
1
|
+
import type { CliCommonArgs } from "@osdk/cli.common";
|
|
2
2
|
import type { ThirdPartyAppRid } from "../../net/ThirdPartyAppRid.js";
|
|
3
3
|
export interface CommonSiteArgs extends CliCommonArgs {
|
|
4
4
|
application: ThirdPartyAppRid;
|
|
@@ -6,3 +6,4 @@ export interface CommonSiteArgs extends CliCommonArgs {
|
|
|
6
6
|
token?: string;
|
|
7
7
|
tokenFile?: string;
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=CommonSiteArgs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonSiteArgs.d.ts","sourceRoot":"","sources":["../../../../src/commands/site/CommonSiteArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,WAAW,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteDeployArgs.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/SiteDeployArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/index.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,OAAO,EAAE,aAAa,CAC1B,cAAc,EACd,cAAc,CA8Gf,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -2,3 +2,4 @@ import type { Arguments } from "yargs";
|
|
|
2
2
|
import type { SiteConfig } from "../../../util/config.js";
|
|
3
3
|
import type { SiteDeployArgs } from "./SiteDeployArgs.js";
|
|
4
4
|
export declare function logDeployCommandConfigFileOverride(args: Arguments<SiteDeployArgs>, config: SiteConfig | undefined): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=logDeployCommandConfigFileOverride.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logDeployCommandConfigFileOverride.d.ts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,SAAS,CAAC,cAAc,CAAC,EAC/B,MAAM,EAAE,UAAU,GAAG,SAAS,iBAyB/B"}
|
|
@@ -7,3 +7,4 @@ interface SiteDeployInternalArgs extends Omit<SiteDeployArgs, "version" | "autoV
|
|
|
7
7
|
}
|
|
8
8
|
export default function siteDeployCommand({ selectedVersion, application, foundryUrl, uploadOnly, directory, token, tokenFile, }: SiteDeployInternalArgs): Promise<void>;
|
|
9
9
|
export {};
|
|
10
|
+
//# sourceMappingURL=siteDeployCommand.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"siteDeployCommand.d.mts","sourceRoot":"","sources":["../../../../../src/commands/site/deploy/siteDeployCommand.mts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,UAAU,sBACR,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,CAAC;IAEvD,eAAe,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAA8B,iBAAiB,CAC7C,EACE,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,iBA+E1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { CliCommonArgs } from "@osdk/cli.common";
|
|
1
2
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CliCommonArgs } from "../../CliCommonArgs.js";
|
|
3
3
|
import type { CommonSiteArgs } from "./CommonSiteArgs.js";
|
|
4
4
|
declare const command: CommandModule<CliCommonArgs, CommonSiteArgs>;
|
|
5
5
|
export default command;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/site/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,QAAA,MAAM,OAAO,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,CAsDzD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -2,3 +2,4 @@ import type { Arguments } from "yargs";
|
|
|
2
2
|
import type { FoundryConfig } from "../../util/config.js";
|
|
3
3
|
import type { CommonSiteArgs } from "./CommonSiteArgs.js";
|
|
4
4
|
export declare function logSiteCommandConfigFileOverride(args: Arguments<CommonSiteArgs>, config: FoundryConfig | undefined): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=logSiteCommandConfigFileOverride.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logSiteCommandConfigFileOverride.d.ts","sourceRoot":"","sources":["../../../../src/commands/site/logSiteCommandConfigFileOverride.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,SAAS,CAAC,cAAc,CAAC,EAC/B,MAAM,EAAE,aAAa,GAAG,SAAS,iBAgBlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionDeleteArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/delete/VersionDeleteArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/delete/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,QAAA,MAAM,OAAO,EAAE,aAAa,CAC1B,cAAc,EACd,iBAAiB,CAsBlB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionDeleteCommand.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,wBAA8B,oBAAoB,CAChD,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,EACzD,iBAAiB,iBAuBpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionGetArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/get/VersionGetArgs.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,cAAe,SAAQ,cAAc;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/get/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,OAAO,EAAE,aAAa,CAC1B,cAAc,EACd,cAAc,CAWf,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionGetCommand.d.mts","sourceRoot":"","sources":["../../../../../../src/commands/site/version/get/versionGetCommand.mts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wBAA8B,iBAAiB,CAC7C,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,iBAsB9D"}
|