@osdk/maker 0.16.0-beta.8 → 0.16.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 (117) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/build/browser/api/defineFunction.js +6 -5
  3. package/build/browser/api/defineFunction.js.map +1 -1
  4. package/build/browser/api/defineInterface.js +3 -0
  5. package/build/browser/api/defineInterface.js.map +1 -1
  6. package/build/browser/api/defineLink.js +3 -0
  7. package/build/browser/api/defineLink.js.map +1 -1
  8. package/build/browser/api/defineObject.js +9 -2
  9. package/build/browser/api/defineObject.js.map +1 -1
  10. package/build/browser/api/interface/InterfaceType.js.map +1 -1
  11. package/build/browser/api/links/LinkType.js.map +1 -1
  12. package/build/browser/api/object/ObjectType.js.map +1 -1
  13. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
  14. package/build/browser/cli/main.js +4 -147
  15. package/build/browser/cli/main.js.map +1 -1
  16. package/build/browser/conversion/toMarketplace/convertInterface.js +2 -1
  17. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
  18. package/build/browser/conversion/toMarketplace/convertLink.js +9 -4
  19. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
  20. package/build/browser/util/ApiNameValidator.js +26 -0
  21. package/build/browser/util/ApiNameValidator.js.map +1 -0
  22. package/build/cjs/index.cjs +107 -218
  23. package/build/cjs/index.cjs.map +1 -1
  24. package/build/cjs/index.d.cts +5 -1
  25. package/build/esm/api/defineFunction.js +6 -5
  26. package/build/esm/api/defineFunction.js.map +1 -1
  27. package/build/esm/api/defineInterface.js +3 -0
  28. package/build/esm/api/defineInterface.js.map +1 -1
  29. package/build/esm/api/defineLink.js +3 -0
  30. package/build/esm/api/defineLink.js.map +1 -1
  31. package/build/esm/api/defineObject.js +9 -2
  32. package/build/esm/api/defineObject.js.map +1 -1
  33. package/build/esm/api/interface/InterfaceType.js.map +1 -1
  34. package/build/esm/api/links/LinkType.js.map +1 -1
  35. package/build/esm/api/object/ObjectType.js.map +1 -1
  36. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
  37. package/build/esm/cli/main.js +4 -147
  38. package/build/esm/cli/main.js.map +1 -1
  39. package/build/esm/conversion/toMarketplace/convertInterface.js +2 -1
  40. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
  41. package/build/esm/conversion/toMarketplace/convertLink.js +9 -4
  42. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
  43. package/build/esm/util/ApiNameValidator.js +26 -0
  44. package/build/esm/util/ApiNameValidator.js.map +1 -0
  45. package/build/types/api/defineFunction.d.ts.map +1 -1
  46. package/build/types/api/defineInterface.d.ts.map +1 -1
  47. package/build/types/api/defineLink.d.ts.map +1 -1
  48. package/build/types/api/defineObject.d.ts.map +1 -1
  49. package/build/types/api/interface/InterfaceType.d.ts +1 -1
  50. package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
  51. package/build/types/api/links/LinkType.d.ts +2 -0
  52. package/build/types/api/links/LinkType.d.ts.map +1 -1
  53. package/build/types/api/object/ObjectType.d.ts +1 -0
  54. package/build/types/api/object/ObjectType.d.ts.map +1 -1
  55. package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -0
  56. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
  57. package/build/types/cli/main.d.ts.map +1 -1
  58. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
  59. package/build/types/util/ApiNameValidator.d.ts +4 -0
  60. package/build/types/util/ApiNameValidator.d.ts.map +1 -0
  61. package/package.json +6 -7
  62. package/build/browser/api/test/actions.test.js +0 -14402
  63. package/build/browser/api/test/actions.test.js.map +0 -1
  64. package/build/browser/api/test/interfaces.test.js +0 -1189
  65. package/build/browser/api/test/interfaces.test.js.map +0 -1
  66. package/build/browser/api/test/links.test.js +0 -2019
  67. package/build/browser/api/test/links.test.js.map +0 -1
  68. package/build/browser/api/test/markingconstraint.test.js +0 -134
  69. package/build/browser/api/test/markingconstraint.test.js.map +0 -1
  70. package/build/browser/api/test/misc.test.js +0 -1315
  71. package/build/browser/api/test/misc.test.js.map +0 -1
  72. package/build/browser/api/test/objectStatus.test.js +0 -252
  73. package/build/browser/api/test/objectStatus.test.js.map +0 -1
  74. package/build/browser/api/test/objects.test.js +0 -4441
  75. package/build/browser/api/test/objects.test.js.map +0 -1
  76. package/build/browser/api/test/spt.test.js +0 -751
  77. package/build/browser/api/test/spt.test.js.map +0 -1
  78. package/build/browser/api/test/valueTypes.test.js +0 -307
  79. package/build/browser/api/test/valueTypes.test.js.map +0 -1
  80. package/build/cjs/defineFunction-7ORD7HD4.cjs +0 -72
  81. package/build/cjs/defineFunction-7ORD7HD4.cjs.map +0 -1
  82. package/build/esm/api/test/actions.test.js +0 -14402
  83. package/build/esm/api/test/actions.test.js.map +0 -1
  84. package/build/esm/api/test/interfaces.test.js +0 -1189
  85. package/build/esm/api/test/interfaces.test.js.map +0 -1
  86. package/build/esm/api/test/links.test.js +0 -2019
  87. package/build/esm/api/test/links.test.js.map +0 -1
  88. package/build/esm/api/test/markingconstraint.test.js +0 -134
  89. package/build/esm/api/test/markingconstraint.test.js.map +0 -1
  90. package/build/esm/api/test/misc.test.js +0 -1315
  91. package/build/esm/api/test/misc.test.js.map +0 -1
  92. package/build/esm/api/test/objectStatus.test.js +0 -252
  93. package/build/esm/api/test/objectStatus.test.js.map +0 -1
  94. package/build/esm/api/test/objects.test.js +0 -4441
  95. package/build/esm/api/test/objects.test.js.map +0 -1
  96. package/build/esm/api/test/spt.test.js +0 -751
  97. package/build/esm/api/test/spt.test.js.map +0 -1
  98. package/build/esm/api/test/valueTypes.test.js +0 -307
  99. package/build/esm/api/test/valueTypes.test.js.map +0 -1
  100. package/build/types/api/test/actions.test.d.ts +0 -1
  101. package/build/types/api/test/actions.test.d.ts.map +0 -1
  102. package/build/types/api/test/interfaces.test.d.ts +0 -1
  103. package/build/types/api/test/interfaces.test.d.ts.map +0 -1
  104. package/build/types/api/test/links.test.d.ts +0 -1
  105. package/build/types/api/test/links.test.d.ts.map +0 -1
  106. package/build/types/api/test/markingconstraint.test.d.ts +0 -1
  107. package/build/types/api/test/markingconstraint.test.d.ts.map +0 -1
  108. package/build/types/api/test/misc.test.d.ts +0 -1
  109. package/build/types/api/test/misc.test.d.ts.map +0 -1
  110. package/build/types/api/test/objectStatus.test.d.ts +0 -1
  111. package/build/types/api/test/objectStatus.test.d.ts.map +0 -1
  112. package/build/types/api/test/objects.test.d.ts +0 -1
  113. package/build/types/api/test/objects.test.d.ts.map +0 -1
  114. package/build/types/api/test/spt.test.d.ts +0 -1
  115. package/build/types/api/test/spt.test.d.ts.map +0 -1
  116. package/build/types/api/test/valueTypes.test.d.ts +0 -1
  117. package/build/types/api/test/valueTypes.test.d.ts.map +0 -1
