@skmtc/core 0.0.465 → 0.0.467
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/esm/context/GenerateContext.d.ts +3 -3
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +62 -29
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +11 -0
- package/esm/dsl/ContentSettings.d.ts +3 -1
- package/esm/dsl/ContentSettings.d.ts.map +1 -1
- package/esm/dsl/ContentSettings.js +10 -2
- package/esm/dsl/File.d.ts +1 -1
- package/esm/dsl/File.d.ts.map +1 -1
- package/esm/dsl/File.js +6 -9
- package/esm/dsl/model/ModelInsertable.d.ts +5 -2
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.d.ts +4 -4
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/OperationInsertable.d.ts +7 -4
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +5 -4
- package/esm/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationInsertable.d.ts +4 -4
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/esm/types/Settings.d.ts +482 -52
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +11 -5
- package/package.json +2 -1
- package/script/context/GenerateContext.d.ts +3 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +61 -28
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +11 -0
- package/script/dsl/ContentSettings.d.ts +3 -1
- package/script/dsl/ContentSettings.d.ts.map +1 -1
- package/script/dsl/ContentSettings.js +10 -2
- package/script/dsl/File.d.ts +1 -1
- package/script/dsl/File.d.ts.map +1 -1
- package/script/dsl/File.js +6 -9
- package/script/dsl/model/ModelInsertable.d.ts +5 -2
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.d.ts +4 -4
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/script/dsl/operation/OperationInsertable.d.ts +7 -4
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +5 -4
- package/script/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/script/dsl/operation/toOperationInsertable.d.ts +4 -4
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/script/types/Settings.d.ts +482 -52
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +12 -6
package/esm/types/Settings.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import "../_dnt.polyfills.js";
|
|
2
2
|
import { method } from './Method.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
export const baseSettings = z.object({
|
|
5
|
+
selected: z.boolean(),
|
|
6
|
+
name: z.string().optional(),
|
|
7
|
+
importFrom: z.string().optional(),
|
|
8
|
+
exportPath: z.string().optional(),
|
|
9
|
+
parentExportPath: z.string().optional()
|
|
10
|
+
});
|
|
4
11
|
export const operationsGeneratorSettings = z.object({
|
|
5
12
|
id: z.string(),
|
|
6
13
|
description: z.string().optional(),
|
|
7
|
-
operations: z.record(z.record(method,
|
|
8
|
-
|
|
14
|
+
operations: z.record(z.record(method, baseSettings)),
|
|
15
|
+
baseSettings: baseSettings
|
|
9
16
|
});
|
|
10
17
|
export const modelsGeneratorSettings = z.object({
|
|
11
18
|
id: z.string(),
|
|
12
19
|
exportPath: z.string().optional(),
|
|
13
20
|
description: z.string().optional(),
|
|
14
|
-
models: z.record(
|
|
15
|
-
|
|
21
|
+
models: z.record(baseSettings),
|
|
22
|
+
baseSettings: baseSettings
|
|
16
23
|
});
|
|
17
24
|
export const clientGeneratorSettings = z.union([
|
|
18
25
|
operationsGeneratorSettings,
|
|
@@ -24,7 +31,6 @@ export const modulePackage = z.object({
|
|
|
24
31
|
});
|
|
25
32
|
export const clientSettings = z.object({
|
|
26
33
|
basePath: z.string().optional(),
|
|
27
|
-
alias: z.record(z.string(), z.string()).optional(),
|
|
28
34
|
packages: z.array(modulePackage).optional(),
|
|
29
35
|
generators: z.array(clientGeneratorSettings)
|
|
30
36
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skmtc/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.467",
|
|
4
4
|
"main": "./script/mod.js",
|
|
5
5
|
"module": "./esm/mod.js",
|
|
6
6
|
"exports": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"test": "exit 0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
+
"@apiture/openapi-down-convert": "0.14.0",
|
|
56
57
|
"@babel/helper-validator-identifier": "7.22.20",
|
|
57
58
|
"@sentry/deno": "8.26.0",
|
|
58
59
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
@@ -3,7 +3,7 @@ import { Definition } from '../dsl/Definition.js';
|
|
|
3
3
|
import type { OasDocument } from '../oas/document/Document.js';
|
|
4
4
|
import type { OasSchema } from '../oas/schema/Schema.js';
|
|
5
5
|
import type { OasRef } from '../oas/ref/Ref.js';
|
|
6
|
-
import type { ClientGeneratorSettings, ClientSettings } from '../types/Settings.js';
|
|
6
|
+
import type { BaseSettings, ClientGeneratorSettings, ClientSettings } from '../types/Settings.js';
|
|
7
7
|
import type { Method } from '../types/Method.js';
|
|
8
8
|
import type { OperationInsertable, OperationGateway } from '../dsl/operation/OperationInsertable.js';
|
|
9
9
|
import type { OasOperation } from '../oas/operation/Operation.js';
|
|
@@ -208,8 +208,8 @@ export declare class GenerateContext {
|
|
|
208
208
|
* @param { generatorId, path, method }
|
|
209
209
|
* @returns Base settings for operation
|
|
210
210
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
toOperationBaseSettings({ generatorId, path, method }: GetOperationSettingsArgs): BaseSettings;
|
|
212
|
+
toModelBaseSettings({ generatorId, refName }: GetModelSettingsArgs): BaseSettings;
|
|
213
213
|
toGeneratorSettings(generatorId: string): ClientGeneratorSettings | undefined;
|
|
214
214
|
/**
|
|
215
215
|
* Perform one lookup of schema by `refName`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM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;IAY7C;;;;;;;;;;;;;OAaG;IAEH,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,EAAE,EAC9D,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,EAChB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAYzC;;;;;;;;;OASG;IACH,0BAA0B,CAAC,CAAC,EAAE,EAC5B,SAAS,EACT,UAAU,EACX,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,eAAe;IAoB/C;;;;;;;;OAQG;IACH,sBAAsB,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,eAAe;IAmC9F;;;;;;;OAOG;IACH,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe;IAcnE;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,wBAAwB,GAAG,YAAY;IAgB9F,mBAAmB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,YAAY;IAgBjF,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IA+B7E;;;;;OAKG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAUpE;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAGvE"}
|
|
@@ -36,7 +36,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
36
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
|
-
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_stackTrail, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_getFile,
|
|
39
|
+
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_stackTrail, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_getFile, _GenerateContext_setExportPath, _GenerateContext_toGatewayBaseSettings, _GenerateContext_cleanBaseSettings, _GenerateContext_addFile;
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.GenerateContext = void 0;
|
|
42
42
|
const mod_js_1 = require("../deps/jsr.io/@std/path/1.0.6/mod.js");
|
|
@@ -311,17 +311,19 @@ class GenerateContext {
|
|
|
311
311
|
* @returns
|
|
312
312
|
*/
|
|
313
313
|
toOperationContentSettings({ operation, insertable }) {
|
|
314
|
-
const
|
|
314
|
+
const baseSettings = this.toOperationBaseSettings({
|
|
315
315
|
generatorId: insertable.id,
|
|
316
316
|
path: operation.path,
|
|
317
317
|
method: operation.method
|
|
318
318
|
});
|
|
319
|
-
const
|
|
319
|
+
const generatedExportPath = insertable.toExportPath({ operation, baseSettings });
|
|
320
|
+
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
320
321
|
return new ContentSettings_js_1.ContentSettings({
|
|
321
|
-
identifier: insertable.toIdentifier({ operation }),
|
|
322
|
-
selected:
|
|
322
|
+
identifier: insertable.toIdentifier({ operation, baseSettings }),
|
|
323
|
+
selected: baseSettings.selected,
|
|
323
324
|
exportPath,
|
|
324
|
-
importFrom: exportPath
|
|
325
|
+
importFrom: baseSettings.importFrom ?? exportPath,
|
|
326
|
+
parentExportPath: baseSettings.parentExportPath
|
|
325
327
|
});
|
|
326
328
|
}
|
|
327
329
|
/**
|
|
@@ -334,16 +336,18 @@ class GenerateContext {
|
|
|
334
336
|
* @returns Content settings for model
|
|
335
337
|
*/
|
|
336
338
|
toModelContentSettings({ refName, insertable }) {
|
|
337
|
-
const
|
|
339
|
+
const baseSettings = this.toModelBaseSettings({
|
|
338
340
|
generatorId: insertable.id,
|
|
339
341
|
refName
|
|
340
342
|
});
|
|
341
|
-
const
|
|
343
|
+
const generatedExportPath = insertable.toExportPath({ refName, baseSettings });
|
|
344
|
+
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
342
345
|
return new ContentSettings_js_1.ContentSettings({
|
|
343
|
-
identifier: insertable.toIdentifier({ refName }),
|
|
344
|
-
selected:
|
|
346
|
+
identifier: insertable.toIdentifier({ refName, baseSettings }),
|
|
347
|
+
selected: baseSettings.selected,
|
|
345
348
|
exportPath,
|
|
346
|
-
importFrom: exportPath
|
|
349
|
+
importFrom: baseSettings.importFrom ?? exportPath,
|
|
350
|
+
parentExportPath: baseSettings.parentExportPath
|
|
347
351
|
});
|
|
348
352
|
}
|
|
349
353
|
/**
|
|
@@ -355,13 +359,14 @@ class GenerateContext {
|
|
|
355
359
|
* @returns Content settings for model
|
|
356
360
|
*/
|
|
357
361
|
toGatewayContentSetting(gateway) {
|
|
358
|
-
const
|
|
359
|
-
const exportPath = gateway.toExportPath();
|
|
362
|
+
const baseSettings = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toGatewayBaseSettings).call(this, gateway.id);
|
|
363
|
+
const exportPath = gateway.toExportPath(baseSettings);
|
|
360
364
|
return new ContentSettings_js_1.ContentSettings({
|
|
361
|
-
identifier: gateway.toIdentifier(),
|
|
362
|
-
selected:
|
|
365
|
+
identifier: gateway.toIdentifier(baseSettings),
|
|
366
|
+
selected: baseSettings.selected,
|
|
363
367
|
exportPath,
|
|
364
|
-
importFrom: exportPath
|
|
368
|
+
importFrom: baseSettings.importFrom ?? exportPath,
|
|
369
|
+
parentExportPath: baseSettings.parentExportPath
|
|
365
370
|
});
|
|
366
371
|
}
|
|
367
372
|
/**
|
|
@@ -369,17 +374,27 @@ class GenerateContext {
|
|
|
369
374
|
* @param { generatorId, path, method }
|
|
370
375
|
* @returns Base settings for operation
|
|
371
376
|
*/
|
|
372
|
-
|
|
377
|
+
toOperationBaseSettings({ generatorId, path, method }) {
|
|
373
378
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
374
|
-
|
|
379
|
+
const operationSettings = generatorSettings && 'operations' in generatorSettings
|
|
375
380
|
? generatorSettings.operations[path]?.[method]
|
|
376
381
|
: undefined;
|
|
382
|
+
const { exportPath } = generatorSettings?.baseSettings ?? {};
|
|
383
|
+
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
384
|
+
...operationSettings,
|
|
385
|
+
parentExportPath: exportPath
|
|
386
|
+
});
|
|
377
387
|
}
|
|
378
|
-
|
|
388
|
+
toModelBaseSettings({ generatorId, refName }) {
|
|
379
389
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
380
|
-
|
|
390
|
+
const modelSettings = generatorSettings && 'models' in generatorSettings
|
|
381
391
|
? generatorSettings.models[refName]
|
|
382
392
|
: undefined;
|
|
393
|
+
const { exportPath } = generatorSettings?.baseSettings ?? {};
|
|
394
|
+
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
395
|
+
...modelSettings,
|
|
396
|
+
parentExportPath: exportPath
|
|
397
|
+
});
|
|
383
398
|
}
|
|
384
399
|
toGeneratorSettings(generatorId) {
|
|
385
400
|
return this.settings?.generators?.find(({ id }) => id === generatorId);
|
|
@@ -429,12 +444,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
429
444
|
if (!generator.isSupported(operation)) {
|
|
430
445
|
return this.captureCurrentResult('notSupported');
|
|
431
446
|
}
|
|
432
|
-
const
|
|
447
|
+
const baseSettings = this.toOperationBaseSettings({
|
|
433
448
|
generatorId: generator.id,
|
|
434
449
|
path,
|
|
435
450
|
method
|
|
436
451
|
});
|
|
437
|
-
if (!
|
|
452
|
+
if (!baseSettings.selected) {
|
|
438
453
|
return this.captureCurrentResult('notSelected');
|
|
439
454
|
}
|
|
440
455
|
gatewayInstance.transformOperation(operation);
|
|
@@ -461,12 +476,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
461
476
|
if (!generator.isSupported(operation)) {
|
|
462
477
|
return this.captureCurrentResult('notSupported');
|
|
463
478
|
}
|
|
464
|
-
const
|
|
479
|
+
const baseSettings = this.toOperationBaseSettings({
|
|
465
480
|
generatorId: generator.id,
|
|
466
481
|
path,
|
|
467
482
|
method
|
|
468
483
|
});
|
|
469
|
-
if (!
|
|
484
|
+
if (!baseSettings.selected) {
|
|
470
485
|
return this.captureCurrentResult('notSelected');
|
|
471
486
|
}
|
|
472
487
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -482,11 +497,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
482
497
|
if (!generator.isSupported()) {
|
|
483
498
|
return this.captureCurrentResult('notSupported');
|
|
484
499
|
}
|
|
485
|
-
const
|
|
500
|
+
const baseSettings = this.toModelBaseSettings({
|
|
486
501
|
generatorId: generator.id,
|
|
487
502
|
refName
|
|
488
503
|
});
|
|
489
|
-
if (!selected) {
|
|
504
|
+
if (!baseSettings.selected) {
|
|
490
505
|
return this.captureCurrentResult('notSelected');
|
|
491
506
|
}
|
|
492
507
|
this.insertModel({ insertable: generator, refName });
|
|
@@ -505,9 +520,27 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
505
520
|
}
|
|
506
521
|
}
|
|
507
522
|
return currentFile;
|
|
508
|
-
},
|
|
523
|
+
}, _GenerateContext_setExportPath = function _GenerateContext_setExportPath({ generatedExportPath, baseSettings }) {
|
|
524
|
+
const { parentExportPath, exportPath } = baseSettings;
|
|
525
|
+
if (exportPath) {
|
|
526
|
+
return (0, mod_js_1.join)(parentExportPath ?? '', exportPath);
|
|
527
|
+
}
|
|
528
|
+
if (generatedExportPath.startsWith('@/')) {
|
|
529
|
+
return generatedExportPath;
|
|
530
|
+
}
|
|
531
|
+
const combinedExportPath = (0, mod_js_1.join)(parentExportPath ?? '', generatedExportPath);
|
|
532
|
+
return combinedExportPath;
|
|
533
|
+
}, _GenerateContext_toGatewayBaseSettings = function _GenerateContext_toGatewayBaseSettings(generatorId) {
|
|
509
534
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
510
|
-
return generatorSettings?.
|
|
535
|
+
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, generatorSettings?.baseSettings);
|
|
536
|
+
}, _GenerateContext_cleanBaseSettings = function _GenerateContext_cleanBaseSettings(baseSettings) {
|
|
537
|
+
return {
|
|
538
|
+
exportPath: baseSettings?.exportPath,
|
|
539
|
+
selected: Boolean(baseSettings?.selected),
|
|
540
|
+
name: baseSettings?.name,
|
|
541
|
+
importFrom: baseSettings?.importFrom,
|
|
542
|
+
parentExportPath: baseSettings?.parentExportPath
|
|
543
|
+
};
|
|
511
544
|
}, _GenerateContext_addFile = function _GenerateContext_addFile(normalisedPath) {
|
|
512
545
|
if (__classPrivateFieldGet(this, _GenerateContext_files, "f").has(normalisedPath)) {
|
|
513
546
|
throw new Error(`File already exists: ${normalisedPath}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/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UlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
|
|
@@ -36,6 +36,7 @@ const toDocumentFieldsV3_js_1 = require("../oas/document/toDocumentFieldsV3.js")
|
|
|
36
36
|
const Document_js_1 = require("../oas/document/Document.js");
|
|
37
37
|
const tracer_js_1 = require("../helpers/tracer.js");
|
|
38
38
|
const lodash_es_1 = require("lodash-es");
|
|
39
|
+
const openapi_down_convert_1 = require("@apiture/openapi-down-convert");
|
|
39
40
|
class ParseContext {
|
|
40
41
|
constructor({ schema, logger, stackTrail }) {
|
|
41
42
|
_ParseContext_instances.add(this);
|
|
@@ -77,6 +78,16 @@ class ParseContext {
|
|
|
77
78
|
}
|
|
78
79
|
parse() {
|
|
79
80
|
const documentObject = __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseSchema).call(this);
|
|
81
|
+
if (documentObject.openapi.startsWith('3.1')) {
|
|
82
|
+
const options = {
|
|
83
|
+
verbose: false,
|
|
84
|
+
deleteExampleWithId: false,
|
|
85
|
+
allOfTransform: true
|
|
86
|
+
};
|
|
87
|
+
const converter = new openapi_down_convert_1.Converter(documentObject, options);
|
|
88
|
+
const oas30Document = converter.convert();
|
|
89
|
+
return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this, oas30Document);
|
|
90
|
+
}
|
|
80
91
|
return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this, documentObject);
|
|
81
92
|
}
|
|
82
93
|
trace(token, fn) {
|
|
@@ -8,13 +8,15 @@ type CreateArgs = {
|
|
|
8
8
|
selected: boolean;
|
|
9
9
|
exportPath: string;
|
|
10
10
|
importFrom: string;
|
|
11
|
+
parentExportPath: string | undefined;
|
|
11
12
|
};
|
|
12
13
|
export declare class ContentSettings {
|
|
13
14
|
identifier: Identifier;
|
|
14
15
|
selected: boolean;
|
|
15
16
|
exportPath: string;
|
|
16
17
|
importFrom: string;
|
|
17
|
-
|
|
18
|
+
parentExportPath: string | undefined;
|
|
19
|
+
constructor({ identifier, selected, exportPath, importFrom, parentExportPath }: CreateArgs);
|
|
18
20
|
static empty({ identifier, exportPath }: EmptyArgs): ContentSettings;
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSettings.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"ContentSettings.d.ts","sourceRoot":"","sources":["../../src/dsl/ContentSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC,CAAA;AAED,qBAAa,eAAe;IAC1B,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;gBAExB,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,UAAU;IAQ1F,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,GAAG,eAAe;CASrE"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ContentSettings = void 0;
|
|
4
4
|
class ContentSettings {
|
|
5
|
-
constructor({ identifier, selected, exportPath, importFrom }) {
|
|
5
|
+
constructor({ identifier, selected, exportPath, importFrom, parentExportPath }) {
|
|
6
6
|
Object.defineProperty(this, "identifier", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
configurable: true,
|
|
@@ -27,17 +27,25 @@ class ContentSettings {
|
|
|
27
27
|
writable: true,
|
|
28
28
|
value: void 0
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(this, "parentExportPath", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: void 0
|
|
35
|
+
});
|
|
30
36
|
this.identifier = identifier;
|
|
31
37
|
this.selected = selected;
|
|
32
38
|
this.exportPath = exportPath;
|
|
33
39
|
this.importFrom = importFrom;
|
|
40
|
+
this.parentExportPath = parentExportPath;
|
|
34
41
|
}
|
|
35
42
|
static empty({ identifier, exportPath }) {
|
|
36
43
|
return new ContentSettings({
|
|
37
44
|
selected: true,
|
|
38
45
|
identifier,
|
|
39
46
|
exportPath,
|
|
40
|
-
importFrom: exportPath
|
|
47
|
+
importFrom: exportPath,
|
|
48
|
+
parentExportPath: undefined
|
|
41
49
|
});
|
|
42
50
|
}
|
|
43
51
|
}
|
package/script/dsl/File.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class File {
|
|
|
11
11
|
reExports: Map<string, Record<string, Set<string>>>;
|
|
12
12
|
imports: Map<string, Set<string>>;
|
|
13
13
|
definitions: Map<string, Definition>;
|
|
14
|
-
|
|
14
|
+
packages: ModulePackage[] | undefined;
|
|
15
15
|
constructor({ path, settings }: FileArgs);
|
|
16
16
|
get generatorKeys(): Set<GeneratorKey>;
|
|
17
17
|
toString(): string;
|
package/script/dsl/File.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/dsl/File.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzE,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CACrC,CAAA;AAED,qBAAa,IAAI;;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACnD,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAEpC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../src/dsl/File.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzE,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;CACrC,CAAA;AAED,qBAAa,IAAI;;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACnD,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAEpC,QAAQ,EAAE,aAAa,EAAE,GAAG,SAAS,CAAA;gBAEzB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,QAAQ;IASxC,IAAI,aAAa,sBAEhB;IAED,QAAQ;CAkCT;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,aAAa,EAAE,GAAG,SAAS,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,mBAAmB,8CAI7B,uBAAuB,WAYzB,CAAA"}
|
package/script/dsl/File.js
CHANGED
|
@@ -41,7 +41,7 @@ class File {
|
|
|
41
41
|
value: void 0
|
|
42
42
|
});
|
|
43
43
|
_File_generatorKeys.set(this, void 0);
|
|
44
|
-
Object.defineProperty(this, "
|
|
44
|
+
Object.defineProperty(this, "packages", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
configurable: true,
|
|
47
47
|
writable: true,
|
|
@@ -52,7 +52,7 @@ class File {
|
|
|
52
52
|
this.imports = new Map();
|
|
53
53
|
this.definitions = new Map();
|
|
54
54
|
__classPrivateFieldSet(this, _File_generatorKeys, new Set(), "f");
|
|
55
|
-
this.
|
|
55
|
+
this.packages = settings?.packages;
|
|
56
56
|
}
|
|
57
57
|
get generatorKeys() {
|
|
58
58
|
return __classPrivateFieldGet(this, _File_generatorKeys, "f");
|
|
@@ -62,7 +62,7 @@ class File {
|
|
|
62
62
|
const updatedModuleName = (0, exports.normaliseModuleName)({
|
|
63
63
|
destinationPath: this.path,
|
|
64
64
|
exportPath: module,
|
|
65
|
-
packages: this.
|
|
65
|
+
packages: this.packages
|
|
66
66
|
});
|
|
67
67
|
return Object.entries(entityTypes).map(([entityType, names]) => {
|
|
68
68
|
const prefix = entityType === 'type' ? 'type' : '';
|
|
@@ -70,17 +70,14 @@ class File {
|
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
const imports = Array.from(this.imports.entries()).map(([module, importItems]) => {
|
|
73
|
-
const updatedModuleName = this.
|
|
73
|
+
const updatedModuleName = this.packages
|
|
74
74
|
? (0, exports.normaliseModuleName)({
|
|
75
75
|
destinationPath: this.path,
|
|
76
76
|
exportPath: module,
|
|
77
|
-
packages: this.
|
|
77
|
+
packages: this.packages
|
|
78
78
|
})
|
|
79
79
|
: module;
|
|
80
|
-
|
|
81
|
-
return acc.startsWith(pattern) ? acc.replace(pattern, replacement) : acc;
|
|
82
|
-
}, updatedModuleName);
|
|
83
|
-
return new Import_js_1.Import({ module: aliasedModuleName, importNames: Array.from(importItems) });
|
|
80
|
+
return new Import_js_1.Import({ module: updatedModuleName, importNames: Array.from(importItems) });
|
|
84
81
|
});
|
|
85
82
|
const definitions = Array.from(this.definitions.values());
|
|
86
83
|
return [reExports, imports, definitions]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
2
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
3
4
|
import type { RefName } from '../../types/RefName.js';
|
|
4
5
|
import type { Identifier } from '../Identifier.js';
|
|
5
6
|
type ModelInsertableConstructorArgs = {
|
|
@@ -10,9 +11,11 @@ type ModelInsertableConstructorArgs = {
|
|
|
10
11
|
};
|
|
11
12
|
export type ToModelIdentifierArgs = {
|
|
12
13
|
refName: RefName;
|
|
14
|
+
baseSettings: BaseSettings;
|
|
13
15
|
};
|
|
14
16
|
export type ToModelExportPathArgs = {
|
|
15
17
|
refName: RefName;
|
|
18
|
+
baseSettings: BaseSettings;
|
|
16
19
|
};
|
|
17
20
|
export type WithTransformModel = {
|
|
18
21
|
transformModel: (refName: RefName) => void;
|
|
@@ -24,8 +27,8 @@ export type ModelInsertable<V> = {
|
|
|
24
27
|
id: string;
|
|
25
28
|
type: 'model';
|
|
26
29
|
_class: 'ModelInsertable';
|
|
27
|
-
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
28
|
-
toExportPath: ({ refName }: ToModelExportPathArgs) => string;
|
|
30
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
31
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
29
32
|
isSupported: () => boolean;
|
|
30
33
|
pinnable: boolean;
|
|
31
34
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,8BAA8B,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAA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,CAAA"}
|
|
@@ -10,8 +10,8 @@ export type ModelInsertableArgs = {
|
|
|
10
10
|
};
|
|
11
11
|
export type ModelConfig = {
|
|
12
12
|
id: string;
|
|
13
|
-
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
14
|
-
toExportPath: ({ refName }: ToModelExportPathArgs) => string;
|
|
13
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
15
15
|
};
|
|
16
16
|
export declare const toModelInsertable: (config: ModelConfig) => {
|
|
17
17
|
new (args: ModelInsertableArgs): {
|
|
@@ -26,8 +26,8 @@ export declare const toModelInsertable: (config: ModelConfig) => {
|
|
|
26
26
|
id: string;
|
|
27
27
|
type: "model";
|
|
28
28
|
_class: "ModelInsertable";
|
|
29
|
-
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
30
|
-
toExportPath: ({ refName }: ToModelExportPathArgs) => string;
|
|
29
|
+
toIdentifier: ({ refName, baseSettings }: ToModelIdentifierArgs) => Identifier;
|
|
30
|
+
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
31
31
|
isSupported: () => boolean;
|
|
32
32
|
pinnable: boolean;
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/toModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAExF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CA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
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
2
2
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
3
4
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
4
5
|
import type { Identifier } from '../Identifier.js';
|
|
5
6
|
type OperationInsertableConstructorArgs = {
|
|
@@ -9,9 +10,11 @@ type OperationInsertableConstructorArgs = {
|
|
|
9
10
|
};
|
|
10
11
|
export type ToOperationIdentifierArgs = {
|
|
11
12
|
operation: OasOperation;
|
|
13
|
+
baseSettings: BaseSettings;
|
|
12
14
|
};
|
|
13
15
|
export type ToOperationExportPathArgs = {
|
|
14
16
|
operation: OasOperation;
|
|
17
|
+
baseSettings: BaseSettings;
|
|
15
18
|
};
|
|
16
19
|
export type WithTransformOperation = {
|
|
17
20
|
transformOperation: (operation: OasOperation) => void;
|
|
@@ -25,8 +28,8 @@ export type OperationGateway = {
|
|
|
25
28
|
id: string;
|
|
26
29
|
type: 'operation';
|
|
27
30
|
_class: 'OperationGateway';
|
|
28
|
-
toIdentifier: () => Identifier;
|
|
29
|
-
toExportPath: () => string;
|
|
31
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
32
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
30
33
|
isSupported: (operation: OasOperation) => boolean;
|
|
31
34
|
pinnable: boolean;
|
|
32
35
|
};
|
|
@@ -37,8 +40,8 @@ export type OperationInsertable<V> = {
|
|
|
37
40
|
id: string;
|
|
38
41
|
type: 'operation';
|
|
39
42
|
_class: 'OperationInsertable';
|
|
40
|
-
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
41
|
-
toExportPath: ({ operation }: ToOperationExportPathArgs) => string;
|
|
43
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
44
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
42
45
|
isSupported: (operation: OasOperation) => boolean;
|
|
43
46
|
pinnable: boolean;
|
|
44
47
|
} & Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,YAAY,CAAA;IACvB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,yB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EjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
2
2
|
import { type OperationGatewayArgs } from '../GatewayBase.js';
|
|
3
3
|
import type { Identifier } from '../Identifier.js';
|
|
4
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
4
5
|
export type ToOperationGatewayArgs = {
|
|
5
6
|
id: string;
|
|
6
|
-
toIdentifier: () => Identifier;
|
|
7
|
-
toExportPath: () => string;
|
|
7
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
8
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
8
9
|
isSupported?: (operation: OasOperation) => boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
@@ -18,8 +19,8 @@ export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
|
18
19
|
id: string;
|
|
19
20
|
type: "operation";
|
|
20
21
|
_class: "OperationGateway";
|
|
21
|
-
toIdentifier: () => Identifier;
|
|
22
|
-
toExportPath: () => string;
|
|
22
|
+
toIdentifier: (baseSettings: BaseSettings) => Identifier;
|
|
23
|
+
toExportPath: (baseSettings: BaseSettings) => string;
|
|
23
24
|
isSupported: (operation: OasOperation) => boolean;
|
|
24
25
|
pinnable: boolean;
|
|
25
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"toOperationGateway.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,UAAU,CAAA;IACxD,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,CAAA;IACpD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CACnD,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;gCAa1B,oBAAoB;;;;;;;;;;iCAlB5B,YAAY,KAAK,UAAU;iCAC3B,YAAY,KAAK,MAAM;6BAC1B,YAAY,KAAK,OAAO;;CAsBnD,CAAA"}
|
|
@@ -10,8 +10,8 @@ export type OperationInsertableArgs = {
|
|
|
10
10
|
};
|
|
11
11
|
export type ToOperationInsertableArgs = {
|
|
12
12
|
id: string;
|
|
13
|
-
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
14
|
-
toExportPath: ({ operation }: ToOperationExportPathArgs) => string;
|
|
13
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
15
15
|
isSupported?: (operation: OasOperation) => boolean;
|
|
16
16
|
pinnable?: boolean;
|
|
17
17
|
};
|
|
@@ -34,8 +34,8 @@ export declare const toOperationInsertable: (config: ToOperationInsertableArgs)
|
|
|
34
34
|
id: string;
|
|
35
35
|
type: "operation";
|
|
36
36
|
_class: "OperationInsertable";
|
|
37
|
-
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
38
|
-
toExportPath: ({ operation }: ToOperationExportPathArgs) => string;
|
|
37
|
+
toIdentifier: ({ operation, baseSettings }: ToOperationIdentifierArgs) => Identifier;
|
|
38
|
+
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
39
39
|
isSupported: (operation: OasOperation) => boolean;
|
|
40
40
|
pinnable: boolean;
|
|
41
41
|
};
|