@osdk/cli 0.27.0-beta.1 → 0.27.0-beta.10
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 +31 -0
- package/build/esm/{acorn-TOBUZL7E.js → acorn-JD7YOXOW.js} +3 -3
- package/build/esm/{acorn-TOBUZL7E.js.map → acorn-JD7YOXOW.js.map} +1 -1
- package/build/esm/{angular-KEEXFHZL.js → angular-3AJ2SFX7.js} +3 -3
- package/build/esm/{angular-KEEXFHZL.js.map → angular-3AJ2SFX7.js.map} +1 -1
- package/build/esm/{babel-5PSSMNMW.js → babel-QGX3VV5S.js} +3 -3
- package/build/esm/{babel-5PSSMNMW.js.map → babel-QGX3VV5S.js.map} +1 -1
- package/build/esm/{chunk-7UN3PA2S.js → chunk-5PX3HSZR.js} +3 -3
- package/build/esm/{chunk-7UN3PA2S.js.map → chunk-5PX3HSZR.js.map} +1 -1
- package/build/esm/chunk-DGKZAGPL.js +28 -0
- package/build/esm/chunk-DGKZAGPL.js.map +1 -0
- package/build/esm/{chunk-JPYBJBRJ.js → chunk-DXFUAG7W.js} +3 -3
- package/build/esm/{chunk-JPYBJBRJ.js.map → chunk-DXFUAG7W.js.map} +1 -1
- package/build/esm/{chunk-KUPCZEOX.js → chunk-GQTSTRG7.js} +3 -3
- package/build/esm/{chunk-KUPCZEOX.js.map → chunk-GQTSTRG7.js.map} +1 -1
- package/build/esm/{chunk-PME7V3W5.js → chunk-HFQXGJUG.js} +3 -3
- package/build/esm/{chunk-PME7V3W5.js.map → chunk-HFQXGJUG.js.map} +1 -1
- package/build/esm/{chunk-CGHHQ7AY.js → chunk-MU732G7I.js} +4 -4
- package/build/esm/{chunk-CGHHQ7AY.js.map → chunk-MU732G7I.js.map} +1 -1
- package/build/esm/{chunk-XOFPRGD5.js → chunk-WHNUNGND.js} +5 -5
- package/build/esm/{chunk-XOFPRGD5.js.map → chunk-WHNUNGND.js.map} +1 -1
- package/build/esm/{chunk-M4ZNCKMY.js → chunk-YFS5KLHD.js} +3 -3
- package/build/esm/{chunk-M4ZNCKMY.js.map → chunk-YFS5KLHD.js.map} +1 -1
- package/build/esm/{chunk-QZFJSHSF.js → chunk-ZWSZGR5U.js} +9 -9
- package/build/esm/chunk-ZWSZGR5U.js.map +1 -0
- package/build/esm/{estree-G3OYCIFP.js → estree-KG4K5QQZ.js} +3 -3
- package/build/esm/{estree-G3OYCIFP.js.map → estree-KG4K5QQZ.js.map} +1 -1
- package/build/esm/find-up-W7EXJFQH.js +4 -0
- package/build/esm/{find-up-CF34C5LW.js.map → find-up-W7EXJFQH.js.map} +1 -1
- package/build/esm/{flow-76OUAQ5X.js → flow-JJAOFHVR.js} +3 -3
- package/build/esm/{flow-76OUAQ5X.js.map → flow-JJAOFHVR.js.map} +1 -1
- package/build/esm/{glimmer-J3JDI2DZ.js → glimmer-LTNZJIJW.js} +3 -3
- package/build/esm/{glimmer-J3JDI2DZ.js.map → glimmer-LTNZJIJW.js.map} +1 -1
- package/build/esm/{graphql-WMUJ6I5N.js → graphql-KTAUFGIO.js} +3 -3
- package/build/esm/{graphql-WMUJ6I5N.js.map → graphql-KTAUFGIO.js.map} +1 -1
- package/build/esm/{handleGenerate-FYMWW4KZ.js → handleGenerate-OS33BQ5O.js} +169 -137
- package/build/esm/handleGenerate-OS33BQ5O.js.map +1 -0
- package/build/esm/{html-3MJQME6X.js → html-GMDGBLFG.js} +3 -3
- package/build/esm/{html-3MJQME6X.js.map → html-GMDGBLFG.js.map} +1 -1
- package/build/esm/index.js +19 -19
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-HRPXRVXN.js +4 -0
- package/build/esm/{loginFlow-YYX3TRL6.js.map → loginFlow-HRPXRVXN.js.map} +1 -1
- package/build/esm/{markdown-H7V23EC7.js → markdown-HFDLFZ5Y.js} +3 -3
- package/build/esm/{markdown-H7V23EC7.js.map → markdown-HFDLFZ5Y.js.map} +1 -1
- package/build/esm/{meriyah-DOVZXFCT.js → meriyah-M2H255YT.js} +3 -3
- package/build/esm/{meriyah-DOVZXFCT.js.map → meriyah-M2H255YT.js.map} +1 -1
- package/build/esm/{postcss-CHJDPNAX.js → postcss-HFWVKWXX.js} +3 -3
- package/build/esm/{postcss-CHJDPNAX.js.map → postcss-HFWVKWXX.js.map} +1 -1
- package/build/esm/{siteDeployCommand-RYYEPYTD.js → siteDeployCommand-6UEHD4WI.js} +8 -8
- package/build/esm/{siteDeployCommand-RYYEPYTD.js.map → siteDeployCommand-6UEHD4WI.js.map} +1 -1
- package/build/esm/{typescript-M7LM37RB.js → typescript-LVGK7LR7.js} +3 -3
- package/build/esm/{typescript-M7LM37RB.js.map → typescript-LVGK7LR7.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-2IAUPJWC.js → versionDeleteCommand-4QMJFCGN.js} +7 -7
- package/build/esm/{versionDeleteCommand-2IAUPJWC.js.map → versionDeleteCommand-4QMJFCGN.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-GPI4LQUF.js → versionDeleteCommand-ZYJYFW22.js} +7 -7
- package/build/esm/{versionDeleteCommand-GPI4LQUF.js.map → versionDeleteCommand-ZYJYFW22.js.map} +1 -1
- package/build/esm/{versionGetCommand-JGXCFGK7.js → versionGetCommand-TH4374O6.js} +6 -6
- package/build/esm/{versionGetCommand-JGXCFGK7.js.map → versionGetCommand-TH4374O6.js.map} +1 -1
- package/build/esm/{versionInfoCommand-AZC3QYFR.js → versionInfoCommand-H5VWJY2Y.js} +6 -6
- package/build/esm/{versionInfoCommand-AZC3QYFR.js.map → versionInfoCommand-H5VWJY2Y.js.map} +1 -1
- package/build/esm/{versionListCommand-QVMVMX4M.js → versionListCommand-6LW7EDGY.js} +6 -6
- package/build/esm/{versionListCommand-QVMVMX4M.js.map → versionListCommand-6LW7EDGY.js.map} +1 -1
- package/build/esm/{versionListCommand-IYRJ6TIH.js → versionListCommand-X7OLBTRZ.js} +6 -6
- package/build/esm/{versionListCommand-IYRJ6TIH.js.map → versionListCommand-X7OLBTRZ.js.map} +1 -1
- package/build/esm/{versionSetCommand-KHA6VTEJ.js → versionSetCommand-GO2KYTXZ.js} +6 -6
- package/build/esm/{versionSetCommand-KHA6VTEJ.js.map → versionSetCommand-GO2KYTXZ.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-IJTPIPGL.js → versionUnsetCommand-IUGDHOTH.js} +7 -7
- package/build/esm/{versionUnsetCommand-IJTPIPGL.js.map → versionUnsetCommand-IUGDHOTH.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-YH6FGQ2K.js → widgetSetDeployCommand-XL2CLCMZ.js} +7 -7
- package/build/esm/{widgetSetDeployCommand-YH6FGQ2K.js.map → widgetSetDeployCommand-XL2CLCMZ.js.map} +1 -1
- package/build/esm/{yaml-G7CHE6AH.js → yaml-AZTVLK7P.js} +3 -3
- package/build/esm/{yaml-G7CHE6AH.js.map → yaml-AZTVLK7P.js.map} +1 -1
- package/package.json +5 -5
- package/build/esm/chunk-QZFJSHSF.js.map +0 -1
- package/build/esm/chunk-YJFH4XYM.js +0 -28
- package/build/esm/chunk-YJFH4XYM.js.map +0 -1
- package/build/esm/find-up-CF34C5LW.js +0 -4
- package/build/esm/handleGenerate-FYMWW4KZ.js.map +0 -1
- package/build/esm/loginFlow-YYX3TRL6.js +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
1
|
+
import { createFetchHeaderMutator, createRetryingFetch, createFetchOrThrow, PalantirApiError } from './chunk-GQTSTRG7.js';
|
|
2
|
+
import { YargsCheckError, ExitProcessError } from './chunk-YFS5KLHD.js';
|
|
3
|
+
import { findUp } from './chunk-DXFUAG7W.js';
|
|
4
|
+
import { invokeLoginFlow } from './chunk-HFQXGJUG.js';
|
|
5
|
+
import { __commonJS, init_esm_shims, __export, __toESM } from './chunk-MU732G7I.js';
|
|
6
6
|
import * as fs8 from 'node:fs';
|
|
7
7
|
import * as path19 from 'node:path';
|
|
8
8
|
import path19__default from 'node:path';
|
|
@@ -57,10 +57,10 @@ var require_fast_deep_equal = __commonJS({
|
|
|
57
57
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
58
58
|
init_esm_shims();
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
60
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
|
|
61
61
|
init_esm_shims();
|
|
62
62
|
|
|
63
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
63
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
64
64
|
init_esm_shims();
|
|
65
65
|
|
|
66
66
|
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
@@ -171,37 +171,37 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
171
171
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
174
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
175
175
|
init_esm_shims();
|
|
176
176
|
|
|
177
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
177
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
178
178
|
init_esm_shims();
|
|
179
179
|
|
|
180
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
180
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
181
181
|
init_esm_shims();
|
|
182
182
|
|
|
183
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
183
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/CipherTextProperty.js
|
|
184
184
|
init_esm_shims();
|
|
185
185
|
|
|
186
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
186
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
187
187
|
init_esm_shims();
|
|
188
188
|
|
|
189
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
189
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
190
190
|
init_esm_shims();
|
|
191
191
|
|
|
192
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
192
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
193
193
|
init_esm_shims();
|
|
194
194
|
|
|
195
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
195
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
196
196
|
init_esm_shims();
|
|
197
197
|
|
|
198
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
198
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
199
199
|
init_esm_shims();
|
|
200
200
|
|
|
201
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
201
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
202
202
|
init_esm_shims();
|
|
203
203
|
|
|
204
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
204
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
205
205
|
var OntologyV2_exports = {};
|
|
206
206
|
__export(OntologyV2_exports, {
|
|
207
207
|
get: () => get,
|
|
@@ -218,7 +218,7 @@ var _get = [0, "/v2/ontologies/{0}"];
|
|
|
218
218
|
function get($ctx, ...args) {
|
|
219
219
|
return foundryPlatformFetch($ctx, _get, ...args);
|
|
220
220
|
}
|
|
221
|
-
var _getFullMetadata = [0, "/v2/ontologies/{0}/fullMetadata"];
|
|
221
|
+
var _getFullMetadata = [0, "/v2/ontologies/{0}/fullMetadata", 2];
|
|
222
222
|
function getFullMetadata($ctx, ...args) {
|
|
223
223
|
return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
224
224
|
}
|
|
@@ -227,16 +227,16 @@ function loadMetadata($ctx, ...args) {
|
|
|
227
227
|
return foundryPlatformFetch($ctx, _loadMetadata, ...args);
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
230
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
231
231
|
init_esm_shims();
|
|
232
232
|
|
|
233
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
233
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
234
234
|
init_esm_shims();
|
|
235
235
|
|
|
236
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
236
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
237
237
|
init_esm_shims();
|
|
238
238
|
|
|
239
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
239
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
240
240
|
init_esm_shims();
|
|
241
241
|
|
|
242
242
|
// ../generator/build/esm/index.js
|
|
@@ -476,6 +476,90 @@ function getModifiedEntityTypes(action) {
|
|
|
476
476
|
};
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
+
// ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
|
|
480
|
+
init_esm_shims();
|
|
481
|
+
|
|
482
|
+
// ../generator-converters/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js
|
|
483
|
+
init_esm_shims();
|
|
484
|
+
function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
|
|
485
|
+
switch (input.dataType.type) {
|
|
486
|
+
case "integer":
|
|
487
|
+
case "double":
|
|
488
|
+
case "string":
|
|
489
|
+
case "byte":
|
|
490
|
+
case "long":
|
|
491
|
+
case "short":
|
|
492
|
+
case "timestamp": {
|
|
493
|
+
return input.dataType.type;
|
|
494
|
+
}
|
|
495
|
+
case "date": {
|
|
496
|
+
return "datetime";
|
|
497
|
+
}
|
|
498
|
+
case "boolean":
|
|
499
|
+
case "geopoint":
|
|
500
|
+
case "geoshape":
|
|
501
|
+
case "decimal":
|
|
502
|
+
case "attachment":
|
|
503
|
+
case "timeseries":
|
|
504
|
+
case "array":
|
|
505
|
+
case "marking":
|
|
506
|
+
case "float":
|
|
507
|
+
case "geotimeSeriesReference":
|
|
508
|
+
case "mediaReference":
|
|
509
|
+
case "struct":
|
|
510
|
+
case "cipherText":
|
|
511
|
+
case "vector":
|
|
512
|
+
throw new Error(`Primary key of type ${input.dataType.type} is not supported`);
|
|
513
|
+
default:
|
|
514
|
+
input.dataType;
|
|
515
|
+
throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
|
|
520
|
+
function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {
|
|
521
|
+
if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === void 0) {
|
|
522
|
+
throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
|
|
523
|
+
}
|
|
524
|
+
if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {
|
|
525
|
+
throw new Error("Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.");
|
|
526
|
+
}
|
|
527
|
+
const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).map(([interfaceApiName, impl]) => [interfaceApiName, impl.properties])) : {};
|
|
528
|
+
return {
|
|
529
|
+
type: "object",
|
|
530
|
+
apiName: objectTypeWithLink.objectType.apiName,
|
|
531
|
+
description: objectTypeWithLink.objectType.description,
|
|
532
|
+
primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,
|
|
533
|
+
primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),
|
|
534
|
+
links: Object.fromEntries(objectTypeWithLink.linkTypes.map((linkType) => {
|
|
535
|
+
return [linkType.apiName, {
|
|
536
|
+
multiplicity: linkType.cardinality === "MANY",
|
|
537
|
+
targetType: linkType.objectTypeApiName
|
|
538
|
+
}];
|
|
539
|
+
})),
|
|
540
|
+
properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2), log)]).filter(([key2, value]) => value != null)),
|
|
541
|
+
implements: objectTypeWithLink.implementsInterfaces,
|
|
542
|
+
interfaceMap,
|
|
543
|
+
inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
|
|
544
|
+
icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : void 0,
|
|
545
|
+
titleProperty: objectTypeWithLink.objectType.titleProperty,
|
|
546
|
+
displayName: objectTypeWithLink.objectType.displayName,
|
|
547
|
+
pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,
|
|
548
|
+
status: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.status, supportedReleaseStatus),
|
|
549
|
+
rid: objectTypeWithLink.objectType.rid,
|
|
550
|
+
visibility: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.visibility, supportedObjectTypeVisibility)
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
function invertProps(a) {
|
|
554
|
+
return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : void 0;
|
|
555
|
+
}
|
|
556
|
+
var supportedIconTypes = ["blueprint"];
|
|
557
|
+
var supportedReleaseStatus = ["ACTIVE", "EXPERIMENTAL", "DEPRECATED", "ENDORSED"];
|
|
558
|
+
var supportedObjectTypeVisibility = ["NORMAL", "PROMINENT", "HIDDEN"];
|
|
559
|
+
function ensureStringEnumSupportedOrUndefined(value, supportedValues) {
|
|
560
|
+
return value && supportedValues.includes(value) ? value : void 0;
|
|
561
|
+
}
|
|
562
|
+
|
|
479
563
|
// ../generator-converters/build/esm/wireActionTypeV2ToSdkActionMetadata.js
|
|
480
564
|
function wireActionTypeV2ToSdkActionMetadata(input) {
|
|
481
565
|
const modifiedEntityTypes = getModifiedEntityTypes(input);
|
|
@@ -487,7 +571,7 @@ function wireActionTypeV2ToSdkActionMetadata(input) {
|
|
|
487
571
|
description: input.description,
|
|
488
572
|
modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),
|
|
489
573
|
rid: input.rid,
|
|
490
|
-
status: input.status
|
|
574
|
+
status: ensureStringEnumSupportedOrUndefined(input.status, supportedReleaseStatus)
|
|
491
575
|
};
|
|
492
576
|
}
|
|
493
577
|
function wireActionParameterV2ToSdkParameterDefinition(value) {
|
|
@@ -565,85 +649,6 @@ function createModifiedEntities(addedObjects, modifiedObjects) {
|
|
|
565
649
|
return entities;
|
|
566
650
|
}
|
|
567
651
|
|
|
568
|
-
// ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
|
|
569
|
-
init_esm_shims();
|
|
570
|
-
|
|
571
|
-
// ../generator-converters/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js
|
|
572
|
-
init_esm_shims();
|
|
573
|
-
function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
|
|
574
|
-
switch (input.dataType.type) {
|
|
575
|
-
case "integer":
|
|
576
|
-
case "double":
|
|
577
|
-
case "string":
|
|
578
|
-
case "byte":
|
|
579
|
-
case "long":
|
|
580
|
-
case "short":
|
|
581
|
-
case "timestamp": {
|
|
582
|
-
return input.dataType.type;
|
|
583
|
-
}
|
|
584
|
-
case "date": {
|
|
585
|
-
return "datetime";
|
|
586
|
-
}
|
|
587
|
-
case "boolean":
|
|
588
|
-
case "geopoint":
|
|
589
|
-
case "geoshape":
|
|
590
|
-
case "decimal":
|
|
591
|
-
case "attachment":
|
|
592
|
-
case "timeseries":
|
|
593
|
-
case "array":
|
|
594
|
-
case "marking":
|
|
595
|
-
case "float":
|
|
596
|
-
case "geotimeSeriesReference":
|
|
597
|
-
case "mediaReference":
|
|
598
|
-
case "struct":
|
|
599
|
-
case "cipherText":
|
|
600
|
-
case "vector":
|
|
601
|
-
throw new Error(`Primary key of type ${input.dataType.type} is not supported`);
|
|
602
|
-
default:
|
|
603
|
-
input.dataType;
|
|
604
|
-
throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
// ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
|
|
609
|
-
function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {
|
|
610
|
-
if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === void 0) {
|
|
611
|
-
throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
|
|
612
|
-
}
|
|
613
|
-
if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {
|
|
614
|
-
throw new Error("Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.");
|
|
615
|
-
}
|
|
616
|
-
const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).map(([interfaceApiName, impl]) => [interfaceApiName, impl.properties])) : {};
|
|
617
|
-
return {
|
|
618
|
-
type: "object",
|
|
619
|
-
apiName: objectTypeWithLink.objectType.apiName,
|
|
620
|
-
description: objectTypeWithLink.objectType.description,
|
|
621
|
-
primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,
|
|
622
|
-
primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),
|
|
623
|
-
links: Object.fromEntries(objectTypeWithLink.linkTypes.map((linkType) => {
|
|
624
|
-
return [linkType.apiName, {
|
|
625
|
-
multiplicity: linkType.cardinality === "MANY",
|
|
626
|
-
targetType: linkType.objectTypeApiName
|
|
627
|
-
}];
|
|
628
|
-
})),
|
|
629
|
-
properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2), log)]).filter(([key2, value]) => value != null)),
|
|
630
|
-
implements: objectTypeWithLink.implementsInterfaces,
|
|
631
|
-
interfaceMap,
|
|
632
|
-
inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
|
|
633
|
-
icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : void 0,
|
|
634
|
-
titleProperty: objectTypeWithLink.objectType.titleProperty,
|
|
635
|
-
displayName: objectTypeWithLink.objectType.displayName,
|
|
636
|
-
pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,
|
|
637
|
-
status: objectTypeWithLink.objectType.status,
|
|
638
|
-
rid: objectTypeWithLink.objectType.rid,
|
|
639
|
-
visibility: objectTypeWithLink.objectType.visibility
|
|
640
|
-
};
|
|
641
|
-
}
|
|
642
|
-
function invertProps(a) {
|
|
643
|
-
return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : void 0;
|
|
644
|
-
}
|
|
645
|
-
var supportedIconTypes = ["blueprint"];
|
|
646
|
-
|
|
647
652
|
// ../generator-converters/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js
|
|
648
653
|
init_esm_shims();
|
|
649
654
|
|
|
@@ -817,12 +822,6 @@ function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
|
|
|
817
822
|
};
|
|
818
823
|
}
|
|
819
824
|
|
|
820
|
-
// ../generator/build/esm/util/deleteUndefineds.js
|
|
821
|
-
init_esm_shims();
|
|
822
|
-
function deleteUndefineds(obj) {
|
|
823
|
-
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
|
|
824
|
-
}
|
|
825
|
-
|
|
826
825
|
// ../generator/build/esm/GenerateContext/EnhancedInterfaceType.js
|
|
827
826
|
var EnhancedInterfaceType = class extends EnhancedBase {
|
|
828
827
|
constructor(common2, raw) {
|
|
@@ -839,7 +838,7 @@ var EnhancedInterfaceType = class extends EnhancedBase {
|
|
|
839
838
|
return this.raw.properties;
|
|
840
839
|
}
|
|
841
840
|
getCleanedUpDefinition(v2) {
|
|
842
|
-
return
|
|
841
|
+
return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(this.raw);
|
|
843
842
|
}
|
|
844
843
|
};
|
|
845
844
|
|
|
@@ -857,7 +856,7 @@ var EnhancedObjectType = class extends EnhancedBase {
|
|
|
857
856
|
return this.getDefinitionIdentifier(v2);
|
|
858
857
|
}
|
|
859
858
|
getCleanedUpDefinition(v2) {
|
|
860
|
-
return
|
|
859
|
+
return wireObjectTypeFullMetadataToSdkObjectMetadata(this.raw, v2);
|
|
861
860
|
}
|
|
862
861
|
};
|
|
863
862
|
|
|
@@ -21090,7 +21089,7 @@ function createParsersAndPrinters(modules) {
|
|
|
21090
21089
|
}
|
|
21091
21090
|
var options7 = { ...options_default, ...options_default2, ...options_default3, ...options_default4, ...options_default5, ...options_default6 };
|
|
21092
21091
|
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];
|
|
21093
|
-
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-
|
|
21092
|
+
var { parsers, printers } = createParsersAndPrinters([{ importPlugin: () => import('./acorn-JD7YOXOW.js'), parsers: ["acorn", "espree"] }, { importPlugin: () => import('./angular-3AJ2SFX7.js'), parsers: ["__ng_action", "__ng_binding", "__ng_interpolation", "__ng_directive"] }, { importPlugin: () => import('./babel-QGX3VV5S.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-KG4K5QQZ.js'), printers: ["estree", "estree-json"] }, { importPlugin: () => import('./flow-JJAOFHVR.js'), parsers: ["flow"] }, { importPlugin: () => import('./glimmer-LTNZJIJW.js'), parsers: ["glimmer"], printers: ["glimmer"] }, { importPlugin: () => import('./graphql-KTAUFGIO.js'), parsers: ["graphql"], printers: ["graphql"] }, { importPlugin: () => import('./html-GMDGBLFG.js'), parsers: ["html", "angular", "vue", "lwc"], printers: ["html"] }, { importPlugin: () => import('./markdown-HFDLFZ5Y.js'), parsers: ["markdown", "mdx", "remark"], printers: ["mdast"] }, { importPlugin: () => import('./meriyah-M2H255YT.js'), parsers: ["meriyah"] }, { importPlugin: () => import('./postcss-HFWVKWXX.js'), parsers: ["css", "less", "scss"], printers: ["postcss"] }, { importPlugin: () => import('./typescript-LVGK7LR7.js'), parsers: ["typescript"] }, { importPlugin: () => import('./yaml-AZTVLK7P.js'), parsers: ["yaml"], printers: ["yaml"] }]);
|
|
21094
21093
|
function loadBuiltinPlugins() {
|
|
21095
21094
|
return [builtin_plugins_proxy_exports];
|
|
21096
21095
|
}
|
|
@@ -21337,7 +21336,7 @@ function formatTs(contents) {
|
|
|
21337
21336
|
}
|
|
21338
21337
|
|
|
21339
21338
|
// ../generator/build/esm/v2.0/generateMetadata.js
|
|
21340
|
-
var ExpectedOsdkVersion = "2.
|
|
21339
|
+
var ExpectedOsdkVersion = "2.3.0";
|
|
21341
21340
|
async function generateOntologyMetadataFile({
|
|
21342
21341
|
fs: fs9,
|
|
21343
21342
|
outDir,
|
|
@@ -21367,13 +21366,19 @@ function getObjectImports(objects, curApiName, currentFilePath, v2) {
|
|
|
21367
21366
|
}).join("\n");
|
|
21368
21367
|
}
|
|
21369
21368
|
|
|
21369
|
+
// ../generator/build/esm/util/deleteUndefineds.js
|
|
21370
|
+
init_esm_shims();
|
|
21371
|
+
function deleteUndefineds(obj) {
|
|
21372
|
+
return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
|
|
21373
|
+
}
|
|
21374
|
+
|
|
21370
21375
|
// ../generator/build/esm/util/stringify.js
|
|
21371
21376
|
init_esm_shims();
|
|
21372
21377
|
var defaultCustomizer = (value, defaultValueFormatter, key2, defaultKeyFormatter) => {
|
|
21373
21378
|
return [defaultKeyFormatter(key2), defaultValueFormatter(value)];
|
|
21374
21379
|
};
|
|
21375
21380
|
function stringify(obj, customizer = {}, separator = ",\n") {
|
|
21376
|
-
const defaultKeyFormatter = (key2) =>
|
|
21381
|
+
const defaultKeyFormatter = (key2) => JSON.stringify(key2);
|
|
21377
21382
|
const entries = [];
|
|
21378
21383
|
const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));
|
|
21379
21384
|
for (const key2 of sortedKeys) {
|
|
@@ -21385,6 +21390,8 @@ function stringify(obj, customizer = {}, separator = ",\n") {
|
|
|
21385
21390
|
} else {
|
|
21386
21391
|
entries.push(`${res[0]}: ${res[1]}`);
|
|
21387
21392
|
}
|
|
21393
|
+
} else if (value === void 0) {
|
|
21394
|
+
entries.push(`${defaultKeyFormatter(key2)}: undefined`);
|
|
21388
21395
|
}
|
|
21389
21396
|
}
|
|
21390
21397
|
return entries.join(separator);
|
|
@@ -21674,33 +21681,56 @@ init_esm_shims();
|
|
|
21674
21681
|
|
|
21675
21682
|
// ../generator/build/esm/shared/propertyJsdoc.js
|
|
21676
21683
|
init_esm_shims();
|
|
21677
|
-
function propertyJsdoc(property, {
|
|
21684
|
+
function propertyJsdoc(property, rawPropertyMetadata, {
|
|
21678
21685
|
isInherited,
|
|
21679
21686
|
apiName
|
|
21680
21687
|
}) {
|
|
21681
|
-
|
|
21682
|
-
`;
|
|
21688
|
+
const ret = [];
|
|
21683
21689
|
const renderDisplayName = property.displayName && property.displayName !== apiName;
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21690
|
+
const status = rawPropertyMetadata?.status;
|
|
21691
|
+
if (isInherited || renderDisplayName || property.description || status) {
|
|
21692
|
+
if (status) {
|
|
21693
|
+
let deprecationStatus = "";
|
|
21694
|
+
if (status.type === "deprecated") {
|
|
21695
|
+
deprecationStatus += ` * @deprecated
|
|
21687
21696
|
`;
|
|
21697
|
+
deprecationStatus += ` * - ${status.message}
|
|
21698
|
+
`;
|
|
21699
|
+
if (status.deadline) {
|
|
21700
|
+
deprecationStatus += ` * - deadline: ${status.deadline}
|
|
21701
|
+
`;
|
|
21702
|
+
}
|
|
21703
|
+
if (status.replacedBy) {
|
|
21704
|
+
deprecationStatus += ` * - replaced by: ${status.replacedBy}
|
|
21705
|
+
`;
|
|
21706
|
+
}
|
|
21707
|
+
ret.push(deprecationStatus);
|
|
21708
|
+
} else if (status.type === "experimental") {
|
|
21709
|
+
ret.push(` * @${status.type}
|
|
21710
|
+
`);
|
|
21711
|
+
}
|
|
21712
|
+
ret.push(` * property status: ${status.type}
|
|
21713
|
+
`);
|
|
21714
|
+
}
|
|
21715
|
+
if (isInherited) {
|
|
21716
|
+
ret.push(` * (inherited from parent)
|
|
21717
|
+
`);
|
|
21688
21718
|
}
|
|
21689
21719
|
if (renderDisplayName) {
|
|
21690
|
-
ret
|
|
21691
|
-
|
|
21720
|
+
ret.push(` * display name: '${property.displayName}'${property.description ? "," : ""}
|
|
21721
|
+
`);
|
|
21692
21722
|
}
|
|
21693
21723
|
if (property.description) {
|
|
21694
|
-
ret
|
|
21695
|
-
|
|
21724
|
+
ret.push(` * description: ${property.description}
|
|
21725
|
+
`);
|
|
21696
21726
|
}
|
|
21697
21727
|
} else {
|
|
21698
|
-
ret
|
|
21699
|
-
|
|
21728
|
+
ret.push(` * (no ontology metadata)
|
|
21729
|
+
`);
|
|
21700
21730
|
}
|
|
21701
|
-
|
|
21731
|
+
return `/**
|
|
21732
|
+
` + ret.join("*\n") + ` */
|
|
21702
21733
|
`;
|
|
21703
|
-
return ret;
|
|
21704
21734
|
}
|
|
21705
21735
|
|
|
21706
21736
|
// ../generator/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js
|
|
@@ -21713,7 +21743,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
|
|
|
21713
21743
|
throw new Error("Should not be generating types for an external type");
|
|
21714
21744
|
}
|
|
21715
21745
|
const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map((a) => ontology.requireObjectType(a.objectTypeApiName, false)));
|
|
21716
|
-
const definition =
|
|
21746
|
+
const definition = wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true, consola$1);
|
|
21717
21747
|
const objectDefIdentifier = object.getDefinitionIdentifier(true);
|
|
21718
21748
|
const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;
|
|
21719
21749
|
const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;
|
|
@@ -21830,10 +21860,11 @@ function createProps(type2, identifier, strict) {
|
|
|
21830
21860
|
return `export type StrictProps = Props`;
|
|
21831
21861
|
}
|
|
21832
21862
|
const definition = type2.getCleanedUpDefinition(true);
|
|
21863
|
+
const propertyMetadata = type2 instanceof EnhancedObjectType ? type2.raw.objectType.properties : void 0;
|
|
21833
21864
|
return `export interface ${identifier} {
|
|
21834
21865
|
${stringify(definition.properties, {
|
|
21835
21866
|
"*": (propertyDefinition, _, apiName) => {
|
|
21836
|
-
return [`${propertyJsdoc(propertyDefinition, {
|
|
21867
|
+
return [`${propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {
|
|
21837
21868
|
apiName
|
|
21838
21869
|
})}readonly "${maybeStripNamespace(type2, apiName)}"`, (typeof propertyDefinition.type === "object" ? remapStructType(propertyDefinition.type) : `$PropType[${JSON.stringify(propertyDefinition.type)}]`) + `${propertyDefinition.multiplicity ? "[]" : ""}${propertyDefinition.nullable || !strict && !(definition.type === "object" && definition.primaryKeyApiName === apiName) ? `| undefined` : ""}`];
|
|
21839
21870
|
}
|
|
@@ -21848,6 +21879,7 @@ function createDefinition(object, ontology, identifier, {
|
|
|
21848
21879
|
osdkObjectLinksIdentifier
|
|
21849
21880
|
}) {
|
|
21850
21881
|
const definition = object.getCleanedUpDefinition(true);
|
|
21882
|
+
const propertyMetadata = object instanceof EnhancedObjectType ? object.raw.objectType.properties : void 0;
|
|
21851
21883
|
return `
|
|
21852
21884
|
export interface ${identifier} extends ${object instanceof EnhancedObjectType ? `$ObjectTypeDefinition` : `$InterfaceDefinition`} {
|
|
21853
21885
|
osdkMetadata: typeof $osdkMetadata;
|
|
@@ -21866,7 +21898,7 @@ function createDefinition(object, ontology, identifier, {
|
|
|
21866
21898
|
}`,
|
|
21867
21899
|
properties: () => `{
|
|
21868
21900
|
${stringify(definition.properties, {
|
|
21869
|
-
"*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, {
|
|
21901
|
+
"*": (propertyDefinition, _, apiName) => [`${propertyJsdoc(propertyDefinition, propertyMetadata?.[apiName], {
|
|
21870
21902
|
apiName
|
|
21871
21903
|
})}"${maybeStripNamespace(object, apiName)}"`, `$PropertyDef<${JSON.stringify(propertyDefinition.type)}, "${propertyDefinition.nullable ? "nullable" : "non-nullable"}", "${propertyDefinition.multiplicity ? "array" : "single"}">`]
|
|
21872
21904
|
})}
|
|
@@ -22512,7 +22544,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
22512
22544
|
|
|
22513
22545
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
22514
22546
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
22515
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.27.0-beta.
|
|
22547
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.27.0-beta.10"}`;
|
|
22516
22548
|
async function handleGenerate(args) {
|
|
22517
22549
|
let success = false;
|
|
22518
22550
|
if (args.ontologyPath) {
|
|
@@ -22648,7 +22680,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
22648
22680
|
}
|
|
22649
22681
|
return true;
|
|
22650
22682
|
}
|
|
22651
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.27.0-beta.
|
|
22683
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.27.0-beta.10", args.externalObjects, args.externalInterfaces);
|
|
22652
22684
|
return true;
|
|
22653
22685
|
} catch (e) {
|
|
22654
22686
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -22675,8 +22707,8 @@ async function getDependencyVersions() {
|
|
|
22675
22707
|
typescriptVersion,
|
|
22676
22708
|
tslibVersion,
|
|
22677
22709
|
areTheTypesWrongVersion,
|
|
22678
|
-
osdkApiVersion: `^${"2.3.0-beta.
|
|
22679
|
-
osdkClientVersion: `^${"2.3.0-beta.
|
|
22710
|
+
osdkApiVersion: `^${"2.3.0-beta.10"}`,
|
|
22711
|
+
osdkClientVersion: `^${"2.3.0-beta.10"}`,
|
|
22680
22712
|
osdkLegacyClientVersion
|
|
22681
22713
|
};
|
|
22682
22714
|
}
|
|
@@ -22715,5 +22747,5 @@ function createNormalFs() {
|
|
|
22715
22747
|
}
|
|
22716
22748
|
|
|
22717
22749
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
22718
|
-
//# sourceMappingURL=handleGenerate-
|
|
22719
|
-
//# sourceMappingURL=handleGenerate-
|
|
22750
|
+
//# sourceMappingURL=handleGenerate-OS33BQ5O.js.map
|
|
22751
|
+
//# sourceMappingURL=handleGenerate-OS33BQ5O.js.map
|