@osdk/maker-import 0.1.0

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.
Files changed (45) hide show
  1. package/bin/maker-import.mjs +6 -0
  2. package/build/browser/cli/main.js +47 -0
  3. package/build/browser/cli/main.js.map +1 -0
  4. package/build/browser/generate/convertActionType.js +63 -0
  5. package/build/browser/generate/convertActionType.js.map +1 -0
  6. package/build/browser/generate/convertInterfaceType.js +74 -0
  7. package/build/browser/generate/convertInterfaceType.js.map +1 -0
  8. package/build/browser/generate/convertObjectType.js +64 -0
  9. package/build/browser/generate/convertObjectType.js.map +1 -0
  10. package/build/browser/generate/convertSharedPropertyType.js +37 -0
  11. package/build/browser/generate/convertSharedPropertyType.js.map +1 -0
  12. package/build/browser/generate/mapActionParameterType.js +211 -0
  13. package/build/browser/generate/mapActionParameterType.js.map +1 -0
  14. package/build/browser/generate/mapPropertyType.js +117 -0
  15. package/build/browser/generate/mapPropertyType.js.map +1 -0
  16. package/build/browser/generate/utils.js +52 -0
  17. package/build/browser/generate/utils.js.map +1 -0
  18. package/build/browser/generate/writeImportedOntology.js +169 -0
  19. package/build/browser/generate/writeImportedOntology.js.map +1 -0
  20. package/build/browser/index.js +19 -0
  21. package/build/browser/index.js.map +1 -0
  22. package/build/cjs/index.cjs +601 -0
  23. package/build/cjs/index.cjs.map +1 -0
  24. package/build/cjs/index.d.cts +88 -0
  25. package/build/esm/cli/main.js +47 -0
  26. package/build/esm/cli/main.js.map +1 -0
  27. package/build/esm/generate/convertActionType.js +63 -0
  28. package/build/esm/generate/convertActionType.js.map +1 -0
  29. package/build/esm/generate/convertInterfaceType.js +74 -0
  30. package/build/esm/generate/convertInterfaceType.js.map +1 -0
  31. package/build/esm/generate/convertObjectType.js +64 -0
  32. package/build/esm/generate/convertObjectType.js.map +1 -0
  33. package/build/esm/generate/convertSharedPropertyType.js +37 -0
  34. package/build/esm/generate/convertSharedPropertyType.js.map +1 -0
  35. package/build/esm/generate/mapActionParameterType.js +211 -0
  36. package/build/esm/generate/mapActionParameterType.js.map +1 -0
  37. package/build/esm/generate/mapPropertyType.js +117 -0
  38. package/build/esm/generate/mapPropertyType.js.map +1 -0
  39. package/build/esm/generate/utils.js +52 -0
  40. package/build/esm/generate/utils.js.map +1 -0
  41. package/build/esm/generate/writeImportedOntology.js +169 -0
  42. package/build/esm/generate/writeImportedOntology.js.map +1 -0
  43. package/build/esm/index.js +19 -0
  44. package/build/esm/index.js.map +1 -0
  45. package/package.json +73 -0
