@osdk/maker 0.9.0-beta.28 → 0.9.0-beta.29
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 +7 -0
- package/build/browser/cli/main.js +1 -1
- package/build/cjs/index.cjs +39 -39
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -26,7 +26,7 @@ import { defineOntology } from "../api/defineOntology.js";
|
|
|
26
26
|
import { defineSharedPropertyType } from "../api/defineSpt.js";
|
|
27
27
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
28
28
|
export default async function main(args = process.argv) {
|
|
29
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.
|
|
29
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.29" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
30
30
|
input: {
|
|
31
31
|
alias: "i",
|
|
32
32
|
describe: "Input file",
|
package/build/cjs/index.cjs
CHANGED
|
@@ -131,7 +131,7 @@ function convertObject(objectType) {
|
|
|
131
131
|
displayMetadata: {
|
|
132
132
|
description: objectType.description,
|
|
133
133
|
displayName: objectType.displayName,
|
|
134
|
-
groupDisplayName:
|
|
134
|
+
groupDisplayName: undefined,
|
|
135
135
|
icon: {
|
|
136
136
|
type: "blueprint",
|
|
137
137
|
blueprint: objectType.icon ?? {
|
|
@@ -175,7 +175,7 @@ function convertProperty(property) {
|
|
|
175
175
|
visibility: property.visibility ?? "NORMAL"
|
|
176
176
|
},
|
|
177
177
|
indexedForSearch: property.indexedForSearch ?? true,
|
|
178
|
-
ruleSetBinding:
|
|
178
|
+
ruleSetBinding: undefined,
|
|
179
179
|
baseFormatter: property.baseFormatter,
|
|
180
180
|
type: convertType(property.type),
|
|
181
181
|
typeClasses: property.typeClasses ?? [],
|
|
@@ -183,10 +183,10 @@ function convertProperty(property) {
|
|
|
183
183
|
type: "active",
|
|
184
184
|
active: {}
|
|
185
185
|
},
|
|
186
|
-
inlineAction:
|
|
186
|
+
inlineAction: undefined,
|
|
187
187
|
dataConstraints: property.dataConstraints,
|
|
188
188
|
sharedPropertyTypeRid: property.sharedPropertyType?.apiName,
|
|
189
|
-
valueType:
|
|
189
|
+
valueType: undefined
|
|
190
190
|
};
|
|
191
191
|
return output;
|
|
192
192
|
}
|
|
@@ -212,12 +212,12 @@ function convertSpt({
|
|
|
212
212
|
}) {
|
|
213
213
|
const dataConstraint = typeof type === "object" && type.type === "marking" ? {
|
|
214
214
|
propertyTypeConstraints: [],
|
|
215
|
-
nullability:
|
|
215
|
+
nullability: undefined,
|
|
216
216
|
nullabilityV2: {
|
|
217
217
|
noEmptyCollections: true,
|
|
218
218
|
noNulls: true
|
|
219
219
|
}
|
|
220
|
-
} :
|
|
220
|
+
} : undefined;
|
|
221
221
|
return {
|
|
222
222
|
apiName,
|
|
223
223
|
displayMetadata: {
|
|
@@ -232,11 +232,11 @@ function convertSpt({
|
|
|
232
232
|
}
|
|
233
233
|
} : convertType(type),
|
|
234
234
|
aliases: [],
|
|
235
|
-
baseFormatter:
|
|
235
|
+
baseFormatter: undefined,
|
|
236
236
|
dataConstraints: dataConstraint,
|
|
237
237
|
gothamMapping,
|
|
238
238
|
indexedForSearch: true,
|
|
239
|
-
provenance:
|
|
239
|
+
provenance: undefined,
|
|
240
240
|
typeClasses: typeClasses ?? [],
|
|
241
241
|
valueType
|
|
242
242
|
};
|
|
@@ -260,7 +260,7 @@ function convertType(type) {
|
|
|
260
260
|
apiName: key,
|
|
261
261
|
displayMetadata: {
|
|
262
262
|
displayName: key,
|
|
263
|
-
description:
|
|
263
|
+
description: undefined
|
|
264
264
|
},
|
|
265
265
|
typeClasses: [],
|
|
266
266
|
aliases: [],
|
|
@@ -280,7 +280,7 @@ function convertType(type) {
|
|
|
280
280
|
apiName: key,
|
|
281
281
|
displayMetadata: {
|
|
282
282
|
displayName: key,
|
|
283
|
-
description:
|
|
283
|
+
description: undefined
|
|
284
284
|
},
|
|
285
285
|
typeClasses: [],
|
|
286
286
|
aliases: [],
|
|
@@ -305,16 +305,16 @@ function convertType(type) {
|
|
|
305
305
|
return {
|
|
306
306
|
type,
|
|
307
307
|
[type]: {
|
|
308
|
-
precision:
|
|
309
|
-
scale:
|
|
308
|
+
precision: undefined,
|
|
309
|
+
scale: undefined
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
312
|
case type === "string":
|
|
313
313
|
return {
|
|
314
314
|
type,
|
|
315
315
|
[type]: {
|
|
316
|
-
analyzerOverride:
|
|
317
|
-
enableAsciiFolding:
|
|
316
|
+
analyzerOverride: undefined,
|
|
317
|
+
enableAsciiFolding: undefined,
|
|
318
318
|
isLongText: false,
|
|
319
319
|
supportsEfficientLeadingWildcard: false,
|
|
320
320
|
supportsExactMatching: true
|
|
@@ -344,7 +344,7 @@ var defaultTypeClasses = [{
|
|
|
344
344
|
}];
|
|
345
345
|
function defineSharedPropertyType(opts) {
|
|
346
346
|
const apiName = namespace + opts.apiName;
|
|
347
|
-
!(ontologyDefinition.sharedPropertyTypes[apiName] ===
|
|
347
|
+
!(ontologyDefinition.sharedPropertyTypes[apiName] === undefined) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Shared property type ${apiName} already exists`) : invariant2__default.default(false) : undefined;
|
|
348
348
|
return ontologyDefinition.sharedPropertyTypes[apiName] = {
|
|
349
349
|
...opts,
|
|
350
350
|
apiName,
|
|
@@ -358,10 +358,10 @@ function defineSharedPropertyType(opts) {
|
|
|
358
358
|
// src/api/defineInterface.ts
|
|
359
359
|
function defineInterface(opts) {
|
|
360
360
|
const apiName = namespace + opts.apiName;
|
|
361
|
-
!(ontologyDefinition.interfaceTypes[apiName] ===
|
|
361
|
+
!(ontologyDefinition.interfaceTypes[apiName] === undefined) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Interface ${apiName} already exists`) : invariant2__default.default(false) : undefined;
|
|
362
362
|
const properties = Object.fromEntries(Object.entries(opts.properties ?? {}).map(([apiName2, type]) => {
|
|
363
363
|
if (typeof type === "string" || typeof type === "object" && !("apiName" in type)) {
|
|
364
|
-
!isPropertyTypeType(type) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName2} on InterfaceType ${apiName2}`) : invariant2__default.default(false) :
|
|
364
|
+
!isPropertyTypeType(type) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName2} on InterfaceType ${apiName2}`) : invariant2__default.default(false) : undefined;
|
|
365
365
|
const spt = defineSharedPropertyType({
|
|
366
366
|
apiName: apiName2,
|
|
367
367
|
displayName: apiName2,
|
|
@@ -374,7 +374,7 @@ function defineInterface(opts) {
|
|
|
374
374
|
!(namespace + apiName2 === type.apiName || apiName2 === unNamespacedTypeApiName) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `property key and it's apiName must be identical. ${JSON.stringify({
|
|
375
375
|
key: apiName2,
|
|
376
376
|
apiName: type.apiName
|
|
377
|
-
})}`) : invariant2__default.default(false) :
|
|
377
|
+
})}`) : invariant2__default.default(false) : undefined;
|
|
378
378
|
return [apiName2, type];
|
|
379
379
|
}
|
|
380
380
|
}));
|
|
@@ -384,7 +384,7 @@ function defineInterface(opts) {
|
|
|
384
384
|
extendsInterfaces = [opts.extends];
|
|
385
385
|
} else if (Array.isArray(opts.extends) && opts.extends.every((item) => typeof item === "string")) {
|
|
386
386
|
extendsInterfaces = opts.extends;
|
|
387
|
-
} else if (opts.extends.apiName !==
|
|
387
|
+
} else if (opts.extends.apiName !== undefined) {
|
|
388
388
|
extendsInterfaces = [opts.extends.apiName];
|
|
389
389
|
} else {
|
|
390
390
|
extendsInterfaces = opts.extends.map((item) => item.apiName);
|
|
@@ -393,19 +393,19 @@ function defineInterface(opts) {
|
|
|
393
393
|
const status = mapSimplifiedStatusToInterfaceTypeStatus(opts.status ?? {
|
|
394
394
|
type: "active"
|
|
395
395
|
});
|
|
396
|
-
!(status.type !== "deprecated" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Deprecated status must include message and deadline properties.`) : invariant2__default.default(false) :
|
|
396
|
+
!(status.type !== "deprecated" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Deprecated status must include message and deadline properties.`) : invariant2__default.default(false) : undefined;
|
|
397
397
|
const a = {
|
|
398
398
|
apiName,
|
|
399
399
|
displayMetadata: {
|
|
400
400
|
displayName: opts.displayName ?? opts.apiName,
|
|
401
401
|
description: opts.description ?? opts.displayName ?? opts.apiName,
|
|
402
|
-
icon: opts.icon !==
|
|
402
|
+
icon: opts.icon !== undefined ? {
|
|
403
403
|
type: "blueprint",
|
|
404
404
|
blueprint: {
|
|
405
405
|
color: opts.icon.color,
|
|
406
406
|
locator: opts.icon.locator
|
|
407
407
|
}
|
|
408
|
-
} :
|
|
408
|
+
} : undefined
|
|
409
409
|
},
|
|
410
410
|
extendsInterfaces,
|
|
411
411
|
links: [],
|
|
@@ -425,7 +425,7 @@ function mapSimplifiedStatusToInterfaceTypeStatus(status) {
|
|
|
425
425
|
deprecated: {
|
|
426
426
|
message: status.message,
|
|
427
427
|
deadline: status.deadline,
|
|
428
|
-
replacedBy:
|
|
428
|
+
replacedBy: undefined
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
case "active":
|
|
@@ -445,15 +445,15 @@ function mapSimplifiedStatusToInterfaceTypeStatus(status) {
|
|
|
445
445
|
function defineObject(objectDef) {
|
|
446
446
|
const apiName = namespace + objectDef.apiName;
|
|
447
447
|
const propertyApiNames = (objectDef.properties ?? []).map((val) => val.apiName);
|
|
448
|
-
if (ontologyDefinition.objectTypes[apiName] !==
|
|
448
|
+
if (ontologyDefinition.objectTypes[apiName] !== undefined) {
|
|
449
449
|
throw new Error(`Object type with apiName ${objectDef.apiName} is already defined`);
|
|
450
450
|
}
|
|
451
|
-
!propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant2__default.default(false) :
|
|
452
|
-
!(objectDef.primaryKeys.length !== 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `${objectDef.apiName} does not have any primary keys, objects must have at least one primary key`) : invariant2__default.default(false) :
|
|
451
|
+
!propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant2__default.default(false) : undefined;
|
|
452
|
+
!(objectDef.primaryKeys.length !== 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `${objectDef.apiName} does not have any primary keys, objects must have at least one primary key`) : invariant2__default.default(false) : undefined;
|
|
453
453
|
const nonExistentPrimaryKeys = objectDef.primaryKeys.filter((primaryKey) => !objectDef.properties?.map((val) => val.apiName).includes(primaryKey));
|
|
454
|
-
!(nonExistentPrimaryKeys.length === 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Primary key properties ${nonExistentPrimaryKeys} do not exist on object ${objectDef.apiName}`) : invariant2__default.default(false) :
|
|
454
|
+
!(nonExistentPrimaryKeys.length === 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Primary key properties ${nonExistentPrimaryKeys} do not exist on object ${objectDef.apiName}`) : invariant2__default.default(false) : undefined;
|
|
455
455
|
objectDef.implementsInterfaces?.forEach((interfaceImpl) => {
|
|
456
|
-
const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map((val) => val.interfaceProperty).filter((interfaceProperty) => interfaceImpl.implements.properties[interfaceProperty] ===
|
|
456
|
+
const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map((val) => val.interfaceProperty).filter((interfaceProperty) => interfaceImpl.implements.properties[interfaceProperty] === undefined).map((interfaceProp) => ({
|
|
457
457
|
type: "invalid",
|
|
458
458
|
reason: `Interface property ${interfaceImpl.implements.apiName}.${interfaceProp} referenced in ${objectDef.apiName} object does not exist`
|
|
459
459
|
}));
|
|
@@ -470,7 +470,7 @@ function defineObject(objectDef) {
|
|
|
470
470
|
const baseValidations = Object.entries(interfaceImpl.implements.properties).map(validateProperty);
|
|
471
471
|
const extendsValidations = interfaceImpl.implements.extendsInterfaces.flatMap((interfaceApiName) => Object.entries(ontologyDefinition.interfaceTypes[interfaceApiName].properties).map(validateProperty));
|
|
472
472
|
const allFailedValidations = baseValidations.concat(extendsValidations, nonExistentInterfaceProperties).filter((val) => val.type === "invalid");
|
|
473
|
-
!(allFailedValidations.length === 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "\n" + allFailedValidations.map(formatValidationErrors).join("\n")) : invariant2__default.default(false) :
|
|
473
|
+
!(allFailedValidations.length === 0) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "\n" + allFailedValidations.map(formatValidationErrors).join("\n")) : invariant2__default.default(false) : undefined;
|
|
474
474
|
});
|
|
475
475
|
ontologyDefinition.objectTypes[apiName] = {
|
|
476
476
|
...objectDef,
|
|
@@ -487,7 +487,7 @@ function formatValidationErrors(error) {
|
|
|
487
487
|
}
|
|
488
488
|
function validateInterfaceImplProperty(spt, mappedObjectProp, object) {
|
|
489
489
|
const objProp = object.properties?.find((prop) => prop.apiName === mappedObjectProp);
|
|
490
|
-
if (objProp ===
|
|
490
|
+
if (objProp === undefined) {
|
|
491
491
|
return {
|
|
492
492
|
type: "invalid",
|
|
493
493
|
reason: `Object property mapped to interface does not exist. Object Property Mapped: ${mappedObjectProp}`
|
|
@@ -507,7 +507,7 @@ function validateInterfaceImplProperty(spt, mappedObjectProp, object) {
|
|
|
507
507
|
// src/cli/main.ts
|
|
508
508
|
var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
509
509
|
async function main(args = process.argv) {
|
|
510
|
-
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.9.0-beta.
|
|
510
|
+
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.9.0-beta.29").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
|
|
511
511
|
input: {
|
|
512
512
|
alias: "i",
|
|
513
513
|
describe: "Input file",
|
|
@@ -544,8 +544,8 @@ async function main(args = process.argv) {
|
|
|
544
544
|
let apiNamespace = "";
|
|
545
545
|
if (commandLineOpts.apiNamespace.length !== 0) {
|
|
546
546
|
apiNamespace = commandLineOpts.apiNamespace.slice(-1) !== "." ? commandLineOpts.apiNamespace + "." : commandLineOpts.apiNamespace;
|
|
547
|
-
!(apiNamespace.length < 1024) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "API namespace is too long.") : invariant2__default.default(false) :
|
|
548
|
-
!apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(.[a-z0-9-]+)*.$") : invariant2__default.default(false) :
|
|
547
|
+
!(apiNamespace.length < 1024) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "API namespace is too long.") : invariant2__default.default(false) : undefined;
|
|
548
|
+
!apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(.[a-z0-9-]+)*.$") : invariant2__default.default(false) : undefined;
|
|
549
549
|
}
|
|
550
550
|
consola.consola.info(`Loading ontology from ${commandLineOpts.input}`);
|
|
551
551
|
const ontology = await loadOntology(commandLineOpts.input, apiNamespace);
|
|
@@ -565,13 +565,13 @@ function importSharedPropertyType(opts) {
|
|
|
565
565
|
packageName,
|
|
566
566
|
typeHint
|
|
567
567
|
} = opts;
|
|
568
|
-
if (packageName !==
|
|
568
|
+
if (packageName !== undefined) {
|
|
569
569
|
ontologyDefinition.importedTypes.sharedPropertyTypes.push({
|
|
570
570
|
apiName,
|
|
571
571
|
packageName
|
|
572
572
|
});
|
|
573
|
-
!!packageName.endsWith(".") ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Package name format invalid ends with period") : invariant2__default.default(false) :
|
|
574
|
-
!(packageName.match("[A-Z]") == null) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Package name includes upper case characters") : invariant2__default.default(false) :
|
|
573
|
+
!!packageName.endsWith(".") ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Package name format invalid ends with period") : invariant2__default.default(false) : undefined;
|
|
574
|
+
!(packageName.match("[A-Z]") == null) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Package name includes upper case characters") : invariant2__default.default(false) : undefined;
|
|
575
575
|
return {
|
|
576
576
|
apiName: packageName + "." + apiName,
|
|
577
577
|
type: typeHint,
|
|
@@ -586,7 +586,7 @@ function importSharedPropertyType(opts) {
|
|
|
586
586
|
}
|
|
587
587
|
function defineInterfaceLinkConstraint(linkDef) {
|
|
588
588
|
const fromLinkMeta = getLinkMeta(linkDef);
|
|
589
|
-
!(linkDef.from.links.find((a) => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant2__default.default(false) :
|
|
589
|
+
!(linkDef.from.links.find((a) => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant2__default.default(false) : undefined;
|
|
590
590
|
linkDef.from.links.push({
|
|
591
591
|
cardinality: linkDef.toMany ? "MANY" : "SINGLE",
|
|
592
592
|
linkedEntityTypeId: getLinkedType(linkDef.toMany ?? linkDef.toOne),
|
|
@@ -668,7 +668,7 @@ function defineValueType(opts) {
|
|
|
668
668
|
version
|
|
669
669
|
} = opts;
|
|
670
670
|
const semverValidation = /^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/;
|
|
671
|
-
!semverValidation.test(version) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Version is not a valid semver") : invariant2__default.default(false) :
|
|
671
|
+
!semverValidation.test(version) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Version is not a valid semver") : invariant2__default.default(false) : undefined;
|
|
672
672
|
const typeName = typeof type.type === "string" ? type.type : type.type.type === "struct" ? "structV2" : type.type.type;
|
|
673
673
|
const constraints = type.constraints ? type.constraints.map((constraint) => {
|
|
674
674
|
const output = {
|
|
@@ -698,7 +698,7 @@ function defineValueType(opts) {
|
|
|
698
698
|
constraints,
|
|
699
699
|
exampleValues: []
|
|
700
700
|
};
|
|
701
|
-
if (ontologyDefinition.valueTypes[apiName] ===
|
|
701
|
+
if (ontologyDefinition.valueTypes[apiName] === undefined) {
|
|
702
702
|
ontologyDefinition.valueTypes[apiName] = [];
|
|
703
703
|
}
|
|
704
704
|
ontologyDefinition.valueTypes[apiName].push(vt);
|
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/defineOntology.ts","../../src/api/defineSpt.ts","../../src/api/defineInterface.ts","../../src/api/defineObject.ts","../../src/cli/main.ts","../../src/api/defineImportSpt.ts","../../src/api/defineInterfaceLinkConstraint.ts","../../src/api/defineValueType.ts"],"names":["invariant","apiName","yargs","hideBin","path","consola","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,IAAI,kBAAA,CAAA;AAGJ,IAAI,SAAA,CAAA;AACX,eAAsB,cAAA,CAAe,IAAI,IAAM,EAAA;AAC7C,EAAY,SAAA,GAAA,EAAA,CAAA;AACZ,EAAqB,kBAAA,GAAA;AAAA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AO,CAAA,GAAI,EAAC,CAAA;AAAA,GAC5C;AACA,EAAA,kBAAA,CAAmB,UAAW,CAAA,OAAO,CAAE,CAAA,IAAA,CAAK,EAAE,CAAA,CAAA;AAC9C,EAAO,OAAA,EAAA,CAAA;AACT","file":"index.cjs","sourcesContent":["/*\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\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\n/** @internal */\nexport let ontologyDefinition;\n\n/** @internal */\nexport let namespace;\nexport async function defineOntology(ns, body) {\n namespace = ns;\n ontologyDefinition = {\n actionTypes: {},\n objectTypes: {},\n queryTypes: {},\n interfaceTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {},\n importedTypes: {\n sharedPropertyTypes: []\n }\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Unexpected error while processing the body of the ontology\", e);\n throw e;\n }\n return {\n ontology: convertToWireOntologyIr(ontologyDefinition),\n valueType: convertOntologyToValueTypeIr(ontologyDefinition)\n };\n}\nfunction convertOntologyToValueTypeIr(ontology) {\n return {\n valueTypes: Object.values(ontology.valueTypes).map(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status\n },\n versions: definitions.map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues\n }))\n }))\n };\n}\nfunction convertToWireOntologyIr(ontology) {\n return {\n blockData: {\n objectTypes: Object.fromEntries(Object.entries(ontology.objectTypes).map(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n })),\n sharedPropertyTypes: Object.fromEntries(Object.entries(ontology.sharedPropertyTypes).map(([apiName, spt]) => [apiName, {\n sharedPropertyType: convertSpt(spt)\n }])),\n interfaceTypes: Object.fromEntries(Object.entries(ontology.interfaceTypes).map(([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType)\n }];\n })),\n blockPermissionInformation: {\n actionTypes: {},\n linkTypes: {},\n objectTypes: {}\n }\n },\n importedTypes: ontology.importedTypes\n };\n}\nfunction convertObject(objectType) {\n const propertyDatasource = {};\n (objectType.properties ?? []).forEach(property => {\n propertyDatasource[property.apiName] = {\n type: \"column\",\n column: property.apiName\n };\n });\n const datasource = {\n rid: \"ri.ontology.main.datasource.\".concat(objectType.apiName),\n datasource: {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: propertyDatasource\n }\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: false\n };\n const implementations = objectType.implementsInterfaces ?? [];\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? {\n locator: \"cube\",\n color: \"#2D72D2\"\n }\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\"\n },\n primaryKeys: objectType.primaryKeys,\n propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertProperty(val)]) ?? []),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: objectType.status ?? {\n type: \"active\",\n active: {}\n },\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n properties: Object.fromEntries(impl.propertyMapping.map(mapping => [namespace + mapping.interfaceProperty, {\n propertyTypeRid: mapping.mapsTo\n }]))\n })),\n allImplementsInterfaces: {}\n },\n datasources: [datasource],\n entityMetadata: {\n arePatchesEnabled: objectType.editsEnabled ?? false\n }\n };\n}\nfunction convertProperty(property) {\n const output = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\"\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: convertType(property.type),\n typeClasses: property.typeClasses ?? [],\n status: property.status ?? {\n type: \"active\",\n active: {}\n },\n inlineAction: undefined,\n dataConstraints: property.dataConstraints,\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: undefined\n };\n return output;\n}\nfunction convertInterface(interfaceType) {\n return {\n ...interfaceType,\n properties: Object.values(interfaceType.properties).map(spt => convertSpt(spt)),\n // these are omitted from our internal types but we need to re-add them for the final json\n allExtendsInterfaces: [],\n allLinks: [],\n allProperties: []\n };\n}\nexport function dumpOntologyFullMetadata() {\n return convertToWireOntologyIr(ontologyDefinition);\n}\nexport function dumpValueTypeWireType() {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\nfunction convertSpt({\n type,\n array,\n description,\n apiName,\n displayName,\n gothamMapping,\n typeClasses,\n valueType\n}) {\n const dataConstraint = typeof type === \"object\" && type.type === \"marking\" ? {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: {\n noEmptyCollections: true,\n noNulls: true\n }\n } : undefined;\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: \"NORMAL\",\n description\n },\n type: array ? {\n type: \"array\",\n array: {\n subtype: convertType(type)\n }\n } : convertType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n provenance: undefined,\n typeClasses: typeClasses ?? [],\n valueType: valueType\n };\n}\nfunction convertType(type) {\n switch (true) {\n case typeof type === \"object\" && \"markingType\" in type:\n return {\n \"type\": \"marking\",\n marking: {\n markingType: type.markingType\n }\n };\n case typeof type === \"object\" && \"structDefinition\" in type:\n const structFields = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(fieldTypeDefinition)\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: convertType(fieldTypeDefinition.fieldType),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? []\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(fieldTypeDefinition)\n };\n }\n }\n structFields.push(field);\n }\n return {\n type: \"struct\",\n struct: {\n structFields\n }\n };\n case type === \"geopoint\":\n return {\n type: \"geohash\",\n geohash: {}\n };\n case type === \"decimal\":\n return {\n type,\n [type]: {\n precision: undefined,\n scale: undefined\n }\n };\n case type === \"string\":\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true\n }\n };\n case type === \"mediaReference\":\n return {\n type: type,\n mediaReference: {}\n };\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}\n\n/**\n * Helper function to avoid duplication. Makes the types match properly with the correct\n * behavior without needing to switch on type.\n * @param type\n * @returns\n */\nfunction distributeTypeHelper(type) {\n return {\n type,\n [type]: {}\n }; // any cast to match conditional return type\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 invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nconst defaultTypeClasses = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\"\n}, {\n kind: \"render_hint\",\n name: \"SORTABLE\"\n}];\nexport function defineSharedPropertyType(opts) {\n const apiName = namespace + opts.apiName;\n !(ontologyDefinition.sharedPropertyTypes[apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} already exists`) : invariant(false) : void 0;\n return ontologyDefinition.sharedPropertyTypes[apiName] = {\n ...opts,\n apiName,\n nonNameSpacedApiName: opts.apiName,\n displayName: opts.displayName ?? opts.apiName,\n // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: opts.typeClasses ?? defaultTypeClasses\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 invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nexport function defineInterface(opts) {\n const apiName = namespace + opts.apiName;\n !(ontologyDefinition.interfaceTypes[apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${apiName} already exists`) : invariant(false) : void 0;\n const properties = Object.fromEntries(Object.entries(opts.properties ?? {}).map(([apiName, type]) => {\n if (typeof type === \"string\" || typeof type === \"object\" && !(\"apiName\" in type)) {\n !isPropertyTypeType(type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName} on InterfaceType ${apiName}`) : invariant(false) : void 0;\n const spt = defineSharedPropertyType({\n apiName,\n displayName: apiName,\n type,\n array: false\n });\n return [apiName, spt];\n } else {\n const unNamespacedTypeApiName = type.apiName.slice(type.apiName.lastIndexOf(\".\") + 1);\n !(namespace + apiName === type.apiName || apiName === unNamespacedTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `property key and it's apiName must be identical. ${JSON.stringify({\n key: apiName,\n apiName: type.apiName\n })}`) : invariant(false) : void 0;\n return [apiName, type];\n }\n }));\n let extendsInterfaces = [];\n if (opts.extends) {\n if (typeof opts.extends === \"string\") {\n extendsInterfaces = [opts.extends];\n } else if (Array.isArray(opts.extends) && opts.extends.every(item => typeof item === \"string\")) {\n extendsInterfaces = opts.extends;\n } else if (opts.extends.apiName !== undefined) {\n extendsInterfaces = [opts.extends.apiName];\n } else {\n extendsInterfaces = opts.extends.map(item => item.apiName);\n }\n }\n const status = mapSimplifiedStatusToInterfaceTypeStatus(opts.status ?? {\n type: \"active\"\n });\n !(status.type !== \"deprecated\" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status must include message and deadline properties.`) : invariant(false) : void 0;\n const a = {\n apiName,\n displayMetadata: {\n displayName: opts.displayName ?? opts.apiName,\n description: opts.description ?? opts.displayName ?? opts.apiName,\n icon: opts.icon !== undefined ? {\n type: \"blueprint\",\n blueprint: {\n color: opts.icon.color,\n locator: opts.icon.locator\n }\n } : undefined\n },\n extendsInterfaces: extendsInterfaces,\n links: [],\n properties,\n status\n };\n return ontologyDefinition.interfaceTypes[apiName] = a;\n}\nfunction isPropertyTypeType(v) {\n return v === \"boolean\" || v === \"byte\" || v === \"date\" || v === \"decimal\" || v === \"double\" || v === \"float\" || v === \"geopoint\" || v === \"geoshape\" || v === \"integer\" || v === \"long\" || typeof v === \"object\" && v.type === \"marking\" || v === \"short\" || v === \"string\" || v === \"timestamp\";\n}\nfunction mapSimplifiedStatusToInterfaceTypeStatus(status) {\n switch (status.type) {\n case \"deprecated\":\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n case \"active\":\n return {\n type: \"active\",\n active: {}\n };\n case \"experimental\":\n return {\n type: \"experimental\",\n experimental: {}\n };\n default:\n throw new Error(`Invalid status type: ${status.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\nimport invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nexport function defineObject(objectDef) {\n const apiName = namespace + objectDef.apiName;\n const propertyApiNames = (objectDef.properties ?? []).map(val => val.apiName);\n if (ontologyDefinition.objectTypes[apiName] !== undefined) {\n throw new Error(`Object type with apiName ${objectDef.apiName} is already defined`);\n }\n !propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !(objectDef.primaryKeys.length !== 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${objectDef.apiName} does not have any primary keys, objects must have at least one primary key`) : invariant(false) : void 0;\n const nonExistentPrimaryKeys = objectDef.primaryKeys.filter(primaryKey => !objectDef.properties?.map(val => val.apiName).includes(primaryKey));\n !(nonExistentPrimaryKeys.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key properties ${nonExistentPrimaryKeys} do not exist on object ${objectDef.apiName}`) : invariant(false) : void 0;\n objectDef.implementsInterfaces?.forEach(interfaceImpl => {\n const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map(val => val.interfaceProperty).filter(interfaceProperty => interfaceImpl.implements.properties[interfaceProperty] === undefined).map(interfaceProp => ({\n type: \"invalid\",\n reason: `Interface property ${interfaceImpl.implements.apiName}.${interfaceProp} referenced in ${objectDef.apiName} object does not exist`\n }));\n const interfaceToObjectProperties = Object.fromEntries(interfaceImpl.propertyMapping.map(mapping => [mapping.interfaceProperty, mapping.mapsTo]));\n const validateProperty = interfaceProp => {\n if (interfaceProp[1].nonNameSpacedApiName in interfaceToObjectProperties) {\n return validateInterfaceImplProperty(interfaceProp[1], interfaceToObjectProperties[interfaceProp[0]], objectDef);\n }\n return {\n type: \"invalid\",\n reason: `Interface property ${interfaceImpl.implements.apiName}.${interfaceProp[1].nonNameSpacedApiName} not implemented by ${objectDef.apiName} object definition`\n };\n };\n const baseValidations = Object.entries(interfaceImpl.implements.properties).map(validateProperty);\n const extendsValidations = interfaceImpl.implements.extendsInterfaces.flatMap(interfaceApiName => Object.entries(ontologyDefinition.interfaceTypes[interfaceApiName].properties).map(validateProperty));\n const allFailedValidations = baseValidations.concat(extendsValidations, nonExistentInterfaceProperties).filter(val => val.type === \"invalid\");\n !(allFailedValidations.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"\\n\" + allFailedValidations.map(formatValidationErrors).join(\"\\n\")) : invariant(false) : void 0;\n });\n ontologyDefinition.objectTypes[apiName] = {\n ...objectDef,\n apiName: apiName\n };\n return {\n ...objectDef,\n apiName: apiName\n };\n}\nfunction formatValidationErrors(error) {\n return `Ontology Definition Error: ${error.reason}\\n`;\n}\n\n// Validate that the object and the interface property match up\nfunction validateInterfaceImplProperty(spt, mappedObjectProp, object) {\n const objProp = object.properties?.find(prop => prop.apiName === mappedObjectProp);\n if (objProp === undefined) {\n return {\n type: \"invalid\",\n reason: `Object property mapped to interface does not exist. Object Property Mapped: ${mappedObjectProp}`\n };\n }\n if (spt.type !== objProp?.type) {\n return {\n type: \"invalid\",\n reason: `Object property type does not match the interface property it is mapped to. Interface Property: ${spt.apiName}, objectProperty: ${mappedObjectProp}`\n };\n }\n return {\n type: \"valid\"\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 { consola } from \"consola\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { defineInterface } from \"../api/defineInterface.js\";\nimport { defineObject } from \"../api/defineObject.js\";\nimport { defineOntology } from \"../api/defineOntology.js\";\nimport { defineSharedPropertyType } from \"../api/defineSpt.js\";\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\nexport default async function main(args = process.argv) {\n const commandLineOpts = await yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({\n input: {\n alias: \"i\",\n describe: \"Input file\",\n type: \"string\",\n default: \".ontology/ontology.ts\",\n coerce: path.resolve\n },\n output: {\n alias: \"o\",\n describe: \"Output file\",\n type: \"string\",\n default: \"ontology.json\",\n coerce: path.resolve\n },\n apiNamespace: {\n describe: \"Api name prefix for namespaced ontology types\",\n type: \"string\",\n default: \"\"\n },\n snapshotDir: {\n alias: \"s\",\n describe: \"Snapshot directory\",\n type: \"string\",\n default: \"snapshots\",\n coerce: path.resolve\n },\n valueTypesOutput: {\n describe: \"Value Type Output File\",\n type: \"string\",\n default: \"value-types.json\",\n coerce: path.resolve\n }\n }).parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = commandLineOpts.apiNamespace.slice(-1) !== \".\" ? commandLineOpts.apiNamespace + \".\" : commandLineOpts.apiNamespace;\n !(apiNamespace.length < 1024) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is too long.\") : invariant(false) : void 0;\n !apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\") : invariant(false) : void 0;\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n const ontology = await loadOntology(commandLineOpts.input, apiNamespace);\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(commandLineOpts.output, JSON.stringify(ontology.ontology, null, 2));\n // No point in generating block if there aren't any value types\n if (ontology.valueType.valueTypes.length > 0) {\n await fs.writeFile(commandLineOpts.valueTypesOutput, JSON.stringify(ontology.valueType, null, 2));\n }\n}\nasync function loadOntologyViaJiti(input) {\n Object.assign(globalThis, {\n defineInterface,\n defineObject,\n defineSharedPropertyType\n });\n const jiti_ = await import(\"jiti\");\n const jiti = jiti_.default(process.cwd(), {\n debug: true\n });\n return defineOntology(\"\", async () => await jiti(input));\n}\nasync function loadOntologyViaTsNode(input) {\n Object.assign(globalThis, {\n defineInterface,\n defineObject,\n defineSharedPropertyType\n });\n const tsNode = await import(\"ts-node\");\n const tsNodeService = tsNode.register({\n transpileOnly: true,\n compilerOptions: {\n module: \"commonjs\",\n target: \"esnext\"\n },\n esm: true\n });\n tsNodeService.enabled(true);\n const q = await import(input);\n return q;\n}\nasync function loadOntology(input, apiNamespace) {\n // Object.assign(globalThis, {\n // defineInterface,\n // defineLink,\n // defineObject,\n // defineSharedPropertyType,\n // });\n\n const q = await defineOntology(apiNamespace, async () => await import(input));\n return q;\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 invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\n/**\n * Defines a foreign shared property type you want to take as an input to your product. The typeHint field is used for OSDK generation\n */\nexport function importSharedPropertyType(opts) {\n const {\n apiName,\n packageName,\n typeHint\n } = opts;\n if (packageName !== undefined) {\n ontologyDefinition.importedTypes.sharedPropertyTypes.push({\n apiName,\n packageName\n });\n !!packageName.endsWith(\".\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name format invalid ends with period\") : invariant(false) : void 0;\n !(packageName.match(\"[A-Z]\") == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name includes upper case characters\") : invariant(false) : void 0;\n return {\n apiName: packageName + \".\" + apiName,\n type: typeHint,\n nonNameSpacedApiName: apiName\n };\n }\n return {\n apiName: apiName,\n type: typeHint,\n nonNameSpacedApiName: apiName\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 invariant from \"tiny-invariant\";\nimport { namespace } from \"./defineOntology.js\";\nexport function defineInterfaceLinkConstraint(linkDef) {\n const fromLinkMeta = getLinkMeta(linkDef);\n !(linkDef.from.links.find(a => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant(false) : void 0;\n linkDef.from.links.push({\n cardinality: linkDef.toMany ? \"MANY\" : \"SINGLE\",\n linkedEntityTypeId: getLinkedType(linkDef.toMany ?? linkDef.toOne),\n metadata: fromLinkMeta,\n required: linkDef.required ?? true\n });\n}\nfunction getLinkedType(t) {\n return {\n type: \"interfaceType\",\n interfaceType: typeof t === \"string\" ? t : t.apiName\n };\n}\nfunction getLinkMeta(meta) {\n return typeof meta === \"string\" ? withDefaults({\n apiName: namespace + meta\n }) : withDefaults(meta);\n}\nfunction withDefaults({\n apiName,\n description,\n displayName\n}) {\n return {\n apiName: namespace + apiName,\n displayName: displayName ?? apiName,\n description: description ?? displayName ?? apiName\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 invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\nfunction convertValueTypeTypeToBaseType(valueType) {\n if (typeof valueType === \"string\") {}\n switch (true) {\n case typeof valueType === \"object\" && valueType.type === \"array\":\n return {\n type: \"array\",\n array: {\n elementType: convertValueTypeTypeToBaseType(valueType.elementType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"struct\":\n return {\n type: \"structV2\",\n structV2: {\n fields: valueType.fields.map(field => ({\n identifier: field.identifier,\n baseType: convertValueTypeTypeToBaseType(field.baseType)\n }))\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"map\":\n return {\n type: \"map\",\n map: {\n keyType: convertValueTypeTypeToBaseType(valueType.keyType),\n valueType: convertValueTypeTypeToBaseType(valueType.valueType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"optional\":\n return {\n type: \"optional\",\n optional: {\n wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType)\n }\n };\n case typeof valueType === \"string\":\n return {\n type: valueType,\n [valueType]: {}\n };\n default:\n throw new Error(\"Invalid ValueTypeType\");\n }\n}\nexport function defineValueType(opts) {\n const {\n apiName,\n displayName,\n description,\n type,\n version\n } = opts;\n const semverValidation = /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n !semverValidation.test(version) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Version is not a valid semver\") : invariant(false) : void 0;\n const typeName = typeof type.type === \"string\" ? type.type : type.type.type === \"struct\" ? \"structV2\" : type.type.type;\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = type.constraints ? type.constraints.map(constraint => {\n const output = {\n constraint: {\n type: typeName,\n [typeName]: constraint.constraint\n },\n failureMessage: constraint.failureMessage\n };\n return {\n constraint: output\n };\n }) : [];\n const baseType = convertValueTypeTypeToBaseType(type.type);\n const vt = {\n apiName,\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\"\n },\n status: {\n type: \"active\",\n active: {}\n },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: []\n };\n if (ontologyDefinition.valueTypes[apiName] === undefined) {\n ontologyDefinition.valueTypes[apiName] = [];\n }\n ontologyDefinition.valueTypes[apiName].push(vt);\n return vt;\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/defineOntology.ts","../../src/api/defineSpt.ts","../../src/api/defineInterface.ts","../../src/api/defineObject.ts","../../src/cli/main.ts","../../src/api/defineImportSpt.ts","../../src/api/defineInterfaceLinkConstraint.ts","../../src/api/defineValueType.ts"],"names":["invariant","apiName","yargs","hideBin","path","consola","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,IAAI,kBAAA;AAGJ,IAAI,SAAA;AACX,eAAsB,cAAA,CAAe,IAAI,IAAM,EAAA;AAC7C,EAAY,SAAA,GAAA,EAAA;AACZ,EAAqB,kBAAA,GAAA;AAAA,IACnB,aAAa,EAAC;AAAA,IACd,aAAa,EAAC;AAAA,IACd,YAAY,EAAC;AAAA,IACb,gBAAgB,EAAC;AAAA,IACjB,qBAAqB,EAAC;AAAA,IACtB,YAAY,EAAC;AAAA,IACb,aAAe,EAAA;AAAA,MACb,qBAAqB;AAAC;AACxB,GACF;AACA,EAAI,IAAA;AACF,IAAA,MAAM,IAAK,EAAA;AAAA,WACJ,CAAG,EAAA;AAEV,IAAQ,OAAA,CAAA,KAAA,CAAM,8DAA8D,CAAC,CAAA;AAC7E,IAAM,MAAA,CAAA;AAAA;AAER,EAAO,OAAA;AAAA,IACL,QAAA,EAAU,wBAAwB,kBAAkB,CAAA;AAAA,IACpD,SAAA,EAAW,6BAA6B,kBAAkB;AAAA,GAC5D;AACF;AACA,SAAS,6BAA6B,QAAU,EAAA;AAC9C,EAAO,OAAA;AAAA,IACL,YAAY,MAAO,CAAA,MAAA,CAAO,SA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AA,CAAA,UAAA,CAAW,OAAO,CAAA,GAAI,EAAC;AAAA;AAE5C,EAAA,kBAAA,CAAmB,UAAW,CAAA,OAAO,CAAE,CAAA,IAAA,CAAK,EAAE,CAAA;AAC9C,EAAO,OAAA,EAAA;AACT","file":"index.cjs","sourcesContent":["/*\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\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\n/** @internal */\nexport let ontologyDefinition;\n\n/** @internal */\nexport let namespace;\nexport async function defineOntology(ns, body) {\n namespace = ns;\n ontologyDefinition = {\n actionTypes: {},\n objectTypes: {},\n queryTypes: {},\n interfaceTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {},\n importedTypes: {\n sharedPropertyTypes: []\n }\n };\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Unexpected error while processing the body of the ontology\", e);\n throw e;\n }\n return {\n ontology: convertToWireOntologyIr(ontologyDefinition),\n valueType: convertOntologyToValueTypeIr(ontologyDefinition)\n };\n}\nfunction convertOntologyToValueTypeIr(ontology) {\n return {\n valueTypes: Object.values(ontology.valueTypes).map(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status\n },\n versions: definitions.map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues\n }))\n }))\n };\n}\nfunction convertToWireOntologyIr(ontology) {\n return {\n blockData: {\n objectTypes: Object.fromEntries(Object.entries(ontology.objectTypes).map(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n })),\n sharedPropertyTypes: Object.fromEntries(Object.entries(ontology.sharedPropertyTypes).map(([apiName, spt]) => [apiName, {\n sharedPropertyType: convertSpt(spt)\n }])),\n interfaceTypes: Object.fromEntries(Object.entries(ontology.interfaceTypes).map(([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType)\n }];\n })),\n blockPermissionInformation: {\n actionTypes: {},\n linkTypes: {},\n objectTypes: {}\n }\n },\n importedTypes: ontology.importedTypes\n };\n}\nfunction convertObject(objectType) {\n const propertyDatasource = {};\n (objectType.properties ?? []).forEach(property => {\n propertyDatasource[property.apiName] = {\n type: \"column\",\n column: property.apiName\n };\n });\n const datasource = {\n rid: \"ri.ontology.main.datasource.\".concat(objectType.apiName),\n datasource: {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: propertyDatasource\n }\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false\n },\n redacted: false\n };\n const implementations = objectType.implementsInterfaces ?? [];\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? {\n locator: \"cube\",\n color: \"#2D72D2\"\n }\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\"\n },\n primaryKeys: objectType.primaryKeys,\n propertyTypes: Object.fromEntries(objectType.properties?.map(val => [val.apiName, convertProperty(val)]) ?? []),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: objectType.status ?? {\n type: \"active\",\n active: {}\n },\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n properties: Object.fromEntries(impl.propertyMapping.map(mapping => [namespace + mapping.interfaceProperty, {\n propertyTypeRid: mapping.mapsTo\n }]))\n })),\n allImplementsInterfaces: {}\n },\n datasources: [datasource],\n entityMetadata: {\n arePatchesEnabled: objectType.editsEnabled ?? false\n }\n };\n}\nfunction convertProperty(property) {\n const output = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\"\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: convertType(property.type),\n typeClasses: property.typeClasses ?? [],\n status: property.status ?? {\n type: \"active\",\n active: {}\n },\n inlineAction: undefined,\n dataConstraints: property.dataConstraints,\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: undefined\n };\n return output;\n}\nfunction convertInterface(interfaceType) {\n return {\n ...interfaceType,\n properties: Object.values(interfaceType.properties).map(spt => convertSpt(spt)),\n // these are omitted from our internal types but we need to re-add them for the final json\n allExtendsInterfaces: [],\n allLinks: [],\n allProperties: []\n };\n}\nexport function dumpOntologyFullMetadata() {\n return convertToWireOntologyIr(ontologyDefinition);\n}\nexport function dumpValueTypeWireType() {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\nfunction convertSpt({\n type,\n array,\n description,\n apiName,\n displayName,\n gothamMapping,\n typeClasses,\n valueType\n}) {\n const dataConstraint = typeof type === \"object\" && type.type === \"marking\" ? {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: {\n noEmptyCollections: true,\n noNulls: true\n }\n } : undefined;\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: \"NORMAL\",\n description\n },\n type: array ? {\n type: \"array\",\n array: {\n subtype: convertType(type)\n }\n } : convertType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n provenance: undefined,\n typeClasses: typeClasses ?? [],\n valueType: valueType\n };\n}\nfunction convertType(type) {\n switch (true) {\n case typeof type === \"object\" && \"markingType\" in type:\n return {\n \"type\": \"marking\",\n marking: {\n markingType: type.markingType\n }\n };\n case typeof type === \"object\" && \"structDefinition\" in type:\n const structFields = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(fieldTypeDefinition)\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: convertType(fieldTypeDefinition.fieldType),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? []\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: {\n displayName: key,\n description: undefined\n },\n typeClasses: [],\n aliases: [],\n fieldType: convertType(fieldTypeDefinition)\n };\n }\n }\n structFields.push(field);\n }\n return {\n type: \"struct\",\n struct: {\n structFields\n }\n };\n case type === \"geopoint\":\n return {\n type: \"geohash\",\n geohash: {}\n };\n case type === \"decimal\":\n return {\n type,\n [type]: {\n precision: undefined,\n scale: undefined\n }\n };\n case type === \"string\":\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true\n }\n };\n case type === \"mediaReference\":\n return {\n type: type,\n mediaReference: {}\n };\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}\n\n/**\n * Helper function to avoid duplication. Makes the types match properly with the correct\n * behavior without needing to switch on type.\n * @param type\n * @returns\n */\nfunction distributeTypeHelper(type) {\n return {\n type,\n [type]: {}\n }; // any cast to match conditional return type\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 invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nconst defaultTypeClasses = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\"\n}, {\n kind: \"render_hint\",\n name: \"SORTABLE\"\n}];\nexport function defineSharedPropertyType(opts) {\n const apiName = namespace + opts.apiName;\n !(ontologyDefinition.sharedPropertyTypes[apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Shared property type ${apiName} already exists`) : invariant(false) : void 0;\n return ontologyDefinition.sharedPropertyTypes[apiName] = {\n ...opts,\n apiName,\n nonNameSpacedApiName: opts.apiName,\n displayName: opts.displayName ?? opts.apiName,\n // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: opts.typeClasses ?? defaultTypeClasses\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 invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nimport { defineSharedPropertyType } from \"./defineSpt.js\";\nexport function defineInterface(opts) {\n const apiName = namespace + opts.apiName;\n !(ontologyDefinition.interfaceTypes[apiName] === undefined) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Interface ${apiName} already exists`) : invariant(false) : void 0;\n const properties = Object.fromEntries(Object.entries(opts.properties ?? {}).map(([apiName, type]) => {\n if (typeof type === \"string\" || typeof type === \"object\" && !(\"apiName\" in type)) {\n !isPropertyTypeType(type) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid data type ${JSON.stringify(type)} for property ${apiName} on InterfaceType ${apiName}`) : invariant(false) : void 0;\n const spt = defineSharedPropertyType({\n apiName,\n displayName: apiName,\n type,\n array: false\n });\n return [apiName, spt];\n } else {\n const unNamespacedTypeApiName = type.apiName.slice(type.apiName.lastIndexOf(\".\") + 1);\n !(namespace + apiName === type.apiName || apiName === unNamespacedTypeApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `property key and it's apiName must be identical. ${JSON.stringify({\n key: apiName,\n apiName: type.apiName\n })}`) : invariant(false) : void 0;\n return [apiName, type];\n }\n }));\n let extendsInterfaces = [];\n if (opts.extends) {\n if (typeof opts.extends === \"string\") {\n extendsInterfaces = [opts.extends];\n } else if (Array.isArray(opts.extends) && opts.extends.every(item => typeof item === \"string\")) {\n extendsInterfaces = opts.extends;\n } else if (opts.extends.apiName !== undefined) {\n extendsInterfaces = [opts.extends.apiName];\n } else {\n extendsInterfaces = opts.extends.map(item => item.apiName);\n }\n }\n const status = mapSimplifiedStatusToInterfaceTypeStatus(opts.status ?? {\n type: \"active\"\n });\n !(status.type !== \"deprecated\" || status.deprecated.message && status.deprecated.deadline) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Deprecated status must include message and deadline properties.`) : invariant(false) : void 0;\n const a = {\n apiName,\n displayMetadata: {\n displayName: opts.displayName ?? opts.apiName,\n description: opts.description ?? opts.displayName ?? opts.apiName,\n icon: opts.icon !== undefined ? {\n type: \"blueprint\",\n blueprint: {\n color: opts.icon.color,\n locator: opts.icon.locator\n }\n } : undefined\n },\n extendsInterfaces: extendsInterfaces,\n links: [],\n properties,\n status\n };\n return ontologyDefinition.interfaceTypes[apiName] = a;\n}\nfunction isPropertyTypeType(v) {\n return v === \"boolean\" || v === \"byte\" || v === \"date\" || v === \"decimal\" || v === \"double\" || v === \"float\" || v === \"geopoint\" || v === \"geoshape\" || v === \"integer\" || v === \"long\" || typeof v === \"object\" && v.type === \"marking\" || v === \"short\" || v === \"string\" || v === \"timestamp\";\n}\nfunction mapSimplifiedStatusToInterfaceTypeStatus(status) {\n switch (status.type) {\n case \"deprecated\":\n return {\n type: \"deprecated\",\n deprecated: {\n message: status.message,\n deadline: status.deadline,\n replacedBy: undefined\n }\n };\n case \"active\":\n return {\n type: \"active\",\n active: {}\n };\n case \"experimental\":\n return {\n type: \"experimental\",\n experimental: {}\n };\n default:\n throw new Error(`Invalid status type: ${status.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\nimport invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nexport function defineObject(objectDef) {\n const apiName = namespace + objectDef.apiName;\n const propertyApiNames = (objectDef.properties ?? []).map(val => val.apiName);\n if (ontologyDefinition.objectTypes[apiName] !== undefined) {\n throw new Error(`Object type with apiName ${objectDef.apiName} is already defined`);\n }\n !propertyApiNames.includes(objectDef.titlePropertyApiName) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Title property ${objectDef.titlePropertyApiName} is not defined on object ${objectDef.apiName}`) : invariant(false) : void 0;\n !(objectDef.primaryKeys.length !== 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `${objectDef.apiName} does not have any primary keys, objects must have at least one primary key`) : invariant(false) : void 0;\n const nonExistentPrimaryKeys = objectDef.primaryKeys.filter(primaryKey => !objectDef.properties?.map(val => val.apiName).includes(primaryKey));\n !(nonExistentPrimaryKeys.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Primary key properties ${nonExistentPrimaryKeys} do not exist on object ${objectDef.apiName}`) : invariant(false) : void 0;\n objectDef.implementsInterfaces?.forEach(interfaceImpl => {\n const nonExistentInterfaceProperties = interfaceImpl.propertyMapping.map(val => val.interfaceProperty).filter(interfaceProperty => interfaceImpl.implements.properties[interfaceProperty] === undefined).map(interfaceProp => ({\n type: \"invalid\",\n reason: `Interface property ${interfaceImpl.implements.apiName}.${interfaceProp} referenced in ${objectDef.apiName} object does not exist`\n }));\n const interfaceToObjectProperties = Object.fromEntries(interfaceImpl.propertyMapping.map(mapping => [mapping.interfaceProperty, mapping.mapsTo]));\n const validateProperty = interfaceProp => {\n if (interfaceProp[1].nonNameSpacedApiName in interfaceToObjectProperties) {\n return validateInterfaceImplProperty(interfaceProp[1], interfaceToObjectProperties[interfaceProp[0]], objectDef);\n }\n return {\n type: \"invalid\",\n reason: `Interface property ${interfaceImpl.implements.apiName}.${interfaceProp[1].nonNameSpacedApiName} not implemented by ${objectDef.apiName} object definition`\n };\n };\n const baseValidations = Object.entries(interfaceImpl.implements.properties).map(validateProperty);\n const extendsValidations = interfaceImpl.implements.extendsInterfaces.flatMap(interfaceApiName => Object.entries(ontologyDefinition.interfaceTypes[interfaceApiName].properties).map(validateProperty));\n const allFailedValidations = baseValidations.concat(extendsValidations, nonExistentInterfaceProperties).filter(val => val.type === \"invalid\");\n !(allFailedValidations.length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"\\n\" + allFailedValidations.map(formatValidationErrors).join(\"\\n\")) : invariant(false) : void 0;\n });\n ontologyDefinition.objectTypes[apiName] = {\n ...objectDef,\n apiName: apiName\n };\n return {\n ...objectDef,\n apiName: apiName\n };\n}\nfunction formatValidationErrors(error) {\n return `Ontology Definition Error: ${error.reason}\\n`;\n}\n\n// Validate that the object and the interface property match up\nfunction validateInterfaceImplProperty(spt, mappedObjectProp, object) {\n const objProp = object.properties?.find(prop => prop.apiName === mappedObjectProp);\n if (objProp === undefined) {\n return {\n type: \"invalid\",\n reason: `Object property mapped to interface does not exist. Object Property Mapped: ${mappedObjectProp}`\n };\n }\n if (spt.type !== objProp?.type) {\n return {\n type: \"invalid\",\n reason: `Object property type does not match the interface property it is mapped to. Interface Property: ${spt.apiName}, objectProperty: ${mappedObjectProp}`\n };\n }\n return {\n type: \"valid\"\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 { consola } from \"consola\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { defineInterface } from \"../api/defineInterface.js\";\nimport { defineObject } from \"../api/defineObject.js\";\nimport { defineOntology } from \"../api/defineOntology.js\";\nimport { defineSharedPropertyType } from \"../api/defineSpt.js\";\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\nexport default async function main(args = process.argv) {\n const commandLineOpts = await yargs(hideBin(args)).version(process.env.PACKAGE_VERSION ?? \"\").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({\n input: {\n alias: \"i\",\n describe: \"Input file\",\n type: \"string\",\n default: \".ontology/ontology.ts\",\n coerce: path.resolve\n },\n output: {\n alias: \"o\",\n describe: \"Output file\",\n type: \"string\",\n default: \"ontology.json\",\n coerce: path.resolve\n },\n apiNamespace: {\n describe: \"Api name prefix for namespaced ontology types\",\n type: \"string\",\n default: \"\"\n },\n snapshotDir: {\n alias: \"s\",\n describe: \"Snapshot directory\",\n type: \"string\",\n default: \"snapshots\",\n coerce: path.resolve\n },\n valueTypesOutput: {\n describe: \"Value Type Output File\",\n type: \"string\",\n default: \"value-types.json\",\n coerce: path.resolve\n }\n }).parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = commandLineOpts.apiNamespace.slice(-1) !== \".\" ? commandLineOpts.apiNamespace + \".\" : commandLineOpts.apiNamespace;\n !(apiNamespace.length < 1024) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is too long.\") : invariant(false) : void 0;\n !apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\") : invariant(false) : void 0;\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n const ontology = await loadOntology(commandLineOpts.input, apiNamespace);\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(commandLineOpts.output, JSON.stringify(ontology.ontology, null, 2));\n // No point in generating block if there aren't any value types\n if (ontology.valueType.valueTypes.length > 0) {\n await fs.writeFile(commandLineOpts.valueTypesOutput, JSON.stringify(ontology.valueType, null, 2));\n }\n}\nasync function loadOntologyViaJiti(input) {\n Object.assign(globalThis, {\n defineInterface,\n defineObject,\n defineSharedPropertyType\n });\n const jiti_ = await import(\"jiti\");\n const jiti = jiti_.default(process.cwd(), {\n debug: true\n });\n return defineOntology(\"\", async () => await jiti(input));\n}\nasync function loadOntologyViaTsNode(input) {\n Object.assign(globalThis, {\n defineInterface,\n defineObject,\n defineSharedPropertyType\n });\n const tsNode = await import(\"ts-node\");\n const tsNodeService = tsNode.register({\n transpileOnly: true,\n compilerOptions: {\n module: \"commonjs\",\n target: \"esnext\"\n },\n esm: true\n });\n tsNodeService.enabled(true);\n const q = await import(input);\n return q;\n}\nasync function loadOntology(input, apiNamespace) {\n // Object.assign(globalThis, {\n // defineInterface,\n // defineLink,\n // defineObject,\n // defineSharedPropertyType,\n // });\n\n const q = await defineOntology(apiNamespace, async () => await import(input));\n return q;\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 invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\n/**\n * Defines a foreign shared property type you want to take as an input to your product. The typeHint field is used for OSDK generation\n */\nexport function importSharedPropertyType(opts) {\n const {\n apiName,\n packageName,\n typeHint\n } = opts;\n if (packageName !== undefined) {\n ontologyDefinition.importedTypes.sharedPropertyTypes.push({\n apiName,\n packageName\n });\n !!packageName.endsWith(\".\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name format invalid ends with period\") : invariant(false) : void 0;\n !(packageName.match(\"[A-Z]\") == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Package name includes upper case characters\") : invariant(false) : void 0;\n return {\n apiName: packageName + \".\" + apiName,\n type: typeHint,\n nonNameSpacedApiName: apiName\n };\n }\n return {\n apiName: apiName,\n type: typeHint,\n nonNameSpacedApiName: apiName\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 invariant from \"tiny-invariant\";\nimport { namespace } from \"./defineOntology.js\";\nexport function defineInterfaceLinkConstraint(linkDef) {\n const fromLinkMeta = getLinkMeta(linkDef);\n !(linkDef.from.links.find(a => a.metadata.apiName === fromLinkMeta.apiName) == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Link with apiName ${fromLinkMeta.apiName} already exists on ${linkDef.apiName}`) : invariant(false) : void 0;\n linkDef.from.links.push({\n cardinality: linkDef.toMany ? \"MANY\" : \"SINGLE\",\n linkedEntityTypeId: getLinkedType(linkDef.toMany ?? linkDef.toOne),\n metadata: fromLinkMeta,\n required: linkDef.required ?? true\n });\n}\nfunction getLinkedType(t) {\n return {\n type: \"interfaceType\",\n interfaceType: typeof t === \"string\" ? t : t.apiName\n };\n}\nfunction getLinkMeta(meta) {\n return typeof meta === \"string\" ? withDefaults({\n apiName: namespace + meta\n }) : withDefaults(meta);\n}\nfunction withDefaults({\n apiName,\n description,\n displayName\n}) {\n return {\n apiName: namespace + apiName,\n displayName: displayName ?? apiName,\n description: description ?? displayName ?? apiName\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 invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\nfunction convertValueTypeTypeToBaseType(valueType) {\n if (typeof valueType === \"string\") {}\n switch (true) {\n case typeof valueType === \"object\" && valueType.type === \"array\":\n return {\n type: \"array\",\n array: {\n elementType: convertValueTypeTypeToBaseType(valueType.elementType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"struct\":\n return {\n type: \"structV2\",\n structV2: {\n fields: valueType.fields.map(field => ({\n identifier: field.identifier,\n baseType: convertValueTypeTypeToBaseType(field.baseType)\n }))\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"map\":\n return {\n type: \"map\",\n map: {\n keyType: convertValueTypeTypeToBaseType(valueType.keyType),\n valueType: convertValueTypeTypeToBaseType(valueType.valueType)\n }\n };\n case typeof valueType === \"object\" && valueType.type === \"optional\":\n return {\n type: \"optional\",\n optional: {\n wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType)\n }\n };\n case typeof valueType === \"string\":\n return {\n type: valueType,\n [valueType]: {}\n };\n default:\n throw new Error(\"Invalid ValueTypeType\");\n }\n}\nexport function defineValueType(opts) {\n const {\n apiName,\n displayName,\n description,\n type,\n version\n } = opts;\n const semverValidation = /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n !semverValidation.test(version) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Version is not a valid semver\") : invariant(false) : void 0;\n const typeName = typeof type.type === \"string\" ? type.type : type.type.type === \"struct\" ? \"structV2\" : type.type.type;\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = type.constraints ? type.constraints.map(constraint => {\n const output = {\n constraint: {\n type: typeName,\n [typeName]: constraint.constraint\n },\n failureMessage: constraint.failureMessage\n };\n return {\n constraint: output\n };\n }) : [];\n const baseType = convertValueTypeTypeToBaseType(type.type);\n const vt = {\n apiName,\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\"\n },\n status: {\n type: \"active\",\n active: {}\n },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: []\n };\n if (ontologyDefinition.valueTypes[apiName] === undefined) {\n ontologyDefinition.valueTypes[apiName] = [];\n }\n ontologyDefinition.valueTypes[apiName].push(vt);\n return vt;\n}"]}
|
package/build/esm/cli/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { defineOntology } from "../api/defineOntology.js";
|
|
|
26
26
|
import { defineSharedPropertyType } from "../api/defineSpt.js";
|
|
27
27
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
28
28
|
export default async function main(args = process.argv) {
|
|
29
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.
|
|
29
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.9.0-beta.29" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
30
30
|
input: {
|
|
31
31
|
alias: "i",
|
|
32
32
|
describe: "Input file",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/maker",
|
|
3
|
-
"version": "0.9.0-beta.
|
|
3
|
+
"version": "0.9.0-beta.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"tiny-invariant": "^1.3.3",
|
|
33
33
|
"ts-node": "^10.9.2",
|
|
34
34
|
"yargs": "^17.7.2",
|
|
35
|
-
"@osdk/api": "~2.1.0-beta.
|
|
35
|
+
"@osdk/api": "~2.1.0-beta.29"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@osdk/internal.foundry.core": "2.11.0",
|
|
39
39
|
"@types/yargs": "^17.0.32",
|
|
40
40
|
"typescript": "~5.5.4",
|
|
41
41
|
"vitest": "^3.0.5",
|
|
42
|
+
"@osdk/client.unstable": "~2.1.0-beta.29",
|
|
42
43
|
"@osdk/monorepo.api-extractor": "~0.0.0",
|
|
43
|
-
"@osdk/monorepo.tsconfig": "~0.0.0"
|
|
44
|
-
"@osdk/client.unstable": "~2.1.0-beta.28"
|
|
44
|
+
"@osdk/monorepo.tsconfig": "~0.0.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|