@skmtc/core 0.0.471 → 0.0.476
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 +20 -61
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +1 -1
- package/esm/dsl/ContentSettings.d.ts +1 -5
- package/esm/dsl/ContentSettings.d.ts.map +1 -1
- package/esm/dsl/ContentSettings.js +2 -18
- package/esm/dsl/model/ModelDriver.js +2 -2
- package/esm/dsl/model/ModelInsertable.d.ts +2 -0
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/esm/dsl/model/toModelInsertable.d.ts +2 -0
- package/esm/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/OperationDriver.js +2 -2
- package/esm/dsl/operation/OperationInsertable.d.ts +3 -0
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +2 -0
- package/esm/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationInsertable.d.ts +2 -0
- package/esm/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/esm/helpers/ResultsLog.d.ts.map +1 -1
- package/esm/helpers/naming.d.ts.map +1 -1
- package/esm/mod.d.ts +3 -1
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +3 -1
- package/esm/oas/array/Array.d.ts +3 -1
- package/esm/oas/array/Array.d.ts.map +1 -1
- package/esm/oas/array/Array.js +10 -0
- package/esm/oas/boolean/Boolean.d.ts +3 -0
- package/esm/oas/boolean/Boolean.d.ts.map +1 -1
- package/esm/oas/boolean/Boolean.js +10 -0
- package/esm/oas/contact/Contact.d.ts.map +1 -1
- package/esm/oas/integer/Integer.d.ts +3 -0
- package/esm/oas/integer/Integer.d.ts.map +1 -1
- package/esm/oas/integer/Integer.js +12 -0
- package/esm/oas/intersection/Intersection.d.ts +3 -1
- package/esm/oas/intersection/Intersection.d.ts.map +1 -1
- package/esm/oas/intersection/Intersection.js +9 -0
- package/esm/oas/number/Number.d.ts +3 -0
- package/esm/oas/number/Number.d.ts.map +1 -1
- package/esm/oas/number/Number.js +10 -0
- package/esm/oas/object/Object.d.ts +3 -1
- package/esm/oas/object/Object.d.ts.map +1 -1
- package/esm/oas/object/Object.js +21 -0
- package/esm/oas/ref/Ref.d.ts +3 -1
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +11 -0
- package/esm/oas/schema/Schema.d.ts +3 -0
- package/esm/oas/schema/Schema.d.ts.map +1 -1
- package/esm/oas/string/String.d.ts +3 -0
- package/esm/oas/string/String.d.ts.map +1 -1
- package/esm/oas/string/String.js +14 -0
- package/esm/oas/union/Union.d.ts +3 -0
- package/esm/oas/union/Union.d.ts.map +1 -1
- package/esm/oas/union/Union.js +9 -0
- package/esm/oas/unknown/Unknown.d.ts +3 -0
- package/esm/oas/unknown/Unknown.d.ts.map +1 -1
- package/esm/oas/unknown/Unknown.js +7 -0
- package/esm/run/toSettings.d.ts +15 -0
- package/esm/run/toSettings.d.ts.map +1 -0
- package/esm/run/toSettings.js +74 -0
- package/esm/run/transform.d.ts.map +1 -0
- package/esm/types/EnrichmentRequest.d.ts +57 -0
- package/esm/types/EnrichmentRequest.d.ts.map +1 -0
- package/esm/types/EnrichmentRequest.js +1 -0
- package/esm/types/Settings.d.ts +24 -483
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +2 -11
- package/esm/typescript/FunctionParameter.d.ts.map +1 -1
- package/esm/typescript/FunctionParameter.js +1 -1
- package/package.json +8 -3
- package/script/context/GenerateContext.d.ts +3 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +19 -60
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +1 -1
- package/script/dsl/ContentSettings.d.ts +1 -5
- package/script/dsl/ContentSettings.d.ts.map +1 -1
- package/script/dsl/ContentSettings.js +2 -18
- package/script/dsl/model/ModelDriver.js +2 -2
- package/script/dsl/model/ModelInsertable.d.ts +2 -0
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -1
- package/script/dsl/model/toModelInsertable.d.ts +2 -0
- package/script/dsl/model/toModelInsertable.d.ts.map +1 -1
- package/script/dsl/operation/OperationDriver.js +2 -2
- package/script/dsl/operation/OperationInsertable.d.ts +3 -0
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +2 -0
- package/script/dsl/operation/toOperationGateway.d.ts.map +1 -1
- package/script/dsl/operation/toOperationInsertable.d.ts +2 -0
- package/script/dsl/operation/toOperationInsertable.d.ts.map +1 -1
- package/script/helpers/ResultsLog.d.ts.map +1 -1
- package/script/helpers/naming.d.ts.map +1 -1
- package/script/mod.d.ts +3 -1
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +3 -1
- package/script/oas/array/Array.d.ts +3 -1
- package/script/oas/array/Array.d.ts.map +1 -1
- package/script/oas/array/Array.js +10 -0
- package/script/oas/boolean/Boolean.d.ts +3 -0
- package/script/oas/boolean/Boolean.d.ts.map +1 -1
- package/script/oas/boolean/Boolean.js +10 -0
- package/script/oas/contact/Contact.d.ts.map +1 -1
- package/script/oas/integer/Integer.d.ts +3 -0
- package/script/oas/integer/Integer.d.ts.map +1 -1
- package/script/oas/integer/Integer.js +12 -0
- package/script/oas/intersection/Intersection.d.ts +3 -1
- package/script/oas/intersection/Intersection.d.ts.map +1 -1
- package/script/oas/intersection/Intersection.js +9 -0
- package/script/oas/number/Number.d.ts +3 -0
- package/script/oas/number/Number.d.ts.map +1 -1
- package/script/oas/number/Number.js +10 -0
- package/script/oas/object/Object.d.ts +3 -1
- package/script/oas/object/Object.d.ts.map +1 -1
- package/script/oas/object/Object.js +21 -0
- package/script/oas/ref/Ref.d.ts +3 -1
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +11 -0
- package/script/oas/schema/Schema.d.ts +3 -0
- package/script/oas/schema/Schema.d.ts.map +1 -1
- package/script/oas/string/String.d.ts +3 -0
- package/script/oas/string/String.d.ts.map +1 -1
- package/script/oas/string/String.js +14 -0
- package/script/oas/union/Union.d.ts +3 -0
- package/script/oas/union/Union.d.ts.map +1 -1
- package/script/oas/union/Union.js +9 -0
- package/script/oas/unknown/Unknown.d.ts +3 -0
- package/script/oas/unknown/Unknown.d.ts.map +1 -1
- package/script/oas/unknown/Unknown.js +7 -0
- package/script/run/toSettings.d.ts +15 -0
- package/script/run/toSettings.d.ts.map +1 -0
- package/script/run/toSettings.js +78 -0
- package/script/run/transform.d.ts.map +1 -0
- package/script/types/EnrichmentRequest.d.ts +57 -0
- package/script/types/EnrichmentRequest.d.ts.map +1 -0
- package/script/types/EnrichmentRequest.js +3 -0
- package/script/types/Settings.d.ts +24 -483
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +3 -12
- package/script/typescript/FunctionParameter.d.ts.map +1 -1
- package/script/typescript/FunctionParameter.js +1 -1
- package/esm/transform/transform.d.ts.map +0 -1
- package/script/transform/transform.d.ts.map +0 -1
- /package/esm/{transform → run}/transform.d.ts +0 -0
- /package/esm/{transform → run}/transform.js +0 -0
- /package/script/{transform → run}/transform.d.ts +0 -0
- /package/script/{transform → run}/transform.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skmtc/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.476",
|
|
4
4
|
"main": "./script/mod.js",
|
|
5
5
|
"module": "./esm/mod.js",
|
|
6
6
|
"exports": {
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
"./Settings": {
|
|
48
48
|
"import": "./esm/types/Settings.js",
|
|
49
49
|
"require": "./script/types/Settings.js"
|
|
50
|
+
},
|
|
51
|
+
"./EnrichmentRequest": {
|
|
52
|
+
"import": "./esm/types/EnrichmentRequest.js",
|
|
53
|
+
"require": "./script/types/EnrichmentRequest.js"
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
"scripts": {
|
|
@@ -57,11 +61,12 @@
|
|
|
57
61
|
"@babel/helper-validator-identifier": "7.22.20",
|
|
58
62
|
"@sentry/deno": "8.26.0",
|
|
59
63
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
64
|
+
"@types/lodash-es": "4.17.12",
|
|
60
65
|
"lodash-es": "4.17.21",
|
|
61
66
|
"openapi-types": "12.1.3",
|
|
62
67
|
"tiny-invariant": "1.3.3",
|
|
63
|
-
"ts-pattern": "5.
|
|
64
|
-
"zod": "3.
|
|
68
|
+
"ts-pattern": "5.6.0",
|
|
69
|
+
"zod": "3.24.1",
|
|
65
70
|
"@deno/shim-deno": "~0.18.0"
|
|
66
71
|
},
|
|
67
72
|
"devDependencies": {
|
|
@@ -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 {
|
|
6
|
+
import type { 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
|
+
toOperationSelected({ generatorId, path, method }: GetOperationSettingsArgs): boolean | undefined;
|
|
212
|
+
toModelSelected({ generatorId, refName }: GetModelSettingsArgs): boolean | undefined;
|
|
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,
|
|
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;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AACpG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAA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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;IAc/C;;;;;;;;OAQG;IACH,sBAAsB,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,eAAe;IAa9F;;;;;;;OAOG;IACH,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe;IAQnE;;;;OAIG;IACH,mBAAmB,CAAC,EAClB,WAAW,EACX,IAAI,EACJ,MAAM,EACP,EAAE,wBAAwB,GAAG,OAAO,GAAG,SAAS;IAWjD,eAAe,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,OAAO,GAAG,SAAS;IAWpF,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAe7E;;;;;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_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,19 +311,15 @@ class GenerateContext {
|
|
|
311
311
|
* @returns
|
|
312
312
|
*/
|
|
313
313
|
toOperationContentSettings({ operation, insertable }) {
|
|
314
|
-
const
|
|
314
|
+
const selected = this.toOperationSelected({
|
|
315
315
|
generatorId: insertable.id,
|
|
316
316
|
path: operation.path,
|
|
317
317
|
method: operation.method
|
|
318
318
|
});
|
|
319
|
-
const generatedExportPath = insertable.toExportPath(operation);
|
|
320
|
-
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
321
319
|
return new ContentSettings_js_1.ContentSettings({
|
|
320
|
+
selected: Boolean(selected),
|
|
322
321
|
identifier: insertable.toIdentifier(operation),
|
|
323
|
-
|
|
324
|
-
exportPath,
|
|
325
|
-
importFrom: baseSettings.importFrom ?? exportPath,
|
|
326
|
-
parentExportPath: baseSettings.parentExportPath
|
|
322
|
+
exportPath: insertable.toExportPath(operation)
|
|
327
323
|
});
|
|
328
324
|
}
|
|
329
325
|
/**
|
|
@@ -336,18 +332,14 @@ class GenerateContext {
|
|
|
336
332
|
* @returns Content settings for model
|
|
337
333
|
*/
|
|
338
334
|
toModelContentSettings({ refName, insertable }) {
|
|
339
|
-
const
|
|
335
|
+
const selected = this.toModelSelected({
|
|
340
336
|
generatorId: insertable.id,
|
|
341
337
|
refName
|
|
342
338
|
});
|
|
343
|
-
const generatedExportPath = insertable.toExportPath(refName);
|
|
344
|
-
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
345
339
|
return new ContentSettings_js_1.ContentSettings({
|
|
346
340
|
identifier: insertable.toIdentifier(refName),
|
|
347
|
-
selected:
|
|
348
|
-
exportPath
|
|
349
|
-
importFrom: baseSettings.importFrom ?? exportPath,
|
|
350
|
-
parentExportPath: baseSettings.parentExportPath
|
|
341
|
+
selected: Boolean(selected),
|
|
342
|
+
exportPath: insertable.toExportPath(refName)
|
|
351
343
|
});
|
|
352
344
|
}
|
|
353
345
|
/**
|
|
@@ -359,14 +351,10 @@ class GenerateContext {
|
|
|
359
351
|
* @returns Content settings for model
|
|
360
352
|
*/
|
|
361
353
|
toGatewayContentSetting(gateway) {
|
|
362
|
-
const baseSettings = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toGatewayBaseSettings).call(this, gateway.id);
|
|
363
|
-
const exportPath = gateway.toExportPath();
|
|
364
354
|
return new ContentSettings_js_1.ContentSettings({
|
|
365
355
|
identifier: gateway.toIdentifier(),
|
|
366
|
-
selected:
|
|
367
|
-
exportPath
|
|
368
|
-
importFrom: baseSettings.importFrom ?? exportPath,
|
|
369
|
-
parentExportPath: baseSettings.parentExportPath
|
|
356
|
+
selected: true,
|
|
357
|
+
exportPath: gateway.toExportPath()
|
|
370
358
|
});
|
|
371
359
|
}
|
|
372
360
|
/**
|
|
@@ -374,27 +362,19 @@ class GenerateContext {
|
|
|
374
362
|
* @param { generatorId, path, method }
|
|
375
363
|
* @returns Base settings for operation
|
|
376
364
|
*/
|
|
377
|
-
|
|
365
|
+
toOperationSelected({ generatorId, path, method }) {
|
|
378
366
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
379
367
|
const operationSettings = generatorSettings && 'operations' in generatorSettings
|
|
380
368
|
? generatorSettings.operations[path]?.[method]
|
|
381
369
|
: undefined;
|
|
382
|
-
|
|
383
|
-
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
384
|
-
...operationSettings,
|
|
385
|
-
parentExportPath: exportPath
|
|
386
|
-
});
|
|
370
|
+
return operationSettings;
|
|
387
371
|
}
|
|
388
|
-
|
|
372
|
+
toModelSelected({ generatorId, refName }) {
|
|
389
373
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
390
374
|
const modelSettings = generatorSettings && 'models' in generatorSettings
|
|
391
375
|
? generatorSettings.models[refName]
|
|
392
376
|
: undefined;
|
|
393
|
-
|
|
394
|
-
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
395
|
-
...modelSettings,
|
|
396
|
-
parentExportPath: exportPath
|
|
397
|
-
});
|
|
377
|
+
return modelSettings;
|
|
398
378
|
}
|
|
399
379
|
toGeneratorSettings(generatorId) {
|
|
400
380
|
return this.settings?.generators?.find(({ id }) => id === generatorId);
|
|
@@ -444,12 +424,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
444
424
|
if (!generator.isSupported(operation)) {
|
|
445
425
|
return this.captureCurrentResult('notSupported');
|
|
446
426
|
}
|
|
447
|
-
const
|
|
427
|
+
const selected = this.toOperationSelected({
|
|
448
428
|
generatorId: generator.id,
|
|
449
429
|
path,
|
|
450
430
|
method
|
|
451
431
|
});
|
|
452
|
-
if (!
|
|
432
|
+
if (!selected) {
|
|
453
433
|
return this.captureCurrentResult('notSelected');
|
|
454
434
|
}
|
|
455
435
|
gatewayInstance.transformOperation(operation);
|
|
@@ -476,12 +456,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
476
456
|
if (!generator.isSupported(operation)) {
|
|
477
457
|
return this.captureCurrentResult('notSupported');
|
|
478
458
|
}
|
|
479
|
-
const
|
|
459
|
+
const selected = this.toOperationSelected({
|
|
480
460
|
generatorId: generator.id,
|
|
481
461
|
path,
|
|
482
462
|
method
|
|
483
463
|
});
|
|
484
|
-
if (!
|
|
464
|
+
if (!selected) {
|
|
485
465
|
return this.captureCurrentResult('notSelected');
|
|
486
466
|
}
|
|
487
467
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -497,11 +477,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
497
477
|
if (!generator.isSupported()) {
|
|
498
478
|
return this.captureCurrentResult('notSupported');
|
|
499
479
|
}
|
|
500
|
-
const
|
|
480
|
+
const selected = this.toModelSelected({
|
|
501
481
|
generatorId: generator.id,
|
|
502
482
|
refName
|
|
503
483
|
});
|
|
504
|
-
if (!
|
|
484
|
+
if (!selected) {
|
|
505
485
|
return this.captureCurrentResult('notSelected');
|
|
506
486
|
}
|
|
507
487
|
this.insertModel({ insertable: generator, refName });
|
|
@@ -520,27 +500,6 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
520
500
|
}
|
|
521
501
|
}
|
|
522
502
|
return currentFile;
|
|
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) {
|
|
534
|
-
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
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
|
-
};
|
|
544
503
|
}, _GenerateContext_addFile = function _GenerateContext_addFile(normalisedPath) {
|
|
545
504
|
if (__classPrivateFieldGet(this, _GenerateContext_files, "f").has(normalisedPath)) {
|
|
546
505
|
throw new Error(`File already exists: ${normalisedPath}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAEA,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;AAIjD,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC,CAAA;AAED,qBAAa,YAAY;;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAEvB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAQ3D,KAAK;IA6BL,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAiBlD,iBAAiB,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,qBAAqB,GAAG,IAAI;IAIrF,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAUlD;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
|
|
@@ -30,12 +30,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
30
30
|
var _ParseContext_instances, _ParseContext_parseSchema, _ParseContext_parseDocument;
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
exports.parseSchema = exports.ParseContext = void 0;
|
|
33
|
+
const lodash_es_1 = require("lodash-es");
|
|
33
34
|
const Sentry = __importStar(require("@sentry/deno"));
|
|
34
35
|
const mod_js_1 = require("../deps/jsr.io/@std/yaml/0.215.0/mod.js");
|
|
35
36
|
const toDocumentFieldsV3_js_1 = require("../oas/document/toDocumentFieldsV3.js");
|
|
36
37
|
const Document_js_1 = require("../oas/document/Document.js");
|
|
37
38
|
const tracer_js_1 = require("../helpers/tracer.js");
|
|
38
|
-
const lodash_es_1 = require("lodash-es");
|
|
39
39
|
const openapi_down_convert_1 = require("@apiture/openapi-down-convert");
|
|
40
40
|
class ParseContext {
|
|
41
41
|
constructor({ schema, logger, stackTrail }) {
|
|
@@ -7,16 +7,12 @@ type CreateArgs = {
|
|
|
7
7
|
identifier: Identifier;
|
|
8
8
|
selected: boolean;
|
|
9
9
|
exportPath: string;
|
|
10
|
-
importFrom: string;
|
|
11
|
-
parentExportPath: string | undefined;
|
|
12
10
|
};
|
|
13
11
|
export declare class ContentSettings {
|
|
14
12
|
identifier: Identifier;
|
|
15
13
|
selected: boolean;
|
|
16
14
|
exportPath: string;
|
|
17
|
-
|
|
18
|
-
parentExportPath: string | undefined;
|
|
19
|
-
constructor({ identifier, selected, exportPath, importFrom, parentExportPath }: CreateArgs);
|
|
15
|
+
constructor({ identifier, selected, exportPath }: CreateArgs);
|
|
20
16
|
static empty({ identifier, exportPath }: EmptyArgs): ContentSettings;
|
|
21
17
|
}
|
|
22
18
|
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;
|
|
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;CACnB,CAAA;AAED,qBAAa,eAAe;IAC1B,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;gBAEN,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU;IAM5D,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,GAAG,eAAe;CAOrE"}
|
|
@@ -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
|
|
5
|
+
constructor({ identifier, selected, exportPath }) {
|
|
6
6
|
Object.defineProperty(this, "identifier", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
configurable: true,
|
|
@@ -21,31 +21,15 @@ class ContentSettings {
|
|
|
21
21
|
writable: true,
|
|
22
22
|
value: void 0
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(this, "importFrom", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
writable: true,
|
|
28
|
-
value: void 0
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(this, "parentExportPath", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
configurable: true,
|
|
33
|
-
writable: true,
|
|
34
|
-
value: void 0
|
|
35
|
-
});
|
|
36
24
|
this.identifier = identifier;
|
|
37
25
|
this.selected = selected;
|
|
38
26
|
this.exportPath = exportPath;
|
|
39
|
-
this.importFrom = importFrom;
|
|
40
|
-
this.parentExportPath = parentExportPath;
|
|
41
27
|
}
|
|
42
28
|
static empty({ identifier, exportPath }) {
|
|
43
29
|
return new ContentSettings({
|
|
44
30
|
selected: true,
|
|
45
31
|
identifier,
|
|
46
|
-
exportPath
|
|
47
|
-
importFrom: exportPath,
|
|
48
|
-
parentExportPath: undefined
|
|
32
|
+
exportPath
|
|
49
33
|
});
|
|
50
34
|
}
|
|
51
35
|
}
|
|
@@ -50,14 +50,14 @@ class ModelDriver {
|
|
|
50
50
|
this.definition = this.apply({ generation, destinationPath });
|
|
51
51
|
}
|
|
52
52
|
apply({ generation, destinationPath } = {}) {
|
|
53
|
-
const { identifier, exportPath, selected
|
|
53
|
+
const { identifier, exportPath, selected } = this.settings;
|
|
54
54
|
if (!selected && generation !== 'force') {
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
57
|
const definition = this.getDefinition({ identifier, exportPath });
|
|
58
58
|
if (destinationPath && (0, mod_js_1.normalize)(exportPath) !== (0, mod_js_1.normalize)(destinationPath)) {
|
|
59
59
|
this.context.register({
|
|
60
|
-
imports: { [
|
|
60
|
+
imports: { [exportPath]: [identifier.name] },
|
|
61
61
|
destinationPath
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -2,6 +2,7 @@ import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
|
2
2
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
3
|
import type { RefName } from '../../types/RefName.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
|
+
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
5
6
|
type ModelInsertableConstructorArgs = {
|
|
6
7
|
context: GenerateContext;
|
|
7
8
|
refName: RefName;
|
|
@@ -20,6 +21,7 @@ export type ModelInsertable<V> = {
|
|
|
20
21
|
_class: 'ModelInsertable';
|
|
21
22
|
toIdentifier: (refName: RefName) => Identifier;
|
|
22
23
|
toExportPath: (refName: RefName) => string;
|
|
24
|
+
toEnrichmentRequests?: (refName: RefName) => EnrichmentRequest[];
|
|
23
25
|
isSupported: () => boolean;
|
|
24
26
|
pinnable: boolean;
|
|
25
27
|
} & 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,wBAA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B,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -2,6 +2,7 @@ import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
|
2
2
|
import type { RefName } from '../../types/RefName.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
|
+
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
5
6
|
export type ModelInsertableArgs = {
|
|
6
7
|
context: GenerateContext;
|
|
7
8
|
settings: ContentSettings;
|
|
@@ -11,6 +12,7 @@ export type ModelConfig = {
|
|
|
11
12
|
id: string;
|
|
12
13
|
toIdentifier: (refName: RefName) => Identifier;
|
|
13
14
|
toExportPath: (refName: RefName) => string;
|
|
15
|
+
toEnrichmentRequests?: (refName: RefName) => EnrichmentRequest[];
|
|
14
16
|
};
|
|
15
17
|
export declare const toModelInsertable: (config: ModelConfig) => {
|
|
16
18
|
new (args: ModelInsertableArgs): {
|
|
@@ -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;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
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;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,CAAA;IAC9C,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAA;IAC1C,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,iBAAiB,EAAE,CAAA;CACjE,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,WAAW;eAa/B,mBAAmB;;;;;;;;;;;;4BAlBf,OAAO,KAAK,UAAU;4BACtB,OAAO,KAAK,MAAM;;;CA6B3C,CAAA"}
|
|
@@ -53,14 +53,14 @@ class OperationDriver {
|
|
|
53
53
|
this.definition = this.apply({ generation, destinationPath });
|
|
54
54
|
}
|
|
55
55
|
apply({ generation, destinationPath } = {}) {
|
|
56
|
-
const { identifier, exportPath, selected
|
|
56
|
+
const { identifier, exportPath, selected } = this.settings;
|
|
57
57
|
if (!selected && generation !== 'force') {
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
60
60
|
const definition = this.getDefinition({ identifier, exportPath });
|
|
61
61
|
if (destinationPath && (0, mod_js_1.normalize)(exportPath) !== (0, mod_js_1.normalize)(destinationPath)) {
|
|
62
62
|
this.context.register({
|
|
63
|
-
imports: { [
|
|
63
|
+
imports: { [exportPath]: [identifier.name] },
|
|
64
64
|
destinationPath
|
|
65
65
|
});
|
|
66
66
|
}
|
|
@@ -2,6 +2,7 @@ import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
|
2
2
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
3
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
|
+
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
5
6
|
type OperationInsertableConstructorArgs = {
|
|
6
7
|
context: GenerateContext;
|
|
7
8
|
settings: ContentSettings;
|
|
@@ -21,6 +22,7 @@ export type OperationGateway = {
|
|
|
21
22
|
_class: 'OperationGateway';
|
|
22
23
|
toIdentifier: () => Identifier;
|
|
23
24
|
toExportPath: () => string;
|
|
25
|
+
toEnrichmentRequests?: (operation: OasOperation) => EnrichmentRequest[];
|
|
24
26
|
isSupported: (operation: OasOperation) => boolean;
|
|
25
27
|
pinnable: boolean;
|
|
26
28
|
};
|
|
@@ -33,6 +35,7 @@ export type OperationInsertable<V> = {
|
|
|
33
35
|
_class: 'OperationInsertable';
|
|
34
36
|
toIdentifier: (operation: OasOperation) => Identifier;
|
|
35
37
|
toExportPath: (operation: OasOperation) => string;
|
|
38
|
+
toEnrichmentRequests?: (operation: OasOperation) => EnrichmentRequest[];
|
|
36
39
|
isSupported: (operation: OasOperation) => boolean;
|
|
37
40
|
pinnable: boolean;
|
|
38
41
|
} & 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;
|
|
1
|
+
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"AAAA,OA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AkC,GAAG,CAAC,CAAA;IAC7E,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,UAAU,CAAA;IACrD,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,MAAM,CAAA;IACjD,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,iBAAiB,EAAE,CAAA;IACvE,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
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 { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
4
5
|
export type ToOperationGatewayArgs = {
|
|
5
6
|
id: string;
|
|
6
7
|
toIdentifier: () => Identifier;
|
|
7
8
|
toExportPath: () => string;
|
|
8
9
|
isSupported?: (operation: OasOperation) => boolean;
|
|
10
|
+
toEnrichmentRequests?: (operation: OasOperation) => EnrichmentRequest[];
|
|
9
11
|
};
|
|
10
12
|
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
11
13
|
new ({ context, settings }: OperationGatewayArgs): {
|
|
@@ -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,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,UAAU,CAAA;IAC9B,YAAY,EAAE,MAAM,MAAM,CAAA;IAC1B,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,iBAAiB,EAAE,CAAA;CACxE,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;gCAa1B,oBAAoB;;;;;;;;;;wBAnBrC,UAAU;wBACV,MAAM;6BACA,YAAY,KAAK,OAAO;;CAuBnD,CAAA"}
|
|
@@ -2,6 +2,7 @@ import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
|
2
2
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
3
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
4
|
import type { Identifier } from '../Identifier.js';
|
|
5
|
+
import type { EnrichmentRequest } from '../../types/EnrichmentRequest.js';
|
|
5
6
|
export type OperationInsertableArgs = {
|
|
6
7
|
context: GenerateContext;
|
|
7
8
|
settings: ContentSettings;
|
|
@@ -12,6 +13,7 @@ export type ToOperationInsertableArgs = {
|
|
|
12
13
|
toIdentifier: (operation: OasOperation) => Identifier;
|
|
13
14
|
toExportPath: (operation: OasOperation) => string;
|
|
14
15
|
isSupported?: (operation: OasOperation) => boolean;
|
|
16
|
+
toEnrichmentRequests?: (operation: OasOperation) => EnrichmentRequest[];
|
|
15
17
|
pinnable?: boolean;
|
|
16
18
|
};
|
|
17
19
|
export declare const toOperationInsertable: (config: ToOperationInsertableArgs) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"toOperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/toOperationInsertable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAEzE,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,EAAE,YAAY,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,UAAU,CAAA;IACrD,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,MAAM,CAAA;IACjD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,iBAAiB,EAAE,CAAA;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,yBAAyB;eAajD,uBAAuB;;;;;;;;;;;;;;;;;;8BApBjB,YAAY,KAAK,UAAU;8BAC3B,YAAY,KAAK,MAAM;6BACvB,YAAY,KAAK,OAAO;;CA8BnD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultsLog.d.ts","sourceRoot":"","sources":["../../src/helpers/ResultsLog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResultsLog.d.ts","sourceRoot":"","sources":["../../src/helpers/ResultsLog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGlE,qBAAa,UAAU;;;IAOrB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAc9C,MAAM,IAAI,WAAW;CAWtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/helpers/naming.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/helpers/naming.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAGhD,eAAO,MAAM,cAAc,cACd,YAAY,KACtB,OAAO,GAAG,UAEZ,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,cAAe,YAAY,KAAG,MAMxD,CAAA;AAED,eAAO,MAAM,cAAc,cAAe,YAAY,KAAG,MAIxD,CAAA;AAED,eAAO,MAAM,UAAU,cAAe,YAAY,KAAG,MAIpD,CAAA;AAED,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,MAK7C,CAAA"}
|
package/script/mod.d.ts
CHANGED
|
@@ -53,8 +53,10 @@ export * from './oas/tag/Tag.js';
|
|
|
53
53
|
export * from './oas/union/Union.js';
|
|
54
54
|
export * from './oas/unknown/Unknown.js';
|
|
55
55
|
export * from './oas/void/Void.js';
|
|
56
|
-
export * from './
|
|
56
|
+
export * from './run/toSettings.js';
|
|
57
|
+
export * from './run/transform.js';
|
|
57
58
|
export * from './types/CustomValue.js';
|
|
59
|
+
export * from './types/EnrichmentRequest.js';
|
|
58
60
|
export * from './types/GeneratedValue.js';
|
|
59
61
|
export * from './types/GeneratorKeys.js';
|
|
60
62
|
export * from './types/Method.js';
|
package/script/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,wCAAwC,CAAA;AACtD,cAAc,uCAAuC,CAAA;AACrD,cAAc,0CAA0C,CA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AACtC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/script/mod.js
CHANGED
|
@@ -69,8 +69,10 @@ __exportStar(require("./oas/tag/Tag.js"), exports);
|
|
|
69
69
|
__exportStar(require("./oas/union/Union.js"), exports);
|
|
70
70
|
__exportStar(require("./oas/unknown/Unknown.js"), exports);
|
|
71
71
|
__exportStar(require("./oas/void/Void.js"), exports);
|
|
72
|
-
__exportStar(require("./
|
|
72
|
+
__exportStar(require("./run/toSettings.js"), exports);
|
|
73
|
+
__exportStar(require("./run/transform.js"), exports);
|
|
73
74
|
__exportStar(require("./types/CustomValue.js"), exports);
|
|
75
|
+
__exportStar(require("./types/EnrichmentRequest.js"), exports);
|
|
74
76
|
__exportStar(require("./types/GeneratedValue.js"), exports);
|
|
75
77
|
__exportStar(require("./types/GeneratorKeys.js"), exports);
|
|
76
78
|
__exportStar(require("./types/Method.js"), exports);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { OasSchema } from '../schema/Schema.js';
|
|
1
|
+
import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
2
2
|
import type { OasRef } from '../ref/Ref.js';
|
|
3
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
3
4
|
export type ArrayFields = {
|
|
4
5
|
items: OasSchema | OasRef<'schema'>;
|
|
5
6
|
title?: string;
|
|
@@ -52,5 +53,6 @@ export declare class OasArray {
|
|
|
52
53
|
isRef(): this is OasRef<'schema'>;
|
|
53
54
|
resolve(): OasArray;
|
|
54
55
|
resolveOnce(): OasArray;
|
|
56
|
+
toJsonSchema(options: ToJsonSchemaOptions): OpenAPIV3.SchemaObject;
|
|
55
57
|
}
|
|
56
58
|
//# sourceMappingURL=Array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"Array.d.ts","sourceRoot":"","sources":["../../../src/oas/array/Array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAEzC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB;;;OAGG;IACH,OAAO,WAAoB;IAC3B;;OAEG;IACH,IAAI,UAAmB;IACvB;;OAEG;IACH,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAEhC,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IAEpD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;gBAEvB,MAAM,EAAE,WAAW;IAU/B,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC;IAIjC,OAAO,IAAI,QAAQ;IAInB,WAAW,IAAI,QAAQ;IAIvB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAAC,YAAY;CAUnE"}
|
|
@@ -103,5 +103,15 @@ class OasArray {
|
|
|
103
103
|
resolveOnce() {
|
|
104
104
|
return this;
|
|
105
105
|
}
|
|
106
|
+
toJsonSchema(options) {
|
|
107
|
+
return {
|
|
108
|
+
type: 'array',
|
|
109
|
+
items: this.items.toJsonSchema(options),
|
|
110
|
+
title: this.title,
|
|
111
|
+
description: this.description,
|
|
112
|
+
nullable: this.nullable,
|
|
113
|
+
example: this.example
|
|
114
|
+
};
|
|
115
|
+
}
|
|
106
116
|
}
|
|
107
117
|
exports.OasArray = OasArray;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { OpenAPIV3 } from 'openapi-types';
|
|
1
2
|
import type { OasRef } from '../ref/Ref.js';
|
|
3
|
+
import type { ToJsonSchemaOptions } from '../schema/Schema.js';
|
|
2
4
|
export type BooleanFields = {
|
|
3
5
|
title?: string;
|
|
4
6
|
description?: string;
|
|
@@ -41,5 +43,6 @@ export declare class OasBoolean {
|
|
|
41
43
|
isRef(): this is OasRef<'schema'>;
|
|
42
44
|
resolve(): OasBoolean;
|
|
43
45
|
resolveOnce(): OasBoolean;
|
|
46
|
+
toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.SchemaObject;
|
|
44
47
|
}
|
|
45
48
|
//# sourceMappingURL=Boolean.d.ts.map
|