@@ -1,1315 +0,0 @@
1
- /*
2
- * Copyright 2024 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 * as fs from "fs";
18
- import path from "path";
19
- import { fileURLToPath } from "url";
20
- import { beforeEach, describe, expect, it } from "vitest";
21
- import { addDependency } from "../addDependency.js";
22
- import { OntologyEntityTypeEnum } from "../common/OntologyEntityTypeEnum.js";
23
- import { defineInterface } from "../defineInterface.js";
24
- import { defineObject } from "../defineObject.js";
25
- import { defineOntology, dumpOntologyFullMetadata } from "../defineOntology.js";
26
- import { defineSharedPropertyType } from "../defineSpt.js";
27
- import { importOntologyEntity } from "../importOntologyEntity.js";
28
- import { importSharedPropertyType } from "../importSharedPropertyType.js";
29
- describe("Miscellaneous Tests", () => {
30
- beforeEach(async () => {
31
- await defineOntology("com.palantir.", () => {}, "/tmp/");
32
- });
33
- describe("Imports", () => {
34
- it("Legacy importing works", () => {
35
- const id = importSharedPropertyType({
36
- apiName: "id",
37
- packageName: "com.palantir.core.ontology.types",
38
- typeHint: "string"
39
- });
40
- defineInterface({
41
- apiName: "myInterface",
42
- properties: {
43
- id
44
- }
45
- });
46
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
47
- {
48
- "importedOntology": {
49
- "actionTypes": {},
50
- "blockPermissionInformation": {
51
- "actionTypes": {},
52
- "linkTypes": {},
53
- "objectTypes": {},
54
- },
55
- "interfaceTypes": {},
56
- "linkTypes": {},
57
- "objectTypes": {},
58
- "sharedPropertyTypes": {
59
- "com.palantir.core.ontology.types.id": {
60
- "sharedPropertyType": {
61
- "aliases": [],
62
- "apiName": "com.palantir.core.ontology.types.id",
63
- "baseFormatter": undefined,
64
- "dataConstraints": undefined,
65
- "displayMetadata": {
66
- "description": undefined,
67
- "displayName": "com.palantir.core.ontology.types.id",
68
- "visibility": "NORMAL",
69
- },
70
- "gothamMapping": undefined,
71
- "indexedForSearch": true,
72
- "type": {
73
- "string": {
74
- "analyzerOverride": undefined,
75
- "enableAsciiFolding": undefined,
76
- "isLongText": false,
77
- "supportsEfficientLeadingWildcard": false,
78
- "supportsExactMatching": true,
79
- },
80
- "type": "string",
81
- },
82
- "typeClasses": [],
83
- "valueType": undefined,
84
- },
85
- },
86
- },
87
- },
88
- "importedValueTypes": {
89
- "valueTypes": [],
90
- },
91
- "ontology": {
92
- "actionTypes": {},
93
- "blockPermissionInformation": {
94
- "actionTypes": {},
95
- "linkTypes": {},
96
- "objectTypes": {},
97
- },
98
- "interfaceTypes": {
99
- "com.palantir.myInterface": {
100
- "interfaceType": {
101
- "apiName": "com.palantir.myInterface",
102
- "displayMetadata": {
103
- "description": "myInterface",
104
- "displayName": "myInterface",
105
- "icon": {
106
- "blueprint": {
107
- "color": "#4C90F0",
108
- "locator": "layout-hierarchy",
109
- },
110
- "type": "blueprint",
111
- },
112
- },
113
- "extendsInterfaces": [],
114
- "links": [],
115
- "properties": [],
116
- "propertiesV2": {
117
- "com.palantir.core.ontology.types.id": {
118
- "required": true,
119
- "sharedPropertyType": {
120
- "aliases": [],
121
- "apiName": "com.palantir.core.ontology.types.id",
122
- "baseFormatter": undefined,
123
- "dataConstraints": undefined,
124
- "displayMetadata": {
125
- "description": undefined,
126
- "displayName": "com.palantir.core.ontology.types.id",
127
- "visibility": "NORMAL",
128
- },
129
- "gothamMapping": undefined,
130
- "indexedForSearch": true,
131
- "type": {
132
- "string": {
133
- "analyzerOverride": undefined,
134
- "enableAsciiFolding": undefined,
135
- "isLongText": false,
136
- "supportsEfficientLeadingWildcard": false,
137
- "supportsExactMatching": true,
138
- },
139
- "type": "string",
140
- },
141
- "typeClasses": [],
142
- "valueType": undefined,
143
- },
144
- },
145
- },
146
- "propertiesV3": {
147
- "com.palantir.core.ontology.types.id": {
148
- "sharedPropertyBasedPropertyType": {
149
- "requireImplementation": true,
150
- "sharedPropertyType": {
151
- "aliases": [],
152
- "apiName": "com.palantir.core.ontology.types.id",
153
- "baseFormatter": undefined,
154
- "dataConstraints": undefined,
155
- "displayMetadata": {
156
- "description": undefined,
157
- "displayName": "com.palantir.core.ontology.types.id",
158
- "visibility": "NORMAL",
159
- },
160
- "gothamMapping": undefined,
161
- "indexedForSearch": true,
162
- "type": {
163
- "string": {
164
- "analyzerOverride": undefined,
165
- "enableAsciiFolding": undefined,
166
- "isLongText": false,
167
- "supportsEfficientLeadingWildcard": false,
168
- "supportsExactMatching": true,
169
- },
170
- "type": "string",
171
- },
172
- "typeClasses": [],
173
- "valueType": undefined,
174
- },
175
- },
176
- "type": "sharedPropertyBasedPropertyType",
177
- },
178
- },
179
- "searchable": true,
180
- "status": {
181
- "active": {},
182
- "type": "active",
183
- },
184
- },
185
- },
186
- },
187
- "linkTypes": {},
188
- "objectTypes": {},
189
- "sharedPropertyTypes": {},
190
- },
191
- "randomnessKey": undefined,
192
- "valueTypes": {
193
- "valueTypes": [],
194
- },
195
- }
196
- `);
197
- });
198
- it("Simple importing works", () => {
199
- // does the same as "import { spt } from '@other/package'"
200
- const spt = {
201
- apiName: "com.other.package.spt",
202
- nonNameSpacedApiName: "spt",
203
- type: "string",
204
- __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
205
- };
206
- importOntologyEntity(spt);
207
- defineInterface({
208
- apiName: "myInterface",
209
- properties: {
210
- spt
211
- }
212
- });
213
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
214
- {
215
- "importedOntology": {
216
- "actionTypes": {},
217
- "blockPermissionInformation": {
218
- "actionTypes": {},
219
- "linkTypes": {},
220
- "objectTypes": {},
221
- },
222
- "interfaceTypes": {},
223
- "linkTypes": {},
224
- "objectTypes": {},
225
- "sharedPropertyTypes": {
226
- "com.other.package.spt": {
227
- "sharedPropertyType": {
228
- "aliases": [],
229
- "apiName": "com.other.package.spt",
230
- "baseFormatter": undefined,
231
- "dataConstraints": undefined,
232
- "displayMetadata": {
233
- "description": undefined,
234
- "displayName": "com.other.package.spt",
235
- "visibility": "NORMAL",
236
- },
237
- "gothamMapping": undefined,
238
- "indexedForSearch": true,
239
- "type": {
240
- "string": {
241
- "analyzerOverride": undefined,
242
- "enableAsciiFolding": undefined,
243
- "isLongText": false,
244
- "supportsEfficientLeadingWildcard": false,
245
- "supportsExactMatching": true,
246
- },
247
- "type": "string",
248
- },
249
- "typeClasses": [],
250
- "valueType": undefined,
251
- },
252
- },
253
- },
254
- },
255
- "importedValueTypes": {
256
- "valueTypes": [],
257
- },
258
- "ontology": {
259
- "actionTypes": {},
260
- "blockPermissionInformation": {
261
- "actionTypes": {},
262
- "linkTypes": {},
263
- "objectTypes": {},
264
- },
265
- "interfaceTypes": {
266
- "com.palantir.myInterface": {
267
- "interfaceType": {
268
- "apiName": "com.palantir.myInterface",
269
- "displayMetadata": {
270
- "description": "myInterface",
271
- "displayName": "myInterface",
272
- "icon": {
273
- "blueprint": {
274
- "color": "#4C90F0",
275
- "locator": "layout-hierarchy",
276
- },
277
- "type": "blueprint",
278
- },
279
- },
280
- "extendsInterfaces": [],
281
- "links": [],
282
- "properties": [],
283
- "propertiesV2": {
284
- "com.other.package.spt": {
285
- "required": true,
286
- "sharedPropertyType": {
287
- "aliases": [],
288
- "apiName": "com.other.package.spt",
289
- "baseFormatter": undefined,
290
- "dataConstraints": undefined,
291
- "displayMetadata": {
292
- "description": undefined,
293
- "displayName": "com.other.package.spt",
294
- "visibility": "NORMAL",
295
- },
296
- "gothamMapping": undefined,
297
- "indexedForSearch": true,
298
- "type": {
299
- "string": {
300
- "analyzerOverride": undefined,
301
- "enableAsciiFolding": undefined,
302
- "isLongText": false,
303
- "supportsEfficientLeadingWildcard": false,
304
- "supportsExactMatching": true,
305
- },
306
- "type": "string",
307
- },
308
- "typeClasses": [],
309
- "valueType": undefined,
310
- },
311
- },
312
- },
313
- "propertiesV3": {
314
- "com.other.package.spt": {
315
- "sharedPropertyBasedPropertyType": {
316
- "requireImplementation": true,
317
- "sharedPropertyType": {
318
- "aliases": [],
319
- "apiName": "com.other.package.spt",
320
- "baseFormatter": undefined,
321
- "dataConstraints": undefined,
322
- "displayMetadata": {
323
- "description": undefined,
324
- "displayName": "com.other.package.spt",
325
- "visibility": "NORMAL",
326
- },
327
- "gothamMapping": undefined,
328
- "indexedForSearch": true,
329
- "type": {
330
- "string": {
331
- "analyzerOverride": undefined,
332
- "enableAsciiFolding": undefined,
333
- "isLongText": false,
334
- "supportsEfficientLeadingWildcard": false,
335
- "supportsExactMatching": true,
336
- },
337
- "type": "string",
338
- },
339
- "typeClasses": [],
340
- "valueType": undefined,
341
- },
342
- },
343
- "type": "sharedPropertyBasedPropertyType",
344
- },
345
- },
346
- "searchable": true,
347
- "status": {
348
- "active": {},
349
- "type": "active",
350
- },
351
- },
352
- },
353
- },
354
- "linkTypes": {},
355
- "objectTypes": {},
356
- "sharedPropertyTypes": {},
357
- },
358
- "randomnessKey": undefined,
359
- "valueTypes": {
360
- "valueTypes": [],
361
- },
362
- }
363
- `);
364
- });
365
- it("Export files are generated correctly", async () => {
366
- const generatedDir = path.resolve(path.join(__dirname, "..", "generatedNoCheck", "export_files_are_generated_correctly"));
367
- await defineOntology("com.my.package.", () => {
368
- const mySpt = defineSharedPropertyType({
369
- apiName: "mySpt",
370
- type: "string"
371
- });
372
- const myInterface = defineInterface({
373
- apiName: "myInterface",
374
- properties: {
375
- mySpt
376
- }
377
- });
378
- defineObject({
379
- titlePropertyApiName: "bar",
380
- displayName: "My Object",
381
- pluralDisplayName: "myObjects",
382
- apiName: "myObject",
383
- primaryKeyPropertyApiName: "bar",
384
- properties: {
385
- "bar": {
386
- type: "string"
387
- }
388
- },
389
- implementsInterfaces: [{
390
- implements: myInterface,
391
- propertyMapping: [{
392
- interfaceProperty: "com.my.package.mySpt",
393
- mapsTo: "bar"
394
- }]
395
- }]
396
- });
397
- }, generatedDir);
398
- expect(fs.readFileSync(path.join(generatedDir, "codegen/interface-types/myInterface.ts"), "utf8")).toMatchInlineSnapshot(`
399
- "
400
- import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
401
- import type { InterfaceType } from '@osdk/maker';
402
-
403
- /** @type {import('@osdk/maker').InterfaceType} */
404
- const myInterface_base: InterfaceType = {
405
- "apiName": "com.my.package.myInterface",
406
- "displayMetadata": {
407
- "displayName": "myInterface",
408
- "description": "myInterface"
409
- },
410
- "extendsInterfaces": [],
411
- "links": [],
412
- "status": {
413
- "type": "active",
414
- "active": {}
415
- },
416
- "propertiesV2": {
417
- "com.my.package.mySpt": {
418
- "required": true,
419
- "sharedPropertyType": {
420
- "apiName": "com.my.package.mySpt",
421
- "type": "string",
422
- "nonNameSpacedApiName": "mySpt",
423
- "displayName": "mySpt",
424
- "typeClasses": [
425
- {
426
- "kind": "render_hint",
427
- "name": "SELECTABLE"
428
- },
429
- {
430
- "kind": "render_hint",
431
- "name": "SORTABLE"
432
- }
433
- ],
434
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
435
- }
436
- }
437
- },
438
- "propertiesV3": {
439
- "mySpt": {
440
- "required": true,
441
- "sharedPropertyType": {
442
- "apiName": "com.my.package.mySpt",
443
- "type": "string",
444
- "nonNameSpacedApiName": "mySpt",
445
- "displayName": "mySpt",
446
- "typeClasses": [
447
- {
448
- "kind": "render_hint",
449
- "name": "SELECTABLE"
450
- },
451
- {
452
- "kind": "render_hint",
453
- "name": "SORTABLE"
454
- }
455
- ],
456
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
457
- }
458
- }
459
- },
460
- "searchable": true,
461
- "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
462
- } as unknown as InterfaceType;
463
-
464
- export const myInterface: InterfaceType = wrapWithProxy(myInterface_base);
465
- "
466
- `);
467
- expect(fs.readFileSync(path.join(generatedDir, "codegen/object-types/myObject.ts"), "utf8")).toMatchInlineSnapshot(`
468
- "
469
- import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
470
- import type { ObjectType } from '@osdk/maker';
471
-
472
- /** @type {import('@osdk/maker').ObjectType} */
473
- const myObject_base: ObjectType = {
474
- "titlePropertyApiName": "bar",
475
- "displayName": "My Object",
476
- "pluralDisplayName": "myObjects",
477
- "apiName": "com.my.package.myObject",
478
- "primaryKeyPropertyApiName": "bar",
479
- "properties": [
480
- {
481
- "type": "string",
482
- "displayName": "Bar",
483
- "apiName": "bar"
484
- }
485
- ],
486
- "implementsInterfaces": [
487
- {
488
- "implements": {
489
- "apiName": "com.my.package.myInterface",
490
- "displayMetadata": {
491
- "displayName": "myInterface",
492
- "description": "myInterface"
493
- },
494
- "extendsInterfaces": [],
495
- "links": [],
496
- "status": {
497
- "type": "active",
498
- "active": {}
499
- },
500
- "propertiesV2": {
501
- "com.my.package.mySpt": {
502
- "required": true,
503
- "sharedPropertyType": {
504
- "apiName": "com.my.package.mySpt",
505
- "type": "string",
506
- "nonNameSpacedApiName": "mySpt",
507
- "displayName": "mySpt",
508
- "typeClasses": [
509
- {
510
- "kind": "render_hint",
511
- "name": "SELECTABLE"
512
- },
513
- {
514
- "kind": "render_hint",
515
- "name": "SORTABLE"
516
- }
517
- ],
518
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
519
- }
520
- }
521
- },
522
- "propertiesV3": {
523
- "mySpt": {
524
- "required": true,
525
- "sharedPropertyType": {
526
- "apiName": "com.my.package.mySpt",
527
- "type": "string",
528
- "nonNameSpacedApiName": "mySpt",
529
- "displayName": "mySpt",
530
- "typeClasses": [
531
- {
532
- "kind": "render_hint",
533
- "name": "SELECTABLE"
534
- },
535
- {
536
- "kind": "render_hint",
537
- "name": "SORTABLE"
538
- }
539
- ],
540
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
541
- }
542
- }
543
- },
544
- "searchable": true,
545
- "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
546
- },
547
- "propertyMapping": [
548
- {
549
- "interfaceProperty": "com.my.package.mySpt",
550
- "mapsTo": "bar"
551
- }
552
- ]
553
- }
554
- ],
555
- "__type": OntologyEntityTypeEnum.OBJECT_TYPE
556
- } as unknown as ObjectType;
557
-
558
- export const myObject: ObjectType = wrapWithProxy(myObject_base);
559
- "
560
- `);
561
- expect(fs.readFileSync(path.join(generatedDir, "codegen/shared-property-types/mySpt.ts"), "utf8")).toMatchInlineSnapshot(`
562
- "
563
- import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
564
- import type { SharedPropertyType } from '@osdk/maker';
565
-
566
- /** @type {import('@osdk/maker').SharedPropertyType} */
567
- const mySpt_base: SharedPropertyType = {
568
- "apiName": "com.my.package.mySpt",
569
- "type": "string",
570
- "nonNameSpacedApiName": "mySpt",
571
- "displayName": "mySpt",
572
- "typeClasses": [
573
- {
574
- "kind": "render_hint",
575
- "name": "SELECTABLE"
576
- },
577
- {
578
- "kind": "render_hint",
579
- "name": "SORTABLE"
580
- }
581
- ],
582
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
583
- } as unknown as SharedPropertyType;
584
-
585
- export const mySpt: SharedPropertyType = wrapWithProxy(mySpt_base);
586
- "
587
- `);
588
- fs.rmSync(path.resolve(path.join(generatedDir, "..")), {
589
- recursive: true,
590
- force: true
591
- });
592
- });
593
- it("Extended interfaces are propagated to the static objects", async () => {
594
- const generatedDir = path.resolve(path.join(__dirname, "..", "generatedNoCheck", "extended_interfaces_are_propagated_to_the_static_objects"));
595
- await defineOntology("com.palantir.", () => {
596
- const property1 = defineSharedPropertyType({
597
- apiName: "property1",
598
- type: "string"
599
- });
600
- const property2 = defineSharedPropertyType({
601
- apiName: "property2",
602
- type: "string"
603
- });
604
- const parentInterface = defineInterface({
605
- apiName: "parentInterface",
606
- properties: {
607
- property1: property1
608
- }
609
- });
610
- defineInterface({
611
- apiName: "childInterface",
612
- properties: {
613
- property2: property2
614
- },
615
- extends: [parentInterface]
616
- });
617
- }, generatedDir);
618
- expect(fs.readFileSync(path.join(generatedDir, "codegen/interface-types/childInterface.ts"), "utf8")).toMatchInlineSnapshot(`
619
- "
620
- import { wrapWithProxy, OntologyEntityTypeEnum } from '@osdk/maker';
621
- import type { InterfaceType } from '@osdk/maker';
622
-
623
- /** @type {import('@osdk/maker').InterfaceType} */
624
- const childInterface_base: InterfaceType = {
625
- "apiName": "com.palantir.childInterface",
626
- "displayMetadata": {
627
- "displayName": "childInterface",
628
- "description": "childInterface"
629
- },
630
- "extendsInterfaces": [
631
- {
632
- "apiName": "com.palantir.parentInterface",
633
- "displayMetadata": {
634
- "displayName": "parentInterface",
635
- "description": "parentInterface"
636
- },
637
- "extendsInterfaces": [],
638
- "links": [],
639
- "status": {
640
- "type": "active",
641
- "active": {}
642
- },
643
- "propertiesV2": {
644
- "com.palantir.property1": {
645
- "required": true,
646
- "sharedPropertyType": {
647
- "apiName": "com.palantir.property1",
648
- "type": "string",
649
- "nonNameSpacedApiName": "property1",
650
- "displayName": "property1",
651
- "typeClasses": [
652
- {
653
- "kind": "render_hint",
654
- "name": "SELECTABLE"
655
- },
656
- {
657
- "kind": "render_hint",
658
- "name": "SORTABLE"
659
- }
660
- ],
661
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
662
- }
663
- }
664
- },
665
- "propertiesV3": {
666
- "property1": {
667
- "required": true,
668
- "sharedPropertyType": {
669
- "apiName": "com.palantir.property1",
670
- "type": "string",
671
- "nonNameSpacedApiName": "property1",
672
- "displayName": "property1",
673
- "typeClasses": [
674
- {
675
- "kind": "render_hint",
676
- "name": "SELECTABLE"
677
- },
678
- {
679
- "kind": "render_hint",
680
- "name": "SORTABLE"
681
- }
682
- ],
683
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
684
- }
685
- }
686
- },
687
- "searchable": true,
688
- "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
689
- }
690
- ],
691
- "links": [],
692
- "status": {
693
- "type": "active",
694
- "active": {}
695
- },
696
- "propertiesV2": {
697
- "com.palantir.property2": {
698
- "required": true,
699
- "sharedPropertyType": {
700
- "apiName": "com.palantir.property2",
701
- "type": "string",
702
- "nonNameSpacedApiName": "property2",
703
- "displayName": "property2",
704
- "typeClasses": [
705
- {
706
- "kind": "render_hint",
707
- "name": "SELECTABLE"
708
- },
709
- {
710
- "kind": "render_hint",
711
- "name": "SORTABLE"
712
- }
713
- ],
714
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
715
- }
716
- }
717
- },
718
- "propertiesV3": {
719
- "property2": {
720
- "required": true,
721
- "sharedPropertyType": {
722
- "apiName": "com.palantir.property2",
723
- "type": "string",
724
- "nonNameSpacedApiName": "property2",
725
- "displayName": "property2",
726
- "typeClasses": [
727
- {
728
- "kind": "render_hint",
729
- "name": "SELECTABLE"
730
- },
731
- {
732
- "kind": "render_hint",
733
- "name": "SORTABLE"
734
- }
735
- ],
736
- "__type": OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE
737
- }
738
- }
739
- },
740
- "searchable": true,
741
- "__type": OntologyEntityTypeEnum.INTERFACE_TYPE
742
- } as unknown as InterfaceType;
743
-
744
- export const childInterface: InterfaceType = wrapWithProxy(childInterface_base);
745
- "
746
- `);
747
- fs.rmSync(path.join(generatedDir, ".."), {
748
- recursive: true,
749
- force: true
750
- });
751
- });
752
- it("Extended interface properties are checked in object type property mapping", () => {
753
- const iProperty1 = defineSharedPropertyType({
754
- apiName: "iProperty1",
755
- type: "string"
756
- });
757
- const iProperty2 = defineSharedPropertyType({
758
- apiName: "iProperty2",
759
- type: "string"
760
- });
761
- const parentInterface = defineInterface({
762
- apiName: "parentInterface",
763
- properties: {
764
- iProperty1: iProperty1
765
- }
766
- });
767
- const childInterface = defineInterface({
768
- apiName: "childInterface",
769
- properties: {
770
- iProperty2: iProperty2
771
- },
772
- extends: [parentInterface]
773
- });
774
- defineObject({
775
- apiName: "objectDef",
776
- primaryKeyPropertyApiName: "property1",
777
- titlePropertyApiName: "property1",
778
- displayName: "objectDef",
779
- pluralDisplayName: "objectDefs",
780
- properties: {
781
- "property1": {
782
- type: "string",
783
- displayName: "property1"
784
- },
785
- "property2": {
786
- type: "string",
787
- displayName: "property2"
788
- }
789
- },
790
- implementsInterfaces: [{
791
- implements: childInterface,
792
- propertyMapping: [{
793
- interfaceProperty: "com.palantir.iProperty1",
794
- mapsTo: "property1"
795
- }, {
796
- interfaceProperty: "com.palantir.iProperty2",
797
- mapsTo: "property2"
798
- }]
799
- }]
800
- });
801
- expect(dumpOntologyFullMetadata()).toMatchInlineSnapshot(`
802
- {
803
- "importedOntology": {
804
- "actionTypes": {},
805
- "blockPermissionInformation": {
806
- "actionTypes": {},
807
- "linkTypes": {},
808
- "objectTypes": {},
809
- },
810
- "interfaceTypes": {},
811
- "linkTypes": {},
812
- "objectTypes": {},
813
- "sharedPropertyTypes": {},
814
- },
815
- "importedValueTypes": {
816
- "valueTypes": [],
817
- },
818
- "ontology": {
819
- "actionTypes": {},
820
- "blockPermissionInformation": {
821
- "actionTypes": {},
822
- "linkTypes": {},
823
- "objectTypes": {},
824
- },
825
- "interfaceTypes": {
826
- "com.palantir.childInterface": {
827
- "interfaceType": {
828
- "apiName": "com.palantir.childInterface",
829
- "displayMetadata": {
830
- "description": "childInterface",
831
- "displayName": "childInterface",
832
- "icon": {
833
- "blueprint": {
834
- "color": "#4C90F0",
835
- "locator": "layout-hierarchy",
836
- },
837
- "type": "blueprint",
838
- },
839
- },
840
- "extendsInterfaces": [
841
- "com.palantir.parentInterface",
842
- ],
843
- "links": [],
844
- "properties": [],
845
- "propertiesV2": {
846
- "com.palantir.iProperty2": {
847
- "required": true,
848
- "sharedPropertyType": {
849
- "aliases": [],
850
- "apiName": "com.palantir.iProperty2",
851
- "baseFormatter": undefined,
852
- "dataConstraints": undefined,
853
- "displayMetadata": {
854
- "description": undefined,
855
- "displayName": "iProperty2",
856
- "visibility": "NORMAL",
857
- },
858
- "gothamMapping": undefined,
859
- "indexedForSearch": true,
860
- "type": {
861
- "string": {
862
- "analyzerOverride": undefined,
863
- "enableAsciiFolding": undefined,
864
- "isLongText": false,
865
- "supportsEfficientLeadingWildcard": false,
866
- "supportsExactMatching": true,
867
- },
868
- "type": "string",
869
- },
870
- "typeClasses": [
871
- {
872
- "kind": "render_hint",
873
- "name": "SELECTABLE",
874
- },
875
- {
876
- "kind": "render_hint",
877
- "name": "SORTABLE",
878
- },
879
- ],
880
- "valueType": undefined,
881
- },
882
- },
883
- },
884
- "propertiesV3": {
885
- "com.palantir.iProperty2": {
886
- "sharedPropertyBasedPropertyType": {
887
- "requireImplementation": true,
888
- "sharedPropertyType": {
889
- "aliases": [],
890
- "apiName": "com.palantir.iProperty2",
891
- "baseFormatter": undefined,
892
- "dataConstraints": undefined,
893
- "displayMetadata": {
894
- "description": undefined,
895
- "displayName": "iProperty2",
896
- "visibility": "NORMAL",
897
- },
898
- "gothamMapping": undefined,
899
- "indexedForSearch": true,
900
- "type": {
901
- "string": {
902
- "analyzerOverride": undefined,
903
- "enableAsciiFolding": undefined,
904
- "isLongText": false,
905
- "supportsEfficientLeadingWildcard": false,
906
- "supportsExactMatching": true,
907
- },
908
- "type": "string",
909
- },
910
- "typeClasses": [
911
- {
912
- "kind": "render_hint",
913
- "name": "SELECTABLE",
914
- },
915
- {
916
- "kind": "render_hint",
917
- "name": "SORTABLE",
918
- },
919
- ],
920
- "valueType": undefined,
921
- },
922
- },
923
- "type": "sharedPropertyBasedPropertyType",
924
- },
925
- },
926
- "searchable": true,
927
- "status": {
928
- "active": {},
929
- "type": "active",
930
- },
931
- },
932
- },
933
- "com.palantir.parentInterface": {
934
- "interfaceType": {
935
- "apiName": "com.palantir.parentInterface",
936
- "displayMetadata": {
937
- "description": "parentInterface",
938
- "displayName": "parentInterface",
939
- "icon": {
940
- "blueprint": {
941
- "color": "#4C90F0",
942
- "locator": "layout-hierarchy",
943
- },
944
- "type": "blueprint",
945
- },
946
- },
947
- "extendsInterfaces": [],
948
- "links": [],
949
- "properties": [],
950
- "propertiesV2": {
951
- "com.palantir.iProperty1": {
952
- "required": true,
953
- "sharedPropertyType": {
954
- "aliases": [],
955
- "apiName": "com.palantir.iProperty1",
956
- "baseFormatter": undefined,
957
- "dataConstraints": undefined,
958
- "displayMetadata": {
959
- "description": undefined,
960
- "displayName": "iProperty1",
961
- "visibility": "NORMAL",
962
- },
963
- "gothamMapping": undefined,
964
- "indexedForSearch": true,
965
- "type": {
966
- "string": {
967
- "analyzerOverride": undefined,
968
- "enableAsciiFolding": undefined,
969
- "isLongText": false,
970
- "supportsEfficientLeadingWildcard": false,
971
- "supportsExactMatching": true,
972
- },
973
- "type": "string",
974
- },
975
- "typeClasses": [
976
- {
977
- "kind": "render_hint",
978
- "name": "SELECTABLE",
979
- },
980
- {
981
- "kind": "render_hint",
982
- "name": "SORTABLE",
983
- },
984
- ],
985
- "valueType": undefined,
986
- },
987
- },
988
- },
989
- "propertiesV3": {
990
- "com.palantir.iProperty1": {
991
- "sharedPropertyBasedPropertyType": {
992
- "requireImplementation": true,
993
- "sharedPropertyType": {
994
- "aliases": [],
995
- "apiName": "com.palantir.iProperty1",
996
- "baseFormatter": undefined,
997
- "dataConstraints": undefined,
998
- "displayMetadata": {
999
- "description": undefined,
1000
- "displayName": "iProperty1",
1001
- "visibility": "NORMAL",
1002
- },
1003
- "gothamMapping": undefined,
1004
- "indexedForSearch": true,
1005
- "type": {
1006
- "string": {
1007
- "analyzerOverride": undefined,
1008
- "enableAsciiFolding": undefined,
1009
- "isLongText": false,
1010
- "supportsEfficientLeadingWildcard": false,
1011
- "supportsExactMatching": true,
1012
- },
1013
- "type": "string",
1014
- },
1015
- "typeClasses": [
1016
- {
1017
- "kind": "render_hint",
1018
- "name": "SELECTABLE",
1019
- },
1020
- {
1021
- "kind": "render_hint",
1022
- "name": "SORTABLE",
1023
- },
1024
- ],
1025
- "valueType": undefined,
1026
- },
1027
- },
1028
- "type": "sharedPropertyBasedPropertyType",
1029
- },
1030
- },
1031
- "searchable": true,
1032
- "status": {
1033
- "active": {},
1034
- "type": "active",
1035
- },
1036
- },
1037
- },
1038
- },
1039
- "linkTypes": {},
1040
- "objectTypes": {
1041
- "com.palantir.objectDef": {
1042
- "datasources": [
1043
- {
1044
- "datasource": {
1045
- "datasetV2": {
1046
- "datasetRid": "com.palantir.objectDef",
1047
- "propertyMapping": {
1048
- "property1": {
1049
- "column": "property1",
1050
- "type": "column",
1051
- },
1052
- "property2": {
1053
- "column": "property2",
1054
- "type": "column",
1055
- },
1056
- },
1057
- },
1058
- "type": "datasetV2",
1059
- },
1060
- "datasourceName": "com.palantir.objectDef",
1061
- "editsConfiguration": {
1062
- "onlyAllowPrivilegedEdits": false,
1063
- },
1064
- "redacted": false,
1065
- },
1066
- ],
1067
- "entityMetadata": {
1068
- "aliases": [],
1069
- "arePatchesEnabled": false,
1070
- },
1071
- "objectType": {
1072
- "allImplementsInterfaces": {},
1073
- "apiName": "com.palantir.objectDef",
1074
- "displayMetadata": {
1075
- "description": undefined,
1076
- "displayName": "objectDef",
1077
- "groupDisplayName": undefined,
1078
- "icon": {
1079
- "blueprint": {
1080
- "color": "#2D72D2",
1081
- "locator": "cube",
1082
- },
1083
- "type": "blueprint",
1084
- },
1085
- "pluralDisplayName": "objectDefs",
1086
- "visibility": "NORMAL",
1087
- },
1088
- "implementsInterfaces2": [
1089
- {
1090
- "interfaceTypeApiName": "com.palantir.childInterface",
1091
- "linksV2": {},
1092
- "properties": {},
1093
- "propertiesV2": {
1094
- "com.palantir.iProperty1": {
1095
- "propertyTypeRid": "property1",
1096
- "type": "propertyTypeRid",
1097
- },
1098
- "com.palantir.iProperty2": {
1099
- "propertyTypeRid": "property2",
1100
- "type": "propertyTypeRid",
1101
- },
1102
- },
1103
- },
1104
- ],
1105
- "primaryKeys": [
1106
- "property1",
1107
- ],
1108
- "propertyTypes": {
1109
- "property1": {
1110
- "apiName": "property1",
1111
- "baseFormatter": undefined,
1112
- "dataConstraints": undefined,
1113
- "displayMetadata": {
1114
- "description": undefined,
1115
- "displayName": "property1",
1116
- "visibility": "NORMAL",
1117
- },
1118
- "indexedForSearch": true,
1119
- "inlineAction": undefined,
1120
- "ruleSetBinding": undefined,
1121
- "sharedPropertyTypeApiName": undefined,
1122
- "sharedPropertyTypeRid": undefined,
1123
- "status": {
1124
- "active": {},
1125
- "type": "active",
1126
- },
1127
- "type": {
1128
- "string": {
1129
- "analyzerOverride": undefined,
1130
- "enableAsciiFolding": undefined,
1131
- "isLongText": false,
1132
- "supportsEfficientLeadingWildcard": false,
1133
- "supportsExactMatching": true,
1134
- },
1135
- "type": "string",
1136
- },
1137
- "typeClasses": [
1138
- {
1139
- "kind": "render_hint",
1140
- "name": "SELECTABLE",
1141
- },
1142
- {
1143
- "kind": "render_hint",
1144
- "name": "SORTABLE",
1145
- },
1146
- ],
1147
- "valueType": undefined,
1148
- },
1149
- "property2": {
1150
- "apiName": "property2",
1151
- "baseFormatter": undefined,
1152
- "dataConstraints": undefined,
1153
- "displayMetadata": {
1154
- "description": undefined,
1155
- "displayName": "property2",
1156
- "visibility": "NORMAL",
1157
- },
1158
- "indexedForSearch": true,
1159
- "inlineAction": undefined,
1160
- "ruleSetBinding": undefined,
1161
- "sharedPropertyTypeApiName": undefined,
1162
- "sharedPropertyTypeRid": undefined,
1163
- "status": {
1164
- "active": {},
1165
- "type": "active",
1166
- },
1167
- "type": {
1168
- "string": {
1169
- "analyzerOverride": undefined,
1170
- "enableAsciiFolding": undefined,
1171
- "isLongText": false,
1172
- "supportsEfficientLeadingWildcard": false,
1173
- "supportsExactMatching": true,
1174
- },
1175
- "type": "string",
1176
- },
1177
- "typeClasses": [
1178
- {
1179
- "kind": "render_hint",
1180
- "name": "SELECTABLE",
1181
- },
1182
- {
1183
- "kind": "render_hint",
1184
- "name": "SORTABLE",
1185
- },
1186
- ],
1187
- "valueType": undefined,
1188
- },
1189
- },
1190
- "redacted": false,
1191
- "status": {
1192
- "active": {},
1193
- "type": "active",
1194
- },
1195
- "titlePropertyTypeRid": "property1",
1196
- },
1197
- "propertySecurityGroupPackagingVersion": {
1198
- "type": "v2",
1199
- "v2": {},
1200
- },
1201
- },
1202
- },
1203
- "sharedPropertyTypes": {
1204
- "com.palantir.iProperty1": {
1205
- "sharedPropertyType": {
1206
- "aliases": [],
1207
- "apiName": "com.palantir.iProperty1",
1208
- "baseFormatter": undefined,
1209
- "dataConstraints": undefined,
1210
- "displayMetadata": {
1211
- "description": undefined,
1212
- "displayName": "iProperty1",
1213
- "visibility": "NORMAL",
1214
- },
1215
- "gothamMapping": undefined,
1216
- "indexedForSearch": true,
1217
- "type": {
1218
- "string": {
1219
- "analyzerOverride": undefined,
1220
- "enableAsciiFolding": undefined,
1221
- "isLongText": false,
1222
- "supportsEfficientLeadingWildcard": false,
1223
- "supportsExactMatching": true,
1224
- },
1225
- "type": "string",
1226
- },
1227
- "typeClasses": [
1228
- {
1229
- "kind": "render_hint",
1230
- "name": "SELECTABLE",
1231
- },
1232
- {
1233
- "kind": "render_hint",
1234
- "name": "SORTABLE",
1235
- },
1236
- ],
1237
- "valueType": undefined,
1238
- },
1239
- },
1240
- "com.palantir.iProperty2": {
1241
- "sharedPropertyType": {
1242
- "aliases": [],
1243
- "apiName": "com.palantir.iProperty2",
1244
- "baseFormatter": undefined,
1245
- "dataConstraints": undefined,
1246
- "displayMetadata": {
1247
- "description": undefined,
1248
- "displayName": "iProperty2",
1249
- "visibility": "NORMAL",
1250
- },
1251
- "gothamMapping": undefined,
1252
- "indexedForSearch": true,
1253
- "type": {
1254
- "string": {
1255
- "analyzerOverride": undefined,
1256
- "enableAsciiFolding": undefined,
1257
- "isLongText": false,
1258
- "supportsEfficientLeadingWildcard": false,
1259
- "supportsExactMatching": true,
1260
- },
1261
- "type": "string",
1262
- },
1263
- "typeClasses": [
1264
- {
1265
- "kind": "render_hint",
1266
- "name": "SELECTABLE",
1267
- },
1268
- {
1269
- "kind": "render_hint",
1270
- "name": "SORTABLE",
1271
- },
1272
- ],
1273
- "valueType": undefined,
1274
- },
1275
- },
1276
- },
1277
- },
1278
- "randomnessKey": undefined,
1279
- "valueTypes": {
1280
- "valueTypes": [],
1281
- },
1282
- }
1283
- `);
1284
- });
1285
- });
1286
- describe("Dependencies", () => {
1287
- it("Correctly adds dependencies", async () => {
1288
- const generatedDir = path.resolve(path.join(__dirname, "..", "generatedNoCheck", "correctly_adds_dependencies"));
1289
- await defineOntology("com.palantir.", () => {
1290
- addDependency("com.palantir", fileURLToPath(import.meta.url));
1291
- defineInterface({
1292
- apiName: "myInterface",
1293
- properties: {
1294
- property1: {
1295
- type: "string"
1296
- }
1297
- }
1298
- });
1299
- }, generatedDir, path.join(generatedDir, "dependencies.json"));
1300
- const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "..", "package.json"), "utf8"));
1301
- expect(packageJson.version).toBeDefined();
1302
- expect(fs.readFileSync(path.join(generatedDir, "dependencies.json"), "utf8")).toMatchInlineSnapshot(`
1303
- "{
1304
- "com.palantir": "${packageJson.version}"
1305
- }"
1306
- `);
1307
- expect(fs.readFileSync(path.join(generatedDir, "index.ts"), "utf8")).toContain(`addDependency("com.palantir", new URL(import.meta.url).pathname);`);
1308
- fs.rmSync(path.join(generatedDir, ".."), {
1309
- recursive: true,
1310
- force: true
1311
- });
1312
- });
1313
- });
1314
- });
1315
- //# sourceMappingURL=misc.test.js.map