@osdk/cli 0.25.0-beta.25 → 0.25.0-beta.27
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 +8 -0
- package/build/esm/{chunk-A75R3CG3.js → chunk-E54HEYOJ.js} +7 -3
- package/build/esm/chunk-E54HEYOJ.js.map +1 -0
- package/build/esm/chunk-I7LYTQVK.js +28 -0
- package/build/esm/chunk-I7LYTQVK.js.map +1 -0
- package/build/esm/{chunk-AEZWAKEY.js → chunk-ZVSMBLCW.js} +86 -4
- package/build/esm/chunk-ZVSMBLCW.js.map +1 -0
- package/build/esm/{handleGenerate-XEOONWLB.js → handleGenerate-NGHOD2J6.js} +25 -24
- package/build/esm/handleGenerate-NGHOD2J6.js.map +1 -0
- package/build/esm/index.js +255 -43
- package/build/esm/index.js.map +1 -1
- package/build/esm/{siteDeployCommand-B2GG2VCI.js → siteDeployCommand-5I2XNGUC.js} +4 -4
- package/build/esm/{siteDeployCommand-B2GG2VCI.js.map → siteDeployCommand-5I2XNGUC.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-DEGVONLC.js → versionDeleteCommand-IFMENRKO.js} +3 -3
- package/build/esm/{versionDeleteCommand-DEGVONLC.js.map → versionDeleteCommand-IFMENRKO.js.map} +1 -1
- package/build/esm/versionDeleteCommand-WOGLF3WW.js +49 -0
- package/build/esm/versionDeleteCommand-WOGLF3WW.js.map +1 -0
- package/build/esm/{versionGetCommand-66BAEUN2.js → versionGetCommand-XO3IXMF6.js} +3 -3
- package/build/esm/{versionGetCommand-66BAEUN2.js.map → versionGetCommand-XO3IXMF6.js.map} +1 -1
- package/build/esm/versionInfoCommand-5FROF7ET.js +27 -0
- package/build/esm/versionInfoCommand-5FROF7ET.js.map +1 -0
- package/build/esm/{versionListCommand-GLQDWLEI.js → versionListCommand-4SPFQRUT.js} +3 -3
- package/build/esm/{versionListCommand-GLQDWLEI.js.map → versionListCommand-4SPFQRUT.js.map} +1 -1
- package/build/esm/versionListCommand-KEDRW5L2.js +34 -0
- package/build/esm/versionListCommand-KEDRW5L2.js.map +1 -0
- package/build/esm/{versionSetCommand-7ZXK5MO6.js → versionSetCommand-TD34G4X7.js} +3 -3
- package/build/esm/{versionSetCommand-7ZXK5MO6.js.map → versionSetCommand-TD34G4X7.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-HNJNIZPF.js → versionUnsetCommand-W3ZMIQFV.js} +3 -3
- package/build/esm/{versionUnsetCommand-HNJNIZPF.js.map → versionUnsetCommand-W3ZMIQFV.js.map} +1 -1
- package/build/esm/widgetSetDeployCommand-C4ZT4E4N.js +92 -0
- package/build/esm/widgetSetDeployCommand-C4ZT4E4N.js.map +1 -0
- package/build/types/commands/site/deploy/{logDeployCommandConfigFileOverride.d.ts → logSiteDeployCommandConfigFileOverride.d.ts} +1 -1
- package/build/types/commands/widgetset/CommonWidgetSetArgs.d.ts +8 -0
- package/build/types/commands/widgetset/deploy/WidgetSetDeployArgs.d.ts +6 -0
- package/build/types/commands/widgetset/deploy/index.d.ts +5 -0
- package/build/types/commands/widgetset/deploy/logWidgetSetDeployCommandConfigFileOverride.d.ts +4 -0
- package/build/types/commands/widgetset/deploy/widgetSetDeployCommand.d.mts +2 -0
- package/build/types/commands/widgetset/index.d.ts +5 -0
- package/build/types/commands/widgetset/logWidgetSetCommandConfigFileOverride.d.ts +4 -0
- package/build/types/commands/widgetset/version/delete/VersionDeleteArgs.d.ts +5 -0
- package/build/types/commands/widgetset/version/delete/index.d.ts +5 -0
- package/build/types/commands/widgetset/version/delete/versionDeleteCommand.d.mts +2 -0
- package/build/types/commands/widgetset/version/index.d.ts +4 -0
- package/build/types/commands/widgetset/version/info/VersionInfoArgs.d.ts +4 -0
- package/build/types/commands/widgetset/version/info/index.d.ts +5 -0
- package/build/types/commands/widgetset/version/info/versionInfoCommand.d.mts +2 -0
- package/build/types/commands/widgetset/version/list/VersionListArgs.d.ts +2 -0
- package/build/types/commands/widgetset/version/list/index.d.ts +5 -0
- package/build/types/commands/widgetset/version/list/versionListCommand.d.mts +2 -0
- package/build/types/net/StemmaRepositoryRid.d.ts +1 -0
- package/build/types/net/WidgetSetRid.d.ts +1 -0
- package/build/types/net/index.d.mts +1 -0
- package/build/types/net/widget-registry/ListWidgetSetReleasesResponse.d.mts +5 -0
- package/build/types/net/widget-registry/WidgetSetLocator.d.mts +16 -0
- package/build/types/net/widget-registry/WidgetSetRelease.d.mts +13 -0
- package/build/types/net/widget-registry/deleteSiteVersion.d.mts +4 -0
- package/build/types/net/widget-registry/deleteWidgetSetRelease.d.mts +3 -0
- package/build/types/net/widget-registry/getWidgetSetRelease.d.mts +4 -0
- package/build/types/net/widget-registry/index.d.mts +8 -0
- package/build/types/net/widget-registry/listWidgetSetReleases.d.mts +4 -0
- package/build/types/net/widget-registry/publishManifest.d.mts +4 -0
- package/build/types/net/widget-registry/uploadSiteVersion.d.mts +4 -0
- package/build/types/util/configLoader.d.ts +3 -1
- package/build/types/yargs/logConfigFileMiddleware.d.ts +1 -1
- package/package.json +15 -14
- package/build/esm/chunk-A75R3CG3.js.map +0 -1
- package/build/esm/chunk-AEZWAKEY.js.map +0 -1
- package/build/esm/handleGenerate-XEOONWLB.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -152,6 +152,10 @@ var FOUNDRY_WIDGET_SET_CONFIG_SCHEMA = {
|
|
|
152
152
|
directory: {
|
|
153
153
|
type: "string"
|
|
154
154
|
},
|
|
155
|
+
repository: {
|
|
156
|
+
type: "string",
|
|
157
|
+
nullable: true
|
|
158
|
+
},
|
|
155
159
|
autoVersion: FOUNDRY_SITE_CONFIG_SCHEMA.properties.site.properties.autoVersion,
|
|
156
160
|
uploadOnly: {
|
|
157
161
|
type: "boolean",
|
|
@@ -188,7 +192,7 @@ async function loadFoundryConfig(type) {
|
|
|
188
192
|
throw new Error(`Couldn't read or parse config file ${configFilePath}. Error: ${error}`);
|
|
189
193
|
}
|
|
190
194
|
if (!validate(foundryConfig)) {
|
|
191
|
-
throw new Error(`The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);
|
|
195
|
+
throw new Error(`The configuration file ${configFilePath} does not match the expected schema: ${ajv.errorsText(validate.errors)}`);
|
|
192
196
|
}
|
|
193
197
|
return {
|
|
194
198
|
foundryConfig,
|
|
@@ -208,5 +212,5 @@ function parseConfigFile(fileContent, configFilePath) {
|
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
export { AutoVersionError, autoVersion, loadFoundryConfig };
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-E54HEYOJ.js.map
|
|
216
|
+
//# sourceMappingURL=chunk-E54HEYOJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../foundry-config-json/build/esm/autoVersion.js","../../../foundry-config-json/build/esm/index.js","../../../foundry-config-json/build/esm/config.js"],"names":["fsPromises","findUp"],"mappings":";;;;;;;;;AAAA,cAAA,EAAA,CAAA;AAqBa,IAAA,gBAAA,GAAN,cAA+B,KAAM,CAAA;AAAA,EAC1C,WAAA,CAAY,KAAK,GAAK,EAAA;AACpB,IAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AACT,IAAA,IAAA,CAAK,GAAM,GAAA,GAAA,CAAA;AACX,IAAA,IAAA,CAAK,GAAM,GAAA,GAAA,CAAA;AAAA,GACb;AACF,EAAA;AASA,eAAsB,YAAY,MAAQ,EAAA;AACxC,EAAA,QAAQ,OAAO,IAAM;AAAA,IACnB,KAAK,cAAA;AACH,MAAO,OAAA,sBAAA,CAAuB,OAAO,SAAS,CAAA,CAAA;AAAA,IAChD,KAAK,cAAA;AACH,MAAA,OAAO,sBAAuB,EAAA,CAAA;AAAA,IAChC;AACE,MAAA,MAAM,IAAI,KAAM,CAAA,CAAA,iCAAA,EAAoC,KAAK,SAAU,CAAA,MAAM,CAAC,CAAG,CAAA,CAAA,CAAA,CAAA;AAAA,G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S,eAAA,CAAgB,aAAa,cAAgB,EAAA;AACpD,EAAM,MAAA,SAAA,GAAY,QAAQ,cAAc,CAAA,CAAA;AACxC,EAAA,QAAQ,SAAW;AAAA,IACjB,KAAK,OAAA;AACH,MAAO,OAAA,IAAA,CAAK,MAAM,WAAW,CAAA,CAAA;AAAA,IAC/B;AACE,MAAA,MAAM,IAAI,KAAA,CAAM,CAA+B,4BAAA,EAAA,SAAS,CAAmB,iBAAA,CAAA,CAAA,CAAA;AAAA,GAC/E;AACF","file":"chunk-E54HEYOJ.js","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 { findUp } from \"find-up\";\nimport { exec } from \"node:child_process\";\nimport { promises as fsPromises } from \"node:fs\";\nimport { promisify } from \"node:util\";\nimport { valid } from \"semver\";\nexport class AutoVersionError extends Error {\n constructor(msg, tip) {\n super(msg);\n this.msg = msg;\n this.tip = tip;\n }\n}\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(config) {\n switch (config.type) {\n case \"git-describe\":\n return gitDescribeAutoVersion(config.tagPrefix);\n case \"package-json\":\n return packageJsonAutoVersion();\n default:\n throw new Error(`Unexpected auto version config: (${JSON.stringify(config)})`);\n }\n}\nasync function gitDescribeAutoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n validateVersion(version);\n return version;\n}\nasync function packageJsonAutoVersion() {\n const packageJsonPath = await findUp(\"package.json\");\n if (!packageJsonPath) {\n throw new AutoVersionError(`Couldn't find package.json file in the current working directory or its parents: ${process.cwd()}`);\n }\n let packageJson;\n try {\n const fileContent = await fsPromises.readFile(packageJsonPath, \"utf-8\");\n packageJson = JSON.parse(fileContent);\n } catch (error) {\n throw new AutoVersionError(`Couldn't read or parse package.json file ${packageJsonPath}. Error: ${error}`);\n }\n const version = packageJson.version;\n validateVersion(version);\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new AutoVersionError(\"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new AutoVersionError(`Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new AutoVersionError(`Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new AutoVersionError(`Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\n}\nfunction validateVersion(version) {\n if (valid(version) == null) {\n throw new AutoVersionError(`The version string ${version} is not SemVer compliant.`);\n }\n}","/*\n * Copyright 2024 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 { autoVersion, AutoVersionError } from \"./autoVersion.js\";\nexport { loadFoundryConfig } from \"./config.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 { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst FOUNDRY_SITE_CONFIG_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n type: {\n const: \"git-describe\",\n type: \"string\"\n },\n tagPrefix: {\n type: \"string\",\n nullable: true\n }\n }\n }, {\n properties: {\n type: {\n const: \"package-json\",\n type: \"string\"\n }\n }\n }],\n required: [\"type\"]\n },\n uploadOnly: {\n type: \"boolean\",\n nullable: true\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\nconst FOUNDRY_WIDGET_SET_CONFIG_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n widgetSet: {\n type: \"object\",\n properties: {\n rid: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n repository: {\n type: \"string\",\n nullable: true\n },\n autoVersion: FOUNDRY_SITE_CONFIG_SCHEMA.properties.site.properties.autoVersion,\n uploadOnly: {\n type: \"boolean\",\n nullable: true\n }\n },\n required: [\"rid\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"widgetSet\"],\n additionalProperties: false\n};\nconst FOUNDRY_CONFIG_SCHEMA = {\n site: FOUNDRY_SITE_CONFIG_SCHEMA,\n widgetSet: FOUNDRY_WIDGET_SET_CONFIG_SCHEMA\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\n\nexport async function loadFoundryConfig(type) {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(FOUNDRY_CONFIG_SCHEMA[type]);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new Error(`Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new Error(`The configuration file ${configFilePath} does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new Error(`Unsupported file extension: ${extension} for config file.`);\n }\n}"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { init_esm_shims } from './chunk-MGJFR5AW.js';
|
|
2
|
+
|
|
3
|
+
// ../widget.api.unstable/build/esm/manifest.js
|
|
4
|
+
init_esm_shims();
|
|
5
|
+
var MANIFEST_FILE_LOCATION = ".palantir/widgets.config.json";
|
|
6
|
+
|
|
7
|
+
// ../widget.api.unstable/build/esm/index.js
|
|
8
|
+
init_esm_shims();
|
|
9
|
+
|
|
10
|
+
// ../widget.api.unstable/build/esm/config.js
|
|
11
|
+
init_esm_shims();
|
|
12
|
+
|
|
13
|
+
// ../widget.api.unstable/build/esm/messages/hostMessages.js
|
|
14
|
+
init_esm_shims();
|
|
15
|
+
var HostMessage;
|
|
16
|
+
(function(_HostMessage) {
|
|
17
|
+
_HostMessage.Version = "1.0.0";
|
|
18
|
+
})(HostMessage || (HostMessage = {}));
|
|
19
|
+
|
|
20
|
+
// ../widget.api.unstable/build/esm/messages/widgetMessages.js
|
|
21
|
+
init_esm_shims();
|
|
22
|
+
|
|
23
|
+
// ../widget.api.unstable/build/esm/metaTags.js
|
|
24
|
+
init_esm_shims();
|
|
25
|
+
|
|
26
|
+
export { MANIFEST_FILE_LOCATION };
|
|
27
|
+
//# sourceMappingURL=chunk-I7LYTQVK.js.map
|
|
28
|
+
//# sourceMappingURL=chunk-I7LYTQVK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../widget.api.unstable/build/esm/manifest.js","../../../widget.api.unstable/build/esm/index.js","../../../widget.api.unstable/build/esm/config.js","../../../widget.api.unstable/build/esm/messages/hostMessages.js","../../../widget.api.unstable/build/esm/messages/widgetMessages.js","../../../widget.api.unstable/build/esm/metaTags.js"],"names":[],"mappings":";;;AAAA,cAAA,EAAA,CAAA;AAgBO,IAAM,sBAAyB,GAAA,gCAAA;;;AChBtC,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AAgBO,IAAI,WAAA,CAAA;AAAA,CACV,SAAU,YAAc,EAAA;AACvB,EAAA,YAAA,CAAa,OAAU,GAAA,OAAA,CAAA;AASzB,CAAG,EAAA,WAAA,KAAgB,WAAc,GAAA,EAAG,CAAA,CAAA,CAAA;;;AC3BpC,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA","file":"chunk-I7LYTQVK.js","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const MANIFEST_FILE_LOCATION = \".palantir/widgets.config.json\";","/*\n * Copyright 2024 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 { defineConfig } from \"./config.js\";\nexport { MANIFEST_FILE_LOCATION } from \"./manifest.js\";\nexport { _unstable_isHostFetchResponseFailedMessage, _unstable_isHostFetchResponseSuccessMessage, HostMessage, isHostParametersUpdatedMessage, visitHostMessage } from \"./messages/hostMessages.js\";\nexport { _unstable_isWidgetFetchMessage, isWidgetEmitEventMessage, isWidgetReadyMessage, visitWidgetMessage } from \"./messages/widgetMessages.js\";\nexport { META_TAG_HOST_ORIGIN } from \"./metaTags.js\";","/*\n * Copyright 2024 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\n/**\n * Extracts the parameter ID strings as types from the given ParameterConfig.\n */\n\n/**\n * Extracts a map of parameter IDs to their async-wrapped value types from the given ParameterConfig.\n */\n\n/**\n * Extracts a map of parameter IDs to the raw parameter values from the given ParameterConfig.\n */\n\n/**\n * Extracts a list of strongly-typed parameter IDs from the given WidgetConfig for a given event ID.\n * If a parameter ID is referenced by an event but does not exist, its type will be never\n */\n\n/**\n * Extracts a map of event IDs to their raw parameter value types from the given WidgetConfig.\n */\n\nexport function defineConfig(c) {\n return c;\n}","/*\n * Copyright 2024 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// Interfaces and type guards for messages passed from the host Foundry UI to the widget\nexport let HostMessage;\n(function (_HostMessage) {\n _HostMessage.Version = \"1.0.0\";\n /**\n * Temporary fetch proxy response\n * Will be removed in favor of server side proxy\n */\n /**\n * Temporary fetch proxy response\n * Will be removed in favor of server side proxy\n */\n})(HostMessage || (HostMessage = {}));\nexport function isHostParametersUpdatedMessage(event) {\n return event.type === \"host.update-parameters\";\n}\nexport function _unstable_isHostFetchResponseSuccessMessage(event) {\n return event.type === \"host._unstable.fetch-response-success\";\n}\nexport function _unstable_isHostFetchResponseFailedMessage(event) {\n return event.type === \"host._unstable.fetch-response-failed\";\n}\n/**\n * Strongly typed visitor to handle every type of host message\n */\nexport function visitHostMessage(message, visitor) {\n const {\n type,\n payload\n } = message;\n const handler = visitor[type];\n if (handler) {\n // Typescript creates an & of the parameters instead of a union\n handler(payload);\n } else {\n visitor._unknown(type);\n }\n}","/*\n * Copyright 2024 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// Interfaces and type guards for messages passed from the widget to the host Foundry UI\nexport let WidgetMessage;\nexport function isWidgetReadyMessage(event) {\n return event.type === \"widget.ready\";\n}\nexport function isWidgetEmitEventMessage(event) {\n return event.type === \"widget.emit-event\";\n}\nexport function _unstable_isWidgetFetchMessage(event) {\n return event.type === \"widget._unstable.fetch-request\";\n}\nexport function visitWidgetMessage(message, visitor) {\n const {\n type,\n payload\n } = message;\n const handler = visitor[type];\n if (handler) {\n // Typescript creates an & of the parameters instead of a union\n handler(payload);\n } else {\n visitor._unknown(type);\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const META_TAG_HOST_ORIGIN = \"x-palantir-widgets-host-origin\";"]}
|
|
@@ -36,7 +36,7 @@ init_esm_shims();
|
|
|
36
36
|
|
|
37
37
|
// src/net/UserAgent.ts
|
|
38
38
|
init_esm_shims();
|
|
39
|
-
var USER_AGENT = `osdk-cli/${"0.25.0-beta.
|
|
39
|
+
var USER_AGENT = `osdk-cli/${"0.25.0-beta.27"}`;
|
|
40
40
|
|
|
41
41
|
// src/net/createFetch.mts
|
|
42
42
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -225,6 +225,88 @@ async function uploadVersion(ctx, thirdPartyAppRid, version, zipFile) {
|
|
|
225
225
|
return result.json();
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
// src/net/widget-registry/index.mts
|
|
229
|
+
var widget_registry_exports = {};
|
|
230
|
+
__export(widget_registry_exports, {
|
|
231
|
+
deleteSiteVersion: () => deleteSiteVersion,
|
|
232
|
+
deleteWidgetSetRelease: () => deleteWidgetSetRelease,
|
|
233
|
+
getWidgetSetRelease: () => getWidgetSetRelease,
|
|
234
|
+
listWidgetSetReleases: () => listWidgetSetReleases,
|
|
235
|
+
publishManifest: () => publishManifest,
|
|
236
|
+
uploadSiteVersion: () => uploadSiteVersion
|
|
237
|
+
});
|
|
238
|
+
init_esm_shims();
|
|
239
|
+
|
|
240
|
+
// src/net/widget-registry/deleteSiteVersion.mts
|
|
241
|
+
init_esm_shims();
|
|
242
|
+
async function deleteSiteVersion(ctx, repositoryRid, version) {
|
|
243
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
244
|
+
const url = `${ctx.foundryUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset/versions/${version}`;
|
|
245
|
+
await fetch2(url, {
|
|
246
|
+
method: "DELETE"
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// src/net/widget-registry/deleteWidgetSetRelease.mts
|
|
251
|
+
init_esm_shims();
|
|
252
|
+
async function deleteWidgetSetRelease(ctx, widgetSetRid, version) {
|
|
253
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
254
|
+
const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases/${version}`;
|
|
255
|
+
await fetch2(url, {
|
|
256
|
+
method: "DELETE"
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/net/widget-registry/getWidgetSetRelease.mts
|
|
261
|
+
init_esm_shims();
|
|
262
|
+
async function getWidgetSetRelease(ctx, widgetSetRid, version) {
|
|
263
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
264
|
+
const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases/${version}`;
|
|
265
|
+
const response = await fetch2(url);
|
|
266
|
+
return response.json();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/net/widget-registry/listWidgetSetReleases.mts
|
|
270
|
+
init_esm_shims();
|
|
271
|
+
async function listWidgetSetReleases(ctx, widgetSetRid) {
|
|
272
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
273
|
+
const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases`;
|
|
274
|
+
const response = await fetch2(url);
|
|
275
|
+
return response.json();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// src/net/widget-registry/publishManifest.mts
|
|
279
|
+
init_esm_shims();
|
|
280
|
+
async function publishManifest(ctx, repositoryRid, version) {
|
|
281
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
282
|
+
const url = `${ctx.foundryUrl}/widget-registry/api/repositories/${repositoryRid}/publish-manifest`;
|
|
283
|
+
await fetch2(url, {
|
|
284
|
+
method: "POST",
|
|
285
|
+
body: JSON.stringify({
|
|
286
|
+
version
|
|
287
|
+
}),
|
|
288
|
+
headers: {
|
|
289
|
+
"Content-Type": "application/json"
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// src/net/widget-registry/uploadSiteVersion.mts
|
|
295
|
+
init_esm_shims();
|
|
296
|
+
async function uploadSiteVersion(ctx, repositoryRid, version, zipFile) {
|
|
297
|
+
const fetch2 = createFetch(ctx.tokenProvider);
|
|
298
|
+
const url = `${ctx.foundryUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset/versions/zip/${version}`;
|
|
299
|
+
await fetch2(url, {
|
|
300
|
+
method: "PUT",
|
|
301
|
+
body: zipFile,
|
|
302
|
+
headers: {
|
|
303
|
+
"Content-Type": "application/octet-stream"
|
|
304
|
+
},
|
|
305
|
+
duplex: "half"
|
|
306
|
+
// Node hates me
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
|
|
228
310
|
// src/net/index.mts
|
|
229
311
|
init_esm_shims();
|
|
230
312
|
|
|
@@ -281,6 +363,6 @@ function isJWT(token) {
|
|
|
281
363
|
return jwtPattern.test(token);
|
|
282
364
|
}
|
|
283
365
|
|
|
284
|
-
export { createInternalClientContext, loadToken, third_party_applications_exports };
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
366
|
+
export { createInternalClientContext, loadToken, third_party_applications_exports, widget_registry_exports };
|
|
367
|
+
//# sourceMappingURL=chunk-ZVSMBLCW.js.map
|
|
368
|
+
//# sourceMappingURL=chunk-ZVSMBLCW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/net/createInternalClientContext.mts","../../src/net/third-party-applications/index.mts","../../src/net/third-party-applications/deleteVersion.mts","../../src/net/createFetch.mts","../../src/net/UserAgent.ts","../../src/net/third-party-applications/deployWebsite.mts","../../src/net/third-party-applications/getWebsite.mts","../../src/net/third-party-applications/listVersions.mts","../../src/net/third-party-applications/undeployWebsite.mts","../../src/net/third-party-applications/uploadSnapshotVersion.mts","../../src/net/third-party-applications/uploadVersion.mts","../../src/net/widget-registry/index.mts","../../src/net/widget-registry/deleteSiteVersion.mts","../../src/net/widget-registry/deleteWidgetSetRelease.mts","../../src/net/widget-registry/getWidgetSetRelease.mts","../../src/net/widget-registry/listWidgetSetReleases.mts","../../src/net/widget-registry/publishManifest.mts","../../src/net/widget-registry/uploadSiteVersion.mts","../../src/net/index.mts","../../src/util/token.ts"],"names":["fetch","consola","fsPromises"],"mappings":";;;;;;;;;AAAA,cAAA,EAAA,CAAA;AAgBO,SAAS,2BAAA,CAA4B,YAAY,aAAe,EAAA;AACrE,EAAO,OAAA;AAAA,IACL,aAAA;AAAA,IACA,UAAA;AAAA,GACF,CAAA;AACF,CAAA;;;ACrBA,IAAA,gCAAA,GAAA,GAAA;AAAA,QAAA,CAAA,gCAAA,EAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,CAAA,CAAA,CAAA;AAAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;;;ACAA,cAAA,EAAA,CAAA;AAgBO,IAAM,UAAA,GAAa,YAAY,gBAA2B,CAAA,CAAA,CAAA;;;ADM1D,SAAS,WAAA,CAAY,aAAe,EAAA,OAAA,GAAU,KAAO,EAAA;AAC1D,EAAO,OAAA,wBAAA,CAAyB,0BAA0B,uBAAwB,CAAA,kBAAA,CAAmB,OAAO,CAAC,CAAC,CAAG,EAAA,OAAM,OAAW,KAAA;AAChI,IAAM,MAAA,KAAA,GAAQ,MAAM,aAAc,EAAA,CAAA;AAClC,IAAA,OAAA,CAAQ,GAAI,CAAA,eAAA,EAAiB,CAAU,OAAA,EAAA,KAAK,CAAE,CAAA,CAAA,CAAA;AAC9C,IAA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AA,EAAM,KAAK,CAAE,CAAA,CAAA,CAAA;AAAA,GACnF;AACA,EAAO,OAAA;AAAA,IACL,QAAU,EAAA,YAAA;AAAA,IACV,KAAA;AAAA,GACF,CAAA;AACF,CAAA;AACO,SAAS,SAAS,KAAO,EAAA;AAC9B,EAAI,IAAA,CAAC,KAAM,CAAA,KAAK,CAAG,EAAA;AACjB,IAAM,MAAA,IAAI,gBAAiB,CAAA,CAAA,EAAG,CAAmC,iCAAA,CAAA,CAAA,CAAA;AAAA,GACnE;AACF,CAAA;AACA,SAAS,MAAM,KAAO,EAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,kDAAA,CAAA;AACnB,EAAO,OAAA,UAAA,CAAW,KAAK,KAAK,CAAA,CAAA;AAC9B","file":"chunk-ZVSMBLCW.js","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 function createInternalClientContext(foundryUrl, tokenProvider) {\n return {\n tokenProvider,\n foundryUrl\n };\n}","/*\n * Copyright 2024 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 { deleteVersion } from \"./deleteVersion.mjs\";\nexport { deployWebsite } from \"./deployWebsite.mjs\";\nexport { getWebsite } from \"./getWebsite.mjs\";\nexport { listVersions } from \"./listVersions.mjs\";\nexport { undeployWebsite } from \"./undeployWebsite.mjs\";\nexport { uploadSnapshotVersion } from \"./uploadSnapshotVersion.mjs\";\nexport { uploadVersion } from \"./uploadVersion.mjs\";","/*\n * Copyright 2024 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 async function deleteVersion(ctx, thirdPartyAppRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/${version}?preview=true`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { createFetchHeaderMutator, createFetchOrThrow } from \"@osdk/shared.net.fetch\";\nimport { consola } from \"consola\";\nimport prettyBytes from \"pretty-bytes\";\nimport { USER_AGENT } from \"./UserAgent.js\";\nexport function createFetch(tokenProvider, fetchFn = fetch) {\n return createFetchHeaderMutator(createRequestLoggingFetch(createErrorExitingFetch(createFetchOrThrow(fetchFn))), async headers => {\n const token = await tokenProvider();\n headers.set(\"Authorization\", `Bearer ${token}`);\n headers.set(\"Fetch-User-Agent\", USER_AGENT);\n return headers;\n });\n}\nfunction createErrorExitingFetch(fetchFn = fetch) {\n return function errorExitingFetch(input, init) {\n return fetchFn(input, init).catch(handleFetchError);\n };\n}\nfunction handleFetchError(e) {\n if (!(e instanceof PalantirApiError)) {\n throw new ExitProcessError(1, \"Unexpected fetch error\");\n }\n let tip;\n if (e.statusCode === 401) {\n tip = \"Check your token is valid and has not expired or been disabled\";\n } else if (e.statusCode === 403) {\n tip = \"Check your token has the required scopes for this operation\";\n } else if (e.statusCode === 404) {\n tip = \"The resource may not exist or your token may not have the required scopes to load it\";\n }\n let message;\n if (e.errorName === \"CannotDeleteDeployedVersion\") {\n message = \"The site version to delete is live and cannot be deleted\";\n tip = \"Run the `site version set` command to change the live site version\";\n } else if (e.errorName === \"InvalidVersion\") {\n message = \"The site version is invalid and must be a valid SemVer string\";\n } else if (e.errorName === \"VersionAlreadyExists\") {\n message = \"The site version already exists\";\n } else if (e.errorName === \"VersionNotFound\") {\n message = \"The site version could not be found\";\n } else if (e.errorName === \"VersionLimitExceeded\") {\n const {\n versionLimit\n } = e.parameters ?? {};\n const versionLimitPart = versionLimit != null ? ` (Limit: ${versionLimit} versions)` : \"\";\n message = `The site contains too many versions${versionLimitPart}`;\n tip = \"Run the `site version delete` command to delete an old version and try again\";\n } else if (e.errorName === \"FileCountLimitExceeded\") {\n const {\n fileCountLimit\n } = e.parameters ?? {};\n const fileCountLimitPart = fileCountLimit != null ? ` (Limit: ${fileCountLimit} files)` : \"\";\n message = `The .zip file contains too many files${fileCountLimitPart}`;\n tip = \"Reduce the number of files in the production build to below the limit\";\n } else if (e.errorName === \"FileSizeLimitExceeded\") {\n const {\n currentFilePath,\n currentFileSizeBytes,\n fileSizeBytesLimit\n } = e.parameters ?? {};\n const currentFilePathPart = currentFilePath != null ? ` \"${currentFilePath}\"` : \"\";\n const currentFileSizePart = currentFileSizeBytes != null ? ` (${prettyBytes(parseInt(currentFileSizeBytes), {\n binary: true\n })})` : \"\";\n const fileSizeLimitPart = fileSizeBytesLimit != null ? ` (Limit: ${prettyBytes(parseInt(fileSizeBytesLimit), {\n binary: true\n })})` : \"\";\n message = `The .zip file contains a file${currentFilePathPart}${currentFileSizePart} that is too large${fileSizeLimitPart}`;\n tip = \"Ensure all files in the production build are below the size limit\";\n } else {\n const {\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n } = e;\n // Include extra info about the original API error in CLI error messages\n // https://www.palantir.com/docs/foundry/api/general/overview/errors/\n message = `${e.message}\\n\\n${JSON.stringify({\n errorCode,\n errorName,\n errorInstanceId,\n parameters\n }, null, 2)}`;\n }\n throw new ExitProcessError(1, message, tip, e);\n}\nfunction createRequestLoggingFetch(fetchFn = fetch) {\n return function requestLoggingFetch(input, init) {\n const requestLog = typeof input === \"string\" || input instanceof URL ? `${init?.method ?? \"GET\"}: ${input.toString().trim()}` : `${input.method ?? \"GET\"}: ${input.url.toString().trim()}`;\n consola.trace(requestLog);\n return fetchFn(input, init).then(a => {\n consola.trace(`FINISH ${requestLog}`);\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\nexport const USER_AGENT = `osdk-cli/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 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 async function deployWebsite(ctx, thirdPartyAppRid, request) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/deploy?preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\n body: JSON.stringify(request),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n return result.json();\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { createFetch } from \"../createFetch.mjs\";\nexport async function getWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website?preview=true`;\n try {\n const result = await fetch(url);\n return await result.json();\n } catch (e) {\n // Revisit this error handling in the API\n if (e instanceof ExitProcessError && e.originalError != null && e.originalError instanceof PalantirApiError && e.originalError.errorName === \"WebsiteNotFound\") {\n return undefined;\n }\n throw e;\n }\n}","/*\n * Copyright 2024 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 async function listVersions(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions?preview=true`;\n const result = await fetch(url);\n return result.json();\n}","/*\n * Copyright 2024 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 async function undeployWebsite(ctx, thirdPartyAppRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/undeploy?preview=true`;\n await fetch(url, {\n method: \"POST\"\n });\n}","/*\n * Copyright 2024 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 async function uploadSnapshotVersion(ctx, thirdPartyAppRid, version, snapshotId, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/uploadSnapshot?version=${version}&preview=true${snapshotId !== \"\" ? `&snapshotIdentifier=${snapshotId}` : \"\"}`;\n const result = await fetch(url, {\n method: \"POST\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n return result.json();\n}","/*\n * Copyright 2024 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 async function uploadVersion(ctx, thirdPartyAppRid, version, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/api/v2/thirdPartyApplications/${thirdPartyAppRid}/website/versions/upload?version=${version}&preview=true`;\n const result = await fetch(url, {\n method: \"POST\",\n body: zipFile,\n headers: {\n \"Content-Type\": \"application/octet-stream\"\n },\n duplex: \"half\" // Node hates me\n });\n return result.json();\n}","/*\n * Copyright 2025 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 { deleteWidgetSetRelease } from \"./deleteWidgetSetRelease.mjs\";\nexport { getWidgetSetRelease } from \"./getWidgetSetRelease.mjs\";\nexport { listWidgetSetReleases } from \"./listWidgetSetReleases.mjs\";\nexport { publishManifest } from \"./publishManifest.mjs\";\nexport { uploadSiteVersion } from \"./uploadSiteVersion.mjs\";","/*\n * Copyright 2025 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 async function deleteSiteVersion(ctx, repositoryRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset/versions/${version}`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2025 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 async function deleteWidgetSetRelease(ctx, widgetSetRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases/${version}`;\n await fetch(url, {\n method: \"DELETE\"\n });\n}","/*\n * Copyright 2025 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 async function getWidgetSetRelease(ctx, widgetSetRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases/${version}`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 async function listWidgetSetReleases(ctx, widgetSetRid) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/widget-registry/api/widget-sets/${widgetSetRid}/releases`;\n const response = await fetch(url);\n return response.json();\n}","/*\n * Copyright 2025 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 async function publishManifest(ctx, repositoryRid, version) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/widget-registry/api/repositories/${repositoryRid}/publish-manifest`;\n await fetch(url, {\n method: \"POST\",\n body: JSON.stringify({\n version\n }),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n}","/*\n * Copyright 2025 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 async function uploadSiteVersion(ctx, repositoryRid, version, zipFile) {\n const fetch = createFetch(ctx.tokenProvider);\n const url = `${ctx.foundryUrl}/artifacts/api/repositories/${repositoryRid}/contents/release/siteasset/versions/zip/${version}`;\n 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 * 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 { createInternalClientContext } from \"./createInternalClientContext.mjs\";\nexport * as thirdPartyApplications from \"./third-party-applications/index.mjs\";\nexport * as widgetRegistry from \"./widget-registry/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\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport { promises as fsPromises } from \"node:fs\";\nimport path from \"node:path\";\nconst TOKEN_ENV_VARS = [\"FOUNDRY_TOKEN\", \"FOUNDRY_SDK_AUTH_TOKEN\"];\n\n/**\n * Loads a JWT Auth Token from an argument, a file, or environment variable returning the first found.\n * @param token The token as a string.\n * @param tokenFile The path to the token file.\n * @returns The token as a string.\n * @throws An error if no token is found.\n */\nexport async function loadToken(token, tokenFile) {\n if (token) {\n consola.debug(`Using token from --token option`);\n validate(token);\n return token;\n }\n if (tokenFile) {\n const loadedToken = await loadTokenFile(tokenFile);\n consola.debug(`Using token from --tokenFile=${loadedToken.filePath} option`);\n validate(loadedToken.token);\n return loadedToken.token;\n }\n for (const envVar of TOKEN_ENV_VARS) {\n const environmentToken = process.env[envVar];\n if (environmentToken) {\n consola.debug(`Using token from ${envVar} environment variable`);\n validate(environmentToken);\n if (envVar === \"FOUNDRY_SDK_AUTH_TOKEN\") {\n consola.warn(`Using FOUNDRY_SDK_AUTH_TOKEN environment variable is deprecated. Please use FOUNDRY_TOKEN instead.`);\n }\n return environmentToken;\n }\n }\n throw new ExitProcessError(2, `No token found.`, `You can supply a --token or --token-file option, or set the ${TOKEN_ENV_VARS[0]} environment variable`);\n}\n/**\n * Reads a JWT Auth Token from a file.\n * @param filePath The path to the token file.\n * @returns The token as a string.\n * @throws An error if the file cannot be read.\n */\nexport async function loadTokenFile(filePath) {\n let token;\n let resolvedPath;\n try {\n resolvedPath = path.resolve(filePath);\n token = await fsPromises.readFile(resolvedPath, \"utf8\");\n token = token.trim();\n } catch (error) {\n throw new ExitProcessError(2, `Unable to read token file \"${filePath}\": ${error}`);\n }\n return {\n filePath: resolvedPath,\n token\n };\n}\nexport function validate(token) {\n if (!isJWT(token)) {\n throw new ExitProcessError(2, `Token does not appear to be a JWT`);\n }\n}\nfunction isJWT(token) {\n // https://stackoverflow.com/a/65755789\n const jwtPattern = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\n return jwtPattern.test(token);\n}"]}
|
|
@@ -321,6 +321,7 @@ function actionPropertyToSdkPropertyDefinition(parameterType) {
|
|
|
321
321
|
case "integer":
|
|
322
322
|
case "long":
|
|
323
323
|
case "timestamp":
|
|
324
|
+
case "mediaReference":
|
|
324
325
|
case "marking":
|
|
325
326
|
case "objectType":
|
|
326
327
|
return parameterType.type;
|
|
@@ -352,7 +353,7 @@ function actionPropertyToSdkPropertyDefinition(parameterType) {
|
|
|
352
353
|
}, {})
|
|
353
354
|
};
|
|
354
355
|
default:
|
|
355
|
-
throw new Error(`Unsupported action parameter type: ${parameterType
|
|
356
|
+
throw new Error(`Unsupported action parameter type: ${JSON.stringify(parameterType)}`);
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
359
|
function createModifiedEntities(addedObjects, modifiedObjects) {
|
|
@@ -22137,7 +22138,7 @@ function helper(x) {
|
|
|
22137
22138
|
|
|
22138
22139
|
// ../generator/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js
|
|
22139
22140
|
async function generateClientSdkVersionTwoPointZero(ontology, userAgent, fs9, outDir, packageType = "commonjs", externalObjects = /* @__PURE__ */ new Map(), externalInterfaces = /* @__PURE__ */ new Map(), externalSpts = /* @__PURE__ */ new Map(), forInternalUse = false) {
|
|
22140
|
-
const importExt =
|
|
22141
|
+
const importExt = ".js";
|
|
22141
22142
|
await verifyOutDir(outDir, fs9);
|
|
22142
22143
|
const sanitizedOntology = sanitizeMetadata(ontology);
|
|
22143
22144
|
await fs9.mkdir(outDir, {
|
|
@@ -22272,10 +22273,10 @@ async function writeJson(minimalFs, filePath, body) {
|
|
|
22272
22273
|
return void await minimalFs.writeFile(filePath, JSON.stringify(body, void 0, 2) + "\n");
|
|
22273
22274
|
}
|
|
22274
22275
|
|
|
22275
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22276
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/index.js
|
|
22276
22277
|
init_esm_shims();
|
|
22277
22278
|
|
|
22278
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22279
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Action.js
|
|
22279
22280
|
init_esm_shims();
|
|
22280
22281
|
|
|
22281
22282
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.2.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
@@ -22382,34 +22383,34 @@ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, h
|
|
|
22382
22383
|
return response;
|
|
22383
22384
|
}
|
|
22384
22385
|
|
|
22385
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22386
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/ActionTypeV2.js
|
|
22386
22387
|
init_esm_shims();
|
|
22387
22388
|
|
|
22388
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22389
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Attachment.js
|
|
22389
22390
|
init_esm_shims();
|
|
22390
22391
|
|
|
22391
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22392
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/AttachmentPropertyV2.js
|
|
22392
22393
|
init_esm_shims();
|
|
22393
22394
|
|
|
22394
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22395
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/LinkedObjectV2.js
|
|
22395
22396
|
init_esm_shims();
|
|
22396
22397
|
|
|
22397
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22398
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/MediaReferenceProperty.js
|
|
22398
22399
|
init_esm_shims();
|
|
22399
22400
|
|
|
22400
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22401
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/ObjectTypeV2.js
|
|
22401
22402
|
init_esm_shims();
|
|
22402
22403
|
|
|
22403
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22404
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyInterface.js
|
|
22404
22405
|
init_esm_shims();
|
|
22405
22406
|
|
|
22406
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22407
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyObjectSet.js
|
|
22407
22408
|
init_esm_shims();
|
|
22408
22409
|
|
|
22409
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22410
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyObjectV2.js
|
|
22410
22411
|
init_esm_shims();
|
|
22411
22412
|
|
|
22412
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22413
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyV2.js
|
|
22413
22414
|
var OntologyV2_exports = {};
|
|
22414
22415
|
__export(OntologyV2_exports, {
|
|
22415
22416
|
get: () => get,
|
|
@@ -22430,16 +22431,16 @@ function getFullMetadata($ctx, ...args) {
|
|
|
22430
22431
|
return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
22431
22432
|
}
|
|
22432
22433
|
|
|
22433
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22434
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Query.js
|
|
22434
22435
|
init_esm_shims();
|
|
22435
22436
|
|
|
22436
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22437
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/QueryType.js
|
|
22437
22438
|
init_esm_shims();
|
|
22438
22439
|
|
|
22439
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22440
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/TimeSeriesPropertyV2.js
|
|
22440
22441
|
init_esm_shims();
|
|
22441
22442
|
|
|
22442
|
-
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.
|
|
22443
|
+
// ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/TimeSeriesValueBankProperty.js
|
|
22443
22444
|
init_esm_shims();
|
|
22444
22445
|
|
|
22445
22446
|
// ../shared.client.impl/build/esm/index.js
|
|
@@ -22474,7 +22475,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
22474
22475
|
|
|
22475
22476
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
22476
22477
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
22477
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.25.0-beta.
|
|
22478
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.25.0-beta.27"}`;
|
|
22478
22479
|
async function handleGenerate(args) {
|
|
22479
22480
|
let success = false;
|
|
22480
22481
|
if (args.ontologyPath) {
|
|
@@ -22610,7 +22611,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
22610
22611
|
}
|
|
22611
22612
|
return true;
|
|
22612
22613
|
}
|
|
22613
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.25.0-beta.
|
|
22614
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.25.0-beta.27", args.externalObjects, args.externalInterfaces);
|
|
22614
22615
|
return true;
|
|
22615
22616
|
} catch (e) {
|
|
22616
22617
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -22637,8 +22638,8 @@ async function getDependencyVersions() {
|
|
|
22637
22638
|
typescriptVersion,
|
|
22638
22639
|
tslibVersion,
|
|
22639
22640
|
areTheTypesWrongVersion,
|
|
22640
|
-
osdkApiVersion: `^${"2.1.0-beta.
|
|
22641
|
-
osdkClientVersion: `^${"2.1.0-beta.
|
|
22641
|
+
osdkApiVersion: `^${"2.1.0-beta.27"}`,
|
|
22642
|
+
osdkClientVersion: `^${"2.1.0-beta.27"}`,
|
|
22642
22643
|
osdkLegacyClientVersion
|
|
22643
22644
|
};
|
|
22644
22645
|
}
|
|
@@ -22677,5 +22678,5 @@ function createNormalFs() {
|
|
|
22677
22678
|
}
|
|
22678
22679
|
|
|
22679
22680
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
22680
|
-
//# sourceMappingURL=handleGenerate-
|
|
22681
|
-
//# sourceMappingURL=handleGenerate-
|
|
22681
|
+
//# sourceMappingURL=handleGenerate-NGHOD2J6.js.map
|
|
22682
|
+
//# sourceMappingURL=handleGenerate-NGHOD2J6.js.map
|