@@ -0,0 +1,117 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { consola } from "consola";
18
+
19
+ /**
20
+ * Result of mapping a gateway ObjectPropertyType to a maker PropertyTypeType.
21
+ * `array` is true when the gateway type was {type: "array", subType: X}.
22
+ */
23
+
24
+ /**
25
+ * Maps a gateway ObjectPropertyType (discriminated union with {type: string})
26
+ * to a maker PropertyTypeType.
27
+ *
28
+ * Returns undefined for unsupported types (with a warning).
29
+ */
30
+ export function mapPropertyType(dataType) {
31
+ switch (dataType.type) {
32
+ case "string":
33
+ return {
34
+ type: "string"
35
+ };
36
+ case "integer":
37
+ return {
38
+ type: "integer"
39
+ };
40
+ case "boolean":
41
+ return {
42
+ type: "boolean"
43
+ };
44
+ case "double":
45
+ return {
46
+ type: "double"
47
+ };
48
+ case "float":
49
+ return {
50
+ type: "float"
51
+ };
52
+ case "long":
53
+ return {
54
+ type: "long"
55
+ };
56
+ case "short":
57
+ return {
58
+ type: "short"
59
+ };
60
+ case "byte":
61
+ return {
62
+ type: "byte"
63
+ };
64
+ case "date":
65
+ return {
66
+ type: "date"
67
+ };
68
+ case "timestamp":
69
+ return {
70
+ type: "timestamp"
71
+ };
72
+ case "decimal":
73
+ return {
74
+ type: "decimal"
75
+ };
76
+ case "attachment":
77
+ return {
78
+ type: "attachment"
79
+ };
80
+ case "geopoint":
81
+ return {
82
+ type: "geopoint"
83
+ };
84
+ case "geoshape":
85
+ return {
86
+ type: "geoshape"
87
+ };
88
+ case "mediaReference":
89
+ return {
90
+ type: "mediaReference"
91
+ };
92
+ case "geotimeSeriesReference":
93
+ return {
94
+ type: "geotimeSeries"
95
+ };
96
+ case "array":
97
+ {
98
+ const subType = dataType.subType;
99
+ if (!subType) {
100
+ consola.warn("Array type missing subType, skipping");
101
+ return undefined;
102
+ }
103
+ const inner = mapPropertyType(subType);
104
+ if (!inner) {
105
+ return undefined;
106
+ }
107
+ return {
108
+ type: inner.type,
109
+ array: true
110
+ };
111
+ }
112
+ // We don't support structs or markings here. It should have no influence on importing functionality
113
+ default:
114
+ return undefined;
115
+ }
116
+ }
117
+ //# sourceMappingURL=mapPropertyType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapPropertyType.js","names":["consola","mapPropertyType","dataType","type","subType","warn","undefined","inner","array"],"sources":["mapPropertyType.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 { PropertyTypeType } from \"@osdk/maker\";\nimport { consola } from \"consola\";\n\n/**\n * Result of mapping a gateway ObjectPropertyType to a maker PropertyTypeType.\n * `array` is true when the gateway type was {type: \"array\", subType: X}.\n */\nexport interface MappedPropertyType {\n type: PropertyTypeType;\n array?: boolean;\n}\n\n/**\n * Maps a gateway ObjectPropertyType (discriminated union with {type: string})\n * to a maker PropertyTypeType.\n *\n * Returns undefined for unsupported types (with a warning).\n */\nexport function mapPropertyType(\n dataType: { type: string; [key: string]: unknown },\n): MappedPropertyType | undefined {\n switch (dataType.type) {\n case \"string\":\n return { type: \"string\" };\n case \"integer\":\n return { type: \"integer\" };\n case \"boolean\":\n return { type: \"boolean\" };\n case \"double\":\n return { type: \"double\" };\n case \"float\":\n return { type: \"float\" };\n case \"long\":\n return { type: \"long\" };\n case \"short\":\n return { type: \"short\" };\n case \"byte\":\n return { type: \"byte\" };\n case \"date\":\n return { type: \"date\" };\n case \"timestamp\":\n return { type: \"timestamp\" };\n case \"decimal\":\n return { type: \"decimal\" };\n case \"attachment\":\n return { type: \"attachment\" };\n case \"geopoint\":\n return { type: \"geopoint\" };\n case \"geoshape\":\n return { type: \"geoshape\" };\n case \"mediaReference\":\n return { type: \"mediaReference\" };\n case \"geotimeSeriesReference\":\n return { type: \"geotimeSeries\" };\n case \"array\": {\n const subType = (dataType as { subType?: { type: string } }).subType;\n if (!subType) {\n consola.warn(\"Array type missing subType, skipping\");\n return undefined;\n }\n const inner = mapPropertyType(subType);\n if (!inner) {\n return undefined;\n }\n return { type: inner.type, array: true };\n }\n // We don't support structs or markings here. It should have no influence on importing functionality\n default:\n return undefined;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,OAAO,QAAQ,SAAS;;AAEjC;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,QAAkD,EAClB;EAChC,QAAQA,QAAQ,CAACC,IAAI;IACnB,KAAK,QAAQ;MACX,OAAO;QAA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QAClB;QACA,OAAO;UAAEH,IAAI,EAAEI,KAAK,CAACJ,IAAI;UAAEK,KAAK,EAAE;QAAK,CAAC;MAC1C;IACA;IACA;MACE,OAAOF,SAAS;EACpB;AACF","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /**
18
+ * Strips namespace prefix from an apiName.
19
+ * "com.example.Employee" -> "Employee"
20
+ * "Employee" -> "Employee"
21
+ */
22
+ export function withoutNamespace(apiName) {
23
+ const lastDot = apiName.lastIndexOf(".");
24
+ if (lastDot === -1) {
25
+ return apiName;
26
+ }
27
+ return apiName.substring(lastDot + 1);
28
+ }
29
+
30
+ /**
31
+ * Converts a dot-separated apiName to camelCase, including namespace segments.
32
+ * "com.example.Employee" -> "comExampleEmployee"
33
+ * "Employee" -> "employee"
34
+ */
35
+ export function fullCamel(apiName) {
36
+ return camel(apiName.replace(/\./g, "-"));
37
+ }
38
+
39
+ /**
40
+ * Converts an apiName to camelCase variable name.
41
+ * "Employee" -> "employee"
42
+ * "create-employee" -> "createEmployee"
43
+ */
44
+ export function camel(str) {
45
+ if (!str) {
46
+ return str;
47
+ }
48
+ let result = str.replace(/[-_]+(.)?/g, (_, c) => c ? c.toUpperCase() : "");
49
+ result = result.charAt(0).toLowerCase() + result.slice(1);
50
+ return result;
51
+ }
52
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["withoutNamespace","apiName","lastDot","lastIndexOf","substring","fullCamel","camel","replace","str","result","_","c","toUpperCase","charAt","toLowerCase","slice"],"sources":["utils.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\n/**\n * Strips namespace prefix from an apiName.\n * \"com.example.Employee\" -> \"Employee\"\n * \"Employee\" -> \"Employee\"\n */\nexport function withoutNamespace(apiName: string): string {\n const lastDot = apiName.lastIndexOf(\".\");\n if (lastDot === -1) {\n return apiName;\n }\n return apiName.substring(lastDot + 1);\n}\n\n/**\n * Converts a dot-separated apiName to camelCase, including namespace segments.\n * \"com.example.Employee\" -> \"comExampleEmployee\"\n * \"Employee\" -> \"employee\"\n */\nexport function fullCamel(apiName: string): string {\n return camel(apiName.replace(/\\./g, \"-\"));\n}\n\n/**\n * Converts an apiName to camelCase variable name.\n * \"Employee\" -> \"employee\"\n * \"create-employee\" -> \"createEmployee\"\n */\nexport function camel(str: string): string {\n if (!str) {\n return str;\n }\n let result = str.replace(/[-_]+(.)?/g, (_, c) => (c ? c.toUpperCase() : \"\"));\n result = result.charAt(0).toLowerCase() + result.slice(1);\n return result;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,gBAAgBA,CAACC,OAAe,EAAU;EACxD,MAAMC,OAAO,GAAGD,OAAO,CAACE,WAAW,CAAC,GAAG,CAAC;EACxC,IAAID,OAAO,KAAK,CAAC,CAAC,EAAE;IAClB,OAAOD,OAAO;EAChB;EACA,OAAOA,OAAO,CAACG,SAAS,CAACF,OAAO,GAAG,CAAC,CAAC;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,SAASA,CAACJ,OAAe,EAAU;EACjD,OAAOK,KAAK,CAACL,OAAO,CAACM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASD,KAAKA,CAACE,GAAW,EAAU;EACzC,IAAI,CAACA,GAAG,EAAE;IACR,OAAOA,GAAG;EACZ;EACA,IAAIC,MAAM,GAAGD,GAAG,CAACD,OAAO,CAAC,YAAY,EAAE,CAACG,CAAC,EAAEC,CAAC,KAAMA,CAAC,GAAGA,CAAC,CAACC,WAAW,CAAC,CAAC,GAAG,EAAG,CAAC;EAC5EH,MAAM,GAAGA,MAAM,CAACI,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGL,MAAM,CAACM,KAAK,CAAC,CAAC,CAAC;EACzD,OAAON,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { OntologyEntityTypeEnum } from "@osdk/maker";
18
+ import * as fs from "node:fs";
19
+ import * as path from "node:path";
20
+ import { convertActionType } from "./convertActionType.js";
21
+ import { convertInterfaceType } from "./convertInterfaceType.js";
22
+ import { convertObjectType } from "./convertObjectType.js";
23
+ import { convertSharedPropertyType } from "./convertSharedPropertyType.js";
24
+ import { camel, fullCamel, withoutNamespace } from "./utils.js";
25
+ const TYPE_NAME_MAP = {
26
+ [OntologyEntityTypeEnum.OBJECT_TYPE]: "ObjectType",
27
+ [OntologyEntityTypeEnum.ACTION_TYPE]: "ActionType",
28
+ [OntologyEntityTypeEnum.INTERFACE_TYPE]: "InterfaceType",
29
+ [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: "SharedPropertyType"
30
+ };
31
+ const DIR_NAME_MAP = {
32
+ [OntologyEntityTypeEnum.OBJECT_TYPE]: "object-types",
33
+ [OntologyEntityTypeEnum.ACTION_TYPE]: "action-types",
34
+ [OntologyEntityTypeEnum.INTERFACE_TYPE]: "interface-types",
35
+ [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: "shared-property-types"
36
+ };
37
+ /**
38
+ * Resolves unique variable/file names for a list of apiNames.
39
+ *
40
+ * First tries the short name (namespace stripped, camelCase).
41
+ * If that collides, all colliding entries are escalated to the full
42
+ * camelCase name (namespace included). Any remaining duplicates get
43
+ * a numeric suffix.
44
+ */
45
+ export function resolveVarNames(apiNames) {
46
+ const shortNames = apiNames.map(n => camel(withoutNamespace(n)));
47
+
48
+ // Find which short names appear more than once
49
+ const counts = new Map();
50
+ for (const name of shortNames) {
51
+ counts.set(name, (counts.get(name) ?? 0) + 1);
52
+ }
53
+
54
+ // Escalate conflicting names to fullCamel
55
+ const resolved = apiNames.map((apiName, i) => {
56
+ if (counts.get(shortNames[i]) > 1) {
57
+ return fullCamel(apiName);
58
+ }
59
+ return shortNames[i];
60
+ });
61
+
62
+ // Handle any remaining duplicates with numeric suffixes
63
+ const finalNames = [];
64
+ const used = new Map();
65
+ for (const name of resolved) {
66
+ const count = used.get(name) ?? 0;
67
+ finalNames.push(count === 0 ? name : `${name}${count}`);
68
+ used.set(name, count + 1);
69
+ }
70
+ return finalNames;
71
+ }
72
+
73
+ /**
74
+ * Generates TypeScript files from OntologyFullMetadata, replicating
75
+ * the pattern from maker's writeStaticObjects().
76
+ *
77
+ * Each entity gets its own file with wrapWithProxy, plus an index.ts
78
+ * that re-exports everything.
79
+ */
80
+ export function writeImportedOntology(metadata, outputDir) {
81
+ const codegenDir = path.resolve(outputDir, "codegen");
82
+
83
+ // Clean and create directories
84
+ for (const dirName of Object.values(DIR_NAME_MAP)) {
85
+ const dirPath = path.join(codegenDir, dirName);
86
+ if (fs.existsSync(dirPath)) {
87
+ fs.rmSync(dirPath, {
88
+ recursive: true,
89
+ force: true
90
+ });
91
+ }
92
+ fs.mkdirSync(dirPath, {
93
+ recursive: true
94
+ });
95
+ }
96
+
97
+ // Pass 1: Convert all entities
98
+ const entries = [];
99
+ for (const [_apiName, spt] of Object.entries(metadata.sharedPropertyTypes)) {
100
+ const converted = convertSharedPropertyType(spt);
101
+ if (converted) {
102
+ entries.push({
103
+ apiName: converted.apiName,
104
+ entityType: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE,
105
+ entity: converted
106
+ });
107
+ }
108
+ }
109
+ for (const [_apiName, iface] of Object.entries(metadata.interfaceTypes)) {
110
+ const converted = convertInterfaceType(iface, metadata.interfaceTypes);
111
+ entries.push({
112
+ apiName: converted.apiName,
113
+ entityType: OntologyEntityTypeEnum.INTERFACE_TYPE,
114
+ entity: converted
115
+ });
116
+ }
117
+ for (const [_apiName, objFull] of Object.entries(metadata.objectTypes)) {
118
+ const converted = convertObjectType(objFull);
119
+ entries.push({
120
+ apiName: converted.apiName,
121
+ entityType: OntologyEntityTypeEnum.OBJECT_TYPE,
122
+ entity: converted
123
+ });
124
+ }
125
+ for (const [_apiName, action] of Object.entries(metadata.actionTypes)) {
126
+ const converted = convertActionType(action);
127
+ entries.push({
128
+ apiName: converted.apiName,
129
+ entityType: OntologyEntityTypeEnum.ACTION_TYPE,
130
+ entity: converted
131
+ });
132
+ }
133
+
134
+ // Pass 2: Resolve unique variable names across all entities
135
+ const varNames = resolveVarNames(entries.map(e => e.apiName));
136
+
137
+ // Pass 3: Write files with resolved names
138
+ const topLevelExports = [];
139
+ for (let i = 0; i < entries.length; i++) {
140
+ writeEntityFile(codegenDir, entries[i].entityType, entries[i].entity, varNames[i], topLevelExports);
141
+ }
142
+
143
+ // Write index.ts
144
+ if (topLevelExports.length > 0) {
145
+ const indexContent = topLevelExports.join("\n") + "\n";
146
+ const indexPath = path.join(outputDir, "index.ts");
147
+ fs.writeFileSync(indexPath, indexContent, {
148
+ flag: "w"
149
+ });
150
+ }
151
+ }
152
+ function writeEntityFile(codegenDir, entityType, entity, varName, topLevelExports) {
153
+ const typeName = TYPE_NAME_MAP[entityType];
154
+ const dirName = DIR_NAME_MAP[entityType];
155
+ const entityJSON = JSON.stringify(entity, null, 2).replace(/("__type"\s*:\s*)"([^"]*)"/g, (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`);
156
+ const filePath = path.join(codegenDir, dirName, `${varName}.ts`);
157
+ fs.writeFileSync(filePath, `import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
158
+ import type { ${typeName} } from '@osdk/maker';
159
+
160
+ /** @type {import('@osdk/maker').${typeName}} */
161
+ const ${varName}_base: ${typeName} = ${entityJSON} as unknown as ${typeName};
162
+
163
+ export const ${varName}: ${typeName} = wrapWithProxy(${varName}_base);
164
+ `, {
165
+ flag: "w"
166
+ });
167
+ topLevelExports.push(`export { ${varName} } from "./codegen/${dirName}/${varName}.js";`);
168
+ }
169
+ //# sourceMappingURL=writeImportedOntology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeImportedOntology.js","names":["OntologyEntityTypeEnum","fs","path","convertActionType","convertInterfaceType","convertObjectType","convertSharedPropertyType","camel","fullCamel","withoutNamespace","TYPE_NAME_MAP","OBJECT_TYPE","ACTION_TYPE","INTERFACE_TYPE","SHARED_PROPERTY_TYPE","DIR_NAME_MAP","resolveVarNames","apiNames","shortNames","map","n","counts","Map","name","set","get","resolved","apiName","i","finalNames","used","count","push","writeImportedOntology","metadata","outputDir","codegenDir","resolve","dirName","Object","values","dirPath","join","existsSync","rmSync","recursive","force","mkdirSync","entries","_apiName","spt","sharedPropertyTypes","converted","entityType","entity","iface","interfaceTypes","objFull","objectTypes","action","actionTypes","varNames","e","topLevelExports","length","writeEntityFile","indexContent","indexPath","writeFileSync","flag","varName","typeName","entityJSON","JSON","stringify","replace","_","prefix","value","filePath"],"sources":["writeImportedOntology.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 { OntologyEntityTypeEnum } from \"@osdk/maker\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { convertActionType } from \"./convertActionType.js\";\nimport { convertInterfaceType } from \"./convertInterfaceType.js\";\nimport { convertObjectType } from \"./convertObjectType.js\";\nimport { convertSharedPropertyType } from \"./convertSharedPropertyType.js\";\nimport { camel, fullCamel, withoutNamespace } from \"./utils.js\";\n\ninterface OntologyFullMetadata {\n objectTypes: Record<string, {\n objectType: {\n apiName: string;\n displayName?: string;\n description?: string;\n primaryKey: string;\n titleProperty: string;\n status: string;\n visibility?: string;\n properties: Record<\n string,\n {\n displayName?: string;\n description?: string;\n dataType: { type: string; [key: string]: unknown };\n }\n >;\n };\n sharedPropertyTypeMapping?: Record<string, string>;\n }>;\n actionTypes: Record<string, {\n apiName: string;\n displayName?: string;\n description?: string;\n status: string;\n parameters: Record<string, {\n displayName?: string;\n description?: string;\n dataType: { type: string; [key: string]: unknown };\n required: boolean;\n }>;\n operations: Array<{ type: string; [key: string]: unknown }>;\n }>;\n interfaceTypes: Record<string, {\n apiName: string;\n displayName?: string;\n description?: string;\n extendsInterfaces: ReadonlyArray<string>;\n properties: Record<string, {\n apiName: string;\n displayName?: string;\n description?: string;\n dataType: { type: string; [key: string]: unknown };\n }>;\n links: Record<string, {\n apiName: string;\n displayName?: string;\n description?: string;\n cardinality: string;\n required: boolean;\n linkedEntityApiName: { type: string; apiName?: string };\n }>;\n }>;\n sharedPropertyTypes: Record<string, {\n apiName: string;\n displayName?: string;\n description?: string;\n dataType: { type: string; [key: string]: unknown };\n }>;\n}\n\nconst TYPE_NAME_MAP: Record<string, string> = {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"ObjectType\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"ActionType\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"InterfaceType\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"SharedPropertyType\",\n};\n\nconst DIR_NAME_MAP: Record<string, string> = {\n [OntologyEntityTypeEnum.OBJECT_TYPE]: \"object-types\",\n [OntologyEntityTypeEnum.ACTION_TYPE]: \"action-types\",\n [OntologyEntityTypeEnum.INTERFACE_TYPE]: \"interface-types\",\n [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: \"shared-property-types\",\n};\n\ninterface EntityEntry {\n apiName: string;\n entityType: OntologyEntityTypeEnum;\n entity: unknown;\n}\n\n/**\n * Resolves unique variable/file names for a list of apiNames.\n *\n * First tries the short name (namespace stripped, camelCase).\n * If that collides, all colliding entries are escalated to the full\n * camelCase name (namespace included). Any remaining duplicates get\n * a numeric suffix.\n */\nexport function resolveVarNames(apiNames: string[]): string[] {\n const shortNames = apiNames.map(n => camel(withoutNamespace(n)));\n\n // Find which short names appear more than once\n const counts = new Map<string, number>();\n for (const name of shortNames) {\n counts.set(name, (counts.get(name) ?? 0) + 1);\n }\n\n // Escalate conflicting names to fullCamel\n const resolved = apiNames.map((apiName, i) => {\n if (counts.get(shortNames[i])! > 1) {\n return fullCamel(apiName);\n }\n return shortNames[i];\n });\n\n // Handle any remaining duplicates with numeric suffixes\n const finalNames: string[] = [];\n const used = new Map<string, number>();\n for (const name of resolved) {\n const count = used.get(name) ?? 0;\n finalNames.push(count === 0 ? name : `${name}${count}`);\n used.set(name, count + 1);\n }\n\n return finalNames;\n}\n\n/**\n * Generates TypeScript files from OntologyFullMetadata, replicating\n * the pattern from maker's writeStaticObjects().\n *\n * Each entity gets its own file with wrapWithProxy, plus an index.ts\n * that re-exports everything.\n */\nexport function writeImportedOntology(\n metadata: OntologyFullMetadata,\n outputDir: string,\n): void {\n const codegenDir = path.resolve(outputDir, \"codegen\");\n\n // Clean and create directories\n for (const dirName of Object.values(DIR_NAME_MAP)) {\n const dirPath = path.join(codegenDir, dirName);\n if (fs.existsSync(dirPath)) {\n fs.rmSync(dirPath, { recursive: true, force: true });\n }\n fs.mkdirSync(dirPath, { recursive: true });\n }\n\n // Pass 1: Convert all entities\n const entries: EntityEntry[] = [];\n\n for (const [_apiName, spt] of Object.entries(metadata.sharedPropertyTypes)) {\n const converted = convertSharedPropertyType(spt);\n if (converted) {\n entries.push({\n apiName: converted.apiName,\n entityType: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE,\n entity: converted,\n });\n }\n }\n\n for (const [_apiName, iface] of Object.entries(metadata.interfaceTypes)) {\n const converted = convertInterfaceType(iface, metadata.interfaceTypes);\n entries.push({\n apiName: converted.apiName,\n entityType: OntologyEntityTypeEnum.INTERFACE_TYPE,\n entity: converted,\n });\n }\n\n for (const [_apiName, objFull] of Object.entries(metadata.objectTypes)) {\n const converted = convertObjectType(objFull);\n entries.push({\n apiName: converted.apiName,\n entityType: OntologyEntityTypeEnum.OBJECT_TYPE,\n entity: converted,\n });\n }\n\n for (const [_apiName, action] of Object.entries(metadata.actionTypes)) {\n const converted = convertActionType(action);\n entries.push({\n apiName: converted.apiName,\n entityType: OntologyEntityTypeEnum.ACTION_TYPE,\n entity: converted,\n });\n }\n\n // Pass 2: Resolve unique variable names across all entities\n const varNames = resolveVarNames(entries.map(e => e.apiName));\n\n // Pass 3: Write files with resolved names\n const topLevelExports: string[] = [];\n for (let i = 0; i < entries.length; i++) {\n writeEntityFile(\n codegenDir,\n entries[i].entityType,\n entries[i].entity,\n varNames[i],\n topLevelExports,\n );\n }\n\n // Write index.ts\n if (topLevelExports.length > 0) {\n const indexContent = topLevelExports.join(\"\\n\") + \"\\n\";\n const indexPath = path.join(outputDir, \"index.ts\");\n fs.writeFileSync(indexPath, indexContent, { flag: \"w\" });\n }\n}\n\nfunction writeEntityFile(\n codegenDir: string,\n entityType: OntologyEntityTypeEnum,\n entity: unknown,\n varName: string,\n topLevelExports: string[],\n): void {\n const typeName = TYPE_NAME_MAP[entityType];\n const dirName = DIR_NAME_MAP[entityType];\n\n const entityJSON = JSON.stringify(entity, null, 2).replace(\n /(\"__type\"\\s*:\\s*)\"([^\"]*)\"/g,\n (_, prefix, value) => `${prefix}OntologyEntityTypeEnum.${value}`,\n );\n\n const content =\n `import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';\nimport type { ${typeName} } from '@osdk/maker';\n\n/** @type {import('@osdk/maker').${typeName}} */\nconst ${varName}_base: ${typeName} = ${entityJSON} as unknown as ${typeName};\n\nexport const ${varName}: ${typeName} = wrapWithProxy(${varName}_base);\n`;\n\n const filePath = path.join(codegenDir, dirName, `${varName}.ts`);\n fs.writeFileSync(filePath, content, { flag: \"w\" });\n\n topLevelExports.push(\n `export { ${varName} } from \"./codegen/${dirName}/${varName}.js\";`,\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,sBAAsB,QAAQ,aAAa;AACpD,OAAO,KAAKC,EAAE,MAAM,SAAS;AAC7B,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,S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AAEE,OAAO,EAAE,GAAGgC,OAAO,KAAK,CAAC;EAChErE,EAAE,CAACmE,aAAa,CAACW,QAAQ,EAVvB;AACJ,gBAAgBR,QAAQ;AACxB;AACA,mCAAmCA,QAAQ;AAC3C,QAAQD,OAAO,UAAUC,QAAQ,MAAMC,UAAU,kBAAkBD,QAAQ;AAC3E;AACA,eAAeD,OAAO,KAAKC,QAAQ,oBAAoBD,OAAO;AAC9D,CAAC,EAGqC;IAAED,IAAI,EAAE;EAAI,CAAC,CAAC;EAElDN,eAAe,CAAC/B,IAAI,CAClB,YAAYsC,OAAO,sBAAsBhC,OAAO,IAAIgC,OAAO,OAC7D,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export { default } from "./cli/main.js";
18
+ export { writeImportedOntology } from "./generate/writeImportedOntology.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default","writeImportedOntology"],"sources":["index.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\nexport { default as default } from \"./cli/main.js\";\nexport { writeImportedOntology } from \"./generate/writeImportedOntology.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAClD,SAASC,qBAAqB,QAAQ,qCAAqC","ignoreList":[]}