@osdk/cli 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/build/js/chunk-2LNCUMIA.cjs +8 -0
- package/build/js/chunk-2LNCUMIA.cjs.map +1 -0
- package/build/js/chunk-AFLYFRYO.cjs +16 -0
- package/build/js/chunk-AFLYFRYO.cjs.map +1 -0
- package/build/js/chunk-LBGQDFFN.js +5 -0
- package/build/js/chunk-LBGQDFFN.js.map +1 -0
- package/build/js/chunk-NOVNYG3L.js +11 -0
- package/build/js/chunk-NOVNYG3L.js.map +1 -0
- package/build/js/handleSiteDeploy-2C2WC2A7.js +9 -0
- package/build/js/handleSiteDeploy-2C2WC2A7.js.map +1 -0
- package/build/js/handleSiteDeploy-4O4DUUB6.cjs +11 -0
- package/build/js/handleSiteDeploy-4O4DUUB6.cjs.map +1 -0
- package/build/js/index.cjs +35 -0
- package/build/js/index.cjs.map +1 -0
- package/build/js/index.js +6 -11
- package/build/js/index.js.map +1 -1
- package/build/js/siteDeleteCommand-GQCHP3EN.js +9 -0
- package/build/js/siteDeleteCommand-GQCHP3EN.js.map +1 -0
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs +11 -0
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs.map +1 -0
- package/build/js/siteUploadCommand-4ZL5TAIW.js +12 -0
- package/build/js/siteUploadCommand-4ZL5TAIW.js.map +1 -0
- package/build/js/siteUploadCommand-5AYNOXAT.cjs +37 -0
- package/build/js/siteUploadCommand-5AYNOXAT.cjs.map +1 -0
- package/build/js/siteVersionsCommand-ZUFBC6EH.js +10 -0
- package/build/js/siteVersionsCommand-ZUFBC6EH.js.map +1 -0
- package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs +12 -0
- package/build/js/siteVersionsCommand-ZVHYGOAQ.cjs.map +1 -0
- package/build/types/CliCommonArgs.d.ts +3 -0
- package/build/types/cli.d.ts +1 -0
- package/build/types/commands/site/CommonSiteArgs.d.ts +6 -0
- package/build/types/commands/site/delete/DeleteArgs.d.ts +4 -0
- package/build/types/commands/site/delete/index.d.ts +5 -0
- package/build/types/commands/site/delete/siteDeleteCommand.d.mts +2 -0
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +5 -0
- package/build/types/commands/site/deploy/handleSiteDeploy.d.mts +2 -0
- package/build/types/commands/site/deploy/index.d.ts +5 -0
- package/build/types/commands/site/index.d.ts +5 -0
- package/build/types/commands/site/upload/UploadArgs.d.ts +1 -1
- package/build/types/commands/site/upload/index.d.ts +2 -2
- package/build/types/commands/site/versions/index.d.ts +1 -1
- package/build/types/commands/site/versions/siteVersionsCommand.d.mts +2 -2
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService.d.ts +2 -0
- package/build/types/generated/artifacts-admin/ClearDeletedUserRepositoriesRequest.d.ts +3 -0
- package/build/types/generated/artifacts-admin/ContainerRegistryDomainResponse.d.ts +3 -0
- package/build/types/generated/artifacts-admin/index.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.d.ts +2 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminService.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +2 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +4 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +4 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service.d.ts +10 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveName.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyDirectiveValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyHeaderValue.d.ts +1 -0
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/DeploySiteRequest.d.ts +7 -0
- package/build/types/generated/artifacts-sites/DeploymentInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/DomainName.d.ts +3 -0
- package/build/types/generated/artifacts-sites/PreviewContentSecurityPolicyRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/SiteDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/SiteDomainRegistrationRequestRid.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SiteVersion.d.ts +3 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.d.ts +2 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService.d.ts +1 -0
- package/build/types/generated/artifacts-sites/SubmitDomainRegistrationRequest.d.ts +7 -0
- package/build/types/generated/artifacts-sites/UnregisterDomainRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/UpdateDeployedVersionRequest.d.ts +4 -0
- package/build/types/generated/artifacts-sites/index.d.ts +18 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/net/artifacts/SiteAssetArtifactsService/SiteAssetVersions.d.mts +3 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.d.mts +2 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.d.mts +2 -0
- package/build/types/net/artifacts/SiteAssetArtifactsService/index.d.mts +4 -0
- package/build/types/net/{uploadSiteVersion.d.mts → artifacts/SiteAssetArtifactsService/uploadSiteVersion.d.mts} +1 -4
- package/build/types/net/artifacts/index.d.mts +1 -0
- package/build/types/net/createConjureContext.d.mts +2 -0
- package/build/types/net/index.d.mts +4 -0
- package/build/types/net/{fetchWebsiteRepositoryRid.d.mts → third-party-application-service/fetchWebsiteRepositoryRid.d.mts} +2 -2
- package/build/types/net/third-party-application-service/index.d.mts +1 -0
- package/build/types/readCliVersionFromPackageJson.d.ts +1 -0
- package/build/types/yargs/logVersionMiddleware.d.ts +2 -0
- package/package.json +8 -2
- package/build/js/chunk-2DJZUIFP.js +0 -7
- package/build/js/chunk-2DJZUIFP.js.map +0 -1
- package/build/js/chunk-6PVNK2PW.js +0 -13
- package/build/js/chunk-6PVNK2PW.js.map +0 -1
- package/build/js/chunk-MGT3UGXW.mjs +0 -5
- package/build/js/chunk-MGT3UGXW.mjs.map +0 -1
- package/build/js/chunk-YEWM6TCR.mjs +0 -9
- package/build/js/chunk-YEWM6TCR.mjs.map +0 -1
- package/build/js/index.mjs +0 -9
- package/build/js/index.mjs.map +0 -1
- package/build/js/siteUploadCommand-36HAEYDG.js +0 -37
- package/build/js/siteUploadCommand-36HAEYDG.js.map +0 -1
- package/build/js/siteUploadCommand-L3QDNVWX.mjs +0 -12
- package/build/js/siteUploadCommand-L3QDNVWX.mjs.map +0 -1
- package/build/js/siteVersionsCommand-BQMPCMGZ.mjs +0 -10
- package/build/js/siteVersionsCommand-BQMPCMGZ.mjs.map +0 -1
- package/build/js/siteVersionsCommand-YSV7HQJK.js +0 -12
- package/build/js/siteVersionsCommand-YSV7HQJK.js.map +0 -1
- package/build/types/commands/site/addSiteCommand.d.ts +0 -7
- package/build/types/net/getSiteVersions.d.mts +0 -5
- /package/build/types/net/{getSiteAssetBaseUrl.d.mts → artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.d.mts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":["consola","colorize","siteVersionsCommand","baseUrl","appRid","repositoryRid","third_party_application_service_exports","ctx","createConjureContext","versions","deployedVersion","artifacts_exports","ArtifactsSitesAdminV2Service_exports","version"],"mappings":"yFAiBA,OAAS,WAAAA,MAAe,UACxB,OAAS,YAAAC,MAAgB,gBACzB,eAAOC,EAA2C,CAChD,QAAAC,EACA,OAAAC,CACF,EAAG,CACDJ,EAAQ,MAAM,sCAAsC,EACpD,IAAMK,EAAgB,MAAMC,EAA6B,0BAA0BH,EAASC,CAAM,EAC5FG,EAAMC,EAAqBL,EAAS,gBAAgB,EACpD,CAACM,EAAUC,CAAe,EAAI,MAAM,QAAQ,IAAI,CAACC,EAAU,0BAA0B,kBAAkBR,EAASC,CAAM,EAAGQ,EAA6B,mBAAmBL,EAAKF,CAAa,CAAC,CAAC,EACnM,GAAII,EAAS,QAAU,EAAG,CACxBT,EAAQ,KAAK,+DAA+D,EAC5E,MACF,CACAA,EAAQ,QAAQ,iBAAiB,EACjC,QAAWa,KAAWJ,EACpBT,EAAQ,IAAI,SAASa,CAAO,GAAGH,GAAmBG,IAAYH,EAAgB,QAAUT,EAAS,QAAS,aAAa,EAAI,EAAE,EAAE,CAEnI","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 { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, thirdPartyApplicationService } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nexport default async function siteVersionsCommand({\n baseUrl,\n appRid\n}) {\n consola.start(\"Fetching versions & deployed version\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), ArtifactsSitesAdminV2Service.getDeployedVersion(ctx, repositoryRid)]);\n if (versions.length == 0) {\n consola.warn(\"Successfully connected to server, but no versions were found.\");\n return;\n }\n consola.success(\"Found versions:\");\n for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkAFLYFRYO_cjs = require('./chunk-AFLYFRYO.cjs');
|
|
4
|
+
require('./chunk-2LNCUMIA.cjs');
|
|
5
|
+
var consola = require('consola');
|
|
6
|
+
var utils = require('consola/utils');
|
|
7
|
+
|
|
8
|
+
async function v({baseUrl:o,appRid:t}){consola.consola.start("Fetching versions & deployed version");let d=await chunkAFLYFRYO_cjs.d.fetchWebsiteRepositoryRid(o,t),l=chunkAFLYFRYO_cjs.c(o,"/artifacts/api"),[i,r]=await Promise.all([chunkAFLYFRYO_cjs.b.SiteAssetArtifactsService.fetchSiteVersions(o,t),chunkAFLYFRYO_cjs.a.getDeployedVersion(l,d)]);if(i.length==0){consola.consola.warn("Successfully connected to server, but no versions were found.");return}consola.consola.success("Found versions:");for(let s of i)consola.consola.log(` - ${s}${r&&s===r.version?utils.colorize("green"," (deployed)"):""}`);}
|
|
9
|
+
|
|
10
|
+
module.exports = v;
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=siteVersionsCommand-ZVHYGOAQ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/versions/siteVersionsCommand.mts"],"names":["consola","colorize","siteVersionsCommand","baseUrl","appRid","repositoryRid","third_party_application_service_exports","ctx","createConjureContext","versions","deployedVersion","artifacts_exports","ArtifactsSitesAdminV2Service_exports","version"],"mappings":"2FAiBA,OAAS,WAAAA,MAAe,UACxB,OAAS,YAAAC,MAAgB,gBACzB,eAAOC,EAA2C,CAChD,QAAAC,EACA,OAAAC,CACF,EAAG,CACDJ,EAAQ,MAAM,sCAAsC,EACpD,IAAMK,EAAgB,MAAMC,EAA6B,0BAA0BH,EAASC,CAAM,EAC5FG,EAAMC,EAAqBL,EAAS,gBAAgB,EACpD,CAACM,EAAUC,CAAe,EAAI,MAAM,QAAQ,IAAI,CAACC,EAAU,0BAA0B,kBAAkBR,EAASC,CAAM,EAAGQ,EAA6B,mBAAmBL,EAAKF,CAAa,CAAC,CAAC,EACnM,GAAII,EAAS,QAAU,EAAG,CACxBT,EAAQ,KAAK,+DAA+D,EAC5E,MACF,CACAA,EAAQ,QAAQ,iBAAiB,EACjC,QAAWa,KAAWJ,EACpBT,EAAQ,IAAI,SAASa,CAAO,GAAGH,GAAmBG,IAAYH,EAAgB,QAAUT,EAAS,QAAS,aAAa,EAAI,EAAE,EAAE,CAEnI","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 { artifacts, ArtifactsSitesAdminV2Service, createConjureContext, thirdPartyApplicationService } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nexport default async function siteVersionsCommand({\n baseUrl,\n appRid\n}) {\n consola.start(\"Fetching versions & deployed version\");\n const repositoryRid = await thirdPartyApplicationService.fetchWebsiteRepositoryRid(baseUrl, appRid);\n const ctx = createConjureContext(baseUrl, \"/artifacts/api\");\n const [versions, deployedVersion] = await Promise.all([artifacts.SiteAssetArtifactsService.fetchSiteVersions(baseUrl, appRid), ArtifactsSitesAdminV2Service.getDeployedVersion(ctx, repositoryRid)]);\n if (versions.length == 0) {\n consola.warn(\"Successfully connected to server, but no versions were found.\");\n return;\n }\n consola.success(\"Found versions:\");\n for (const version of versions) {\n consola.log(` - ${version}${deployedVersion && version === deployedVersion.version ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
package/build/types/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonSiteArgs } from "../
|
|
3
|
-
import type { UploadArgs } from "./UploadArgs";
|
|
2
|
+
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
3
|
+
import type { UploadArgs } from "./UploadArgs.js";
|
|
4
4
|
export declare const command: CommandModule<CommonSiteArgs, UploadArgs>;
|
|
5
5
|
export default command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonSiteArgs } from "../
|
|
2
|
+
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
3
3
|
export declare const command: CommandModule<CommonSiteArgs, CommonSiteArgs>;
|
|
4
4
|
export default command;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CommonSiteArgs } from "../
|
|
2
|
-
export default function
|
|
1
|
+
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
2
|
+
export default function siteVersionsCommand({ baseUrl, appRid }: CommonSiteArgs): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ClearDeletedUserRepositoriesRequest } from "../ClearDeletedUserRepositoriesRequest.js";
|
|
3
|
+
export declare function clearDeletedUserRepositories(ctx: ConjureContext, request: ClearDeletedUserRepositoriesRequest): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
+
export declare function getContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string): Promise<ContentSecurityPolicyAdditions>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ContentSecurityPolicyHeaderValue } from "../ContentSecurityPolicyHeaderValue.js";
|
|
3
|
+
import type { PreviewContentSecurityPolicyRequest } from "../PreviewContentSecurityPolicyRequest.js";
|
|
4
|
+
export declare function previewContentSecurityPolicy(ctx: ConjureContext, repositoryRid: string, request: PreviewContentSecurityPolicyRequest): Promise<ContentSecurityPolicyHeaderValue>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
+
export declare function putContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string, contentSecurityPolicyAdditions: ContentSecurityPolicyAdditions): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
+
import type { SubmitDomainRegistrationRequest } from "../SubmitDomainRegistrationRequest.js";
|
|
4
|
+
export declare function requestSiteDomainForRepository(ctx: ConjureContext, repositoryRid: string, request: SubmitDomainRegistrationRequest): Promise<SiteDomainInfo>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
import type { UpdateDeployedVersionRequest } from "../UpdateDeployedVersionRequest.js";
|
|
3
|
+
export declare function updateDeployedVersion(ctx: ConjureContext, repositoryRid: string, version: UpdateDeployedVersionRequest): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { clearDeployedVersion } from "./ArtifactsSitesAdminV2Service/clearDeployedVersion.js";
|
|
2
|
+
export { getContentSecurityPolicyAdditions } from "./ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.js";
|
|
3
|
+
export { getDeployedVersion } from "./ArtifactsSitesAdminV2Service/getDeployedVersion.js";
|
|
4
|
+
export { getRegisteredSiteDomains } from "./ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.js";
|
|
5
|
+
export { getRequestedSiteDomains } from "./ArtifactsSitesAdminV2Service/getRequestedSiteDomains.js";
|
|
6
|
+
export { previewContentSecurityPolicy } from "./ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.js";
|
|
7
|
+
export { putContentSecurityPolicyAdditions } from "./ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.js";
|
|
8
|
+
export { requestSiteDomainForRepository } from "./ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.js";
|
|
9
|
+
export { unregisterSiteDomain } from "./ArtifactsSitesAdminV2Service/unregisterSiteDomain.js";
|
|
10
|
+
export { updateDeployedVersion } from "./ArtifactsSitesAdminV2Service/updateDeployedVersion.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ContentSecurityPolicyDirectiveName = "CONNECT_SRC" | "FRAME_SRC" | "IMG_SRC" | "SCRIPT_SRC";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ContentSecurityPolicyDirectiveValue = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ContentSecurityPolicyHeaderValue = string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DomainName } from "./DomainName.js";
|
|
2
|
+
import type { SiteDomainRegistrationRequestRid } from "./SiteDomainRegistrationRequestRid.js";
|
|
3
|
+
export interface ControlPanelManagedDomainInfo {
|
|
4
|
+
requestRid: SiteDomainRegistrationRequestRid;
|
|
5
|
+
siteDomain: DomainName;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ControlPanelManagedDomainInfo } from "./ControlPanelManagedDomainInfo.js";
|
|
2
|
+
export interface SiteDomainInfo_controlPanelManaged {
|
|
3
|
+
type: "controlPanelManaged";
|
|
4
|
+
controlPanelManaged: ControlPanelManagedDomainInfo;
|
|
5
|
+
}
|
|
6
|
+
export type SiteDomainInfo = SiteDomainInfo_controlPanelManaged;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SiteDomainRegistrationRequestRid = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getRegisteredDomains } from "./SitesDomainRegistryService/getRegisteredDomains.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * as ArtifactsSitesAdminService from "./ArtifactsSitesAdminService.js";
|
|
2
|
+
export * as ArtifactsSitesAdminV2Service from "./ArtifactsSitesAdminV2Service.js";
|
|
3
|
+
export * as SitesDomainRegistryService from "./SitesDomainRegistryService.js";
|
|
4
|
+
export type { ContentSecurityPolicyAdditions } from "./ContentSecurityPolicyAdditions.js";
|
|
5
|
+
export type { ContentSecurityPolicyDirectiveName } from "./ContentSecurityPolicyDirectiveName.js";
|
|
6
|
+
export type { ContentSecurityPolicyDirectiveValue } from "./ContentSecurityPolicyDirectiveValue.js";
|
|
7
|
+
export type { ContentSecurityPolicyHeaderValue } from "./ContentSecurityPolicyHeaderValue.js";
|
|
8
|
+
export type { ControlPanelManagedDomainInfo } from "./ControlPanelManagedDomainInfo.js";
|
|
9
|
+
export type { DeploymentInfo } from "./DeploymentInfo.js";
|
|
10
|
+
export type { DeploySiteRequest } from "./DeploySiteRequest.js";
|
|
11
|
+
export type { DomainName } from "./DomainName.js";
|
|
12
|
+
export type { PreviewContentSecurityPolicyRequest } from "./PreviewContentSecurityPolicyRequest.js";
|
|
13
|
+
export type { SiteDomainInfo } from "./SiteDomainInfo.js";
|
|
14
|
+
export type { SiteDomainRegistrationRequestRid } from "./SiteDomainRegistrationRequestRid.js";
|
|
15
|
+
export type { SiteVersion } from "./SiteVersion.js";
|
|
16
|
+
export type { SubmitDomainRegistrationRequest } from "./SubmitDomainRegistrationRequest.js";
|
|
17
|
+
export type { UnregisterDomainRequest } from "./UnregisterDomainRequest.js";
|
|
18
|
+
export type { UpdateDeployedVersionRequest } from "./UpdateDeployedVersionRequest.js";
|
package/build/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { cli } from "./cli";
|
|
1
|
+
export { cli } from "./cli.js";
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import type { ThirdPartyAppRid } from "
|
|
2
|
-
export interface SiteAssetVersions {
|
|
3
|
-
versions: string[];
|
|
4
|
-
}
|
|
1
|
+
import type { ThirdPartyAppRid } from "../../ThirdPartyAppRid.js";
|
|
5
2
|
export declare function uploadZippedSiteAsset(baseUrl: string, thirdPartyAppRid: ThirdPartyAppRid, version: string, zipFile: ReadableStream | Blob | BufferSource): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as SiteAssetArtifactsService from "./SiteAssetArtifactsService/index.mjs";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ArtifactsSitesAdminV2Service } from "../generated/artifacts-sites/index.js";
|
|
2
|
+
export * as artifacts from "./artifacts/index.mjs";
|
|
3
|
+
export { createConjureContext } from "./createConjureContext.mjs";
|
|
4
|
+
export * as thirdPartyApplicationService from "./third-party-application-service/index.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RepositoryRid } from "
|
|
2
|
-
import type { ThirdPartyAppRid } from "
|
|
1
|
+
import type { RepositoryRid } from "../RepositoryRid.js";
|
|
2
|
+
import type { ThirdPartyAppRid } from "../ThirdPartyAppRid.js";
|
|
3
3
|
export declare function fetchWebsiteRepositoryRid(baseUrl: string, thirdPartyAppRid: ThirdPartyAppRid): Promise<RepositoryRid>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { fetchWebsiteRepositoryRid } from "./fetchWebsiteRepositoryRid.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function readCliVersionFromPackageJson(): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"archiver": "^6.0.1",
|
|
21
|
+
"conjure-lite": "0.0.5",
|
|
21
22
|
"consola": "^3.2.3",
|
|
23
|
+
"find-up": "^6.3.0",
|
|
22
24
|
"yargs": "^17.7.2",
|
|
23
|
-
"@osdk/api": "0.0.
|
|
25
|
+
"@osdk/api": "0.0.9"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
28
|
"@types/archiver": "^6.0.0",
|
|
@@ -34,6 +36,9 @@
|
|
|
34
36
|
"publishConfig": {
|
|
35
37
|
"access": "public"
|
|
36
38
|
},
|
|
39
|
+
"imports": {
|
|
40
|
+
"#net": "./src/net/index.mts"
|
|
41
|
+
},
|
|
37
42
|
"keywords": [],
|
|
38
43
|
"bin": {
|
|
39
44
|
"osdk": "./build/js/cli.js"
|
|
@@ -44,6 +49,7 @@
|
|
|
44
49
|
"CHANGELOG.md",
|
|
45
50
|
"package.json"
|
|
46
51
|
],
|
|
52
|
+
"type": "module",
|
|
47
53
|
"scripts": {
|
|
48
54
|
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
|
|
49
55
|
"dev:transpile": "tsup --watch",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"AAgBO,IAAMA,EAAN,cAA+B,KAAM,CAC1C,YAAYC,EAAWC,EAAK,CAC1B,MAAMA,CAAG,EACT,KAAK,UAAYD,CACnB,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ExitProcessError extends Error {\n constructor(errorCode, msg) {\n super(msg);\n this.errorCode = errorCode;\n }\n}"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var utils = require('@osdk/api/utils');
|
|
4
|
-
var consola = require('consola');
|
|
5
|
-
|
|
6
|
-
function c(e,o=fetch){return utils.createFetchHeaderMutator(u(o),async t=>{let s=await e();return t.set("Authorization",`Bearer ${s}`),t.set("Fetch-User-Agent",""),t})}function u(e=fetch){return function(t,s){return typeof t=="string"||t instanceof URL?consola.consola.debug(`${s?.method??"GET"}: ${t.toString().trim()}`):consola.consola.debug(`${t.method??"GET"}: ${t.url.toString().trim()}`),e(t,s).then(r=>(consola.consola.debug("Finished fetch"),r))}}async function $(e,o){let t=c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),s=`
|
|
7
|
-
${e}/third-party-application-service/api/application-websites/${o}`,r=await t(s);if(r.status>=200&&r.status<300){let i=await r.json();return consola.consola.debug(`Repository RID: ${i}`),i}throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}function b(e,o){return `${e}/artifacts/api/repositories/${o}/contents/release/siteasset`}
|
|
8
|
-
|
|
9
|
-
exports.a = c;
|
|
10
|
-
exports.b = $;
|
|
11
|
-
exports.c = b;
|
|
12
|
-
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=chunk-6PVNK2PW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/createFetch.mts","../../src/net/fetchWebsiteRepositoryRid.mts","../../src/net/getSiteAssetBaseUrl.mts"],"names":["createFetchHeaderMutator","consola","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","repositoryRid","getSiteAssetBaseUrl","foundryBaseUrl"],"mappings":"AAgBA,OAAS,4BAAAA,MAAgC,kBACzC,OAAS,WAAAC,MAAe,UACjB,SAASC,EAAYC,EAAeC,EAAU,MAAO,CAC1D,OAAOJ,EAAyBK,EAAwBD,CAAO,EAAG,MAAME,GAAW,CACjF,IAAMC,EAAQ,MAAMJ,EAAc,EAClC,OAAAG,EAAQ,IAAI,gBAAiB,UAAUC,CAAK,EAAE,EAC9CD,EAAQ,IAAI,mBAAoB,EAAE,EAC3BA,CACT,CAAC,CACH,CACA,SAASD,EAAwBD,EAAU,MAAO,CAChD,OAAO,SAA2BI,EAAOC,EAAM,CAC7C,OAAI,OAAOD,GAAU,UAAYA,aAAiB,IAChDP,EAAQ,MAAM,GAAGQ,GAAM,QAAU,KAAK,KAAKD,EAAM,SAAS,EAAE,KAAK,CAAC,EAAE,EAEpEP,EAAQ,MAAM,GAAGO,EAAM,QAAU,KAAK,KAAKA,EAAM,IAAI,SAAS,EAAE,KAAK,CAAC,EAAE,EAEnEJ,EAAQI,EAAOC,CAAI,EAAE,KAAKC,IAC/BT,EAAQ,MAAM,gBAAgB,EACvBS,EACR,CACH,CACF,CCtBA,OAAS,WAAAT,MAAe,UAExB,eAAsBU,EAA0BC,EAASC,EAAkB,CACzE,IAAMC,EAAQZ,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EAC5Da,EAAM;AAAA,MACRH,CAAO,6DAA6DC,CAAgB,GAClFG,EAAS,MAAMF,EAAMC,CAAG,EAC9B,GAAIC,EAAO,QAAU,KAAOA,EAAO,OAAS,IAAK,CAC/C,IAAMC,EAAgB,MAAMD,EAAO,KAAK,EACxC,OAAAf,EAAQ,MAAM,mBAAmBgB,CAAa,EAAE,EACzCA,CACT,CACA,MAAM,IAAI,MAAM,4BAA4BD,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CACpF,CCbO,SAASE,EAAoBC,EAAgBF,EAAe,CACjE,MAAO,GAAGE,CAAc,+BAA+BF,CAAa,6BACtE","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 { createFetchHeaderMutator } from \"@osdk/api/utils\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"./createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ExitProcessError.ts"],"names":["ExitProcessError","errorCode","msg"],"mappings":"AAgBO,IAAMA,EAAN,cAA+B,KAAM,CAC1C,YAAYC,EAAWC,EAAK,CAC1B,MAAMA,CAAG,EACT,KAAK,UAAYD,CACnB,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class ExitProcessError extends Error {\n constructor(errorCode, msg) {\n super(msg);\n this.errorCode = errorCode;\n }\n}"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createFetchHeaderMutator } from '@osdk/api/utils';
|
|
2
|
-
import { consola } from 'consola';
|
|
3
|
-
|
|
4
|
-
function c(e,o=fetch){return createFetchHeaderMutator(u(o),async t=>{let s=await e();return t.set("Authorization",`Bearer ${s}`),t.set("Fetch-User-Agent",""),t})}function u(e=fetch){return function(t,s){return typeof t=="string"||t instanceof URL?consola.debug(`${s?.method??"GET"}: ${t.toString().trim()}`):consola.debug(`${t.method??"GET"}: ${t.url.toString().trim()}`),e(t,s).then(r=>(consola.debug("Finished fetch"),r))}}async function $(e,o){let t=c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),s=`
|
|
5
|
-
${e}/third-party-application-service/api/application-websites/${o}`,r=await t(s);if(r.status>=200&&r.status<300){let i=await r.json();return consola.debug(`Repository RID: ${i}`),i}throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}function b(e,o){return `${e}/artifacts/api/repositories/${o}/contents/release/siteasset`}
|
|
6
|
-
|
|
7
|
-
export { c as a, $ as b, b as c };
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-YEWM6TCR.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/createFetch.mts","../../src/net/fetchWebsiteRepositoryRid.mts","../../src/net/getSiteAssetBaseUrl.mts"],"names":["createFetchHeaderMutator","consola","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","repositoryRid","getSiteAssetBaseUrl","foundryBaseUrl"],"mappings":"AAgBA,OAAS,4BAAAA,MAAgC,kBACzC,OAAS,WAAAC,MAAe,UACjB,SAASC,EAAYC,EAAeC,EAAU,MAAO,CAC1D,OAAOJ,EAAyBK,EAAwBD,CAAO,EAAG,MAAME,GAAW,CACjF,IAAMC,EAAQ,MAAMJ,EAAc,EAClC,OAAAG,EAAQ,IAAI,gBAAiB,UAAUC,CAAK,EAAE,EAC9CD,EAAQ,IAAI,mBAAoB,EAAE,EAC3BA,CACT,CAAC,CACH,CACA,SAASD,EAAwBD,EAAU,MAAO,CAChD,OAAO,SAA2BI,EAAOC,EAAM,CAC7C,OAAI,OAAOD,GAAU,UAAYA,aAAiB,IAChDP,EAAQ,MAAM,GAAGQ,GAAM,QAAU,KAAK,KAAKD,EAAM,SAAS,EAAE,KAAK,CAAC,EAAE,EAEpEP,EAAQ,MAAM,GAAGO,EAAM,QAAU,KAAK,KAAKA,EAAM,IAAI,SAAS,EAAE,KAAK,CAAC,EAAE,EAEnEJ,EAAQI,EAAOC,CAAI,EAAE,KAAKC,IAC/BT,EAAQ,MAAM,gBAAgB,EACvBS,EACR,CACH,CACF,CCtBA,OAAS,WAAAT,MAAe,UAExB,eAAsBU,EAA0BC,EAASC,EAAkB,CACzE,IAAMC,EAAQZ,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EAC5Da,EAAM;AAAA,MACRH,CAAO,6DAA6DC,CAAgB,GAClFG,EAAS,MAAMF,EAAMC,CAAG,EAC9B,GAAIC,EAAO,QAAU,KAAOA,EAAO,OAAS,IAAK,CAC/C,IAAMC,EAAgB,MAAMD,EAAO,KAAK,EACxC,OAAAf,EAAQ,MAAM,mBAAmBgB,CAAa,EAAE,EACzCA,CACT,CACA,MAAM,IAAI,MAAM,4BAA4BD,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CACpF,CCbO,SAASE,EAAoBC,EAAgBF,EAAe,CACjE,MAAO,GAAGE,CAAc,+BAA+BF,CAAa,6BACtE","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 { createFetchHeaderMutator } from \"@osdk/api/utils\";\nimport { consola } from \"consola\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createDebugLoggingFetch(fetchFn), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", \"\");\n return headers;\n });\n}\nfunction createDebugLoggingFetch(fetchFn = fetch) {\n return function debugLoggingFetch(input, init) {\n if (typeof input === \"string\" || input instanceof URL) {\n consola.debug(`${init?.method ?? \"GET\"}: ${input.toString().trim()}`);\n } else {\n consola.debug(`${input.method ?? \"GET\"}: ${input.url.toString().trim()}`);\n }\n return fetchFn(input, init).then(a => {\n consola.debug(\"Finished fetch\");\n return a;\n });\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { createFetch } from \"./createFetch.mjs\";\nexport async function fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid) {\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const url = `\n ${baseUrl}/third-party-application-service/api/application-websites/${thirdPartyAppRid}`;\n const result = await fetch(url);\n if (result.status >= 200 && result.status < 300) {\n const repositoryRid = await result.json();\n consola.debug(`Repository RID: ${repositoryRid}`);\n return repositoryRid;\n }\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}"]}
|
package/build/js/index.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-MGT3UGXW.mjs';
|
|
2
|
-
import c from 'yargs';
|
|
3
|
-
import { hideBin } from 'yargs/helpers';
|
|
4
|
-
|
|
5
|
-
var d={command:"upload",describe:"Upload an application version",builder:o=>o.option("siteVersion",{type:"string",demandOption:!0}).option("dir",{type:"string"}),handler:async o=>{await(await import('./siteUploadCommand-L3QDNVWX.mjs')).default(o);}},i=d;var s={command:"versions",describe:"List application versions",builder:o=>o,handler:async o=>{await(await import('./siteVersionsCommand-BQMPCMGZ.mjs')).default(o);}},m=s;function a(o){return o.command("site","Manage your site",t=>{let r=t.options({appRid:{type:"string",demandOption:!0,coerce:n=>n},baseUrl:{type:"string",demandOption:!0}}).demandCommand();return r.command(m),r.command(i),r},t=>{})}async function u(o=process.argv){let t=c(hideBin(o)).env("OSDK"),r=await import('consola');a(t),t.demandCommand().strict();try{return t.parseAsync()}catch(n){n instanceof a$1&&r.consola.error(n.message);}}
|
|
6
|
-
|
|
7
|
-
export { u as cli };
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=index.mjs.map
|
package/build/js/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts","../../src/commands/site/upload/index.ts","../../src/commands/site/versions/index.ts","../../src/commands/site/addSiteCommand.ts"],"names":["yargs","hideBin","command","argv","args","upload_default","versions_default","addSiteCommand","originalYargs","a","cli","base","Consola","e","ExitProcessError"],"mappings":"yCAgBA,OAAOA,MAAW,QAClB,OAAS,WAAAC,MAAe,gBCDjB,IAAMC,EAAU,CACrB,QAAS,SACT,SAAU,gCACV,QAASC,GACAA,EAAK,OAAO,cAAe,CAChC,KAAM,SACN,aAAc,EAChB,CAAC,EAAE,OAAO,MAAO,CACf,KAAM,QACR,CAAC,EAEH,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,kCAAyB,GACxC,QAAQA,CAAI,CAC5B,CACF,EACOC,EAAQH,EChBR,IAAMA,EAAU,CACrB,QAAS,WACT,SAAU,4BACV,QAASC,GACAA,EAET,QAAS,MAAMC,GAAQ,CAErB,MADgB,KAAM,QAAO,oCAA2B,GAC1C,QAAQA,CAAI,CAC5B,CACF,EACOE,EAAQJ,ECTA,SAARK,EAAgCP,EAAO,CAC5C,OAAOA,EAAM,QAAQ,OAAQ,mBAAoBQ,GAAiB,CAChE,IAAMR,EAAQQ,EAAc,QAAQ,CAClC,OAAQ,CACN,KAAM,SACN,aAAc,GACd,OAAQC,GAAKA,CACf,EACA,QAAS,CACP,KAAM,SACN,aAAc,EAChB,CACF,CAAC,EAAE,cAAc,EACjB,OAAAT,EAAM,QAAQM,CAAQ,EACtBN,EAAM,QAAQK,CAAM,EACbL,CACT,EAAGI,GAAQ,CAAC,CAAC,CACf,CHfA,eAAsBM,EAAIN,EAAO,QAAQ,KAAM,CAC7C,IAAMO,EAAOX,EAAMC,EAAQG,CAAI,CAAC,EAAE,IAAI,MAAM,EACtCQ,EAAU,KAAM,QAAO,SAAS,EAGtCL,EAAeI,CAAI,EACnBA,EAAK,cAAc,EAAE,OAAO,EAC5B,GAAI,CACF,OAAOA,EAAK,WAAW,CACzB,OAASE,EAAG,CACNA,aAAaC,GACfF,EAAQ,QAAQ,MAAMC,EAAE,OAAO,CAEnC,CACF","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport addSiteCommand from \"./commands/site/addSiteCommand\";\nimport { ExitProcessError } from \"./ExitProcessError.js\";\nexport async function cli(args = process.argv) {\n const base = yargs(hideBin(args)).env(\"OSDK\");\n const Consola = await import(\"consola\");\n // Consola.default.level = Consola.LogLevels.debug;\n\n addSiteCommand(base);\n base.demandCommand().strict();\n try {\n return base.parseAsync();\n } catch (e) {\n if (e instanceof ExitProcessError) {\n Consola.consola.error(e.message);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"upload\",\n describe: \"Upload an application version\",\n builder: argv => {\n return argv.option(\"siteVersion\", {\n type: \"string\",\n demandOption: true\n }).option(\"dir\", {\n type: \"string\"\n });\n },\n handler: async args => {\n const command = await import(\"./siteUploadCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"versions\",\n describe: \"List application versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./siteVersionsCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport upload from \"./upload\";\nimport versions from \"./versions\";\nexport default function addSiteCommand(yargs) {\n return yargs.command(\"site\", \"Manage your site\", originalYargs => {\n const yargs = originalYargs.options({\n appRid: {\n type: \"string\",\n demandOption: true,\n coerce: a => a\n },\n baseUrl: {\n type: \"string\",\n demandOption: true\n }\n }).demandCommand();\n yargs.command(versions);\n yargs.command(upload);\n return yargs;\n }, args => {});\n}"]}
|