@osdk/maker 0.13.0-beta.13 → 0.13.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +49 -11
- package/build/browser/api/defineLink.js +30 -9
- package/build/browser/api/defineLink.js.map +1 -1
- package/build/browser/api/defineOntology.js +3 -3
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/links/LinkType.js.map +1 -1
- package/build/browser/api/overall.test.js +596 -31
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/cli/main.js +10 -1
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertLink.js +14 -1
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js +3 -2
- package/build/browser/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +2 -2
- package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -1
- package/build/cjs/index.cjs +61 -17
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +30 -1
- package/build/esm/api/defineLink.js +30 -9
- package/build/esm/api/defineLink.js.map +1 -1
- package/build/esm/api/defineOntology.js +3 -3
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/links/LinkType.js.map +1 -1
- package/build/esm/api/overall.test.js +596 -31
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/cli/main.js +10 -1
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertLink.js +14 -1
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js +3 -2
- package/build/esm/conversion/toMarketplace/convertOntologyDefinition.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js +2 -2
- package/build/esm/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map +1 -1
- package/build/types/api/defineLink.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/links/LinkType.d.ts +29 -0
- package/build/types/api/links/LinkType.d.ts.map +1 -1
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts +1 -1
- package/build/types/conversion/toMarketplace/convertOntologyDefinition.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -18,12 +18,13 @@ import { consola } from "consola";
|
|
|
18
18
|
import * as fs from "node:fs/promises";
|
|
19
19
|
import * as path from "node:path";
|
|
20
20
|
import invariant from "tiny-invariant";
|
|
21
|
+
import { validate as validateUuid } from "uuid";
|
|
21
22
|
import yargs from "yargs";
|
|
22
23
|
import { hideBin } from "yargs/helpers";
|
|
23
24
|
import { defineOntology } from "../api/defineOntology.js";
|
|
24
25
|
const apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
25
26
|
export default async function main(args = process.argv) {
|
|
26
|
-
const commandLineOpts = await yargs(hideBin(args)).version("0.13.0-beta.
|
|
27
|
+
const commandLineOpts = await yargs(hideBin(args)).version("0.13.0-beta.15" ?? "").wrap(Math.min(150, yargs().terminalWidth())).strict().help().options({
|
|
27
28
|
input: {
|
|
28
29
|
alias: "i",
|
|
29
30
|
describe: "Input file",
|
|
@@ -66,6 +67,11 @@ export default async function main(args = process.argv) {
|
|
|
66
67
|
describe: "File to write dependencies to",
|
|
67
68
|
type: "string",
|
|
68
69
|
coerce: path.resolve
|
|
70
|
+
},
|
|
71
|
+
randomnessKey: {
|
|
72
|
+
describe: "Value used to assure uniqueness of entities",
|
|
73
|
+
type: "string",
|
|
74
|
+
coerce: path.resolve
|
|
69
75
|
}
|
|
70
76
|
}).parseAsync();
|
|
71
77
|
let apiNamespace = "";
|
|
@@ -75,6 +81,9 @@ export default async function main(args = process.argv) {
|
|
|
75
81
|
!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;
|
|
76
82
|
}
|
|
77
83
|
consola.info(`Loading ontology from ${commandLineOpts.input}`);
|
|
84
|
+
if (commandLineOpts.randomnessKey !== undefined) {
|
|
85
|
+
!validateUuid(commandLineOpts.randomnessKey) ? process.env.NODE_ENV !== "production" ? invariant(false, "Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee") : invariant(false) : void 0;
|
|
86
|
+
}
|
|
78
87
|
const ontologyIr = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.outputDir, commandLineOpts.dependencies);
|
|
79
88
|
consola.info(`Saving ontology to ${commandLineOpts.output}`);
|
|
80
89
|
await fs.writeFile(commandLineOpts.output, JSON.stringify(ontologyIr, null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","names":["consola","fs","path","invariant","yargs","hideBin","defineOntology","apiNamespaceRegex","main","args","process","argv","commandLineOpts","version","wrap","Math","min","terminalWidth","strict","help","options","input","alias","describe","type","default","coerce","resolve","output","apiNamespace","snapshotDir","outputDir","valueTypesOutput","dependencies","parseAsync","length","slice","env","NODE_ENV","test","info","ontologyIr","loadOntology","writeFile","JSON","stringify","valueTypes","importedValueTypes","dependencyFile","q"],"sources":["main.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\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 { defineOntology } from \"../api/defineOntology.js\";\n\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\n\nexport default async function main(\n args: string[] = process.argv,\n): Promise<void> {\n const commandLineOpts: {\n input: string;\n output: string;\n apiNamespace: string;\n snapshotDir: string;\n valueTypesOutput: string;\n outputDir?: string;\n dependencies?: string;\n } = await yargs(hideBin(args))\n .version(process.env.PACKAGE_VERSION ?? \"\")\n .wrap(Math.min(150, yargs().terminalWidth()))\n .strict()\n .help()\n .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 outputDir: {\n alias: \"d\",\n describe: \"Directory for generated ontology entities\",\n type: \"string\",\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 dependencies: {\n describe: \"File to write dependencies to\",\n type: \"string\",\n coerce: path.resolve,\n },\n })\n .parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = (commandLineOpts.apiNamespace.slice(-1) !== \".\")\n ? commandLineOpts.apiNamespace + \".\"\n : commandLineOpts.apiNamespace;\n invariant(apiNamespace.length < 1024, \"API namespace is too long.\");\n invariant(\n apiNamespaceRegex.test(apiNamespace),\n \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\",\n );\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n\n const ontologyIr = await loadOntology(\n commandLineOpts.input,\n apiNamespace,\n commandLineOpts.outputDir,\n commandLineOpts.dependencies,\n );\n\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(\n commandLineOpts.output,\n JSON.stringify(\n ontologyIr,\n null,\n 2,\n ),\n );\n // No point in generating block if there aren't any value types\n if (\n ontologyIr.valueTypes.valueTypes.length > 0\n || ontologyIr.importedValueTypes.valueTypes.length > 0\n ) {\n await fs.writeFile(\n commandLineOpts.valueTypesOutput,\n JSON.stringify(\n ontologyIr.valueTypes,\n null,\n 2,\n ),\n );\n }\n}\n\nasync function loadOntology(\n input: string,\n apiNamespace: string,\n outputDir: string | undefined,\n dependencyFile: string | undefined,\n) {\n const q = await defineOntology(\n apiNamespace,\n async () => await import(input),\n outputDir,\n dependencyFile,\n );\n return q;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,kBAAkB;AACtC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,MAAMC,iBAAiB,GAAG,+BAA+B;AAEzD,eAAe,eAAeC,IAAIA,CAChCC,IAAc,GAAGC,OAAO,CAACC,IAAI,EACd;EACf,MAAMC,
|
|
1
|
+
{"version":3,"file":"main.js","names":["consola","fs","path","invariant","validate","validateUuid","yargs","hideBin","defineOntology","apiNamespaceRegex","main","args","process","argv","commandLineOpts","version","wrap","Math","min","terminalWidth","strict","help","options","input","alias","describe","type","default","coerce","resolve","output","apiNamespace","snapshotDir","outputDir","valueTypesOutput","dependencies","randomnessKey","parseAsync","length","slice","env","NODE_ENV","test","info","undefined","ontologyIr","loadOntology","writeFile","JSON","stringify","valueTypes","importedValueTypes","dependencyFile","q"],"sources":["main.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport { validate as validateUuid } from \"uuid\";\nimport yargs from \"yargs\";\nimport { hideBin } from \"yargs/helpers\";\nimport { defineOntology } from \"../api/defineOntology.js\";\n\nconst apiNamespaceRegex = /^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$/;\n\nexport default async function main(\n args: string[] = process.argv,\n): Promise<void> {\n const commandLineOpts: {\n input: string;\n output: string;\n apiNamespace: string;\n snapshotDir: string;\n valueTypesOutput: string;\n outputDir?: string;\n dependencies?: string;\n randomnessKey?: string;\n } = await yargs(hideBin(args))\n .version(process.env.PACKAGE_VERSION ?? \"\")\n .wrap(Math.min(150, yargs().terminalWidth()))\n .strict()\n .help()\n .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 outputDir: {\n alias: \"d\",\n describe: \"Directory for generated ontology entities\",\n type: \"string\",\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 dependencies: {\n describe: \"File to write dependencies to\",\n type: \"string\",\n coerce: path.resolve,\n },\n randomnessKey: {\n describe: \"Value used to assure uniqueness of entities\",\n type: \"string\",\n coerce: path.resolve,\n },\n })\n .parseAsync();\n let apiNamespace = \"\";\n if (commandLineOpts.apiNamespace.length !== 0) {\n apiNamespace = (commandLineOpts.apiNamespace.slice(-1) !== \".\")\n ? commandLineOpts.apiNamespace + \".\"\n : commandLineOpts.apiNamespace;\n invariant(apiNamespace.length < 1024, \"API namespace is too long.\");\n invariant(\n apiNamespaceRegex.test(apiNamespace),\n \"API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(\\.[a-z0-9-]+)*\\.$\",\n );\n }\n consola.info(`Loading ontology from ${commandLineOpts.input}`);\n\n if (commandLineOpts.randomnessKey !== undefined) {\n invariant(\n validateUuid(commandLineOpts.randomnessKey),\n \"Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee\",\n );\n }\n\n const ontologyIr = await loadOntology(\n commandLineOpts.input,\n apiNamespace,\n commandLineOpts.outputDir,\n commandLineOpts.dependencies,\n );\n\n consola.info(`Saving ontology to ${commandLineOpts.output}`);\n await fs.writeFile(\n commandLineOpts.output,\n JSON.stringify(\n ontologyIr,\n null,\n 2,\n ),\n );\n // No point in generating block if there aren't any value types\n if (\n ontologyIr.valueTypes.valueTypes.length > 0\n || ontologyIr.importedValueTypes.valueTypes.length > 0\n ) {\n await fs.writeFile(\n commandLineOpts.valueTypesOutput,\n JSON.stringify(\n ontologyIr.valueTypes,\n null,\n 2,\n ),\n );\n }\n}\n\nasync function loadOntology(\n input: string,\n apiNamespace: string,\n outputDir: string | undefined,\n dependencyFile: string | undefined,\n) {\n const q = await defineOntology(\n apiNamespace,\n async () => await import(input),\n outputDir,\n dependencyFile,\n );\n return q;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,kBAAkB;AACtC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,QAAQ,IAAIC,YAAY,QAAQ,MAAM;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,MAAMC,iBAAiB,GAAG,+BAA+B;AAEzD,eAAe,eAAeC,IAAIA,CAChCC,IAAc,GAAGC,OAAO,CAACC,IAAI,EACd;EACf,MAAMC,eASL,GAAG,MAAMR,KAAK,CAACC,OAAO,CAACI,IAAI,CAAC,CAAC,CAC3BI,OAAO,CAAC,oBAA+B,EAAE,CAAC,CAC1CC,IAAI,CAACC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAEZ,KAAK,CAAC,CAAC,CAACa,aAAa,CAAC,CAAC,CAAC,CAAC,CAC5CC,MAAM,CAAC,CAAC,CACRC,IAAI,CAAC,CAAC,CACNC,OAAO,CAAC;IACPC,KAAK,EAAE;MACLC,KAAK,EAAE,GAAG;MACVC,QAAQ,EAAE,YAAY;MACtBC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE,uBAAuB;MAChCC,MAAM,EAAE1B,IAAI,CAAC2B;IACf,CAAC;IACDC,MAAM,EAAE;MACNN,KAAK,EAAE,GAAG;MACVC,QAAQ,EAAE,aAAa;MACvBC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE,eAAe;MACxBC,MAAM,EAAE1B,IAAI,CAAC2B;I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AACR,KAAK,CAAC,EAC/BU,SAAS,EACTmB,cACF,CAAC;EACD,OAAOC,CAAC;AACV","ignoreList":[]}
|
|
@@ -40,6 +40,19 @@ export function convertLink(linkType) {
|
|
|
40
40
|
}]
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
+
} else if ("intermediaryObjectType" in linkType) {
|
|
44
|
+
definition = {
|
|
45
|
+
type: "intermediary",
|
|
46
|
+
intermediary: {
|
|
47
|
+
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
48
|
+
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
49
|
+
objectTypeRidA: linkType.many.object.apiName,
|
|
50
|
+
objectTypeRidB: linkType.toMany.object.apiName,
|
|
51
|
+
intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,
|
|
52
|
+
aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),
|
|
53
|
+
intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
43
56
|
} else {
|
|
44
57
|
definition = {
|
|
45
58
|
type: "manyToMany",
|
|
@@ -72,7 +85,7 @@ export function convertLink(linkType) {
|
|
|
72
85
|
}
|
|
73
86
|
};
|
|
74
87
|
datasource = {
|
|
75
|
-
|
|
88
|
+
datasourceName: linkType.apiName,
|
|
76
89
|
datasource: {
|
|
77
90
|
type: "dataset",
|
|
78
91
|
dataset: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","
|
|
1
|
+
{"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","intermediary","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.ts"],"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\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n column: linkType.many.object.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,SAASC,WAAWA,CACzBC,QAAkB,EACa;EAC/B,IAAIC,UAAoC;EACxC,IAAIC,UAA8D,GAChEC,SAAS;EACX,IAAI,KAAK,IAAIH,QAAQ,EAAE;IACrBC,UAAU,GAAG;MACXG,IAAI,EAAE,WAAW;MACjBC,SAAS,EAAE;QACTC,eAAe,EAAER,kBAAkB,CAACE,QAAQ,CAACO,WAAW,CAAC;QACzDC,qBAAqB,EAAER,QAAQ,CAACS,MAAM,CAACC,QAAQ;QAC/CC,qBAAqB,EAAEX,QAAQ,CAAC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AAQ,EAAE;cACR9B,OAAO,EAAEb,QAAQ,CAACwB,IAAI,CAACZ,MAAM,CAACO,yBAAyB;cACvDP,MAAM,EAAEZ,QAAQ,CAACwB,IAAI,CAACZ,MAAM,CAACC;YAC/B,CAAC;YACD+B,MAAM,EAAE5C,QAAQ,CAACwB,IAAI,CAACZ,MAAM,CAACO;UAC/B,CAAC,CAAC;UACF0B,4BAA4B,EAAE,CAAC;YAC7BF,QAAQ,EAAE;cACR9B,OAAO,EAAEb,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACO,yBAAyB;cACzDP,MAAM,EAAEZ,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACC;YACjC,CAAC;YACD+B,MAAM,EAAE5C,QAAQ,CAACS,MAAM,CAACG,MAAM,CAACO;UACjC,CAAC;QACH;MACF,CAAC;MACD2B,kBAAkB,EAAE;QAClBC,wBAAwB,EAAE;MAC5B,CAAC;MACDC,QAAQ,EAAEhD,QAAQ,CAACgD;IACrB,CAAC;EACH;EAEA,OAAO;IACLhD,QAAQ,EAAE;MACRC,UAAU,EAAEA,UAAU;MACtBgD,EAAE,EAAEpD,0BAA0B,CAACG,QAAQ,CAACa,OAAO,CAAC;MAChDqC,MAAM,EAAElD,QAAQ,CAACkD,MAAM,IAAI;QAAE9C,IAAI,EAAE,QAAQ;QAAE+C,MAAM,EAAE,CAAC;MAAE,CAAC;MACzDH,QAAQ,EAAEhD,QAAQ,CAACgD,QAAQ,IAAI;IACjC,CAAC;IACDI,WAAW,EAAElD,UAAU,KAAKC,SAAS,GAAG,CAACD,UAAU,CAAC,GAAG,EAAE;IACzDmD,cAAc,EAAE;MACdC,iBAAiB,EAAEtD,QAAQ,CAACuD,YAAY,IAAI;IAC9C;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
import { importedTypes } from "../../api/defineOntology.js";
|
|
18
18
|
import { convertOntologyDefinitionToWireBlockData } from "./convertOntologyDefinitionToWireBlockData.js";
|
|
19
19
|
import { convertOntologyToValueTypeIr } from "./convertOntologyToValueTypeIr.js";
|
|
20
|
-
export function convertOntologyDefinition(ontology) {
|
|
20
|
+
export function convertOntologyDefinition(ontology, randomnessKey) {
|
|
21
21
|
return {
|
|
22
22
|
ontology: convertOntologyDefinitionToWireBlockData(ontology),
|
|
23
23
|
importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),
|
|
24
24
|
valueTypes: convertOntologyToValueTypeIr(ontology),
|
|
25
|
-
importedValueTypes: convertOntologyToValueTypeIr(importedTypes)
|
|
25
|
+
importedValueTypes: convertOntologyToValueTypeIr(importedTypes),
|
|
26
|
+
randomnessKey
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=convertOntologyDefinition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertOntologyDefinition.js","names":["importedTypes","convertOntologyDefinitionToWireBlockData","convertOntologyToValueTypeIr","convertOntologyDefinition","ontology","importedOntology","valueTypes","importedValueTypes"],"sources":["convertOntologyDefinition.ts"],"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\nimport type { OntologyIr } from \"@osdk/client.unstable\";\nimport type { OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\n\nexport function convertOntologyDefinition(\n ontology: OntologyDefinition,\n): OntologyIr {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,wCAAwC,QAAQ,+CAA+C;AACxG,SAASC,4BAA4B,QAAQ,mCAAmC;AAEhF,OAAO,SAASC,yBAAyBA,CACvCC,QAA4B,
|
|
1
|
+
{"version":3,"file":"convertOntologyDefinition.js","names":["importedTypes","convertOntologyDefinitionToWireBlockData","convertOntologyToValueTypeIr","convertOntologyDefinition","ontology","randomnessKey","importedOntology","valueTypes","importedValueTypes"],"sources":["convertOntologyDefinition.ts"],"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\nimport type { OntologyIr } from \"@osdk/client.unstable\";\nimport type { OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { importedTypes } from \"../../api/defineOntology.js\";\nimport { convertOntologyDefinitionToWireBlockData } from \"./convertOntologyDefinitionToWireBlockData.js\";\nimport { convertOntologyToValueTypeIr } from \"./convertOntologyToValueTypeIr.js\";\n\nexport function convertOntologyDefinition(\n ontology: OntologyDefinition,\n randomnessKey?: string,\n): OntologyIr {\n return {\n ontology: convertOntologyDefinitionToWireBlockData(ontology),\n importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),\n valueTypes: convertOntologyToValueTypeIr(ontology),\n importedValueTypes: convertOntologyToValueTypeIr(importedTypes),\n randomnessKey,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,wCAAwC,QAAQ,+CAA+C;AACxG,SAASC,4BAA4B,QAAQ,mCAAmC;AAEhF,OAAO,SAASC,yBAAyBA,CACvCC,QAA4B,EAC5BC,aAAsB,EACV;EACZ,OAAO;IACLD,QAAQ,EAAEH,wCAAwC,CAACG,QAAQ,CAAC;IAC5DE,gBAAgB,EAAEL,wCAAwC,CAACD,aAAa,CAAC;IACzEO,UAAU,EAAEL,4BAA4B,CAACE,QAAQ,CAAC;IAClDI,kBAAkB,EAAEN,4BAA4B,CAACF,aAAa,CAAC;IAC/DK;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { OntologyEntityTypeEnum } from "../../api/common/OntologyEntityTypeEnum.js";
|
|
18
|
-
import { convertAction } from "../../api/defineOntology.js";
|
|
18
|
+
import { cleanAndValidateLinkTypeId, convertAction } from "../../api/defineOntology.js";
|
|
19
19
|
import { convertInterface } from "./convertInterface.js";
|
|
20
20
|
import { convertLink } from "./convertLink.js";
|
|
21
21
|
import { convertObject } from "./convertObject.js";
|
|
@@ -34,7 +34,7 @@ export function convertOntologyDefinitionToWireBlockData(ontology) {
|
|
|
34
34
|
}];
|
|
35
35
|
})),
|
|
36
36
|
linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {
|
|
37
|
-
return [id, convertLink(link)];
|
|
37
|
+
return [cleanAndValidateLinkTypeId(id), convertLink(link)];
|
|
38
38
|
})),
|
|
39
39
|
actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {
|
|
40
40
|
return [apiName, convertAction(action)];
|
package/build/browser/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertOntologyDefinitionToWireBlockData.js","names":["OntologyEntityTypeEnum","convertAction","convertInterface","convertLink","convertObject","convertSpt","convertOntologyDefinitionToWireBlockData","ontology","objectTypes","Object","fromEntries","entries","OBJECT_TYPE","map","apiName","objectType","sharedPropertyTypes","SHARED_PROPERTY_TYPE","spt","sharedPropertyType","interfaceTypes","INTERFACE_TYPE","interfaceType","linkTypes","LINK_TYPE","id","link","actionTypes","ACTION_TYPE","action","blockPermissionInformation","filter","validation","restrictionStatus","hasRolesApplied","ontologyPackageRid","publicProject"],"sources":["convertOntologyDefinitionToWireBlockData.ts"],"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\nimport type {\n ActionTypePermissionInformation,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrInterfaceTypeBlockDataV2,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrOntologyBlockDataV2,\n OntologyIrSharedPropertyTypeBlockDataV2,\n} from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {
|
|
1
|
+
{"version":3,"file":"convertOntologyDefinitionToWireBlockData.js","names":["OntologyEntityTypeEnum","cleanAndValidateLinkTypeId","convertAction","convertInterface","convertLink","convertObject","convertSpt","convertOntologyDefinitionToWireBlockData","ontology","objectTypes","Object","fromEntries","entries","OBJECT_TYPE","map","apiName","objectType","sharedPropertyTypes","SHARED_PROPERTY_TYPE","spt","sharedPropertyType","interfaceTypes","INTERFACE_TYPE","interfaceType","linkTypes","LINK_TYPE","id","link","actionTypes","ACTION_TYPE","action","blockPermissionInformation","filter","validation","restrictionStatus","hasRolesApplied","ontologyPackageRid","publicProject"],"sources":["convertOntologyDefinitionToWireBlockData.ts"],"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\nimport type {\n ActionTypePermissionInformation,\n OntologyIrActionTypeBlockDataV2,\n OntologyIrInterfaceTypeBlockDataV2,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrOntologyBlockDataV2,\n OntologyIrSharedPropertyTypeBlockDataV2,\n} from \"@osdk/client.unstable\";\nimport { type OntologyDefinition } from \"../../api/common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {\n cleanAndValidateLinkTypeId,\n convertAction,\n} from \"../../api/defineOntology.js\";\nimport { convertInterface } from \"./convertInterface.js\";\nimport { convertLink } from \"./convertLink.js\";\nimport { convertObject } from \"./convertObject.js\";\nimport { convertSpt } from \"./convertSpt.js\";\n\nexport function convertOntologyDefinitionToWireBlockData(\n ontology: OntologyDefinition,\n): OntologyIrOntologyBlockDataV2 {\n return ({\n objectTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.OBJECT_TYPE]).map<\n [string, OntologyIrObjectTypeBlockDataV2]\n >(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n }),\n ),\n sharedPropertyTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE],\n )\n .map<[string, OntologyIrSharedPropertyTypeBlockDataV2]>((\n [apiName, spt],\n ) => [apiName, { sharedPropertyType: convertSpt(spt) }]),\n ),\n interfaceTypes: Object.fromEntries(\n Object.entries(\n ontology[OntologyEntityTypeEnum.INTERFACE_TYPE],\n )\n .map<[string, OntologyIrInterfaceTypeBlockDataV2]>(\n ([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType),\n }];\n },\n ),\n ),\n linkTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map<\n [string, OntologyIrLinkTypeBlockDataV2]\n >(([id, link]) => {\n return [cleanAndValidateLinkTypeId(id), convertLink(link)];\n }),\n ),\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map<\n [string, OntologyIrActionTypeBlockDataV2]\n >(([apiName, action]) => {\n return [apiName, convertAction(action)];\n }),\n ),\n blockPermissionInformation: {\n actionTypes: Object.fromEntries(\n Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE])\n .filter(([apiName, action]) => action.validation)\n .map<\n [string, ActionTypePermissionInformation]\n >(([apiName, action]) => {\n return [apiName, {\n restrictionStatus: {\n hasRolesApplied: true,\n ontologyPackageRid: null,\n publicProject: false,\n },\n }];\n }),\n ),\n linkTypes: {},\n objectTypes: {},\n },\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,sBAAsB,QAAQ,4CAA4C;AACnF,SACEC,0BAA0B,EAC1BC,aAAa,QACR,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AAO,CAAC1B,0BAA0B,CAACyB,EAAE,CAAC,EAAEtB,WAAW,CAACuB,IAAI,CAAC,CAAC;IAC5D,CAAC,CACH,CAAC;IACDC,WAAW,EAAElB,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACR,sBAAsB,CAAC6B,WAAW,CAAC,CAAC,CAACf,GAAG,CAE9D,CAAC,CAACC,OAAO,EAAEe,MAAM,CAAC,KAAK;MACvB,OAAO,CAACf,OAAO,EAAEb,aAAa,CAAC4B,MAAM,CAAC,CAAC;IACzC,CAAC,CACH,CAAC;IACDC,0BAA0B,EAAE;MAC1BH,WAAW,EAAElB,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,OAAO,CAACJ,QAAQ,CAACR,sBAAsB,CAAC6B,WAAW,CAAC,CAAC,CACzDG,MAAM,CAAC,CAAC,CAACjB,OAAO,EAAEe,MAAM,CAAC,KAAKA,MAAM,CAACG,UAAU,CAAC,CAChDnB,GAAG,CAEF,CAAC,CAACC,OAAO,EAAEe,MAAM,CAAC,KAAK;QACvB,OAAO,CAACf,OAAO,EAAE;UACfmB,iBAAiB,EAAE;YACjBC,eAAe,EAAE,IAAI;YACrBC,kBAAkB,EAAE,IAAI;YACxBC,aAAa,EAAE;UACjB;QACF,CAAC,CAAC;MACJ,CAAC,CACL,CAAC;MACDb,SAAS,EAAE,CAAC,CAAC;MACbf,WAAW,EAAE,CAAC;IAChB;EACF,CAAC;AACH","ignoreList":[]}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var consola = require('consola');
|
|
|
6
6
|
var fs2 = require('fs/promises');
|
|
7
7
|
var path2 = require('path');
|
|
8
8
|
var invariant5 = require('tiny-invariant');
|
|
9
|
+
var uuid = require('uuid');
|
|
9
10
|
var yargs = require('yargs');
|
|
10
11
|
var helpers = require('yargs/helpers');
|
|
11
12
|
var fs = require('fs');
|
|
@@ -734,6 +735,19 @@ function convertLink(linkType) {
|
|
|
734
735
|
}]
|
|
735
736
|
}
|
|
736
737
|
};
|
|
738
|
+
} else if ("intermediaryObjectType" in linkType) {
|
|
739
|
+
definition = {
|
|
740
|
+
type: "intermediary",
|
|
741
|
+
intermediary: {
|
|
742
|
+
objectTypeAToBLinkMetadata: linkType.many.metadata,
|
|
743
|
+
objectTypeBToALinkMetadata: linkType.toMany.metadata,
|
|
744
|
+
objectTypeRidA: linkType.many.object.apiName,
|
|
745
|
+
objectTypeRidB: linkType.toMany.object.apiName,
|
|
746
|
+
intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,
|
|
747
|
+
aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(linkType.many.linkToIntermediary.apiName),
|
|
748
|
+
intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(linkType.toMany.linkToIntermediary.apiName)
|
|
749
|
+
}
|
|
750
|
+
};
|
|
737
751
|
} else {
|
|
738
752
|
definition = {
|
|
739
753
|
type: "manyToMany",
|
|
@@ -766,7 +780,7 @@ function convertLink(linkType) {
|
|
|
766
780
|
}
|
|
767
781
|
};
|
|
768
782
|
datasource = {
|
|
769
|
-
|
|
783
|
+
datasourceName: linkType.apiName,
|
|
770
784
|
datasource: {
|
|
771
785
|
type: "dataset",
|
|
772
786
|
dataset: {
|
|
@@ -1132,7 +1146,7 @@ function convertOntologyDefinitionToWireBlockData(ontology) {
|
|
|
1132
1146
|
}];
|
|
1133
1147
|
})),
|
|
1134
1148
|
linkTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.LINK_TYPE]).map(([id, link]) => {
|
|
1135
|
-
return [id, convertLink(link)];
|
|
1149
|
+
return [cleanAndValidateLinkTypeId(id), convertLink(link)];
|
|
1136
1150
|
})),
|
|
1137
1151
|
actionTypes: Object.fromEntries(Object.entries(ontology[OntologyEntityTypeEnum.ACTION_TYPE]).map(([apiName, action]) => {
|
|
1138
1152
|
return [apiName, convertAction(action)];
|
|
@@ -1180,12 +1194,13 @@ function convertOntologyToValueTypeIr(ontology) {
|
|
|
1180
1194
|
}
|
|
1181
1195
|
|
|
1182
1196
|
// src/conversion/toMarketplace/convertOntologyDefinition.ts
|
|
1183
|
-
function convertOntologyDefinition(ontology) {
|
|
1197
|
+
function convertOntologyDefinition(ontology, randomnessKey) {
|
|
1184
1198
|
return {
|
|
1185
1199
|
ontology: convertOntologyDefinitionToWireBlockData(ontology),
|
|
1186
1200
|
importedOntology: convertOntologyDefinitionToWireBlockData(importedTypes),
|
|
1187
1201
|
valueTypes: convertOntologyToValueTypeIr(ontology),
|
|
1188
|
-
importedValueTypes: convertOntologyToValueTypeIr(importedTypes)
|
|
1202
|
+
importedValueTypes: convertOntologyToValueTypeIr(importedTypes),
|
|
1203
|
+
randomnessKey
|
|
1189
1204
|
};
|
|
1190
1205
|
}
|
|
1191
1206
|
|
|
@@ -1228,7 +1243,7 @@ function updateOntology(entity) {
|
|
|
1228
1243
|
}
|
|
1229
1244
|
ontologyDefinition[OntologyEntityTypeEnum.VALUE_TYPE][entity.apiName].push(entity);
|
|
1230
1245
|
}
|
|
1231
|
-
async function defineOntology(ns, body, outputDir, dependencyFile) {
|
|
1246
|
+
async function defineOntology(ns, body, outputDir, dependencyFile, randomnessKey) {
|
|
1232
1247
|
namespace = ns;
|
|
1233
1248
|
dependencies = {};
|
|
1234
1249
|
ontologyDefinition = {
|
|
@@ -1259,7 +1274,7 @@ async function defineOntology(ns, body, outputDir, dependencyFile) {
|
|
|
1259
1274
|
if (dependencyFile) {
|
|
1260
1275
|
writeDependencyFile(dependencyFile);
|
|
1261
1276
|
}
|
|
1262
|
-
return convertOntologyDefinition(ontologyDefinition);
|
|
1277
|
+
return convertOntologyDefinition(ontologyDefinition, randomnessKey);
|
|
1263
1278
|
}
|
|
1264
1279
|
function writeStaticObjects(outputDir) {
|
|
1265
1280
|
const codegenDir = path2__namespace.resolve(outputDir, "codegen");
|
|
@@ -1334,7 +1349,7 @@ function buildDatasource(apiName, definition, classificationMarkingGroupName, ma
|
|
|
1334
1349
|
} : void 0
|
|
1335
1350
|
} : void 0;
|
|
1336
1351
|
return {
|
|
1337
|
-
|
|
1352
|
+
datasourceName: apiName,
|
|
1338
1353
|
datasource: definition,
|
|
1339
1354
|
editsConfiguration: {
|
|
1340
1355
|
onlyAllowPrivilegedEdits: false
|
|
@@ -1690,7 +1705,7 @@ function addNamespaceIfNone(apiName) {
|
|
|
1690
1705
|
// src/cli/main.ts
|
|
1691
1706
|
var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
1692
1707
|
async function main(args = process.argv) {
|
|
1693
|
-
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.13.0-beta.
|
|
1708
|
+
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.13.0-beta.15").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
|
|
1694
1709
|
input: {
|
|
1695
1710
|
alias: "i",
|
|
1696
1711
|
describe: "Input file",
|
|
@@ -1733,6 +1748,11 @@ async function main(args = process.argv) {
|
|
|
1733
1748
|
describe: "File to write dependencies to",
|
|
1734
1749
|
type: "string",
|
|
1735
1750
|
coerce: path2__namespace.resolve
|
|
1751
|
+
},
|
|
1752
|
+
randomnessKey: {
|
|
1753
|
+
describe: "Value used to assure uniqueness of entities",
|
|
1754
|
+
type: "string",
|
|
1755
|
+
coerce: path2__namespace.resolve
|
|
1736
1756
|
}
|
|
1737
1757
|
}).parseAsync();
|
|
1738
1758
|
let apiNamespace = "";
|
|
@@ -1742,6 +1762,9 @@ async function main(args = process.argv) {
|
|
|
1742
1762
|
!apiNamespaceRegex.test(apiNamespace) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "API namespace is invalid! It is expected to conform to ^[a-z0-9-]+(.[a-z0-9-]+)*.$") : invariant5__default.default(false) : void 0;
|
|
1743
1763
|
}
|
|
1744
1764
|
consola.consola.info(`Loading ontology from ${commandLineOpts.input}`);
|
|
1765
|
+
if (commandLineOpts.randomnessKey !== void 0) {
|
|
1766
|
+
!uuid.validate(commandLineOpts.randomnessKey) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee") : invariant5__default.default(false) : void 0;
|
|
1767
|
+
}
|
|
1745
1768
|
const ontologyIr = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.outputDir, commandLineOpts.dependencies);
|
|
1746
1769
|
consola.consola.info(`Saving ontology to ${commandLineOpts.output}`);
|
|
1747
1770
|
await fs2__namespace.writeFile(commandLineOpts.output, JSON.stringify(ontologyIr, null, 2));
|
|
@@ -2822,15 +2845,30 @@ function defineLink(linkDefinition) {
|
|
|
2822
2845
|
const typesMatch = foreignKey.type === linkDefinition.one.object.properties?.[linkDefinition.one.object.primaryKeyPropertyApiName].type;
|
|
2823
2846
|
!typesMatch ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`) : invariant5__default.default(false) : void 0;
|
|
2824
2847
|
}
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
one
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2848
|
+
if ("intermediaryObjectType" in linkDefinition) {
|
|
2849
|
+
!("one" in linkDefinition.many.linkToIntermediary && linkDefinition.many.linkToIntermediary.one.object.apiName === linkDefinition.many.object.apiName && linkDefinition.many.linkToIntermediary.toMany.object.apiName === linkDefinition.intermediaryObjectType.apiName) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${linkDefinition.intermediaryObjectType.apiName} to objectA ${linkDefinition.many.object.apiName}`) : invariant5__default.default(false) : void 0;
|
|
2850
|
+
!("one" in linkDefinition.toMany.linkToIntermediary && linkDefinition.toMany.linkToIntermediary.one.object.apiName === linkDefinition.toMany.object.apiName && linkDefinition.toMany.linkToIntermediary.toMany.object.apiName === linkDefinition.intermediaryObjectType.apiName) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${linkDefinition.intermediaryObjectType.apiName} to objectB ${linkDefinition.toMany.object.apiName}`) : invariant5__default.default(false) : void 0;
|
|
2851
|
+
}
|
|
2852
|
+
let fullLinkDefinition;
|
|
2853
|
+
if ("one" in linkDefinition) {
|
|
2854
|
+
fullLinkDefinition = {
|
|
2855
|
+
...linkDefinition,
|
|
2856
|
+
one: convertUserOneToManyLinkDefinition(linkDefinition.one),
|
|
2857
|
+
toMany: convertUserOneToManyLinkDefinition(linkDefinition.toMany)
|
|
2858
|
+
};
|
|
2859
|
+
} else if ("intermediaryObjectType" in linkDefinition) {
|
|
2860
|
+
fullLinkDefinition = {
|
|
2861
|
+
...linkDefinition,
|
|
2862
|
+
many: convertUserIntermediaryLinkDefinition(linkDefinition.many),
|
|
2863
|
+
toMany: convertUserIntermediaryLinkDefinition(linkDefinition.toMany)
|
|
2864
|
+
};
|
|
2865
|
+
} else {
|
|
2866
|
+
fullLinkDefinition = {
|
|
2867
|
+
...linkDefinition,
|
|
2868
|
+
many: convertUserManyToManyLinkDefinition(linkDefinition.many),
|
|
2869
|
+
toMany: convertUserManyToManyLinkDefinition(linkDefinition.toMany)
|
|
2870
|
+
};
|
|
2871
|
+
}
|
|
2834
2872
|
const linkType = {
|
|
2835
2873
|
cardinality: "one" in linkDefinition ? linkDefinition.cardinality : void 0,
|
|
2836
2874
|
...fullLinkDefinition,
|
|
@@ -2851,6 +2889,12 @@ function convertUserManyToManyLinkDefinition(manyToMany) {
|
|
|
2851
2889
|
metadata: convertLinkTypeMetadata(manyToMany.metadata)
|
|
2852
2890
|
};
|
|
2853
2891
|
}
|
|
2892
|
+
function convertUserIntermediaryLinkDefinition(intermediary) {
|
|
2893
|
+
return {
|
|
2894
|
+
...intermediary,
|
|
2895
|
+
metadata: convertLinkTypeMetadata(intermediary.metadata)
|
|
2896
|
+
};
|
|
2897
|
+
}
|
|
2854
2898
|
function convertLinkTypeMetadata(metadata) {
|
|
2855
2899
|
return {
|
|
2856
2900
|
apiName: metadata.apiName,
|