@osdk/cli 0.26.0-beta.5 → 0.26.0-beta.7
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/{acorn-LQZJTRX7.js → acorn-RXMSUCXL.js} +3 -3
- package/build/esm/{acorn-LQZJTRX7.js.map → acorn-RXMSUCXL.js.map} +1 -1
- package/build/esm/{angular-VWUX447C.js → angular-ZXAN5BMN.js} +3 -3
- package/build/esm/{angular-VWUX447C.js.map → angular-ZXAN5BMN.js.map} +1 -1
- package/build/esm/{babel-7BWEVLBS.js → babel-TI7T67T2.js} +3 -3
- package/build/esm/{babel-7BWEVLBS.js.map → babel-TI7T67T2.js.map} +1 -1
- package/build/esm/{chunk-SAOPV5FF.js → chunk-2U36M44D.js} +3 -3
- package/build/esm/{chunk-SAOPV5FF.js.map → chunk-2U36M44D.js.map} +1 -1
- package/build/esm/{chunk-LR3YBME3.js → chunk-KJFA7LBI.js} +7 -7
- package/build/esm/{chunk-LR3YBME3.js.map → chunk-KJFA7LBI.js.map} +1 -1
- package/build/esm/{chunk-KHVWTBWA.js → chunk-M2BWWO6L.js} +8 -8
- package/build/esm/{chunk-KHVWTBWA.js.map → chunk-M2BWWO6L.js.map} +1 -1
- package/build/esm/{chunk-GVZBRYRL.js → chunk-ML7ZMS6G.js} +3 -3
- package/build/esm/{chunk-GVZBRYRL.js.map → chunk-ML7ZMS6G.js.map} +1 -1
- package/build/esm/{chunk-KXNCVDQG.js → chunk-MU54JM45.js} +9 -9
- package/build/esm/{chunk-KXNCVDQG.js.map → chunk-MU54JM45.js.map} +1 -1
- package/build/esm/{chunk-HCWMXOMI.js → chunk-N3LXG6II.js} +5 -4
- package/build/esm/chunk-N3LXG6II.js.map +1 -0
- package/build/esm/{chunk-DMUWBIYY.js → chunk-VHOQB2JW.js} +4 -4
- package/build/esm/{chunk-DMUWBIYY.js.map → chunk-VHOQB2JW.js.map} +1 -1
- package/build/esm/{chunk-PXU2ECCD.js → chunk-Y3AS6B5K.js} +3 -3
- package/build/esm/{chunk-PXU2ECCD.js.map → chunk-Y3AS6B5K.js.map} +1 -1
- package/build/esm/{chunk-TAVP2OOG.js → chunk-ZI5AB4DP.js} +8 -8
- package/build/esm/{chunk-TAVP2OOG.js.map → chunk-ZI5AB4DP.js.map} +1 -1
- package/build/esm/{estree-PI6JMQNR.js → estree-CSIG7D6Y.js} +3 -3
- package/build/esm/{estree-PI6JMQNR.js.map → estree-CSIG7D6Y.js.map} +1 -1
- package/build/esm/find-up-EKHQCTZM.js +4 -0
- package/build/esm/{find-up-QYNPYSRQ.js.map → find-up-EKHQCTZM.js.map} +1 -1
- package/build/esm/{flow-AP4DEOL5.js → flow-NUNWZLRW.js} +3 -3
- package/build/esm/{flow-AP4DEOL5.js.map → flow-NUNWZLRW.js.map} +1 -1
- package/build/esm/{glimmer-LM2ZFC5U.js → glimmer-GYUSOBQY.js} +3 -3
- package/build/esm/{glimmer-LM2ZFC5U.js.map → glimmer-GYUSOBQY.js.map} +1 -1
- package/build/esm/{graphql-U5CPDQKQ.js → graphql-OALHBC5M.js} +3 -3
- package/build/esm/{graphql-U5CPDQKQ.js.map → graphql-OALHBC5M.js.map} +1 -1
- package/build/esm/{handleGenerate-XE3AXVFJ.js → handleGenerate-YLHDBKBX.js} +66 -61
- package/build/esm/handleGenerate-YLHDBKBX.js.map +1 -0
- package/build/esm/{html-FNGHE355.js → html-4RLNYFM4.js} +3 -3
- package/build/esm/{html-FNGHE355.js.map → html-4RLNYFM4.js.map} +1 -1
- package/build/esm/index.js +18 -18
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-ETZCNKG3.js +4 -0
- package/build/esm/{loginFlow-ESPJDVBX.js.map → loginFlow-ETZCNKG3.js.map} +1 -1
- package/build/esm/{markdown-HUHOYR5Q.js → markdown-MRACSGE5.js} +3 -3
- package/build/esm/{markdown-HUHOYR5Q.js.map → markdown-MRACSGE5.js.map} +1 -1
- package/build/esm/{meriyah-WP7UQXC7.js → meriyah-LVMHXIGF.js} +3 -3
- package/build/esm/{meriyah-WP7UQXC7.js.map → meriyah-LVMHXIGF.js.map} +1 -1
- package/build/esm/{postcss-JMNG34CL.js → postcss-A2ITI5N4.js} +3 -3
- package/build/esm/{postcss-JMNG34CL.js.map → postcss-A2ITI5N4.js.map} +1 -1
- package/build/esm/{siteDeployCommand-MHW4DE2N.js → siteDeployCommand-FW3TPYIM.js} +11 -11
- package/build/esm/{siteDeployCommand-MHW4DE2N.js.map → siteDeployCommand-FW3TPYIM.js.map} +1 -1
- package/build/esm/{typescript-A4QI3FB6.js → typescript-BMNHHGAA.js} +3 -3
- package/build/esm/{typescript-A4QI3FB6.js.map → typescript-BMNHHGAA.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-2HTL2AKX.js → versionDeleteCommand-6N7ILT5Q.js} +9 -8
- package/build/esm/versionDeleteCommand-6N7ILT5Q.js.map +1 -0
- package/build/esm/{versionDeleteCommand-OH3DBVWK.js → versionDeleteCommand-ZJNBSPUN.js} +9 -8
- package/build/esm/versionDeleteCommand-ZJNBSPUN.js.map +1 -0
- package/build/esm/{versionGetCommand-OJ7OWM4W.js → versionGetCommand-C7BL25D4.js} +6 -6
- package/build/esm/{versionGetCommand-OJ7OWM4W.js.map → versionGetCommand-C7BL25D4.js.map} +1 -1
- package/build/esm/{versionInfoCommand-VSSWQ7XO.js → versionInfoCommand-EDWVUCEP.js} +6 -6
- package/build/esm/{versionInfoCommand-VSSWQ7XO.js.map → versionInfoCommand-EDWVUCEP.js.map} +1 -1
- package/build/esm/{versionListCommand-YNYRIF6K.js → versionListCommand-IVUMHTEV.js} +6 -6
- package/build/esm/{versionListCommand-YNYRIF6K.js.map → versionListCommand-IVUMHTEV.js.map} +1 -1
- package/build/esm/{versionListCommand-AMJ24BZS.js → versionListCommand-OXSBNCUO.js} +6 -6
- package/build/esm/{versionListCommand-AMJ24BZS.js.map → versionListCommand-OXSBNCUO.js.map} +1 -1
- package/build/esm/{versionSetCommand-GFLHAZE6.js → versionSetCommand-FWL456LO.js} +6 -6
- package/build/esm/{versionSetCommand-GFLHAZE6.js.map → versionSetCommand-FWL456LO.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-5R33WWJ5.js → versionUnsetCommand-4VLL3XWY.js} +9 -8
- package/build/esm/versionUnsetCommand-4VLL3XWY.js.map +1 -0
- package/build/esm/{widgetSetDeployCommand-7DA2ZFNW.js → widgetSetDeployCommand-2ADVNOMA.js} +10 -10
- package/build/esm/{widgetSetDeployCommand-7DA2ZFNW.js.map → widgetSetDeployCommand-2ADVNOMA.js.map} +1 -1
- package/build/esm/{yaml-IT3UOTAK.js → yaml-XQ236J4T.js} +3 -3
- package/build/esm/{yaml-IT3UOTAK.js.map → yaml-XQ236J4T.js.map} +1 -1
- package/build/types/consola/handlePromptCancel.d.ts.map +1 -1
- package/package.json +6 -6
- package/build/esm/chunk-HCWMXOMI.js.map +0 -1
- package/build/esm/find-up-QYNPYSRQ.js +0 -4
- package/build/esm/handleGenerate-XE3AXVFJ.js.map +0 -1
- package/build/esm/loginFlow-ESPJDVBX.js +0 -4
- package/build/esm/versionDeleteCommand-2HTL2AKX.js.map +0 -1
- package/build/esm/versionDeleteCommand-OH3DBVWK.js.map +0 -1
- package/build/esm/versionUnsetCommand-5R33WWJ5.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { createFetchHeaderMutator, createRetryingFetch, createFetchOrThrow, PalantirApiError } from './chunk-
|
|
2
|
-
import { YargsCheckError, ExitProcessError } from './chunk-
|
|
3
|
-
import { findUp } from './chunk-
|
|
4
|
-
import { invokeLoginFlow } from './chunk-
|
|
5
|
-
import { __commonJS, init_esm_shims, __export, __toESM } from './chunk-
|
|
6
|
-
import * as fs8 from 'fs';
|
|
7
|
-
import
|
|
1
|
+
import { createFetchHeaderMutator, createRetryingFetch, createFetchOrThrow, PalantirApiError } from './chunk-Y3AS6B5K.js';
|
|
2
|
+
import { YargsCheckError, ExitProcessError } from './chunk-2U36M44D.js';
|
|
3
|
+
import { findUp } from './chunk-KJFA7LBI.js';
|
|
4
|
+
import { invokeLoginFlow } from './chunk-M2BWWO6L.js';
|
|
5
|
+
import { __commonJS, init_esm_shims, __export, __toESM } from './chunk-VHOQB2JW.js';
|
|
6
|
+
import * as fs8 from 'node:fs';
|
|
7
|
+
import * as path19 from 'node:path';
|
|
8
|
+
import path19__default from 'node:path';
|
|
8
9
|
import * as path9 from 'path';
|
|
9
10
|
import path9__default, { dirname } from 'path';
|
|
10
11
|
import { createRequire, builtinModules } from 'module';
|
|
@@ -14,9 +15,11 @@ import os from 'os';
|
|
|
14
15
|
import tty from 'tty';
|
|
15
16
|
import fs from 'fs/promises';
|
|
16
17
|
import assert2 from 'assert';
|
|
18
|
+
import fs6, { realpathSync, statSync, Stats } from 'fs';
|
|
17
19
|
import v8 from 'v8';
|
|
18
20
|
import { format, inspect } from 'util';
|
|
19
21
|
import consola$1, { consola } from 'consola';
|
|
22
|
+
import { fileURLToPath as fileURLToPath$1 } from 'node:url';
|
|
20
23
|
|
|
21
24
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
22
25
|
var require_fast_deep_equal = __commonJS({
|
|
@@ -54,10 +57,10 @@ var require_fast_deep_equal = __commonJS({
|
|
|
54
57
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
55
58
|
init_esm_shims();
|
|
56
59
|
|
|
57
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
60
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
|
|
58
61
|
init_esm_shims();
|
|
59
62
|
|
|
60
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
63
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
61
64
|
init_esm_shims();
|
|
62
65
|
|
|
63
66
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
@@ -168,34 +171,34 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
168
171
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
174
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
172
175
|
init_esm_shims();
|
|
173
176
|
|
|
174
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
177
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
175
178
|
init_esm_shims();
|
|
176
179
|
|
|
177
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
180
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
178
181
|
init_esm_shims();
|
|
179
182
|
|
|
180
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
183
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
181
184
|
init_esm_shims();
|
|
182
185
|
|
|
183
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
186
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
184
187
|
init_esm_shims();
|
|
185
188
|
|
|
186
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
189
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
187
190
|
init_esm_shims();
|
|
188
191
|
|
|
189
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
192
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
190
193
|
init_esm_shims();
|
|
191
194
|
|
|
192
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
195
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
193
196
|
init_esm_shims();
|
|
194
197
|
|
|
195
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
198
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
196
199
|
init_esm_shims();
|
|
197
200
|
|
|
198
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
201
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
199
202
|
var OntologyV2_exports = {};
|
|
200
203
|
__export(OntologyV2_exports, {
|
|
201
204
|
get: () => get,
|
|
@@ -216,16 +219,16 @@ function getFullMetadata($ctx, ...args) {
|
|
|
216
219
|
return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
217
220
|
}
|
|
218
221
|
|
|
219
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
222
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
220
223
|
init_esm_shims();
|
|
221
224
|
|
|
222
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
225
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
223
226
|
init_esm_shims();
|
|
224
227
|
|
|
225
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
228
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
226
229
|
init_esm_shims();
|
|
227
230
|
|
|
228
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
231
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.15.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
229
232
|
init_esm_shims();
|
|
230
233
|
|
|
231
234
|
// ../generator/build/esm/index.js
|
|
@@ -265,7 +268,7 @@ var AbstractImportable = class {
|
|
|
265
268
|
}
|
|
266
269
|
getImportPathRelTo = (filePath) => {
|
|
267
270
|
if (this.importPath.startsWith(".")) {
|
|
268
|
-
const result =
|
|
271
|
+
const result = path19.relative(path19.dirname(filePath), this.importPath).split(path19.sep).join("/");
|
|
269
272
|
if (result.startsWith(".")) {
|
|
270
273
|
return result;
|
|
271
274
|
} else {
|
|
@@ -432,8 +435,8 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2,
|
|
|
432
435
|
apiName: interfaceType.apiName,
|
|
433
436
|
displayName: interfaceType.displayName,
|
|
434
437
|
description: interfaceType.description,
|
|
435
|
-
implements: interfaceType.extendsInterfaces,
|
|
436
|
-
properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key2, value]) => {
|
|
438
|
+
implements: interfaceType.allExtendsInterfaces ?? interfaceType.extendsInterfaces,
|
|
439
|
+
properties: Object.fromEntries(Object.entries(interfaceType.allProperties ?? interfaceType.properties).map(([key2, value]) => {
|
|
437
440
|
return [key2, wirePropertyV2ToSdkPropertyDefinition(value, true, log)];
|
|
438
441
|
}).filter(([key2, value]) => value != null)),
|
|
439
442
|
links: {},
|
|
@@ -727,6 +730,7 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
|
|
|
727
730
|
threeDimensionalAggregation: get3DQueryAggregationProps(input),
|
|
728
731
|
nullable: false
|
|
729
732
|
};
|
|
733
|
+
case "entrySet":
|
|
730
734
|
case "null":
|
|
731
735
|
case "unsupported":
|
|
732
736
|
throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);
|
|
@@ -17484,7 +17488,7 @@ function read2(jsonPath, { base, specifier }) {
|
|
|
17484
17488
|
}
|
|
17485
17489
|
let string;
|
|
17486
17490
|
try {
|
|
17487
|
-
string =
|
|
17491
|
+
string = fs6.readFileSync(path9__default.toNamespacedPath(jsonPath), "utf8");
|
|
17488
17492
|
} catch (error) {
|
|
17489
17493
|
const exception2 = (
|
|
17490
17494
|
/** @type {ErrnoException} */
|
|
@@ -18393,7 +18397,7 @@ var import_n_readlines = __toESM2(require_readlines());
|
|
|
18393
18397
|
function getInterpreter(file) {
|
|
18394
18398
|
let fd;
|
|
18395
18399
|
try {
|
|
18396
|
-
fd =
|
|
18400
|
+
fd = fs6.openSync(file, "r");
|
|
18397
18401
|
} catch {
|
|
18398
18402
|
return;
|
|
18399
18403
|
}
|
|
@@ -18410,7 +18414,7 @@ function getInterpreter(file) {
|
|
|
18410
18414
|
}
|
|
18411
18415
|
} finally {
|
|
18412
18416
|
try {
|
|
18413
|
-
|
|
18417
|
+
fs6.closeSync(fd);
|
|
18414
18418
|
} catch {
|
|
18415
18419
|
}
|
|
18416
18420
|
}
|
|
@@ -21078,7 +21082,7 @@ function createParsersAndPrinters(modules) {
|
|
|
21078
21082
|
}
|
|
21079
21083
|
var options7 = { ...options_default, ...options_default2, ...options_default3, ...options_default4, ...options_default5, ...options_default6 };
|
|
21080
21084
|
var languages = [...languages_evaluate_default, ...languages_evaluate_default2, ...languages_evaluate_default3, ...languages_evaluate_default4, ...languages_evaluate_default5, ...languages_evaluate_default6, ...languages_evaluate_default7, ...languages_evaluate_default8];
|
|
21081
|
-
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-
|
|
21085
|
+
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-RXMSUCXL.js'), parsers: ["acorn", "espree"] }, { importPlugin: () => import('./angular-ZXAN5BMN.js'), parsers: ["__ng_action", "__ng_binding", "__ng_interpolation", "__ng_directive"] }, { importPlugin: () => import('./babel-TI7T67T2.js'), parsers: ["babel", "babel-flow", "babel-ts", "__js_expression", "__ts_expression", "__vue_expression", "__vue_ts_expression", "__vue_event_binding", "__vue_ts_event_binding", "__babel_estree", "json", "json5", "jsonc", "json-stringify"] }, { importPlugin: () => import('./estree-CSIG7D6Y.js'), printers: ["estree", "estree-json"] }, { importPlugin: () => import('./flow-NUNWZLRW.js'), parsers: ["flow"] }, { importPlugin: () => import('./glimmer-GYUSOBQY.js'), parsers: ["glimmer"], printers: ["glimmer"] }, { importPlugin: () => import('./graphql-OALHBC5M.js'), parsers: ["graphql"], printers: ["graphql"] }, { importPlugin: () => import('./html-4RLNYFM4.js'), parsers: ["html", "angular", "vue", "lwc"], printers: ["html"] }, { importPlugin: () => import('./markdown-MRACSGE5.js'), parsers: ["markdown", "mdx", "remark"], printers: ["mdast"] }, { importPlugin: () => import('./meriyah-LVMHXIGF.js'), parsers: ["meriyah"] }, { importPlugin: () => import('./postcss-A2ITI5N4.js'), parsers: ["css", "less", "scss"], printers: ["postcss"] }, { importPlugin: () => import('./typescript-BMNHHGAA.js'), parsers: ["typescript"] }, { importPlugin: () => import('./yaml-XQ236J4T.js'), parsers: ["yaml"], printers: ["yaml"] }]);
|
|
21082
21086
|
function loadBuiltinPlugins() {
|
|
21083
21087
|
return [builtin_plugins_proxy_exports];
|
|
21084
21088
|
}
|
|
@@ -21408,12 +21412,12 @@ async function generatePerActionDataFiles({
|
|
|
21408
21412
|
ontology: enhancedOntology,
|
|
21409
21413
|
forInternalUse = false
|
|
21410
21414
|
}) {
|
|
21411
|
-
const outDir =
|
|
21415
|
+
const outDir = path19__default.join(rootOutDir, "ontology", "actions");
|
|
21412
21416
|
await fs9.mkdir(outDir, {
|
|
21413
21417
|
recursive: true
|
|
21414
21418
|
});
|
|
21415
21419
|
await Promise.all(Object.values(enhancedOntology.actionTypes).map(async (action) => {
|
|
21416
|
-
const currentFilePath =
|
|
21420
|
+
const currentFilePath = path19__default.join("ontology", "actions", `${action.shortApiName}.ts`);
|
|
21417
21421
|
const uniqueApiNamesArray = extractReferencedObjectsFromAction(action.raw);
|
|
21418
21422
|
const uniqueApiNames = new Set(uniqueApiNamesArray);
|
|
21419
21423
|
stringUnionFrom([...uniqueApiNames]);
|
|
@@ -21499,7 +21503,7 @@ async function generatePerActionDataFiles({
|
|
|
21499
21503
|
}
|
|
21500
21504
|
}
|
|
21501
21505
|
const imports = getObjectImports(referencedObjectDefs, undefined, currentFilePath, true);
|
|
21502
|
-
await fs9.writeFile(
|
|
21506
|
+
await fs9.writeFile(path19__default.join(rootOutDir, currentFilePath), await formatTs(`
|
|
21503
21507
|
import type {
|
|
21504
21508
|
ActionDefinition,
|
|
21505
21509
|
ActionMetadata,
|
|
@@ -21587,8 +21591,8 @@ async function generatePerActionDataFiles({
|
|
|
21587
21591
|
}()}
|
|
21588
21592
|
`));
|
|
21589
21593
|
}));
|
|
21590
|
-
const indexFileRelPath =
|
|
21591
|
-
await fs9.writeFile(
|
|
21594
|
+
const indexFileRelPath = path19__default.join("ontology", "actions.ts");
|
|
21595
|
+
await fs9.writeFile(path19__default.join(rootOutDir, indexFileRelPath), await formatTs(`
|
|
21592
21596
|
${Object.values(enhancedOntology.actionTypes).map((action) => {
|
|
21593
21597
|
const exportConstLine = `export {${action.shortApiName} } from "${action.getImportPathRelTo(indexFileRelPath)}";`;
|
|
21594
21598
|
return exportConstLine;
|
|
@@ -21995,13 +21999,13 @@ async function generatePerInterfaceDataFiles({
|
|
|
21995
21999
|
importExt,
|
|
21996
22000
|
forInternalUse
|
|
21997
22001
|
}) {
|
|
21998
|
-
const interfacesDir =
|
|
22002
|
+
const interfacesDir = path19__default.join(outDir, "ontology", "interfaces");
|
|
21999
22003
|
await fs9.mkdir(interfacesDir, {
|
|
22000
22004
|
recursive: true
|
|
22001
22005
|
});
|
|
22002
22006
|
for (const obj of Object.values(ontology.interfaceTypes)) {
|
|
22003
22007
|
if (obj instanceof ForeignType) continue;
|
|
22004
|
-
await fs9.writeFile(
|
|
22008
|
+
await fs9.writeFile(path19__default.join(interfacesDir, `${obj.shortApiName}.ts`), await formatTs(`
|
|
22005
22009
|
import type { PropertyDef as $PropertyDef } from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22006
22010
|
import { $osdkMetadata } from "../../OntologyMetadata${importExt}";
|
|
22007
22011
|
${__UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(obj, ontology, true, forInternalUse)}
|
|
@@ -22022,13 +22026,13 @@ async function generatePerObjectDataFiles(ctx) {
|
|
|
22022
22026
|
ontology,
|
|
22023
22027
|
importExt
|
|
22024
22028
|
} = ctx;
|
|
22025
|
-
await fs9.mkdir(
|
|
22029
|
+
await fs9.mkdir(path19__default.join(outDir, "ontology", "objects"), {
|
|
22026
22030
|
recursive: true
|
|
22027
22031
|
});
|
|
22028
22032
|
for (const obj of Object.values(ontology.objectTypes)) {
|
|
22029
22033
|
if (obj instanceof ForeignType) continue;
|
|
22030
|
-
const relPath =
|
|
22031
|
-
const outFilePath =
|
|
22034
|
+
const relPath = path19__default.join(".", "ontology", `objects`, `${obj.shortApiName}.ts`);
|
|
22035
|
+
const outFilePath = path19__default.join(outDir, relPath);
|
|
22032
22036
|
await fs9.writeFile(outFilePath, await formatTs(`
|
|
22033
22037
|
import type { PropertyDef as $PropertyDef } from "${ctx.forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22034
22038
|
import { $osdkMetadata } from "../../OntologyMetadata${importExt}";
|
|
@@ -22036,7 +22040,7 @@ async function generatePerObjectDataFiles(ctx) {
|
|
|
22036
22040
|
${wireObjectTypeV2ToSdkObjectConstV2(obj.raw, ctx, relPath)}
|
|
22037
22041
|
`));
|
|
22038
22042
|
}
|
|
22039
|
-
await fs9.writeFile(
|
|
22043
|
+
await fs9.writeFile(path19__default.join(outDir, "ontology", "objects.ts"), await formatTs(`
|
|
22040
22044
|
${Object.values(ctx.ontology.objectTypes).filter((o) => o instanceof EnhancedObjectType).map((objType) => `export {${objType.shortApiName}} from "./objects/${objType.shortApiName}${importExt}";`).join("\n")}
|
|
22041
22045
|
${Object.keys(ontology.objectTypes).length === 0 ? "export {};" : ""}
|
|
22042
22046
|
`));
|
|
@@ -22084,6 +22088,7 @@ function getObjectTypesFromQueryDataType(dataType, types) {
|
|
|
22084
22088
|
case "threeDimensionalAggregation":
|
|
22085
22089
|
case "timestamp":
|
|
22086
22090
|
case "twoDimensionalAggregation":
|
|
22091
|
+
case "entrySet":
|
|
22087
22092
|
case "unsupported":
|
|
22088
22093
|
return;
|
|
22089
22094
|
default:
|
|
@@ -22111,8 +22116,8 @@ async function generatePerQueryDataFilesV2({
|
|
|
22111
22116
|
importExt = "",
|
|
22112
22117
|
forInternalUse = false
|
|
22113
22118
|
}) {
|
|
22114
|
-
const relOutDir =
|
|
22115
|
-
const outDir =
|
|
22119
|
+
const relOutDir = path19__default.join(".", "ontology", "queries");
|
|
22120
|
+
const outDir = path19__default.join(rootOutDir, "ontology", "queries");
|
|
22116
22121
|
await fs9.mkdir(outDir, {
|
|
22117
22122
|
recursive: true
|
|
22118
22123
|
});
|
|
@@ -22125,14 +22130,14 @@ async function generatePerQueryDataFilesV2({
|
|
|
22125
22130
|
`));
|
|
22126
22131
|
}
|
|
22127
22132
|
async function generateV2QueryFile(fs9, outDir, relOutDir, query, importExt, ontology, forInternalUse) {
|
|
22128
|
-
const relFilePath =
|
|
22133
|
+
const relFilePath = path19__default.join(relOutDir, `${query.shortApiName}.ts`);
|
|
22129
22134
|
const objectTypes = getObjectTypeApiNamesFromQuery(query);
|
|
22130
22135
|
const objectTypeObjects = new Set(objectTypes.map((o) => ontology.requireObjectType(o)));
|
|
22131
22136
|
const importObjects = getObjectImports(objectTypeObjects, "", relFilePath, true);
|
|
22132
22137
|
const baseProps = deleteUndefineds(wireQueryTypeV2ToSdkQueryDefinitionNoParams(query.raw));
|
|
22133
22138
|
const outputBase = deleteUndefineds(wireQueryDataTypeToQueryDataTypeDefinition(query.output));
|
|
22134
22139
|
objectTypes.length > 0 ? objectTypes.map((apiNameObj) => `"${apiNameObj}"`).join("|") : "never";
|
|
22135
|
-
await fs9.writeFile(
|
|
22140
|
+
await fs9.writeFile(path19__default.join(outDir, `${query.shortApiName}.ts`), await formatTs(`
|
|
22136
22141
|
import type { QueryDefinition , QueryParam, QueryResult, VersionBound} from "${forInternalUse ? "@osdk/api" : "@osdk/client"}";
|
|
22137
22142
|
import type { $ExpectedClientVersion } from "../../OntologyMetadata${importExt}";
|
|
22138
22143
|
import { $osdkMetadata} from "../../OntologyMetadata${importExt}";
|
|
@@ -22300,7 +22305,7 @@ async function generateRootIndexTsFile({
|
|
|
22300
22305
|
ontologyApiNamespace,
|
|
22301
22306
|
ontology
|
|
22302
22307
|
}) {
|
|
22303
|
-
await fs9.writeFile(
|
|
22308
|
+
await fs9.writeFile(path19__default.join(outDir, "index.ts"), await formatTs(`export {${helper(ontology.actionTypes)}} from "./ontology/actions${importExt}";
|
|
22304
22309
|
export * as $Actions from "./ontology/actions${importExt}";
|
|
22305
22310
|
export {${helper(ontology.interfaceTypes)}} from "./ontology/interfaces${importExt}";
|
|
22306
22311
|
export * as $Interfaces from "./ontology/interfaces${importExt}";
|
|
@@ -22354,24 +22359,24 @@ async function generateClientSdkPackage(packageName, packageVersion, sdkVersion,
|
|
|
22354
22359
|
throw new Error("This generator version does not support generating v1 sdks");
|
|
22355
22360
|
}
|
|
22356
22361
|
for (const packageType of ["module", "commonjs"]) {
|
|
22357
|
-
const outDir =
|
|
22362
|
+
const outDir = path19.join(baseOutDir, "dist", packageType);
|
|
22358
22363
|
await generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, externalObjects, externalInterfaces);
|
|
22359
22364
|
await fs8.promises.mkdir(outDir, {
|
|
22360
22365
|
recursive: true
|
|
22361
22366
|
});
|
|
22362
|
-
await writeJson(minimalFs,
|
|
22367
|
+
await writeJson(minimalFs, path19.join(outDir, "package.json"), {
|
|
22363
22368
|
type: packageType
|
|
22364
22369
|
});
|
|
22365
|
-
await writeJson(minimalFs,
|
|
22370
|
+
await writeJson(minimalFs, path19.join(outDir, `tsconfig.json`), {
|
|
22366
22371
|
compilerOptions: getTsCompilerOptions(packageType)
|
|
22367
22372
|
});
|
|
22368
22373
|
}
|
|
22369
|
-
await writeJson(minimalFs,
|
|
22370
|
-
await minimalFs.mkdir(
|
|
22374
|
+
await writeJson(minimalFs, path19.join(baseOutDir, "package.json"), getPackageJsonContents(packageName, packageVersion, dependencyVersions));
|
|
22375
|
+
await minimalFs.mkdir(path19.join(baseOutDir, "ontology"), {
|
|
22371
22376
|
recursive: true
|
|
22372
22377
|
});
|
|
22373
|
-
await minimalFs.writeFile(
|
|
22374
|
-
await minimalFs.writeFile(
|
|
22378
|
+
await minimalFs.writeFile(path19.join(baseOutDir, "ontology", "objects.js"), `module.exports = require("../../dist/module/ontology/objects")`);
|
|
22379
|
+
await minimalFs.writeFile(path19.join(baseOutDir, "ontology", "objects.d.ts"), `export * from "../dist/module/ontology/objects"`);
|
|
22375
22380
|
}
|
|
22376
22381
|
function getTsCompilerOptions(packageType) {
|
|
22377
22382
|
const commonTsconfig = {
|
|
@@ -22485,7 +22490,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
22485
22490
|
|
|
22486
22491
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
22487
22492
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
22488
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.26.0-beta.
|
|
22493
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.26.0-beta.7"}`;
|
|
22489
22494
|
async function handleGenerate(args) {
|
|
22490
22495
|
let success = false;
|
|
22491
22496
|
if (args.ontologyPath) {
|
|
@@ -22559,7 +22564,7 @@ async function generateFromStack(args) {
|
|
|
22559
22564
|
return {
|
|
22560
22565
|
...x,
|
|
22561
22566
|
extendsInterfaces: [...x.extendsInterfaces].sort(),
|
|
22562
|
-
properties: sortKeys2(x.properties)
|
|
22567
|
+
properties: sortKeys2(x.allProperties ?? x.properties)
|
|
22563
22568
|
};
|
|
22564
22569
|
});
|
|
22565
22570
|
ontology.queryTypes = sortKeys2(ontology.queryTypes, (x) => {
|
|
@@ -22621,7 +22626,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
22621
22626
|
}
|
|
22622
22627
|
return true;
|
|
22623
22628
|
}
|
|
22624
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.26.0-beta.
|
|
22629
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.26.0-beta.7", args.externalObjects, args.externalInterfaces);
|
|
22625
22630
|
return true;
|
|
22626
22631
|
} catch (e) {
|
|
22627
22632
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -22648,15 +22653,15 @@ async function getDependencyVersions() {
|
|
|
22648
22653
|
typescriptVersion,
|
|
22649
22654
|
tslibVersion,
|
|
22650
22655
|
areTheTypesWrongVersion,
|
|
22651
|
-
osdkApiVersion: `^${"2.2.0-beta.
|
|
22652
|
-
osdkClientVersion: `^${"2.2.0-beta.
|
|
22656
|
+
osdkApiVersion: `^${"2.2.0-beta.7"}`,
|
|
22657
|
+
osdkClientVersion: `^${"2.2.0-beta.7"}`,
|
|
22653
22658
|
osdkLegacyClientVersion
|
|
22654
22659
|
};
|
|
22655
22660
|
}
|
|
22656
22661
|
var cachedOurPackageJsonPath;
|
|
22657
22662
|
async function getOurPackageJsonPath() {
|
|
22658
22663
|
if (cachedOurPackageJsonPath) return cachedOurPackageJsonPath;
|
|
22659
|
-
const __dir =
|
|
22664
|
+
const __dir = path19.dirname(fileURLToPath$1(import.meta.url));
|
|
22660
22665
|
const ourPackageJsonPath = await findUp("package.json", {
|
|
22661
22666
|
cwd: __dir
|
|
22662
22667
|
});
|
|
@@ -22688,5 +22693,5 @@ function createNormalFs() {
|
|
|
22688
22693
|
}
|
|
22689
22694
|
|
|
22690
22695
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
22691
|
-
//# sourceMappingURL=handleGenerate-
|
|
22692
|
-
//# sourceMappingURL=handleGenerate-
|
|
22696
|
+
//# sourceMappingURL=handleGenerate-YLHDBKBX.js.map
|
|
22697
|
+
//# sourceMappingURL=handleGenerate-YLHDBKBX.js.map
|