@skmtc/core 0.0.464 → 0.0.465
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 +29 -62
- package/esm/dsl/ContentSettings.d.ts +1 -3
- package/esm/dsl/ContentSettings.d.ts.map +1 -1
- package/esm/dsl/ContentSettings.js +2 -10
- package/esm/dsl/model/ModelInsertable.d.ts +2 -5
- 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 +4 -7
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/esm/dsl/operation/toOperationGateway.d.ts +4 -5
- 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 +48 -482
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +4 -11
- package/package.json +1 -1
- package/script/context/GenerateContext.d.ts +3 -3
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +28 -61
- package/script/dsl/ContentSettings.d.ts +1 -3
- package/script/dsl/ContentSettings.d.ts.map +1 -1
- package/script/dsl/ContentSettings.js +2 -10
- package/script/dsl/model/ModelInsertable.d.ts +2 -5
- 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 +4 -7
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -1
- package/script/dsl/operation/toOperationGateway.d.ts +4 -5
- 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 +48 -482
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +5 -12
|
@@ -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,OAA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ACX,IAAI,EACJ,MAAM,EACP,EAAE,wBAAwB,GAAG,OAAO,GAAG,SAAS;IAQjD,eAAe,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,OAAO,GAAG,SAAS;IAQpF,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAqB7E;;;;;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"}
|
|
@@ -9,8 +9,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_stackTrail, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_getFile,
|
|
13
|
-
import {
|
|
12
|
+
var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_previews, _GenerateContext_stackTrail, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_getFile, _GenerateContext_toGatewaySelected, _GenerateContext_addFile;
|
|
13
|
+
import { normalize } from '../deps/jsr.io/@std/path/1.0.6/mod.js';
|
|
14
14
|
import { Import } from '../dsl/Import.js';
|
|
15
15
|
import { Definition } from '../dsl/Definition.js';
|
|
16
16
|
import { OperationDriver } from '../dsl/operation/OperationDriver.js';
|
|
@@ -282,19 +282,17 @@ export class GenerateContext {
|
|
|
282
282
|
* @returns
|
|
283
283
|
*/
|
|
284
284
|
toOperationContentSettings({ operation, insertable }) {
|
|
285
|
-
const
|
|
285
|
+
const selected = this.toOperationSelected({
|
|
286
286
|
generatorId: insertable.id,
|
|
287
287
|
path: operation.path,
|
|
288
288
|
method: operation.method
|
|
289
289
|
});
|
|
290
|
-
const
|
|
291
|
-
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
290
|
+
const exportPath = insertable.toExportPath({ operation });
|
|
292
291
|
return new ContentSettings({
|
|
293
|
-
identifier: insertable.toIdentifier({ operation
|
|
294
|
-
selected:
|
|
292
|
+
identifier: insertable.toIdentifier({ operation }),
|
|
293
|
+
selected: Boolean(selected),
|
|
295
294
|
exportPath,
|
|
296
|
-
importFrom:
|
|
297
|
-
parentExportPath: baseSettings.parentExportPath
|
|
295
|
+
importFrom: exportPath
|
|
298
296
|
});
|
|
299
297
|
}
|
|
300
298
|
/**
|
|
@@ -307,18 +305,16 @@ export class GenerateContext {
|
|
|
307
305
|
* @returns Content settings for model
|
|
308
306
|
*/
|
|
309
307
|
toModelContentSettings({ refName, insertable }) {
|
|
310
|
-
const
|
|
308
|
+
const selected = this.toModelSelected({
|
|
311
309
|
generatorId: insertable.id,
|
|
312
310
|
refName
|
|
313
311
|
});
|
|
314
|
-
const
|
|
315
|
-
const exportPath = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_setExportPath).call(this, { generatedExportPath, baseSettings });
|
|
312
|
+
const exportPath = insertable.toExportPath({ refName });
|
|
316
313
|
return new ContentSettings({
|
|
317
|
-
identifier: insertable.toIdentifier({ refName
|
|
318
|
-
selected:
|
|
314
|
+
identifier: insertable.toIdentifier({ refName }),
|
|
315
|
+
selected: Boolean(selected),
|
|
319
316
|
exportPath,
|
|
320
|
-
importFrom:
|
|
321
|
-
parentExportPath: baseSettings.parentExportPath
|
|
317
|
+
importFrom: exportPath
|
|
322
318
|
});
|
|
323
319
|
}
|
|
324
320
|
/**
|
|
@@ -330,14 +326,13 @@ export class GenerateContext {
|
|
|
330
326
|
* @returns Content settings for model
|
|
331
327
|
*/
|
|
332
328
|
toGatewayContentSetting(gateway) {
|
|
333
|
-
const
|
|
334
|
-
const exportPath = gateway.toExportPath(
|
|
329
|
+
const selected = __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_toGatewaySelected).call(this, gateway.id);
|
|
330
|
+
const exportPath = gateway.toExportPath();
|
|
335
331
|
return new ContentSettings({
|
|
336
|
-
identifier: gateway.toIdentifier(
|
|
337
|
-
selected:
|
|
332
|
+
identifier: gateway.toIdentifier(),
|
|
333
|
+
selected: Boolean(selected),
|
|
338
334
|
exportPath,
|
|
339
|
-
importFrom:
|
|
340
|
-
parentExportPath: baseSettings.parentExportPath
|
|
335
|
+
importFrom: exportPath
|
|
341
336
|
});
|
|
342
337
|
}
|
|
343
338
|
/**
|
|
@@ -345,27 +340,17 @@ export class GenerateContext {
|
|
|
345
340
|
* @param { generatorId, path, method }
|
|
346
341
|
* @returns Base settings for operation
|
|
347
342
|
*/
|
|
348
|
-
|
|
343
|
+
toOperationSelected({ generatorId, path, method }) {
|
|
349
344
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
350
|
-
|
|
345
|
+
return generatorSettings && 'operations' in generatorSettings
|
|
351
346
|
? generatorSettings.operations[path]?.[method]
|
|
352
347
|
: undefined;
|
|
353
|
-
const { exportPath } = generatorSettings?.baseSettings ?? {};
|
|
354
|
-
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
355
|
-
...operationSettings,
|
|
356
|
-
parentExportPath: exportPath
|
|
357
|
-
});
|
|
358
348
|
}
|
|
359
|
-
|
|
349
|
+
toModelSelected({ generatorId, refName }) {
|
|
360
350
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
361
|
-
|
|
351
|
+
return generatorSettings && 'models' in generatorSettings
|
|
362
352
|
? generatorSettings.models[refName]
|
|
363
353
|
: undefined;
|
|
364
|
-
const { exportPath } = generatorSettings?.baseSettings ?? {};
|
|
365
|
-
return __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_cleanBaseSettings).call(this, {
|
|
366
|
-
...modelSettings,
|
|
367
|
-
parentExportPath: exportPath
|
|
368
|
-
});
|
|
369
354
|
}
|
|
370
355
|
toGeneratorSettings(generatorId) {
|
|
371
356
|
return this.settings?.generators?.find(({ id }) => id === generatorId);
|
|
@@ -414,12 +399,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
414
399
|
if (!generator.isSupported(operation)) {
|
|
415
400
|
return this.captureCurrentResult('notSupported');
|
|
416
401
|
}
|
|
417
|
-
const
|
|
402
|
+
const operationSelected = this.toOperationSelected({
|
|
418
403
|
generatorId: generator.id,
|
|
419
404
|
path,
|
|
420
405
|
method
|
|
421
406
|
});
|
|
422
|
-
if (!
|
|
407
|
+
if (!operationSelected) {
|
|
423
408
|
return this.captureCurrentResult('notSelected');
|
|
424
409
|
}
|
|
425
410
|
gatewayInstance.transformOperation(operation);
|
|
@@ -446,12 +431,12 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
446
431
|
if (!generator.isSupported(operation)) {
|
|
447
432
|
return this.captureCurrentResult('notSupported');
|
|
448
433
|
}
|
|
449
|
-
const
|
|
434
|
+
const operationSelected = this.toOperationSelected({
|
|
450
435
|
generatorId: generator.id,
|
|
451
436
|
path,
|
|
452
437
|
method
|
|
453
438
|
});
|
|
454
|
-
if (!
|
|
439
|
+
if (!operationSelected) {
|
|
455
440
|
return this.captureCurrentResult('notSelected');
|
|
456
441
|
}
|
|
457
442
|
this.insertOperation({ insertable: generator, operation });
|
|
@@ -467,11 +452,11 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
467
452
|
if (!generator.isSupported()) {
|
|
468
453
|
return this.captureCurrentResult('notSupported');
|
|
469
454
|
}
|
|
470
|
-
const
|
|
455
|
+
const selected = this.toModelSelected({
|
|
471
456
|
generatorId: generator.id,
|
|
472
457
|
refName
|
|
473
458
|
});
|
|
474
|
-
if (!
|
|
459
|
+
if (!selected) {
|
|
475
460
|
return this.captureCurrentResult('notSelected');
|
|
476
461
|
}
|
|
477
462
|
this.insertModel({ insertable: generator, refName });
|
|
@@ -490,27 +475,9 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
|
|
|
490
475
|
}
|
|
491
476
|
}
|
|
492
477
|
return currentFile;
|
|
493
|
-
},
|
|
494
|
-
const { parentExportPath, exportPath } = baseSettings;
|
|
495
|
-
if (exportPath) {
|
|
496
|
-
return join(parentExportPath ?? '', exportPath);
|
|
497
|
-
}
|
|
498
|
-
if (generatedExportPath.startsWith('@/')) {
|
|
499
|
-
return generatedExportPath;
|
|
500
|
-
}
|
|
501
|
-
const combinedExportPath = join(parentExportPath ?? '', generatedExportPath);
|
|
502
|
-
return combinedExportPath;
|
|
503
|
-
}, _GenerateContext_toGatewayBaseSettings = function _GenerateContext_toGatewayBaseSettings(generatorId) {
|
|
478
|
+
}, _GenerateContext_toGatewaySelected = function _GenerateContext_toGatewaySelected(generatorId) {
|
|
504
479
|
const generatorSettings = this.toGeneratorSettings(generatorId);
|
|
505
|
-
return
|
|
506
|
-
}, _GenerateContext_cleanBaseSettings = function _GenerateContext_cleanBaseSettings(baseSettings) {
|
|
507
|
-
return {
|
|
508
|
-
exportPath: baseSettings?.exportPath,
|
|
509
|
-
selected: Boolean(baseSettings?.selected),
|
|
510
|
-
name: baseSettings?.name,
|
|
511
|
-
importFrom: baseSettings?.importFrom,
|
|
512
|
-
parentExportPath: baseSettings?.parentExportPath
|
|
513
|
-
};
|
|
480
|
+
return generatorSettings?.selected;
|
|
514
481
|
}, _GenerateContext_addFile = function _GenerateContext_addFile(normalisedPath) {
|
|
515
482
|
if (__classPrivateFieldGet(this, _GenerateContext_files, "f").has(normalisedPath)) {
|
|
516
483
|
throw new Error(`File already exists: ${normalisedPath}`);
|
|
@@ -8,15 +8,13 @@ type CreateArgs = {
|
|
|
8
8
|
selected: boolean;
|
|
9
9
|
exportPath: string;
|
|
10
10
|
importFrom: string;
|
|
11
|
-
parentExportPath: string | undefined;
|
|
12
11
|
};
|
|
13
12
|
export declare class ContentSettings {
|
|
14
13
|
identifier: Identifier;
|
|
15
14
|
selected: boolean;
|
|
16
15
|
exportPath: string;
|
|
17
16
|
importFrom: string;
|
|
18
|
-
|
|
19
|
-
constructor({ identifier, selected, exportPath, importFrom, parentExportPath }: CreateArgs);
|
|
17
|
+
constructor({ identifier, selected, exportPath, importFrom }: CreateArgs);
|
|
20
18
|
static empty({ identifier, exportPath }: EmptyArgs): ContentSettings;
|
|
21
19
|
}
|
|
22
20
|
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;CACnB,CAAA;AAED,qBAAa,eAAe;IAC1B,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;gBAEN,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,UAAU;IAOxE,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,GAAG,eAAe;CAQrE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class ContentSettings {
|
|
2
|
-
constructor({ identifier, selected, exportPath, importFrom
|
|
2
|
+
constructor({ identifier, selected, exportPath, importFrom }) {
|
|
3
3
|
Object.defineProperty(this, "identifier", {
|
|
4
4
|
enumerable: true,
|
|
5
5
|
configurable: true,
|
|
@@ -24,25 +24,17 @@ export class ContentSettings {
|
|
|
24
24
|
writable: true,
|
|
25
25
|
value: void 0
|
|
26
26
|
});
|
|
27
|
-
Object.defineProperty(this, "parentExportPath", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true,
|
|
31
|
-
value: void 0
|
|
32
|
-
});
|
|
33
27
|
this.identifier = identifier;
|
|
34
28
|
this.selected = selected;
|
|
35
29
|
this.exportPath = exportPath;
|
|
36
30
|
this.importFrom = importFrom;
|
|
37
|
-
this.parentExportPath = parentExportPath;
|
|
38
31
|
}
|
|
39
32
|
static empty({ identifier, exportPath }) {
|
|
40
33
|
return new ContentSettings({
|
|
41
34
|
selected: true,
|
|
42
35
|
identifier,
|
|
43
36
|
exportPath,
|
|
44
|
-
importFrom: exportPath
|
|
45
|
-
parentExportPath: undefined
|
|
37
|
+
importFrom: exportPath
|
|
46
38
|
});
|
|
47
39
|
}
|
|
48
40
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
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';
|
|
4
3
|
import type { RefName } from '../../types/RefName.js';
|
|
5
4
|
import type { Identifier } from '../Identifier.js';
|
|
6
5
|
type ModelInsertableConstructorArgs = {
|
|
@@ -11,11 +10,9 @@ type ModelInsertableConstructorArgs = {
|
|
|
11
10
|
};
|
|
12
11
|
export type ToModelIdentifierArgs = {
|
|
13
12
|
refName: RefName;
|
|
14
|
-
baseSettings: BaseSettings;
|
|
15
13
|
};
|
|
16
14
|
export type ToModelExportPathArgs = {
|
|
17
15
|
refName: RefName;
|
|
18
|
-
baseSettings: BaseSettings;
|
|
19
16
|
};
|
|
20
17
|
export type WithTransformModel = {
|
|
21
18
|
transformModel: (refName: RefName) => void;
|
|
@@ -27,8 +24,8 @@ export type ModelInsertable<V> = {
|
|
|
27
24
|
id: string;
|
|
28
25
|
type: 'model';
|
|
29
26
|
_class: 'ModelInsertable';
|
|
30
|
-
toIdentifier: ({ refName
|
|
31
|
-
toExportPath: ({ refName
|
|
27
|
+
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
28
|
+
toExportPath: ({ refName }: ToModelExportPathArgs) => string;
|
|
32
29
|
isSupported: () => boolean;
|
|
33
30
|
pinnable: boolean;
|
|
34
31
|
} & 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,
|
|
1
|
+
{"version":3,"file":"ModelInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelInsertable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,C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: ({ refName
|
|
14
|
-
toExportPath: ({ refName
|
|
13
|
+
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ refName }: 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
|
|
30
|
-
toExportPath: ({ refName
|
|
29
|
+
toIdentifier: ({ refName }: ToModelIdentifierArgs) => Identifier;
|
|
30
|
+
toExportPath: ({ refName }: 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,CAAA;AAElD,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,EAAE,OAAO,EAAE,
|
|
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,CAAA;AAElD,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,EAAE,OAAO,EAAE,EAAE,qBAAqB,KAAK,UAAU,CAAA;IAChE,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;CAC7D,CAAA;AAED,eAAO,MAAM,iBAAiB,WAAY,WAAW;eAa/B,mBAAmB;;;;;;;;;;;;gCAjBX,qBAAqB,KAAK,UAAU;gCACpC,qBAAqB,KAAK,MAAM;;;CA4B7D,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
2
2
|
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
|
-
import type { BaseSettings } from '../../types/Settings.js';
|
|
4
3
|
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
5
4
|
import type { Identifier } from '../Identifier.js';
|
|
6
5
|
type OperationInsertableConstructorArgs = {
|
|
@@ -10,11 +9,9 @@ type OperationInsertableConstructorArgs = {
|
|
|
10
9
|
};
|
|
11
10
|
export type ToOperationIdentifierArgs = {
|
|
12
11
|
operation: OasOperation;
|
|
13
|
-
baseSettings: BaseSettings;
|
|
14
12
|
};
|
|
15
13
|
export type ToOperationExportPathArgs = {
|
|
16
14
|
operation: OasOperation;
|
|
17
|
-
baseSettings: BaseSettings;
|
|
18
15
|
};
|
|
19
16
|
export type WithTransformOperation = {
|
|
20
17
|
transformOperation: (operation: OasOperation) => void;
|
|
@@ -28,8 +25,8 @@ export type OperationGateway = {
|
|
|
28
25
|
id: string;
|
|
29
26
|
type: 'operation';
|
|
30
27
|
_class: 'OperationGateway';
|
|
31
|
-
toIdentifier: (
|
|
32
|
-
toExportPath: (
|
|
28
|
+
toIdentifier: () => Identifier;
|
|
29
|
+
toExportPath: () => string;
|
|
33
30
|
isSupported: (operation: OasOperation) => boolean;
|
|
34
31
|
pinnable: boolean;
|
|
35
32
|
};
|
|
@@ -40,8 +37,8 @@ export type OperationInsertable<V> = {
|
|
|
40
37
|
id: string;
|
|
41
38
|
type: 'operation';
|
|
42
39
|
_class: 'OperationInsertable';
|
|
43
|
-
toIdentifier: ({ operation
|
|
44
|
-
toExportPath: ({ operation
|
|
40
|
+
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
41
|
+
toExportPath: ({ operation }: ToOperationExportPathArgs) => string;
|
|
45
42
|
isSupported: (operation: OasOperation) => boolean;
|
|
46
43
|
pinnable: boolean;
|
|
47
44
|
} & 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,
|
|
1
|
+
{"version":3,"file":"OperationInsertable.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationInsertable.ts"],"names":[],"mappings":"A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,EAAE,EAAE,kCAAkC,GAAG,CAAC,CAAA;IAC7E,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,KAAK,UAAU,CAAA;IACtE,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAElE,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAEjD,QAAQ,EAAE,OAAO,CAAA;CAGlB,GAAG,QAAQ,CAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
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';
|
|
5
4
|
export type ToOperationGatewayArgs = {
|
|
6
5
|
id: string;
|
|
7
|
-
toIdentifier: (
|
|
8
|
-
toExportPath: (
|
|
6
|
+
toIdentifier: () => Identifier;
|
|
7
|
+
toExportPath: () => string;
|
|
9
8
|
isSupported?: (operation: OasOperation) => boolean;
|
|
10
9
|
};
|
|
11
10
|
export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
@@ -19,8 +18,8 @@ export declare const toOperationGateway: (config: ToOperationGatewayArgs) => {
|
|
|
19
18
|
id: string;
|
|
20
19
|
type: "operation";
|
|
21
20
|
_class: "OperationGateway";
|
|
22
|
-
toIdentifier: (
|
|
23
|
-
toExportPath: (
|
|
21
|
+
toIdentifier: () => Identifier;
|
|
22
|
+
toExportPath: () => string;
|
|
24
23
|
isSupported: (operation: OasOperation) => boolean;
|
|
25
24
|
pinnable: boolean;
|
|
26
25
|
};
|
|
@@ -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;AAElD,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;CACnD,CAAA;AAED,eAAO,MAAM,kBAAkB,WAAY,sBAAsB;gCAa1B,oBAAoB;;;;;;;;;;wBAlBrC,UAAU;wBACV,MAAM;6BACA,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
|
|
14
|
-
toExportPath: ({ operation
|
|
13
|
+
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
14
|
+
toExportPath: ({ operation }: 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
|
|
38
|
-
toExportPath: ({ operation
|
|
37
|
+
toIdentifier: ({ operation }: ToOperationIdentifierArgs) => Identifier;
|
|
38
|
+
toExportPath: ({ operation }: ToOperationExportPathArgs) => string;
|
|
39
39
|
isSupported: (operation: OasOperation) => boolean;
|
|
40
40
|
pinnable: boolean;
|
|
41
41
|
};
|
|
@@ -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;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,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,EAAE,SAAS,EAAE,
|
|
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;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAEpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,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,EAAE,SAAS,EAAE,EAAE,yBAAyB,KAAK,UAAU,CAAA;IACtE,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,yBAAyB,KAAK,MAAM,CAAA;IAClE,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,yBAAyB;eAajD,uBAAuB;;;;;;;;;;;;;;;;;;kCAnBb,yBAAyB,KAAK,UAAU;kCACxC,yBAAyB,KAAK,MAAM;6BACxC,YAAY,KAAK,OAAO;;CA6BnD,CAAA"}
|