@osdk/cli 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/bin/osdk.mjs +1 -1
- package/build/js/{chunk-2DJZUIFP.js → chunk-MGT3UGXW.mjs} +1 -1
- package/build/js/{chunk-FE6HR4TN.js → chunk-TSZWWATC.mjs} +4 -4
- package/build/js/chunk-TSZWWATC.mjs.map +1 -0
- package/build/js/{chunk-KSJ4QHUS.cjs → chunk-UOKM237I.cjs} +3 -3
- package/build/js/chunk-UOKM237I.cjs.map +1 -0
- package/build/js/{chunk-4D6JZ4TL.js → chunk-XIJ2ZQRX.mjs} +1 -1
- package/build/js/handleGenerate-XM72AL6J.cjs +32 -0
- package/build/js/handleGenerate-XM72AL6J.cjs.map +1 -0
- package/build/js/handleGenerate-ZHO53G62.mjs +10 -0
- package/build/js/handleGenerate-ZHO53G62.mjs.map +1 -0
- package/build/js/handleSiteDeploy-257ZNTYA.cjs +12 -0
- package/build/js/{handleSiteDeploy-YNRVWKWR.js → handleSiteDeploy-QCMJWAYI.mjs} +4 -4
- package/build/js/{handleSiteDeploy-YNRVWKWR.js.map → handleSiteDeploy-QCMJWAYI.mjs.map} +1 -1
- package/build/js/index.cjs +2 -2
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +11 -0
- package/build/js/index.mjs.map +1 -0
- package/build/js/{siteDeleteCommand-XZF4TDGA.cjs → siteDeleteCommand-NY5W7NE3.cjs} +3 -3
- package/build/js/{siteDeleteCommand-PN2LUAZA.js → siteDeleteCommand-ZKHKGVVF.mjs} +4 -4
- package/build/js/{siteDeleteCommand-PN2LUAZA.js.map → siteDeleteCommand-ZKHKGVVF.mjs.map} +1 -1
- package/build/js/{siteUploadCommand-LF4U2XI6.cjs → siteUploadCommand-OHSOCUL6.cjs} +3 -3
- package/build/js/{siteUploadCommand-MCV3ZQAW.js → siteUploadCommand-PZEJVKRE.mjs} +4 -4
- package/build/js/{siteUploadCommand-MCV3ZQAW.js.map → siteUploadCommand-PZEJVKRE.mjs.map} +1 -1
- package/build/js/{siteVersionsCommand-N33FEMLE.cjs → siteVersionsCommand-IE5QH56U.cjs} +3 -3
- package/build/js/{siteVersionsCommand-ZAZVGVKV.js → siteVersionsCommand-NVJD5BDH.mjs} +4 -4
- package/build/js/{siteVersionsCommand-ZAZVGVKV.js.map → siteVersionsCommand-NVJD5BDH.mjs.map} +1 -1
- package/build/types/commands/typescript/generate/TypescriptGenerateArgs.d.ts +2 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/clearDeletedUserRepositories.d.ts +4 -0
- package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts +3 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts +6 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.d.ts +6 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.d.ts +7 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.d.ts +8 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts +8 -0
- package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.d.ts +5 -0
- package/build/types/generated/artifacts-sites/ContentSecurityPolicyAdditions.d.ts +1 -1
- package/build/types/generated/artifacts-sites/ControlPanelManagedDomainInfo.d.ts +6 -0
- package/build/types/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.d.ts +3 -0
- package/package.json +7 -6
- package/build/js/chunk-FE6HR4TN.js.map +0 -1
- package/build/js/chunk-KSJ4QHUS.cjs.map +0 -1
- package/build/js/handleGenerate-BUJOID4C.js +0 -10
- package/build/js/handleGenerate-BUJOID4C.js.map +0 -1
- package/build/js/handleGenerate-SY3UD5UA.cjs +0 -32
- package/build/js/handleGenerate-SY3UD5UA.cjs.map +0 -1
- package/build/js/handleSiteDeploy-F77NQQTE.cjs +0 -12
- package/build/js/index.js +0 -11
- package/build/js/index.js.map +0 -1
- package/build/types/generated/object-set-watcher/AllPropertiesPropertySet.d.ts +0 -2
- package/build/types/generated/object-set-watcher/Arg.d.ts +0 -4
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeRequests.d.ts +0 -4
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeResponse.d.ts +0 -1
- package/build/types/generated/object-set-watcher/AuditedObjectSetSubscribeResponses.d.ts +0 -4
- package/build/types/generated/object-set-watcher/BaseVersion.d.ts +0 -1
- package/build/types/generated/object-set-watcher/BatchEnableWatcherRequest.d.ts +0 -4
- package/build/types/generated/object-set-watcher/Error.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ErrorName.d.ts +0 -1
- package/build/types/generated/object-set-watcher/FilterValue.d.ts +0 -1
- package/build/types/generated/object-set-watcher/Message.d.ts +0 -11
- package/build/types/generated/object-set-watcher/ObjectSetChanged.d.ts +0 -5
- package/build/types/generated/object-set-watcher/ObjectSetContext.d.ts +0 -4
- package/build/types/generated/object-set-watcher/ObjectSetFilterContext.d.ts +0 -5
- package/build/types/generated/object-set-watcher/ObjectSetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/ObjectSetStreamSubscribeRequest.d.ts +0 -8
- package/build/types/generated/object-set-watcher/ObjectSetStreamSubscribeRequests.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeRequest.d.ts +0 -7
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeRequests.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeResponse.d.ts +0 -16
- package/build/types/generated/object-set-watcher/ObjectSetSubscribeResponses.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetUpdates.d.ts +0 -6
- package/build/types/generated/object-set-watcher/ObjectSetWatchService/batchEnableWatcher.d.ts +0 -3
- package/build/types/generated/object-set-watcher/ObjectSetWatchService.d.ts +0 -1
- package/build/types/generated/object-set-watcher/ObjectTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PatchOffset.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertyId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertySelection.d.ts +0 -6
- package/build/types/generated/object-set-watcher/PropertySet.d.ts +0 -11
- package/build/types/generated/object-set-watcher/PropertyTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/PropertyTypeRidPropertySelection.d.ts +0 -4
- package/build/types/generated/object-set-watcher/QosError.d.ts +0 -2
- package/build/types/generated/object-set-watcher/RefreshObjectSet.d.ts +0 -4
- package/build/types/generated/object-set-watcher/RequestId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/SelectedPropertiesPropertySet.d.ts +0 -4
- package/build/types/generated/object-set-watcher/StreamMessage.d.ts +0 -16
- package/build/types/generated/object-set-watcher/SubscriptionError.d.ts +0 -4
- package/build/types/generated/object-set-watcher/SubscriptionId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/SubscriptionSuccess.d.ts +0 -4
- package/build/types/generated/object-set-watcher/UnresolvedFilterParameterId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/index.d.ts +0 -41
- package/build/types/generated/object-set-watcher/object/DatasourceRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/FoundryObject.d.ts +0 -14
- package/build/types/generated/object-set-watcher/object/ObjectKey.d.ts +0 -3
- package/build/types/generated/object-set-watcher/object/ObjectTypeRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/ObjectVersion.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/PropertyRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/object/PropertyValue.d.ts +0 -2
- package/build/types/generated/object-set-watcher/object/index.d.ts +0 -7
- package/build/types/generated/object-set-watcher/types/Attachment.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Byte.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/CatalogFileReference.d.ts +0 -7
- package/build/types/generated/object-set-watcher/types/Ciphertext.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/DatasetFileReference.d.ts +0 -5
- package/build/types/generated/object-set-watcher/types/DatasetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Date.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Decimal.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/DecimalType.d.ts +0 -4
- package/build/types/generated/object-set-watcher/types/Float.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Geohash.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Geoshape.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesId.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesIntegrationRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/GeotimeSeriesReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/Long.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Marking.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MarkingType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaItemReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/MediaItemRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaReference.d.ts +0 -6
- package/build/types/generated/object-set-watcher/types/MediaSetRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaSetViewRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/MediaValueReference.d.ts +0 -16
- package/build/types/generated/object-set-watcher/types/MediaViewItemReference.d.ts +0 -8
- package/build/types/generated/object-set-watcher/types/MimeType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Null.d.ts +0 -2
- package/build/types/generated/object-set-watcher/types/PrimitiveType.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Short.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Timestamp.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/TransactionRid.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/Value.d.ts +0 -105
- package/build/types/generated/object-set-watcher/types/ValueType.d.ts +0 -25
- package/build/types/generated/object-set-watcher/types/Vector.d.ts +0 -1
- package/build/types/generated/object-set-watcher/types/VectorType.d.ts +0 -3
- package/build/types/generated/object-set-watcher/types/index.d.ts +0 -35
- /package/build/js/{chunk-2DJZUIFP.js.map → chunk-MGT3UGXW.mjs.map} +0 -0
- /package/build/js/{chunk-4D6JZ4TL.js.map → chunk-XIJ2ZQRX.mjs.map} +0 -0
- /package/build/js/{handleSiteDeploy-F77NQQTE.cjs.map → handleSiteDeploy-257ZNTYA.cjs.map} +0 -0
- /package/build/js/{siteDeleteCommand-XZF4TDGA.cjs.map → siteDeleteCommand-NY5W7NE3.cjs.map} +0 -0
- /package/build/js/{siteUploadCommand-LF4U2XI6.cjs.map → siteUploadCommand-OHSOCUL6.cjs.map} +0 -0
- /package/build/js/{siteVersionsCommand-N33FEMLE.cjs.map → siteVersionsCommand-IE5QH56U.cjs.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUOKM237I_cjs = require('./chunk-UOKM237I.cjs');
|
|
4
4
|
require('./chunk-V4QJCMF6.cjs');
|
|
5
5
|
require('./chunk-X6QW63OH.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
|
|
8
|
-
async function i(e){await
|
|
8
|
+
async function i(e){await chunkUOKM237I_cjs.b.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.consola.success("Delete successful");}
|
|
9
9
|
|
|
10
10
|
module.exports = i;
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=siteDeleteCommand-
|
|
12
|
+
//# sourceMappingURL=siteDeleteCommand-NY5W7NE3.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { b } from './chunk-TSZWWATC.mjs';
|
|
2
|
+
import './chunk-MGT3UGXW.mjs';
|
|
3
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
|
|
6
6
|
async function i(e){await b.SiteAssetArtifactsService.deleteSiteVersion(e.baseUrl,e.appRid,e.siteVersion),consola.success("Delete successful");}
|
|
7
7
|
|
|
8
8
|
export { i as default };
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=siteDeleteCommand-
|
|
10
|
+
//# sourceMappingURL=siteDeleteCommand-ZKHKGVVF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":["consola","siteDeleteCommand","args","artifacts_exports"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/delete/siteDeleteCommand.mts"],"names":["consola","siteDeleteCommand","args","artifacts_exports"],"mappings":"mGAgBA,OAAS,WAAAA,MAAe,UAExB,eAAOC,EAAyCC,EAAM,CACpD,MAAMC,EAAU,0BAA0B,kBAAkBD,EAAK,QAASA,EAAK,OAAQA,EAAK,WAAW,EACvGF,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 siteDeleteCommand(args) {\n await artifacts.SiteAssetArtifactsService.deleteSiteVersion(args.baseUrl, args.appRid, args.siteVersion);\n consola.success(\"Delete successful\");\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUOKM237I_cjs = require('./chunk-UOKM237I.cjs');
|
|
4
4
|
var chunkV4QJCMF6_cjs = require('./chunk-V4QJCMF6.cjs');
|
|
5
5
|
require('./chunk-X6QW63OH.cjs');
|
|
6
6
|
var a = require('archiver');
|
|
@@ -31,8 +31,8 @@ function _interopNamespace(e) {
|
|
|
31
31
|
var a__default = /*#__PURE__*/_interopDefault(a);
|
|
32
32
|
var s__namespace = /*#__PURE__*/_interopNamespace(s);
|
|
33
33
|
|
|
34
|
-
async function c(i){if(i.dir==null)throw consola.consola.error("No directory specified"),new chunkV4QJCMF6_cjs.a(1);if(!(await s__namespace.promises.stat(i.dir)).isDirectory())throw consola.consola.error("Specified path is not a directory"),new chunkV4QJCMF6_cjs.a(2);consola.consola.start("Zippping site files");let e=a__default.default("zip").directory(i.dir,!1);await Promise.all([
|
|
34
|
+
async function c(i){if(i.dir==null)throw consola.consola.error("No directory specified"),new chunkV4QJCMF6_cjs.a(1);if(!(await s__namespace.promises.stat(i.dir)).isDirectory())throw consola.consola.error("Specified path is not a directory"),new chunkV4QJCMF6_cjs.a(2);consola.consola.start("Zippping site files");let e=a__default.default("zip").directory(i.dir,!1);await Promise.all([chunkUOKM237I_cjs.b.SiteAssetArtifactsService.uploadZippedSiteAsset(i.baseUrl,i.appRid,i.siteVersion,stream.Readable.toWeb(e)),e.finalize()]),consola.consola.success("Upload complete");}
|
|
35
35
|
|
|
36
36
|
module.exports = c;
|
|
37
37
|
//# sourceMappingURL=out.js.map
|
|
38
|
-
//# sourceMappingURL=siteUploadCommand-
|
|
38
|
+
//# sourceMappingURL=siteUploadCommand-OHSOCUL6.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b } from './chunk-
|
|
2
|
-
import { a } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { b } from './chunk-TSZWWATC.mjs';
|
|
2
|
+
import { a } from './chunk-MGT3UGXW.mjs';
|
|
3
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
4
4
|
import a$1 from 'archiver';
|
|
5
5
|
import { consola } from 'consola';
|
|
6
6
|
import * as s from 'fs';
|
|
@@ -10,4 +10,4 @@ async function c(i){if(i.dir==null)throw consola.error("No directory specified")
|
|
|
10
10
|
|
|
11
11
|
export { c as default };
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=siteUploadCommand-
|
|
13
|
+
//# sourceMappingURL=siteUploadCommand-PZEJVKRE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":["archiver","consola","fs","Readable","invokeSiteUpload","args","ExitProcessError","archive","artifacts_exports"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/upload/siteUploadCommand.mts"],"names":["archiver","consola","fs","Readable","invokeSiteUpload","args","ExitProcessError","archive","artifacts_exports"],"mappings":"+GAgBA,OAAOA,MAAc,WACrB,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,OAAS,YAAAC,MAAgB,SAGzB,eAAOC,EAAwCC,EAAM,CACnD,GAAIA,EAAK,KAAO,KACd,MAAAJ,EAAQ,MAAM,wBAAwB,EAChC,IAAIK,EAAiB,CAAC,EAG9B,GAAI,EADS,MAAS,WAAS,KAAKD,EAAK,GAAG,GAClC,YAAY,EACpB,MAAAJ,EAAQ,MAAM,mCAAmC,EAC3C,IAAIK,EAAiB,CAAC,EAE9BL,EAAQ,MAAM,qBAAqB,EACnC,IAAMM,EAAUP,EAAS,KAAK,EAAE,UAAUK,EAAK,IAAK,EAAK,EACzD,MAAM,QAAQ,IAAI,CAACG,EAAU,0BAA0B,sBAAsBH,EAAK,QAASA,EAAK,OAAQA,EAAK,YAAaF,EAAS,MAAMI,CAAO,CAChJ,EAAGA,EAAQ,SAAS,CAAC,CAAC,EACtBN,EAAQ,QAAQ,iBAAiB,CACnC","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 archiver from \"archiver\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nimport { Readable } from \"node:stream\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { artifacts } from \"../../../net/index.mjs\";\nexport default async function invokeSiteUpload(args) {\n if (args.dir == null) {\n consola.error(\"No directory specified\");\n throw new ExitProcessError(1);\n }\n const stat = await fs.promises.stat(args.dir);\n if (!stat.isDirectory()) {\n consola.error(\"Specified path is not a directory\");\n throw new ExitProcessError(2);\n }\n consola.start(\"Zippping site files\");\n const archive = archiver(\"zip\").directory(args.dir, false);\n await Promise.all([artifacts.SiteAssetArtifactsService.uploadZippedSiteAsset(args.baseUrl, args.appRid, args.siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesnt align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n}"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUOKM237I_cjs = require('./chunk-UOKM237I.cjs');
|
|
4
4
|
require('./chunk-V4QJCMF6.cjs');
|
|
5
5
|
require('./chunk-X6QW63OH.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
var utils = require('consola/utils');
|
|
8
8
|
|
|
9
|
-
async function v({baseUrl:o,appRid:t}){consola.consola.start("Fetching versions & deployed version");let d=await
|
|
9
|
+
async function v({baseUrl:o,appRid:t}){consola.consola.start("Fetching versions & deployed version");let d=await chunkUOKM237I_cjs.d.fetchWebsiteRepositoryRid(o,t),l=chunkUOKM237I_cjs.c(o,"/artifacts/api"),[i,r]=await Promise.all([chunkUOKM237I_cjs.b.SiteAssetArtifactsService.fetchSiteVersions(o,t),chunkUOKM237I_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)"):""}`);}
|
|
10
10
|
|
|
11
11
|
module.exports = v;
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=siteVersionsCommand-
|
|
13
|
+
//# sourceMappingURL=siteVersionsCommand-IE5QH56U.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d, c, b, a } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { d, c, b, a } from './chunk-TSZWWATC.mjs';
|
|
2
|
+
import './chunk-MGT3UGXW.mjs';
|
|
3
|
+
import './chunk-XIJ2ZQRX.mjs';
|
|
4
4
|
import { consola } from 'consola';
|
|
5
5
|
import { colorize } from 'consola/utils';
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ async function v({baseUrl:o,appRid:t}){consola.start("Fetching versions & deploy
|
|
|
8
8
|
|
|
9
9
|
export { v as default };
|
|
10
10
|
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=siteVersionsCommand-
|
|
11
|
+
//# sourceMappingURL=siteVersionsCommand-NVJD5BDH.mjs.map
|
package/build/js/{siteVersionsCommand-ZAZVGVKV.js.map → siteVersionsCommand-NVJD5BDH.mjs.map}
RENAMED
|
@@ -1 +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":"
|
|
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":"wHAiBA,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,3 +1,7 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { ClearDeletedUserRepositoriesRequest } from "../ClearDeletedUserRepositoriesRequest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Kicks off a background task that will iterate over all Stemma repositories and delete all contents from
|
|
5
|
+
* user repositories that no longer exist in Stemma.
|
|
6
|
+
*/
|
|
3
7
|
export declare function clearDeletedUserRepositories(ctx: ConjureContext, request: ClearDeletedUserRepositoriesRequest): Promise<void>;
|
package/build/types/generated/artifacts-admin/ArtifactsAdminService/getContainerRegistryDomain.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { ContainerRegistryDomainResponse } from "../ContainerRegistryDomainResponse.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get the container registry domain, e.g, papaya-container-registry.palantircloud.com
|
|
5
|
+
*/
|
|
3
6
|
export declare function getContainerRegistryDomain(ctx: ConjureContext): Promise<ContainerRegistryDomainResponse>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
|
+
/**
|
|
3
|
+
* Clears the deployed version while leaving the associated domain, visiting the associated domain in this state
|
|
4
|
+
* will return an error.
|
|
5
|
+
*
|
|
6
|
+
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
+
*/
|
|
2
8
|
export declare function clearDeployedVersion(ctx: ConjureContext, repositoryRid: string): Promise<void>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get the CSP additions configured for a repository.
|
|
5
|
+
*
|
|
6
|
+
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
+
*/
|
|
3
8
|
export declare function getContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string): Promise<ContentSecurityPolicyAdditions>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { SiteVersion } from "../SiteVersion.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get the deployed version that will be served for a given siteasset repository.
|
|
5
|
+
*
|
|
6
|
+
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
+
*/
|
|
3
8
|
export declare function getDeployedVersion(ctx: ConjureContext, repositoryRid: string): Promise<SiteVersion | undefined>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get domains that have been successfully registered with the given repository. Visiting a successfully
|
|
5
|
+
* registered domain should serve the registered repository assets.
|
|
6
|
+
*
|
|
7
|
+
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
8
|
+
*/
|
|
3
9
|
export declare function getRegisteredSiteDomains(ctx: ConjureContext, repositoryRid: string): Promise<Array<SiteDomainInfo>>;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get domains that have been requested for a given repository. For control panel domains that require
|
|
5
|
+
* an approval, this will also include pending requests. Closed/rejected requests will only be included as long
|
|
6
|
+
* as their domain hasn't been re-requested for another repository.
|
|
7
|
+
*
|
|
8
|
+
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
9
|
+
*/
|
|
3
10
|
export declare function getRequestedSiteDomains(ctx: ConjureContext, repositoryRid: string): Promise<Array<SiteDomainInfo>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { ContentSecurityPolicyHeaderValue } from "../ContentSecurityPolicyHeaderValue.js";
|
|
3
3
|
import type { PreviewContentSecurityPolicyRequest } from "../PreviewContentSecurityPolicyRequest.js";
|
|
4
|
+
/**
|
|
5
|
+
* Preview what the CSP that will be served with the site looks like.
|
|
6
|
+
*
|
|
7
|
+
* artifacts:sites:read-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
8
|
+
*/
|
|
4
9
|
export declare function previewContentSecurityPolicy(ctx: ConjureContext, repositoryRid: string, request: PreviewContentSecurityPolicyRequest): Promise<ContentSecurityPolicyHeaderValue>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { ContentSecurityPolicyAdditions } from "../ContentSecurityPolicyAdditions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Set the CSP additions configured for a repository.
|
|
5
|
+
*
|
|
6
|
+
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
+
*/
|
|
3
8
|
export declare function putContentSecurityPolicyAdditions(ctx: ConjureContext, repositoryRid: string, contentSecurityPolicyAdditions: ContentSecurityPolicyAdditions): Promise<void>;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { SiteDomainInfo } from "../SiteDomainInfo.js";
|
|
3
3
|
import type { SubmitDomainRegistrationRequest } from "../SubmitDomainRegistrationRequest.js";
|
|
4
|
+
/**
|
|
5
|
+
* Requests the registration of a domain with the provided repository, this will result in an approvals task
|
|
6
|
+
* getting created for approval by an admin.
|
|
7
|
+
*
|
|
8
|
+
* Once the task has been approved, visiting the domain will serve the deployed version, if any is deployed.
|
|
9
|
+
*
|
|
10
|
+
* artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.
|
|
11
|
+
*/
|
|
4
12
|
export declare function requestSiteDomainForRepository(ctx: ConjureContext, repositoryRid: string, request: SubmitDomainRegistrationRequest): Promise<SiteDomainInfo>;
|
package/build/types/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { UnregisterDomainRequest } from "../UnregisterDomainRequest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Unregisters a domain from a repository, visiting the domain will no longer serve the repository assets.
|
|
5
|
+
*
|
|
6
|
+
* Depending on how the domain for the repository was setup, this might also result in deleting the domain
|
|
7
|
+
* itself.
|
|
8
|
+
*
|
|
9
|
+
* artifacts:sites:manage-domains permission is needed on the repository rid to call this endpoint.
|
|
10
|
+
*/
|
|
3
11
|
export declare function unregisterSiteDomain(ctx: ConjureContext, repositoryRid: string, request: UnregisterDomainRequest): Promise<void>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type ConjureContext } from "conjure-lite";
|
|
2
2
|
import type { UpdateDeployedVersionRequest } from "../UpdateDeployedVersionRequest.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sets the asset version of the siteasset repository that will be served.
|
|
5
|
+
*
|
|
6
|
+
* artifacts:sites:write-deployment-info permission is needed on the repository rid to call this endpoint.
|
|
7
|
+
*/
|
|
3
8
|
export declare function updateDeployedVersion(ctx: ConjureContext, repositoryRid: string, version: UpdateDeployedVersionRequest): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContentSecurityPolicyDirectiveName } from "./ContentSecurityPolicyDirectiveName.js";
|
|
2
2
|
import type { ContentSecurityPolicyDirectiveValue } from "./ContentSecurityPolicyDirectiveValue.js";
|
|
3
3
|
export interface ContentSecurityPolicyAdditions {
|
|
4
|
-
policy:
|
|
4
|
+
policy: Record<ContentSecurityPolicyDirectiveName, Array<ContentSecurityPolicyDirectiveValue>>;
|
|
5
5
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { DomainName } from "./DomainName.js";
|
|
2
2
|
import type { SiteDomainRegistrationRequestRid } from "./SiteDomainRegistrationRequestRid.js";
|
|
3
|
+
/**
|
|
4
|
+
* Domain that is managed through control panel and requires an enrollment-level Information Security Officer
|
|
5
|
+
* approval to be fully registered.
|
|
6
|
+
* The domain should be validated with control panel before use, its status can be fetched through
|
|
7
|
+
* approvals APIs.
|
|
8
|
+
*/
|
|
3
9
|
export interface ControlPanelManagedDomainInfo {
|
|
4
10
|
requestRid: SiteDomainRegistrationRequestRid;
|
|
5
11
|
siteDomain: DomainName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,22 +8,23 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./build/types/index.d.ts",
|
|
10
10
|
"import": "./build/js/index.mjs",
|
|
11
|
-
"require": "./build/js/index.
|
|
11
|
+
"require": "./build/js/index.cjs"
|
|
12
12
|
},
|
|
13
13
|
"./*": {
|
|
14
14
|
"types": "./build/types/public/*.d.ts",
|
|
15
15
|
"import": "./build/js/public/*.mjs",
|
|
16
|
-
"require": "./build/js/public/*.
|
|
16
|
+
"require": "./build/js/public/*.cjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"archiver": "^6.0.1",
|
|
21
|
-
"conjure-lite": "0.
|
|
21
|
+
"conjure-lite": "0.3.1",
|
|
22
22
|
"consola": "^3.2.3",
|
|
23
23
|
"find-up": "^6.3.0",
|
|
24
24
|
"yargs": "^17.7.2",
|
|
25
|
-
"@osdk/api": "0.0
|
|
26
|
-
"@osdk/generator": "0.0
|
|
25
|
+
"@osdk/api": "1.0.0",
|
|
26
|
+
"@osdk/generator": "1.0.0",
|
|
27
|
+
"@osdk/shared.net": "1.0.0"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@types/archiver": "^6.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","foundryBaseUrl","ExitProcessError","zipFile","createConjureContext","servicePath","third_party_application_service_exports"],"mappings":"gFAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,sCAAAC,EAAA,uBAAAC,EAAA,6BAAAC,EAAA,4BAAAC,EAAA,iCAAAC,EAAA,sCAAAC,EAAA,mCAAAC,EAAA,yBAAAC,EAAA,0BAAAC,ICgBA,OAAS,gBAAAC,MAAoB,eAC7B,eAAsBV,EAAqBW,EAAKC,EAAe,CAC7D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,QAAQ,CACnG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBT,EAAkCU,EAAKC,EAAe,CAC1E,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,iBAAkB,KAAK,CAC7F,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBR,EAAmBS,EAAKC,EAAe,CAC3D,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,oBAAqB,KAAK,CAChG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBP,EAAyBQ,EAAKC,EAAe,CACjE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,sBAAuB,KAAK,CAClG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBN,EAAwBO,EAAKC,EAAe,CAChE,OAAOF,EAAaC,EAAK,8BAA8BC,CAAa,qBAAsB,KAAK,CACjG,CCHA,OAAS,gBAAAF,MAAoB,eAC7B,eAAsBL,EAA6BM,EAAKC,EAAeC,EAAS,CAC9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AY,IAAM,QAAQ,IAAI,sBAAsB,EAC7D,QAAAU,EACA,YAAAU,CACF,CACF,CCvBA,IAAAC,EAAA,GAAA9C,EAAA8C,EAAA,+BAAAZ","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearDeployedVersion } from \"./ArtifactsSitesAdminV2Service/clearDeployedVersion.js\";\nexport { getContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.js\";\nexport { getDeployedVersion } from \"./ArtifactsSitesAdminV2Service/getDeployedVersion.js\";\nexport { getRegisteredSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.js\";\nexport { getRequestedSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRequestedSiteDomains.js\";\nexport { previewContentSecurityPolicy } from \"./ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.js\";\nexport { putContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.js\";\nexport { requestSiteDomainForRepository } from \"./ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.js\";\nexport { unregisterSiteDomain } from \"./ArtifactsSitesAdminV2Service/unregisterSiteDomain.js\";\nexport { updateDeployedVersion } from \"./ArtifactsSitesAdminV2Service/updateDeployedVersion.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deleteSiteDeployment(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deploySite(ctx, deploySiteRequest) {\n return conjureFetch(ctx, `/sites/admin/deploy`, \"POST\", deploySiteRequest);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}/deployedVersion`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRegisteredDomains(ctx) {\n return conjureFetch(ctx, `/sites/configRegisteredDomains/list`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetchHeaderMutator } from \"@osdk/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}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/clearDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/getRequestedSiteDomains.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/unregisterSiteDomain.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminV2Service/updateDeployedVersion.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deleteSiteDeployment.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/deploySite.ts","../../src/generated/artifacts-sites/ArtifactsSitesAdminService/getDeployedVersion.ts","../../src/generated/artifacts-sites/SitesDomainRegistryService/getRegisteredDomains.ts","../../src/net/artifacts/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/index.mts","../../src/net/artifacts/SiteAssetArtifactsService/deleteSiteVersion.mts","../../src/net/createFetch.mts","../../src/net/third-party-application-service/fetchWebsiteRepositoryRid.mts","../../src/net/artifacts/SiteAssetArtifactsService/getSiteAssetBaseUrl.mts","../../src/net/artifacts/SiteAssetArtifactsService/fetchSiteVersions.mts","../../src/net/artifacts/SiteAssetArtifactsService/uploadSiteVersion.mts","../../src/net/createConjureContext.mts","../../src/net/third-party-application-service/index.mts"],"names":["ArtifactsSitesAdminV2Service_exports","__export","clearDeployedVersion","getContentSecurityPolicyAdditions","getDeployedVersion","getRegisteredSiteDomains","getRequestedSiteDomains","previewContentSecurityPolicy","putContentSecurityPolicyAdditions","requestSiteDomainForRepository","unregisterSiteDomain","updateDeployedVersion","conjureFetch","ctx","repositoryRid","request","contentSecurityPolicyAdditions","version","artifacts_exports","SiteAssetArtifactsService_exports","deleteSiteVersion","fetchSiteVersions","uploadZippedSiteAsset","consola","LogLevels","createFetchHeaderMutator","createFetch","tokenProvider","fetchFn","createDebugLoggingFetch","headers","token","input","init","a","fetchWebsiteRepositoryRid","baseUrl","thirdPartyAppRid","fetch","url","result","getSiteAssetBaseUrl","fo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E,EAAM,GAAGE,EAAoBL,EAAStB,CAAa,CAAC,YAEpD0B,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,WAAAjB,EAAS,aAAAC,MAAiB,UAKnC,eAAsBF,EAAsBc,EAASC,EAAkBpB,EAAS2B,EAAS,CACvF,IAAM9B,EAAgB,MAAMqB,EAA0BC,EAASC,CAAgB,EACzEE,EAAM,GAAGE,EAAoBL,EAAStB,CAAa,CAAC,iBAAiBG,CAAO,GAE5EuB,EAAS,MADDd,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EACvCa,EAAK,CAC9B,OAAQ,MACR,KAAMK,EACN,QAAS,CACP,eAAgB,0BAClB,EACA,OAAQ,MACV,CAAC,EAED,GAAIJ,EAAO,QAAU,KAAOA,EAAO,OAAS,IAC1C,OAAAjB,EAAQ,MAAQC,EAAU,MAC1BD,EAAQ,MAAM,gBAAkBiB,EAAO,UAAU,EAC1C,GACF,MAAIA,EAAO,SAAW,IACrB,IAAIG,EAAiBH,EAAO,OAAQ,wBAAwB,EAE5D,IAAIG,EAAiBH,EAAO,OAAQ,4BAA4BA,EAAO,MAAM,KAAKA,EAAO,UAAU,GAAG,CAEhH,CC1BO,SAASK,EAAqBT,EAASU,EAAa,CACzD,MAAO,CACL,QAASpB,EAAY,IAAM,QAAQ,IAAI,sBAAsB,EAC7D,QAAAU,EACA,YAAAU,CACF,CACF,CCvBA,IAAAC,EAAA,GAAA9C,EAAA8C,EAAA,+BAAAZ","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { clearDeployedVersion } from \"./ArtifactsSitesAdminV2Service/clearDeployedVersion.js\";\nexport { getContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/getContentSecurityPolicyAdditions.js\";\nexport { getDeployedVersion } from \"./ArtifactsSitesAdminV2Service/getDeployedVersion.js\";\nexport { getRegisteredSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRegisteredSiteDomains.js\";\nexport { getRequestedSiteDomains } from \"./ArtifactsSitesAdminV2Service/getRequestedSiteDomains.js\";\nexport { previewContentSecurityPolicy } from \"./ArtifactsSitesAdminV2Service/previewContentSecurityPolicy.js\";\nexport { putContentSecurityPolicyAdditions } from \"./ArtifactsSitesAdminV2Service/putContentSecurityPolicyAdditions.js\";\nexport { requestSiteDomainForRepository } from \"./ArtifactsSitesAdminV2Service/requestSiteDomainForRepository.js\";\nexport { unregisterSiteDomain } from \"./ArtifactsSitesAdminV2Service/unregisterSiteDomain.js\";\nexport { updateDeployedVersion } from \"./ArtifactsSitesAdminV2Service/updateDeployedVersion.js\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function clearDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getContentSecurityPolicyAdditions(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRegisteredSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/registered`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRequestedSiteDomains(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/requested`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function previewContentSecurityPolicy(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/preview`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function putContentSecurityPolicyAdditions(ctx, repositoryRid, contentSecurityPolicyAdditions) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/csp/additions`, \"PUT\", contentSecurityPolicyAdditions);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function requestSiteDomainForRepository(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/submit-registration`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function unregisterSiteDomain(ctx, repositoryRid, request) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/domains/unregister`, \"POST\", request);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function updateDeployedVersion(ctx, repositoryRid, version) {\n return conjureFetch(ctx, `/sites/v2/admin/repository/${repositoryRid}/deployed-version`, \"PUT\", version);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deleteSiteDeployment(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}`, \"DELETE\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function deploySite(ctx, deploySiteRequest) {\n return conjureFetch(ctx, `/sites/admin/deploy`, \"POST\", deploySiteRequest);\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getDeployedVersion(ctx, repositoryRid) {\n return conjureFetch(ctx, `/sites/admin/${repositoryRid}/deployedVersion`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { conjureFetch } from \"conjure-lite\";\nexport async function getRegisteredDomains(ctx) {\n return conjureFetch(ctx, `/sites/configRegisteredDomains/list`, \"GET\");\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as SiteAssetArtifactsService from \"./SiteAssetArtifactsService/index.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { deleteSiteVersion } from \"./deleteSiteVersion.mjs\";\nexport { fetchSiteVersions } from \"./fetchSiteVersions.mjs\";\nexport { uploadZippedSiteAsset } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function deleteSiteVersion(baseUrl, thirdPartyAppRid, version) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"DELETE\"\n });\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(`${result.status} - Status Text: '${result.statusText}'`);\n return true;\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetchHeaderMutator } from \"@osdk/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}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function fetchSiteVersions(baseUrl, thirdPartyAppRid) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url);\n if (result.status === 200) {\n const response = await result.json();\n return response.versions;\n } else {\n throw new Error(`Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola, LogLevels } from \"consola\";\nimport { ExitProcessError } from \"../../../ExitProcessError.js\";\nimport { createFetch } from \"../../createFetch.mjs\";\nimport { fetchWebsiteRepositoryRid } from \"../../third-party-application-service/fetchWebsiteRepositoryRid.mjs\";\nimport { getSiteAssetBaseUrl } from \"./getSiteAssetBaseUrl.mjs\";\nexport async function uploadZippedSiteAsset(baseUrl, thirdPartyAppRid, version, zipFile) {\n const repositoryRid = await fetchWebsiteRepositoryRid(baseUrl, thirdPartyAppRid);\n const url = `${getSiteAssetBaseUrl(baseUrl, repositoryRid)}/versions/zip/${version}`;\n const fetch = createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN);\n const result = await fetch(url, {\n method: \"PUT\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n\n if (result.status >= 200 && result.status < 300) {\n consola.level = LogLevels.debug;\n consola.debug(\"Status Text: \" + result.statusText);\n return true;\n } else if (result.status === 409) {\n throw new ExitProcessError(result.status, \"Version already exists\");\n } else {\n throw new ExitProcessError(result.status, `Unexpected response code ${result.status} (${result.statusText})`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetch } from \"./createFetch.mjs\";\nexport function createConjureContext(baseUrl, servicePath) {\n return {\n fetchFn: createFetch(() => process.env.FOUNDRY_SDK_AUTH_TOKEN),\n baseUrl,\n servicePath\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { fetchWebsiteRepositoryRid } from \"./fetchWebsiteRepositoryRid.mjs\";"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './chunk-4D6JZ4TL.js';
|
|
2
|
-
import { generateClientSdkVersionOneDotOne } from '@osdk/generator';
|
|
3
|
-
import { consola } from 'consola';
|
|
4
|
-
import * as e from 'fs';
|
|
5
|
-
|
|
6
|
-
async function s(r){let i=JSON.parse(await e.promises.readFile(r.ontologyPath,"utf-8"));await generateClientSdkVersionOneDotOne(i,{writeFile:(o,t)=>e.promises.writeFile(o,t,"utf-8"),mkdir:async(o,t)=>{await e.promises.mkdir(o,t);}},r.outDir),consola.info("OSDK Generated!");}
|
|
7
|
-
|
|
8
|
-
export { s as default };
|
|
9
|
-
//# sourceMappingURL=out.js.map
|
|
10
|
-
//# sourceMappingURL=handleGenerate-BUJOID4C.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"4BAgBA,OAAS,qCAAAA,MAAyC,kBAClD,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAClF,MAAMJ,EAAkCK,EAAU,CAChD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,MAAM,EACdH,EAAQ,KAAK,iBAAiB,CAChC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { generateClientSdkVersionOneDotOne } from \"@osdk/generator\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nexport default async function handleGenerate(args) {\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n await generateClientSdkVersionOneDotOne(ontology, {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n }\n }, args.outDir);\n consola.info(\"OSDK Generated!\");\n}"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./chunk-X6QW63OH.cjs');
|
|
4
|
-
var generator = require('@osdk/generator');
|
|
5
|
-
var consola = require('consola');
|
|
6
|
-
var e = require('fs');
|
|
7
|
-
|
|
8
|
-
function _interopNamespace(e) {
|
|
9
|
-
if (e && e.__esModule) return e;
|
|
10
|
-
var n = Object.create(null);
|
|
11
|
-
if (e) {
|
|
12
|
-
Object.keys(e).forEach(function (k) {
|
|
13
|
-
if (k !== 'default') {
|
|
14
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return e[k]; }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var e__namespace = /*#__PURE__*/_interopNamespace(e);
|
|
27
|
-
|
|
28
|
-
async function s(r){let i=JSON.parse(await e__namespace.promises.readFile(r.ontologyPath,"utf-8"));await generator.generateClientSdkVersionOneDotOne(i,{writeFile:(o,t)=>e__namespace.promises.writeFile(o,t,"utf-8"),mkdir:async(o,t)=>{await e__namespace.promises.mkdir(o,t);}},r.outDir),consola.consola.info("OSDK Generated!");}
|
|
29
|
-
|
|
30
|
-
module.exports = s;
|
|
31
|
-
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=handleGenerate-SY3UD5UA.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/typescript/generate/handleGenerate.mts"],"names":["generateClientSdkVersionOneDotOne","consola","fs","handleGenerate","args","ontology","path","contents","options"],"mappings":"6BAgBA,OAAS,qCAAAA,MAAyC,kBAClD,OAAS,WAAAC,MAAe,UACxB,UAAYC,MAAQ,KACpB,eAAOC,EAAsCC,EAAM,CACjD,IAAMC,EAAW,KAAK,MAAM,MAAS,WAAS,SAASD,EAAK,aAAc,OAAO,CAAC,EAClF,MAAMJ,EAAkCK,EAAU,CAChD,UAAW,CAACC,EAAMC,IACN,WAAS,UAAUD,EAAMC,EAAU,OAAO,EAEtD,MAAO,MAAOD,EAAME,IAAY,CAC9B,MAAS,WAAS,MAAMF,EAAME,CAAO,CACvC,CACF,EAAGJ,EAAK,MAAM,EACdH,EAAQ,KAAK,iBAAiB,CAChC","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { generateClientSdkVersionOneDotOne } from \"@osdk/generator\";\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs\";\nexport default async function handleGenerate(args) {\n const ontology = JSON.parse(await fs.promises.readFile(args.ontologyPath, \"utf-8\"));\n await generateClientSdkVersionOneDotOne(ontology, {\n writeFile: (path, contents) => {\n return fs.promises.writeFile(path, contents, \"utf-8\");\n },\n mkdir: async (path, options) => {\n await fs.promises.mkdir(path, options);\n }\n }, args.outDir);\n consola.info(\"OSDK Generated!\");\n}"]}
|