@osdk/cli 0.0.4 → 0.0.6
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 +14 -0
- package/build/js/{chunk-B2HWA3VZ.mjs → chunk-2LNCUMIA.cjs} +5 -2
- package/build/js/chunk-AFLYFRYO.cjs +16 -0
- package/build/js/chunk-AFLYFRYO.cjs.map +1 -0
- package/build/js/chunk-LBGQDFFN.js +1 -4
- 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 -31
- package/build/js/index.js.map +1 -1
- package/build/js/siteDeleteCommand-GQCHP3EN.js +9 -0
- package/build/js/siteDeleteCommand-ZXXHDOOM.cjs +11 -0
- package/build/js/{siteUploadCommand-F37O2BSG.mjs → siteUploadCommand-4ZL5TAIW.js} +4 -4
- package/build/js/{siteUploadCommand-SK4GDXFX.js → siteUploadCommand-5AYNOXAT.cjs} +4 -4
- 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/commands/site/delete/DeleteArgs.d.ts +1 -1
- package/build/types/commands/site/delete/index.d.ts +2 -2
- package/build/types/commands/site/deploy/SiteDeployArgs.d.ts +1 -1
- package/build/types/commands/site/deploy/handleSiteDeploy.d.mts +1 -1
- package/build/types/commands/site/deploy/index.d.ts +2 -2
- 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/siteVersionsCommand.d.mts +1 -1
- 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/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/index.d.mts +0 -1
- package/build/types/net/createConjureContext.d.mts +2 -0
- package/build/types/net/index.d.mts +2 -0
- package/build/types/yargs/logVersionMiddleware.d.ts +1 -1
- package/package.json +7 -2
- package/build/js/chunk-3T6ZEX2P.js +0 -12
- package/build/js/chunk-3T6ZEX2P.js.map +0 -1
- package/build/js/chunk-V7N7LKX3.mjs +0 -10
- package/build/js/chunk-V7N7LKX3.mjs.map +0 -1
- package/build/js/handleSiteDeploy-75PKAAEV.js +0 -11
- package/build/js/handleSiteDeploy-75PKAAEV.js.map +0 -1
- package/build/js/handleSiteDeploy-MCIRO5BB.mjs +0 -9
- package/build/js/handleSiteDeploy-MCIRO5BB.mjs.map +0 -1
- package/build/js/index.mjs +0 -10
- package/build/js/index.mjs.map +0 -1
- package/build/js/siteDeleteCommand-7QIAJLKJ.mjs +0 -9
- package/build/js/siteDeleteCommand-QIT2NBQ5.js +0 -11
- package/build/js/siteVersionsCommand-K6M7GBIK.mjs +0 -10
- package/build/js/siteVersionsCommand-K6M7GBIK.mjs.map +0 -1
- package/build/js/siteVersionsCommand-LJJ3SJNM.js +0 -12
- package/build/js/siteVersionsCommand-LJJ3SJNM.js.map +0 -1
- package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/clearSiteVersion.d.mts +0 -2
- package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/deploySiteVersion.d.mts +0 -5
- package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/fetchDeployedVersion.d.mts +0 -3
- package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/getSitesAdminV2ServiceBaseUrl.d.mts +0 -1
- package/build/types/net/artifacts/conjure/ArtifactsSitesAdminV2Service/index.d.mts +0 -5
- package/build/types/net/artifacts/conjure/index.d.mts +0 -1
- /package/build/js/{chunk-B2HWA3VZ.mjs.map → chunk-2LNCUMIA.cjs.map} +0 -0
- /package/build/js/{siteDeleteCommand-QIT2NBQ5.js.map → siteDeleteCommand-GQCHP3EN.js.map} +0 -0
- /package/build/js/{siteDeleteCommand-7QIAJLKJ.mjs.map → siteDeleteCommand-ZXXHDOOM.cjs.map} +0 -0
- /package/build/js/{siteUploadCommand-SK4GDXFX.js.map → siteUploadCommand-4ZL5TAIW.js.map} +0 -0
- /package/build/js/{siteUploadCommand-F37O2BSG.mjs.map → siteUploadCommand-5AYNOXAT.cjs.map} +0 -0
- /package/build/types/{net/artifacts/conjure/ArtifactsSitesAdminV2Service/SiteVersion.d.mts → generated/artifacts-sites/SiteVersion.d.ts} +0 -0
|
@@ -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}"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonSiteArgs } from "../CommonSiteArgs";
|
|
3
|
-
import type { DeleteArgs } from "./DeleteArgs";
|
|
2
|
+
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
3
|
+
import type { DeleteArgs } from "./DeleteArgs.js";
|
|
4
4
|
export declare const command: CommandModule<CommonSiteArgs, DeleteArgs>;
|
|
5
5
|
export default command;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SiteDeployArgs } from "./SiteDeployArgs.js";
|
|
2
|
-
export default function handleSiteDeploy(
|
|
2
|
+
export default function handleSiteDeploy({ siteVersion: version, appRid, baseUrl, clearVersion }: SiteDeployArgs): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonSiteArgs } from "../CommonSiteArgs";
|
|
3
|
-
import type { SiteDeployArgs } from "./SiteDeployArgs";
|
|
2
|
+
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
3
|
+
import type { SiteDeployArgs } from "./SiteDeployArgs.js";
|
|
4
4
|
export declare const command: CommandModule<CommonSiteArgs, SiteDeployArgs>;
|
|
5
5
|
export default command;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandModule } from "yargs";
|
|
2
|
-
import type { CommonSiteArgs } from "../CommonSiteArgs";
|
|
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,2 +1,2 @@
|
|
|
1
1
|
import type { CommonSiteArgs } from "../CommonSiteArgs.js";
|
|
2
|
-
export default function siteVersionsCommand(
|
|
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,2 +1,4 @@
|
|
|
1
|
+
export { ArtifactsSitesAdminV2Service } from "../generated/artifacts-sites/index.js";
|
|
1
2
|
export * as artifacts from "./artifacts/index.mjs";
|
|
3
|
+
export { createConjureContext } from "./createConjureContext.mjs";
|
|
2
4
|
export * as thirdPartyApplicationService from "./third-party-application-service/index.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CliCommonArgs } from "../CliCommonArgs";
|
|
1
|
+
import type { CliCommonArgs } from "../CliCommonArgs.js";
|
|
2
2
|
export declare function logVersionMiddleware(args: CliCommonArgs): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,10 +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",
|
|
22
23
|
"find-up": "^6.3.0",
|
|
23
24
|
"yargs": "^17.7.2",
|
|
24
|
-
"@osdk/api": "0.0.
|
|
25
|
+
"@osdk/api": "0.0.10"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@types/archiver": "^6.0.0",
|
|
@@ -35,6 +36,9 @@
|
|
|
35
36
|
"publishConfig": {
|
|
36
37
|
"access": "public"
|
|
37
38
|
},
|
|
39
|
+
"imports": {
|
|
40
|
+
"#net": "./src/net/index.mts"
|
|
41
|
+
},
|
|
38
42
|
"keywords": [],
|
|
39
43
|
"bin": {
|
|
40
44
|
"osdk": "./build/js/cli.js"
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
"CHANGELOG.md",
|
|
46
50
|
"package.json"
|
|
47
51
|
],
|
|
52
|
+
"type": "module",
|
|
48
53
|
"scripts": {
|
|
49
54
|
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
|
|
50
55
|
"dev:transpile": "tsup --watch",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkLBGQDFFN_js = require('./chunk-LBGQDFFN.js');
|
|
4
|
-
var utils = require('@osdk/api/utils');
|
|
5
|
-
var consola = require('consola');
|
|
6
|
-
|
|
7
|
-
var U={};chunkLBGQDFFN_js.a(U,{SiteAssetArtifactsService:()=>y,conjure:()=>x});var x={};chunkLBGQDFFN_js.a(x,{ArtifactsSitesAdminV2Service:()=>l});var l={};chunkLBGQDFFN_js.a(l,{clearSiteVersion:()=>S,deploySiteVersion:()=>$,fetchDeployedVersion:()=>w});function c(t,s=fetch){return utils.createFetchHeaderMutator(_(s),async e=>{let o=await t();return e.set("Authorization",`Bearer ${o}`),e.set("Fetch-User-Agent",""),e})}function _(t=fetch){return function(e,o){return typeof e=="string"||e instanceof URL?consola.consola.debug(`${o?.method??"GET"}: ${e.toString().trim()}`):consola.consola.debug(`${e.method??"GET"}: ${e.url.toString().trim()}`),t(e,o).then(i=>(consola.consola.debug("Finished fetch"),i))}}async function a(t,s){let e=c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),o=`
|
|
8
|
-
${t}/third-party-application-service/api/application-websites/${s}`,i=await e(o);if(i.status>=200&&i.status<300){let r=await i.json();return consola.consola.debug(`Repository RID: ${r}`),r}throw new Error(`Unexpected response code ${i.status} (${i.statusText})`)}function m(t){return `${t}/artifacts/api/sites/v2/admin`}async function S(t,s){let e=await a(t,s),o=`${m(t)}/repository/${e}/deployed-version`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o,{method:"DELETE"});if(r.status>=200&&r.status<300)return !0;throw r.status===400?new Error("Invalid version"):new Error(`Unexpected response code ${r.status} (${r.statusText})`)}async function $(t,s,e){let o=await a(t,s),i=`${m(t)}/repository/${o}/deployed-version`,n=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"PUT",body:JSON.stringify({siteVersion:{version:e}}),headers:{"Content-Type":"application/json"}});if(n.status>=200&&n.status<300)return !0;throw n.status===400?new Error("Invalid version"):new Error(`Unexpected response code ${n.status} (${n.statusText})`)}function F(t){return `${t}/artifacts/api/sites/v2/admin`}async function w(t,s){let e=await a(t,s),o=`${F(t)}/repository/${e}/deployed-version`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o,{method:"GET"});if(r.status!==204){if(r.status>=200&&r.status<300)return await r.json();throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}}var y={};chunkLBGQDFFN_js.a(y,{deleteSiteVersion:()=>R,fetchSiteVersions:()=>v,uploadZippedSiteAsset:()=>E});function f(t,s){return `${t}/artifacts/api/repositories/${s}/contents/release/siteasset`}async function R(t,s,e){let o=await a(t,s),i=`${f(t,o)}/versions/${e}`,n=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"DELETE"});if(n.status>=200&&n.status<300)return consola.consola.level=consola.LogLevels.debug,consola.consola.debug(`${n.status} - Status Text: '${n.statusText}'`),!0;throw new chunkLBGQDFFN_js.b(n.status,`Unexpected response code ${n.status} (${n.statusText})`)}async function v(t,s){let e=await a(t,s),o=`${f(t,e)}/versions`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o);if(r.status===200)return (await r.json()).versions;throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}async function E(t,s,e,o){let i=await a(t,s),r=`${f(t,i)}/versions/zip/${e}`,p=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(r,{method:"PUT",body:o,headers:{"Content-Type":"application/octet-stream"},duplex:"half"});if(p.status>=200&&p.status<300)return consola.consola.level=consola.LogLevels.debug,consola.consola.debug("Status Text: "+p.statusText),!0;throw p.status===409?new chunkLBGQDFFN_js.b(p.status,"Version already exists"):new chunkLBGQDFFN_js.b(p.status,`Unexpected response code ${p.status} (${p.statusText})`)}
|
|
9
|
-
|
|
10
|
-
exports.a = U;
|
|
11
|
-
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=chunk-3T6ZEX2P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/artifacts/index.mts","../../src/net/artifacts/conjure/index.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/index.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/getSitesAdminV2ServiceBaseUrl.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/clearSiteVersion.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/deploySiteVersion.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/fetchDeployedVersion.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts"],"names":["artifacts_exports","__export","SiteAssetArtifactsService_exports","conjure_exports","ArtifactsSitesAdminV2Service_exports","clearSiteVersion","deploySiteVersion","fetchDeployedVersion","createFetchHeaderMutator","consola","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","repositoryRid","getSitesAdminV2ServiceBaseUrl","version","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","LogLevels","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile"],"mappings":"+CAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,EAAA,YAAAC,ICAA,IAAAA,EAAA,GAAAF,EAAAE,EAAA,kCAAAC,ICAA,IAAAA,EAAA,GAAAH,EAAAG,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,yBAAAC,ICgBA,OAAS,4BAAAC,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,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EAAO,OAAQ,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEhH","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 * as conjure from \"./conjure/index.mjs\";\nexport * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as ArtifactsSitesAdminV2Service from \"./ArtifactsSitesAdminV2Service/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearSiteVersion } from \"./clearSiteVersion.mjs\";\nexport { deploySiteVersion } from \"./deploySiteVersion.mjs\";\nexport { fetchDeployedVersion } from \"./fetchDeployedVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { 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 getSitesAdminV2ServiceBaseUrl(baseUrl) {\n return `${baseUrl}/artifacts/api/sites/v2/admin`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSitesAdminV2ServiceBaseUrl } from \"./getSitesAdminV2ServiceBaseUrl.mjs\";\n\n// This is from conjure but the others are not. Interestingly\nexport async function clearSiteVersion(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n return true;\n } else if (result.status === 400) {\n throw new Error(\"Invalid version\");\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSitesAdminV2ServiceBaseUrl } from \"./getSitesAdminV2ServiceBaseUrl.mjs\";\n// This is from conjure but the others are not. Interestingly\nexport async function deploySiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: JSON.stringify({\n siteVersion: {\n version\n }\n }),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n if (result.status >= 200 && result.status < 300) {\n return true;\n } else if (result.status === 400) {\n throw new Error(\"Invalid version\");\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nfunction getSitesAdminV2ServiceBaseUrl(baseUrl) {\n return `${baseUrl}/artifacts/api/sites/v2/admin`;\n}\n\n// This is from conjure but the others are not. Interestingly\nexport async function fetchDeployedVersion(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"GET\"\n });\n if (result.status === 204) {\n return undefined;\n } else if (result.status >= 200 && result.status < 300) {\n return await result.json();\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { a as a$1, b } from './chunk-B2HWA3VZ.mjs';
|
|
2
|
-
import { createFetchHeaderMutator } from '@osdk/api/utils';
|
|
3
|
-
import { consola, LogLevels } from 'consola';
|
|
4
|
-
|
|
5
|
-
var U={};a$1(U,{SiteAssetArtifactsService:()=>y,conjure:()=>x});var x={};a$1(x,{ArtifactsSitesAdminV2Service:()=>l});var l={};a$1(l,{clearSiteVersion:()=>S,deploySiteVersion:()=>$,fetchDeployedVersion:()=>w});function c(t,s=fetch){return createFetchHeaderMutator(_(s),async e=>{let o=await t();return e.set("Authorization",`Bearer ${o}`),e.set("Fetch-User-Agent",""),e})}function _(t=fetch){return function(e,o){return typeof e=="string"||e instanceof URL?consola.debug(`${o?.method??"GET"}: ${e.toString().trim()}`):consola.debug(`${e.method??"GET"}: ${e.url.toString().trim()}`),t(e,o).then(i=>(consola.debug("Finished fetch"),i))}}async function a(t,s){let e=c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN),o=`
|
|
6
|
-
${t}/third-party-application-service/api/application-websites/${s}`,i=await e(o);if(i.status>=200&&i.status<300){let r=await i.json();return consola.debug(`Repository RID: ${r}`),r}throw new Error(`Unexpected response code ${i.status} (${i.statusText})`)}function m(t){return `${t}/artifacts/api/sites/v2/admin`}async function S(t,s){let e=await a(t,s),o=`${m(t)}/repository/${e}/deployed-version`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o,{method:"DELETE"});if(r.status>=200&&r.status<300)return !0;throw r.status===400?new Error("Invalid version"):new Error(`Unexpected response code ${r.status} (${r.statusText})`)}async function $(t,s,e){let o=await a(t,s),i=`${m(t)}/repository/${o}/deployed-version`,n=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"PUT",body:JSON.stringify({siteVersion:{version:e}}),headers:{"Content-Type":"application/json"}});if(n.status>=200&&n.status<300)return !0;throw n.status===400?new Error("Invalid version"):new Error(`Unexpected response code ${n.status} (${n.statusText})`)}function F(t){return `${t}/artifacts/api/sites/v2/admin`}async function w(t,s){let e=await a(t,s),o=`${F(t)}/repository/${e}/deployed-version`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o,{method:"GET"});if(r.status!==204){if(r.status>=200&&r.status<300)return await r.json();throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}}var y={};a$1(y,{deleteSiteVersion:()=>R,fetchSiteVersions:()=>v,uploadZippedSiteAsset:()=>E});function f(t,s){return `${t}/artifacts/api/repositories/${s}/contents/release/siteasset`}async function R(t,s,e){let o=await a(t,s),i=`${f(t,o)}/versions/${e}`,n=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(i,{method:"DELETE"});if(n.status>=200&&n.status<300)return consola.level=LogLevels.debug,consola.debug(`${n.status} - Status Text: '${n.statusText}'`),!0;throw new b(n.status,`Unexpected response code ${n.status} (${n.statusText})`)}async function v(t,s){let e=await a(t,s),o=`${f(t,e)}/versions`,r=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(o);if(r.status===200)return (await r.json()).versions;throw new Error(`Unexpected response code ${r.status} (${r.statusText})`)}async function E(t,s,e,o){let i=await a(t,s),r=`${f(t,i)}/versions/zip/${e}`,p=await c(()=>process.env.FOUNDRY_SDK_AUTH_TOKEN)(r,{method:"PUT",body:o,headers:{"Content-Type":"application/octet-stream"},duplex:"half"});if(p.status>=200&&p.status<300)return consola.level=LogLevels.debug,consola.debug("Status Text: "+p.statusText),!0;throw p.status===409?new b(p.status,"Version already exists"):new b(p.status,`Unexpected response code ${p.status} (${p.statusText})`)}
|
|
7
|
-
|
|
8
|
-
export { U as a };
|
|
9
|
-
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=chunk-V7N7LKX3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/net/artifacts/index.mts","../../src/net/artifacts/conjure/index.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/index.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/getSitesAdminV2ServiceBaseUrl.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/clearSiteVersion.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/deploySiteVersion.mts","../../src/net/artifacts/conjure/ArtifactsSitesAdminV2Service/fetchDeployedVersion.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts"],"names":["artifacts_exports","__export","SiteAssetArtifactsService_exports","conjure_exports","ArtifactsSitesAdminV2Service_exports","clearSiteVersion","deploySiteVersion","fetchDeployedVersion","createFetchHeaderMutator","consola","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","repositoryRid","getSitesAdminV2ServiceBaseUrl","version","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","LogLevels","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile"],"mappings":"gDAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,EAAA,YAAAC,ICAA,IAAAA,EAAA,GAAAF,EAAAE,EAAA,kCAAAC,ICAA,IAAAA,EAAA,GAAAH,EAAAG,EAAA,sBAAAC,EAAA,sBAAAC,EAAA,yBAAAC,ICgBA,OAAS,4BAAAC,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,E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jE,IAAMI,EAAgB,MAAMN,EAA0BC,EAASC,CAAgB,EACzEE,EAAM,GAAGS,EAAoBZ,EAASK,CAAa,CAAC,YAEpDD,EAAS,MADDd,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EACvCa,CAAG,EAC9B,GAAIC,EAAO,SAAW,IAEpB,OADiB,MAAMA,EAAO,KAAK,GACnB,SAEhB,MAAM,IAAI,MAAM,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEtF,CCdA,OAAS,WAAAf,EAAS,aAAAsB,MAAiB,UAKnC,eAAsBD,EAAsBV,EAASC,EAAkBM,EAASQ,EAAS,CACvF,IAAMV,EAAgB,MAAMN,EAA0BC,EAASC,CAAgB,EACzEE,EAAM,GAAGS,EAAoBZ,EAASK,CAAa,CAAC,iBAAiBE,CAAO,GAE5EH,EAAS,MADDd,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EACvCa,EAAK,CAC9B,OAAQ,MACR,KAAMY,EACN,QAAS,CACP,eAAgB,0BAClB,EACA,OAAQ,MACV,CAAC,EAED,GAAIX,EAAO,QAAU,KAAOA,EAAO,OAAS,IAC1C,OAAAf,EAAQ,MAAQsB,EAAU,MAC1BtB,EAAQ,MAAM,gBAAkBe,EAAO,UAAU,EAC1C,GACF,MAAIA,EAAO,SAAW,IACrB,IAAIU,EAAiBV,EAAO,OAAQ,wBAAwB,EAE5D,IAAIU,EAAiBV,EAAO,OAAQ,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEhH","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 * as conjure from \"./conjure/index.mjs\";\nexport * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as ArtifactsSitesAdminV2Service from \"./ArtifactsSitesAdminV2Service/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearSiteVersion } from \"./clearSiteVersion.mjs\";\nexport { deploySiteVersion } from \"./deploySiteVersion.mjs\";\nexport { fetchDeployedVersion } from \"./fetchDeployedVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { 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 getSitesAdminV2ServiceBaseUrl(baseUrl) {\n return `${baseUrl}/artifacts/api/sites/v2/admin`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSitesAdminV2ServiceBaseUrl } from \"./getSitesAdminV2ServiceBaseUrl.mjs\";\n\n// This is from conjure but the others are not. Interestingly\nexport async function clearSiteVersion(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n return true;\n } else if (result.status === 400) {\n throw new Error(\"Invalid version\");\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSitesAdminV2ServiceBaseUrl } from \"./getSitesAdminV2ServiceBaseUrl.mjs\";\n// This is from conjure but the others are not. Interestingly\nexport async function deploySiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: JSON.stringify({\n siteVersion: {\n version\n }\n }),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n if (result.status >= 200 && result.status < 300) {\n return true;\n } else if (result.status === 400) {\n throw new Error(\"Invalid version\");\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nfunction getSitesAdminV2ServiceBaseUrl(baseUrl) {\n return `${baseUrl}/artifacts/api/sites/v2/admin`;\n}\n\n// This is from conjure but the others are not. Interestingly\nexport async function fetchDeployedVersion(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSitesAdminV2ServiceBaseUrl(baseUrl)}/repository/${repositoryRid}/deployed-version`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"GET\"\n });\n if (result.status === 204) {\n return undefined;\n } else if (result.status >= 200 && result.status < 300) {\n return await result.json();\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getSiteAssetBaseUrl(foundryBaseUrl, repositoryRid) {\n return `${foundryBaseUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset`;\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk3T6ZEX2P_js = require('./chunk-3T6ZEX2P.js');
|
|
4
|
-
require('./chunk-LBGQDFFN.js');
|
|
5
|
-
var consola = require('consola');
|
|
6
|
-
|
|
7
|
-
async function o(e){e.siteVersion?await chunk3T6ZEX2P_js.a.conjure.ArtifactsSitesAdminV2Service.deploySiteVersion(e.baseUrl,e.appRid,e.siteVersion):e.clearVersion&&await chunk3T6ZEX2P_js.a.conjure.ArtifactsSitesAdminV2Service.clearSiteVersion(e.baseUrl,e.appRid),consola.consola.success("Deploy successful");}
|
|
8
|
-
|
|
9
|
-
module.exports = o;
|
|
10
|
-
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=handleSiteDeploy-75PKAAEV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":["consola","handleSiteDeploy","args","artifacts_exports"],"mappings":"oEAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAwCC,EAAM,CAC/CA,EAAK,YACP,MAAMC,EAAU,QAAQ,6BAA6B,kBAAkBD,EAAK,QAASA,EAAK,OAAQA,EAAK,WAAW,EACzGA,EAAK,cACd,MAAMC,EAAU,QAAQ,6BAA6B,iBAAiBD,EAAK,QAASA,EAAK,MAAM,EAEjGF,EAAQ,QAAQ,mBAAmB,CACrC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function handleSiteDeploy(args) {\n if (args.siteVersion) {\n await artifacts.conjure.ArtifactsSitesAdminV2Service.deploySiteVersion(args.baseUrl, args.appRid, args.siteVersion);\n } else if (args.clearVersion) {\n await artifacts.conjure.ArtifactsSitesAdminV2Service.clearSiteVersion(args.baseUrl, args.appRid);\n }\n consola.success(\"Deploy successful\");\n}"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-V7N7LKX3.mjs';
|
|
2
|
-
import './chunk-B2HWA3VZ.mjs';
|
|
3
|
-
import { consola } from 'consola';
|
|
4
|
-
|
|
5
|
-
async function o(e){e.siteVersion?await a.conjure.ArtifactsSitesAdminV2Service.deploySiteVersion(e.baseUrl,e.appRid,e.siteVersion):e.clearVersion&&await a.conjure.ArtifactsSitesAdminV2Service.clearSiteVersion(e.baseUrl,e.appRid),consola.success("Deploy successful");}
|
|
6
|
-
|
|
7
|
-
export { o as default };
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=handleSiteDeploy-MCIRO5BB.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/deploy/handleSiteDeploy.mts"],"names":["consola","handleSiteDeploy","args","artifacts_exports"],"mappings":"sEAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAwCC,EAAM,CAC/CA,EAAK,YACP,MAAMC,EAAU,QAAQ,6BAA6B,kBAAkBD,EAAK,QAASA,EAAK,OAAQA,EAAK,WAAW,EACzGA,EAAK,cACd,MAAMC,EAAU,QAAQ,6BAA6B,iBAAiBD,EAAK,QAASA,EAAK,MAAM,EAEjGF,EAAQ,QAAQ,mBAAmB,CACrC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function handleSiteDeploy(args) {\n if (args.siteVersion) {\n await artifacts.conjure.ArtifactsSitesAdminV2Service.deploySiteVersion(args.baseUrl, args.appRid, args.siteVersion);\n } else if (args.clearVersion) {\n await artifacts.conjure.ArtifactsSitesAdminV2Service.clearSiteVersion(args.baseUrl, args.appRid);\n }\n consola.success(\"Deploy successful\");\n}"]}
|