@skmtc/core 0.0.337 → 0.0.339
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/CoreContext.d.ts +2 -2
- package/esm/context/CoreContext.d.ts.map +1 -1
- package/esm/context/CoreContext.js +4 -4
- package/esm/context/GenerateContext.d.ts +5 -5
- package/esm/context/GenerateContext.d.ts.map +1 -1
- package/esm/context/GenerateContext.js +64 -32
- package/esm/context/ParseContext.d.ts +1 -1
- package/esm/context/ParseContext.d.ts.map +1 -1
- package/esm/context/ParseContext.js +11 -11
- package/esm/dsl/EntityType.d.ts +2 -2
- package/esm/dsl/EntityType.d.ts.map +1 -1
- package/esm/dsl/EntityType.js +1 -1
- package/esm/dsl/Identifier.js +2 -2
- package/esm/dsl/{ModelDriver.d.ts → model/ModelDriver.d.ts} +5 -5
- package/esm/dsl/model/ModelDriver.d.ts.map +1 -0
- package/esm/dsl/{ModelDriver.js → model/ModelDriver.js} +5 -5
- package/{script/dsl → esm/dsl/model}/ModelInsertable.d.ts +18 -12
- package/esm/dsl/model/ModelInsertable.d.ts.map +1 -0
- package/esm/dsl/operation/OperationBase.d.ts +34 -0
- package/esm/dsl/operation/OperationBase.d.ts.map +1 -0
- package/esm/dsl/{base.js → operation/OperationBase.js} +4 -35
- package/esm/dsl/{OperationDriver.d.ts → operation/OperationDriver.d.ts} +5 -5
- package/esm/dsl/operation/OperationDriver.d.ts.map +1 -0
- package/esm/dsl/{OperationDriver.js → operation/OperationDriver.js} +5 -5
- package/{script/dsl → esm/dsl/operation}/OperationInsertable.d.ts +12 -8
- package/esm/dsl/operation/OperationInsertable.d.ts.map +1 -0
- package/esm/mod.d.ts +5 -6
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +5 -6
- package/esm/oas/components/Components.d.ts +1 -0
- package/esm/oas/components/Components.d.ts.map +1 -1
- package/esm/oas/components/Components.js +3 -0
- package/esm/oas/document/toDocumentFieldsV3.d.ts +2 -2
- package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/esm/oas/document/toDocumentFieldsV3.js +2 -2
- package/esm/oas/ref/Ref.d.ts +2 -2
- package/esm/oas/ref/Ref.d.ts.map +1 -1
- package/esm/oas/ref/Ref.js +8 -8
- package/esm/oas/ref/toRefV31.js +1 -1
- package/esm/server/createServer.d.ts +2 -2
- package/esm/server/createServer.d.ts.map +1 -1
- package/esm/transform/transform.d.ts +2 -2
- package/esm/transform/transform.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/context/CoreContext.d.ts +2 -2
- package/script/context/CoreContext.d.ts.map +1 -1
- package/script/context/CoreContext.js +4 -4
- package/script/context/GenerateContext.d.ts +5 -5
- package/script/context/GenerateContext.d.ts.map +1 -1
- package/script/context/GenerateContext.js +64 -32
- package/script/context/ParseContext.d.ts +1 -1
- package/script/context/ParseContext.d.ts.map +1 -1
- package/script/context/ParseContext.js +11 -11
- package/script/dsl/EntityType.d.ts +2 -2
- package/script/dsl/EntityType.d.ts.map +1 -1
- package/script/dsl/EntityType.js +1 -1
- package/script/dsl/Identifier.js +2 -2
- package/script/dsl/{ModelDriver.d.ts → model/ModelDriver.d.ts} +5 -5
- package/script/dsl/model/ModelDriver.d.ts.map +1 -0
- package/script/dsl/{ModelDriver.js → model/ModelDriver.js} +5 -5
- package/{esm/dsl → script/dsl/model}/ModelInsertable.d.ts +18 -12
- package/script/dsl/model/ModelInsertable.d.ts.map +1 -0
- package/script/dsl/operation/OperationBase.d.ts +34 -0
- package/script/dsl/operation/OperationBase.d.ts.map +1 -0
- package/script/dsl/{base.js → operation/OperationBase.js} +5 -37
- package/script/dsl/{OperationDriver.d.ts → operation/OperationDriver.d.ts} +5 -5
- package/script/dsl/operation/OperationDriver.d.ts.map +1 -0
- package/script/dsl/{OperationDriver.js → operation/OperationDriver.js} +5 -5
- package/{esm/dsl → script/dsl/operation}/OperationInsertable.d.ts +12 -8
- package/script/dsl/operation/OperationInsertable.d.ts.map +1 -0
- package/script/mod.d.ts +5 -6
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +5 -6
- package/script/oas/components/Components.d.ts +1 -0
- package/script/oas/components/Components.d.ts.map +1 -1
- package/script/oas/components/Components.js +3 -0
- package/script/oas/document/toDocumentFieldsV3.d.ts +2 -2
- package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
- package/script/oas/document/toDocumentFieldsV3.js +2 -2
- package/script/oas/ref/Ref.d.ts +2 -2
- package/script/oas/ref/Ref.d.ts.map +1 -1
- package/script/oas/ref/Ref.js +8 -8
- package/script/oas/ref/toRefV31.js +1 -1
- package/script/server/createServer.d.ts +2 -2
- package/script/server/createServer.d.ts.map +1 -1
- package/script/transform/transform.d.ts +2 -2
- package/script/transform/transform.d.ts.map +1 -1
- package/esm/dsl/ModelDriver.d.ts.map +0 -1
- package/esm/dsl/ModelInsertable.d.ts.map +0 -1
- package/esm/dsl/OperationDriver.d.ts.map +0 -1
- package/esm/dsl/OperationInsertable.d.ts.map +0 -1
- package/esm/dsl/base.d.ts +0 -56
- package/esm/dsl/base.d.ts.map +0 -1
- package/esm/dsl/withConfig.d.ts +0 -115
- package/esm/dsl/withConfig.d.ts.map +0 -1
- package/esm/dsl/withConfig.js +0 -138
- package/script/dsl/ModelDriver.d.ts.map +0 -1
- package/script/dsl/ModelInsertable.d.ts.map +0 -1
- package/script/dsl/OperationDriver.d.ts.map +0 -1
- package/script/dsl/OperationInsertable.d.ts.map +0 -1
- package/script/dsl/base.d.ts +0 -56
- package/script/dsl/base.d.ts.map +0 -1
- package/script/dsl/withConfig.d.ts +0 -115
- package/script/dsl/withConfig.d.ts.map +0 -1
- package/script/dsl/withConfig.js +0 -144
- /package/esm/dsl/{ModelInsertable.js → model/ModelInsertable.js} +0 -0
- /package/esm/dsl/{OperationInsertable.js → operation/OperationInsertable.js} +0 -0
- /package/script/dsl/{ModelInsertable.js → model/ModelInsertable.js} +0 -0
- /package/script/dsl/{OperationInsertable.js → operation/OperationInsertable.js} +0 -0
|
@@ -56,7 +56,7 @@ class ParseContext {
|
|
|
56
56
|
writable: true,
|
|
57
57
|
value: void 0
|
|
58
58
|
});
|
|
59
|
-
Object.defineProperty(this, "
|
|
59
|
+
Object.defineProperty(this, "oasDocument", {
|
|
60
60
|
enumerable: true,
|
|
61
61
|
configurable: true,
|
|
62
62
|
writable: true,
|
|
@@ -66,11 +66,11 @@ class ParseContext {
|
|
|
66
66
|
this.schema = schema;
|
|
67
67
|
this.logger = logger;
|
|
68
68
|
__classPrivateFieldSet(this, _ParseContext_stackTrail, stackTrail, "f");
|
|
69
|
-
this.
|
|
69
|
+
this.oasDocument = new Document_js_1.OasDocument();
|
|
70
70
|
}
|
|
71
71
|
parse() {
|
|
72
|
-
const
|
|
73
|
-
return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this,
|
|
72
|
+
const documentObject = __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseSchema).call(this);
|
|
73
|
+
return __classPrivateFieldGet(this, _ParseContext_instances, "m", _ParseContext_parseDocument).call(this, documentObject);
|
|
74
74
|
}
|
|
75
75
|
trace(token, fn) {
|
|
76
76
|
return (0, tracer_js_1.tracer)(__classPrivateFieldGet(this, _ParseContext_stackTrail, "f"), token, fn);
|
|
@@ -87,17 +87,17 @@ class ParseContext {
|
|
|
87
87
|
}
|
|
88
88
|
exports.ParseContext = ParseContext;
|
|
89
89
|
_ParseContext_stackTrail = new WeakMap(), _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
}, _ParseContext_parseDocument = function _ParseContext_parseDocument(
|
|
93
|
-
if (!
|
|
90
|
+
const documentObject = Sentry.startSpan({ name: 'Parse string schema to object' }, () => (0, exports.parseSchema)(this.schema));
|
|
91
|
+
return documentObject;
|
|
92
|
+
}, _ParseContext_parseDocument = function _ParseContext_parseDocument(documentObject) {
|
|
93
|
+
if (!documentObject.openapi.startsWith('3.0.')) {
|
|
94
94
|
throw new Error('Only OpenAPI v3 is supported');
|
|
95
95
|
}
|
|
96
|
-
this.
|
|
97
|
-
|
|
96
|
+
this.oasDocument.fields = (0, toDocumentFieldsV3_js_1.toDocumentFieldsV3)({
|
|
97
|
+
documentObject,
|
|
98
98
|
context: this
|
|
99
99
|
});
|
|
100
|
-
return this.
|
|
100
|
+
return this.oasDocument;
|
|
101
101
|
};
|
|
102
102
|
const parseSchema = (schema) => {
|
|
103
103
|
if (schema.trimStart().startsWith('{')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityType.d.ts","sourceRoot":"","sources":["../../src/dsl/EntityType.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IACrB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"EntityType.d.ts","sourceRoot":"","sources":["../../src/dsl/EntityType.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IACrB,IAAI,EAAE,UAAU,GAAG,MAAM,CAAA;gBACb,IAAI,EAAE,UAAU,GAAG,MAAM;IAIrC,QAAQ,IAAI,MAAM;CAMnB"}
|
package/script/dsl/EntityType.js
CHANGED
package/script/dsl/Identifier.js
CHANGED
|
@@ -32,14 +32,14 @@ class Identifier {
|
|
|
32
32
|
.with(ts_pattern_1.P.string, name => {
|
|
33
33
|
return new Identifier({
|
|
34
34
|
name,
|
|
35
|
-
entityType: new EntityType_js_1.EntityType('
|
|
35
|
+
entityType: new EntityType_js_1.EntityType('variable')
|
|
36
36
|
});
|
|
37
37
|
})
|
|
38
38
|
.otherwise(({ name, tsType }) => {
|
|
39
39
|
return new Identifier({
|
|
40
40
|
name,
|
|
41
41
|
tsType,
|
|
42
|
-
entityType: new EntityType_js_1.EntityType('
|
|
42
|
+
entityType: new EntityType_js_1.EntityType('variable')
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ModelInsertable } from './ModelInsertable.js';
|
|
2
|
-
import type { GenerateContext } from '
|
|
3
|
-
import type { ContentSettings } from '
|
|
4
|
-
import type { GeneratedDefintion, GenerationType } from '
|
|
5
|
-
import type { GeneratedValue } from '
|
|
6
|
-
import type { RefName } from '
|
|
2
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import type { GeneratedDefintion, GenerationType } from '../../types/GeneratedValue.js';
|
|
5
|
+
import type { GeneratedValue } from '../../types/GeneratedValue.js';
|
|
6
|
+
import type { RefName } from '../../types/RefName.js';
|
|
7
7
|
type CreateModelArgs<V extends GeneratedValue, T extends GenerationType> = {
|
|
8
8
|
context: GenerateContext;
|
|
9
9
|
insertable: ModelInsertable<V>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/model/ModelDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAK5D,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAGrD,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc,IAAI;IACzE,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAWD,qBAAa,WAAW,CAAC,CAAC,SAAS,cAAc,EAAE,CAAC,SAAS,cAAc;IACzE,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;gBACxB,EACV,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,EAChB,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;IAUxB,IAAI,KAAK,IAAI,CAAC,CAQb;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,OAAO,CAAC,KAAK;IAyBb,OAAO,CAAC,aAAa;IA6CrB,OAAO,CAAC,gBAAgB;CAoBzB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModelDriver = void 0;
|
|
4
|
-
const mod_js_1 = require("
|
|
5
|
-
const Definition_js_1 = require("
|
|
6
|
-
const Identifier_js_1 = require("
|
|
4
|
+
const mod_js_1 = require("../../deps/jsr.io/@std/path/1.0.0/mod.js");
|
|
5
|
+
const Definition_js_1 = require("../Definition.js");
|
|
6
|
+
const Identifier_js_1 = require("../Identifier.js");
|
|
7
7
|
const ts_pattern_1 = require("ts-pattern");
|
|
8
|
-
const GeneratorKeys_js_1 = require("
|
|
8
|
+
const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
9
9
|
class ModelDriver {
|
|
10
10
|
constructor({ context, insertable, refName, generation, destinationPath }) {
|
|
11
11
|
Object.defineProperty(this, "context", {
|
|
@@ -97,7 +97,7 @@ class ModelDriver {
|
|
|
97
97
|
? value.tsType
|
|
98
98
|
: undefined;
|
|
99
99
|
const identifier = (0, ts_pattern_1.match)(this.insertable.entityType.type)
|
|
100
|
-
.with('
|
|
100
|
+
.with('variable', () => Identifier_js_1.Identifier.createValue({ name, tsType }))
|
|
101
101
|
.with('type', () => Identifier_js_1.Identifier.createType(name))
|
|
102
102
|
.exhaustive();
|
|
103
103
|
const definition = new Definition_js_1.Definition({
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import type { GenerateContext } from '
|
|
2
|
-
import type { EntityType } from '
|
|
3
|
-
import type { ContentSettings } from '
|
|
4
|
-
import type { BaseSettings } from '
|
|
5
|
-
import type { RefName } from '
|
|
1
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
2
|
+
import type { EntityType } from '../EntityType.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
5
|
+
import type { RefName } from '../../types/RefName.js';
|
|
6
|
+
type ModelInsertableConstructorArgs = {
|
|
7
|
+
context: GenerateContext;
|
|
8
|
+
refName: RefName;
|
|
9
|
+
settings: ContentSettings;
|
|
10
|
+
destinationPath: string;
|
|
11
|
+
};
|
|
6
12
|
export type ToModelNameArgs = {
|
|
7
13
|
refName: RefName;
|
|
8
14
|
baseSettings: BaseSettings;
|
|
@@ -22,21 +28,21 @@ export type ModelGenerator = {
|
|
|
22
28
|
new (context: GenerateContext): WithTransformModel;
|
|
23
29
|
id: string;
|
|
24
30
|
type: 'model';
|
|
25
|
-
|
|
31
|
+
_class: 'ModelGenerator';
|
|
32
|
+
pinnable: false;
|
|
26
33
|
};
|
|
27
34
|
export type ModelInsertable<V> = {
|
|
28
35
|
prototype: V;
|
|
29
36
|
} & {
|
|
30
|
-
new (
|
|
31
|
-
context: GenerateContext;
|
|
32
|
-
refName: RefName;
|
|
33
|
-
settings: ContentSettings;
|
|
34
|
-
destinationPath: string;
|
|
35
|
-
}): V;
|
|
37
|
+
new ({ context, refName, settings, destinationPath }: ModelInsertableConstructorArgs): V;
|
|
36
38
|
id: string;
|
|
39
|
+
type: 'model';
|
|
40
|
+
_class: 'ModelInsertable';
|
|
37
41
|
entityType: EntityType;
|
|
38
42
|
toName: ({ refName, baseSettings }: ToModelNameArgs) => string;
|
|
39
43
|
toExportPath: ({ refName, baseSettings }: ToModelExportPathArgs) => string;
|
|
40
44
|
isSelected: ({ refName, baseSettings }: IsModelSelectedArgs) => boolean;
|
|
45
|
+
pinnable: false;
|
|
41
46
|
} & Function;
|
|
47
|
+
export {};
|
|
42
48
|
//# sourceMappingURL=ModelInsertable.d.ts.map
|
|
@@ -0,0 +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,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAErD,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,eAAe,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAAA;IAClD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,gBAAgB,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,GAAG;IAClD,KAAK,EACH,OAAO,EACP,OAAO,EACP,QAAQ,EACR,eAAe,EAChB,EAAE,8BAA8B,GAAG,CAAC,CAAA;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,iBAAiB,CAAA;IACzB,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,eAAe,KAAK,MAAM,CAAA;IAC9D,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,qBAAqB,KAAK,MAAM,CAAA;IAC1E,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAA;IACvE,QAAQ,EAAE,KAAK,CAAA;CAEhB,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { OperationInsertable } from './OperationInsertable.js';
|
|
2
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import type { GenerateContext, RegisterArgs } from '../../context/GenerateContext.js';
|
|
5
|
+
import type { GeneratedValue } from '../../types/GeneratedValue.js';
|
|
6
|
+
import type { GeneratorKey } from '../../types/GeneratorKeys.js';
|
|
7
|
+
import { ValueBase } from '../ValueBase.js';
|
|
8
|
+
import type { Definition } from '../Definition.js';
|
|
9
|
+
import type { Identifier } from '../Identifier.js';
|
|
10
|
+
import type { SchemaToValueFn, SchemaType, TypeSystemOutput } from '../../types/TypeSystem.js';
|
|
11
|
+
export type OperationBaseArgs = {
|
|
12
|
+
context: GenerateContext;
|
|
13
|
+
settings: ContentSettings;
|
|
14
|
+
generatorKey: GeneratorKey;
|
|
15
|
+
operation: OasOperation;
|
|
16
|
+
};
|
|
17
|
+
type CreateAndRegisterDefinition<Schema extends SchemaType> = {
|
|
18
|
+
schema: Schema;
|
|
19
|
+
identifier: Identifier;
|
|
20
|
+
schemaToValueFn: SchemaToValueFn;
|
|
21
|
+
};
|
|
22
|
+
export declare class OperationBase extends ValueBase {
|
|
23
|
+
settings: ContentSettings;
|
|
24
|
+
operation: OasOperation;
|
|
25
|
+
constructor({ context, generatorKey, settings, operation }: OperationBaseArgs);
|
|
26
|
+
insert<V extends GeneratedValue>(insertable: OperationInsertable<V>, operation: OasOperation): {
|
|
27
|
+
settings: ContentSettings;
|
|
28
|
+
definition: Definition<V>;
|
|
29
|
+
};
|
|
30
|
+
createAndRegisterDefinition<Schema extends SchemaType>({ schema, identifier, schemaToValueFn }: CreateAndRegisterDefinition<Schema>): Definition<TypeSystemOutput<Schema['type']>>;
|
|
31
|
+
register(args: Partial<RegisterArgs>): void;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=OperationBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBase.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D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CACjD,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CACjC;IASD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC;CAMrC"}
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const ValueBase_js_1 = require("
|
|
6
|
+
exports.OperationBase = void 0;
|
|
7
|
+
const ValueBase_js_1 = require("../ValueBase.js");
|
|
8
8
|
const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
|
|
9
9
|
class OperationBase extends ValueBase_js_1.ValueBase {
|
|
10
10
|
constructor({ context, generatorKey, settings, operation }) {
|
|
@@ -24,9 +24,10 @@ class OperationBase extends ValueBase_js_1.ValueBase {
|
|
|
24
24
|
this.operation = operation;
|
|
25
25
|
this.settings = settings;
|
|
26
26
|
}
|
|
27
|
-
insert(
|
|
27
|
+
insert(insertable, operation) {
|
|
28
28
|
const { settings, definition } = this.context.insert({
|
|
29
|
-
|
|
29
|
+
insertable,
|
|
30
|
+
operation,
|
|
30
31
|
generation: 'force',
|
|
31
32
|
destinationPath: this.settings.exportPath
|
|
32
33
|
});
|
|
@@ -49,36 +50,3 @@ class OperationBase extends ValueBase_js_1.ValueBase {
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
exports.OperationBase = OperationBase;
|
|
52
|
-
class ModelBase extends ValueBase_js_1.ValueBase {
|
|
53
|
-
constructor({ context, settings, generatorKey, refName }) {
|
|
54
|
-
super({ context, generatorKey });
|
|
55
|
-
Object.defineProperty(this, "settings", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: void 0
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(this, "refName", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
configurable: true,
|
|
64
|
-
writable: true,
|
|
65
|
-
value: void 0
|
|
66
|
-
});
|
|
67
|
-
this.refName = refName;
|
|
68
|
-
this.settings = settings;
|
|
69
|
-
}
|
|
70
|
-
transform(args) {
|
|
71
|
-
this.context.insert({
|
|
72
|
-
...args,
|
|
73
|
-
generation: 'force',
|
|
74
|
-
destinationPath: this.settings.exportPath
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
register(args) {
|
|
78
|
-
this.context.register({
|
|
79
|
-
...args,
|
|
80
|
-
destinationPath: args.destinationPath ?? this.settings.exportPath
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.ModelBase = ModelBase;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { OperationInsertable } from './OperationInsertable.js';
|
|
2
|
-
import type { OasOperation } from '
|
|
3
|
-
import type { ContentSettings } from '
|
|
4
|
-
import type { GeneratedDefintion, GenerationType } from '
|
|
5
|
-
import type { GeneratedValue } from '
|
|
6
|
-
import type { GenerateContext } from '
|
|
2
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
3
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
4
|
+
import type { GeneratedDefintion, GenerationType } from '../../types/GeneratedValue.js';
|
|
5
|
+
import type { GeneratedValue } from '../../types/GeneratedValue.js';
|
|
6
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
7
7
|
type CreateOperationArgs<V extends GeneratedValue, T extends GenerationType> = {
|
|
8
8
|
context: GenerateContext;
|
|
9
9
|
insertable: OperationInsertable<V>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationDriver.d.ts","sourceRoot":"","sources":["../../../src/dsl/operation/OperationDriver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,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|
exports.OperationDriver = void 0;
|
|
4
|
-
const mod_js_1 = require("
|
|
5
|
-
const Definition_js_1 = require("
|
|
6
|
-
const Identifier_js_1 = require("
|
|
4
|
+
const mod_js_1 = require("../../deps/jsr.io/@std/path/1.0.0/mod.js");
|
|
5
|
+
const Definition_js_1 = require("../Definition.js");
|
|
6
|
+
const Identifier_js_1 = require("../Identifier.js");
|
|
7
7
|
const ts_pattern_1 = require("ts-pattern");
|
|
8
|
-
const GeneratorKeys_js_1 = require("
|
|
8
|
+
const GeneratorKeys_js_1 = require("../../types/GeneratorKeys.js");
|
|
9
9
|
class OperationDriver {
|
|
10
10
|
constructor({ context, insertable, operation, generation, destinationPath }) {
|
|
11
11
|
Object.defineProperty(this, "context", {
|
|
@@ -96,7 +96,7 @@ class OperationDriver {
|
|
|
96
96
|
? value.tsType
|
|
97
97
|
: undefined;
|
|
98
98
|
const identifier = (0, ts_pattern_1.match)(this.insertable.entityType.type)
|
|
99
|
-
.with('
|
|
99
|
+
.with('variable', () => Identifier_js_1.Identifier.createValue({ name, tsType }))
|
|
100
100
|
.with('type', () => Identifier_js_1.Identifier.createType(name))
|
|
101
101
|
.exhaustive();
|
|
102
102
|
const definition = new Definition_js_1.Definition({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OasOperation } from '
|
|
2
|
-
import type { ContentSettings } from '
|
|
3
|
-
import type { BaseSettings } from '
|
|
4
|
-
import type { EntityType } from '
|
|
5
|
-
import type { GenerateContext } from '
|
|
6
|
-
type
|
|
1
|
+
import type { OasOperation } from '../../oas/operation/Operation.js';
|
|
2
|
+
import type { ContentSettings } from '../ContentSettings.js';
|
|
3
|
+
import type { BaseSettings } from '../../types/Settings.js';
|
|
4
|
+
import type { EntityType } from '../EntityType.js';
|
|
5
|
+
import type { GenerateContext } from '../../context/GenerateContext.js';
|
|
6
|
+
type OperationInsertableConstructorArgs = {
|
|
7
7
|
context: GenerateContext;
|
|
8
8
|
settings: ContentSettings;
|
|
9
9
|
operation: OasOperation;
|
|
@@ -27,18 +27,22 @@ export type OperationGenerator = {
|
|
|
27
27
|
new (context: GenerateContext): WithTransformOperation;
|
|
28
28
|
id: string;
|
|
29
29
|
type: 'operation';
|
|
30
|
-
|
|
30
|
+
_class: 'OperationGenerator';
|
|
31
|
+
pinnable: boolean;
|
|
31
32
|
isSupported: (operation: OasOperation) => boolean;
|
|
32
33
|
};
|
|
33
34
|
export type OperationInsertable<V> = {
|
|
34
35
|
prototype: V;
|
|
35
36
|
} & {
|
|
37
|
+
new ({ context, settings, operation }: OperationInsertableConstructorArgs): V;
|
|
36
38
|
id: string;
|
|
37
|
-
|
|
39
|
+
type: 'operation';
|
|
40
|
+
_class: 'OperationInsertable';
|
|
38
41
|
entityType: EntityType;
|
|
39
42
|
toName: ({ operation, baseSettings }: ToOperationNameArgs) => string;
|
|
40
43
|
toExportPath: ({ operation, baseSettings }: ToOperationExportPathArgs) => string;
|
|
41
44
|
isSelected: ({ operation, baseSettings }: IsOperationSelectedArgs) => boolean;
|
|
45
|
+
isSupported: (operation: OasOperation) => boolean;
|
|
42
46
|
} & Function;
|
|
43
47
|
export {};
|
|
44
48
|
//# sourceMappingURL=OperationInsertable.d.ts.map
|
|
@@ -0,0 +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,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAEvE,KAAK,kCAAkC,GAAG;IACxC,OAAO,EAAE,eAAe,CAAA;IACxB,QAAQ,EAAE,eAAe,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CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,uBAAuB,KAAK,OAAO,CAAA;IAC7E,WAAW,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,OAAO,CAAA;CAElD,GAAG,QAAQ,CAAA"}
|
package/script/mod.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import "./_dnt.polyfills.js";
|
|
|
2
2
|
export * from './context/CoreContext.js';
|
|
3
3
|
export * from './context/ParseContext.js';
|
|
4
4
|
export * from './context/GenerateContext.js';
|
|
5
|
-
export * from './dsl/
|
|
5
|
+
export * from './dsl/operation/OperationBase.js';
|
|
6
6
|
export * from './dsl/constants.js';
|
|
7
7
|
export * from './dsl/ContentSettings.js';
|
|
8
8
|
export * from './dsl/ContentSettings.js';
|
|
@@ -11,13 +11,12 @@ export * from './dsl/EntityType.js';
|
|
|
11
11
|
export * from './dsl/GeneratedValueList.js';
|
|
12
12
|
export * from './dsl/Identifier.js';
|
|
13
13
|
export * from './dsl/Import.js';
|
|
14
|
-
export * from './dsl/ModelInsertable.js';
|
|
15
|
-
export * from './dsl/ModelDriver.js';
|
|
16
|
-
export * from './dsl/OperationInsertable.js';
|
|
17
|
-
export * from './dsl/OperationDriver.js';
|
|
14
|
+
export * from './dsl/model/ModelInsertable.js';
|
|
15
|
+
export * from './dsl/model/ModelDriver.js';
|
|
16
|
+
export * from './dsl/operation/OperationInsertable.js';
|
|
17
|
+
export * from './dsl/operation/OperationDriver.js';
|
|
18
18
|
export * from './dsl/Stringable.js';
|
|
19
19
|
export * from './dsl/ValueBase.js';
|
|
20
|
-
export * from './dsl/withConfig.js';
|
|
21
20
|
export * from './transform/transform.js';
|
|
22
21
|
export * from './helpers/isImported.js';
|
|
23
22
|
export * from './helpers/naming.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;AAC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AA;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,sBAAsB,CAAA;AACpC,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/script/mod.js
CHANGED
|
@@ -18,7 +18,7 @@ require("./_dnt.polyfills.js");
|
|
|
18
18
|
__exportStar(require("./context/CoreContext.js"), exports);
|
|
19
19
|
__exportStar(require("./context/ParseContext.js"), exports);
|
|
20
20
|
__exportStar(require("./context/GenerateContext.js"), exports);
|
|
21
|
-
__exportStar(require("./dsl/
|
|
21
|
+
__exportStar(require("./dsl/operation/OperationBase.js"), exports);
|
|
22
22
|
__exportStar(require("./dsl/constants.js"), exports);
|
|
23
23
|
__exportStar(require("./dsl/ContentSettings.js"), exports);
|
|
24
24
|
__exportStar(require("./dsl/ContentSettings.js"), exports);
|
|
@@ -27,13 +27,12 @@ __exportStar(require("./dsl/EntityType.js"), exports);
|
|
|
27
27
|
__exportStar(require("./dsl/GeneratedValueList.js"), exports);
|
|
28
28
|
__exportStar(require("./dsl/Identifier.js"), exports);
|
|
29
29
|
__exportStar(require("./dsl/Import.js"), exports);
|
|
30
|
-
__exportStar(require("./dsl/ModelInsertable.js"), exports);
|
|
31
|
-
__exportStar(require("./dsl/ModelDriver.js"), exports);
|
|
32
|
-
__exportStar(require("./dsl/OperationInsertable.js"), exports);
|
|
33
|
-
__exportStar(require("./dsl/OperationDriver.js"), exports);
|
|
30
|
+
__exportStar(require("./dsl/model/ModelInsertable.js"), exports);
|
|
31
|
+
__exportStar(require("./dsl/model/ModelDriver.js"), exports);
|
|
32
|
+
__exportStar(require("./dsl/operation/OperationInsertable.js"), exports);
|
|
33
|
+
__exportStar(require("./dsl/operation/OperationDriver.js"), exports);
|
|
34
34
|
__exportStar(require("./dsl/Stringable.js"), exports);
|
|
35
35
|
__exportStar(require("./dsl/ValueBase.js"), exports);
|
|
36
|
-
__exportStar(require("./dsl/withConfig.js"), exports);
|
|
37
36
|
__exportStar(require("./transform/transform.js"), exports);
|
|
38
37
|
__exportStar(require("./helpers/isImported.js"), exports);
|
|
39
38
|
__exportStar(require("./helpers/naming.js"), exports);
|
|
@@ -23,6 +23,7 @@ export declare class OasComponents {
|
|
|
23
23
|
/** Static identifier property for OasComponents */
|
|
24
24
|
oasType: 'components';
|
|
25
25
|
constructor(fields: ComponentsFields);
|
|
26
|
+
toSchemasRefNames(): RefName[];
|
|
26
27
|
/** Record holding re-usable {@link OasSchema} objects or Refs */
|
|
27
28
|
get schemas(): Record<RefName, OasSchema | OasRef<'schema'>> | undefined;
|
|
28
29
|
/** Record holding re-usable {@link OasResponse} objects or Refs */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Components.d.ts","sourceRoot":"","sources":["../../../src/oas/components/Components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,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|
33
|
+
toSchemasRefNames() {
|
|
34
|
+
return Object.keys(__classPrivateFieldGet(this, _OasComponents_fields, "f").schemas ?? {});
|
|
35
|
+
}
|
|
33
36
|
/** Record holding re-usable {@link OasSchema} objects or Refs */
|
|
34
37
|
get schemas() {
|
|
35
38
|
return __classPrivateFieldGet(this, _OasComponents_fields, "f").schemas;
|
|
@@ -2,9 +2,9 @@ import type { OpenAPIV3 } from 'openapi-types';
|
|
|
2
2
|
import type { ParseContext } from '../../context/ParseContext.js';
|
|
3
3
|
import type { DocumentFields } from './Document.js';
|
|
4
4
|
type ToDocumentV3Args = {
|
|
5
|
-
|
|
5
|
+
documentObject: OpenAPIV3.Document;
|
|
6
6
|
context: ParseContext;
|
|
7
7
|
};
|
|
8
|
-
export declare const toDocumentFieldsV3: ({
|
|
8
|
+
export declare const toDocumentFieldsV3: ({ documentObject, context }: ToDocumentV3Args) => DocumentFields;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=toDocumentFieldsV3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,KAAK,gBAAgB,GAAG;IACtB,
|
|
1
|
+
{"version":3,"file":"toDocumentFieldsV3.d.ts","sourceRoot":"","sources":["../../../src/oas/document/toDocumentFieldsV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,KAAK,gBAAgB,GAAG;IACtB,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,kBAAkB,gCAG5B,gBAAgB,KAAG,cAkBrB,CAAA"}
|
|
@@ -5,8 +5,8 @@ const toTagsV3_js_1 = require("../tag/toTagsV3.js");
|
|
|
5
5
|
const toOperationsV3_js_1 = require("../operation/toOperationsV3.js");
|
|
6
6
|
const toComponentsV3_js_1 = require("../components/toComponentsV3.js");
|
|
7
7
|
const toInfoV3_js_1 = require("../info/toInfoV3.js");
|
|
8
|
-
const toDocumentFieldsV3 = ({
|
|
9
|
-
const { openapi, info, paths, components, tags, ...skipped } =
|
|
8
|
+
const toDocumentFieldsV3 = ({ documentObject, context }) => {
|
|
9
|
+
const { openapi, info, paths, components, tags, ...skipped } = documentObject;
|
|
10
10
|
context.logSkippedFields(skipped);
|
|
11
11
|
const fields = {
|
|
12
12
|
openapi,
|
package/script/oas/ref/Ref.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class OasRef<T extends OasRefData['refType']> {
|
|
|
16
16
|
#private;
|
|
17
17
|
oasType: 'ref';
|
|
18
18
|
type: 'ref';
|
|
19
|
-
constructor(fields: RefFields<T>,
|
|
19
|
+
constructor(fields: RefFields<T>, oasDocument: OasDocument);
|
|
20
20
|
resolve(lookupsPerformed?: number): ResolvedRef<T>;
|
|
21
21
|
isRef(): this is OasRef<T>;
|
|
22
22
|
resolveOnce(): OasRef<T> | ResolvedRef<T>;
|
|
@@ -24,7 +24,7 @@ export declare class OasRef<T extends OasRefData['refType']> {
|
|
|
24
24
|
get refType(): OasRefData['refType'];
|
|
25
25
|
get summary(): string | undefined;
|
|
26
26
|
get description(): string | undefined;
|
|
27
|
-
get
|
|
27
|
+
get oasDocument(): OasDocument;
|
|
28
28
|
}
|
|
29
29
|
export type OasComponentType = OasSchema | OasResponse | OasParameter | OasExample | OasRequestBody | OasHeader;
|
|
30
30
|
export type ResolvedRef<T extends OasRefData['refType']> = Extract<OasComponentType, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ref.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/Ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,IAAI;IACvD,OAAO,EAAE,CAAC,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,qBAAa,MAAM,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC;;IACjD,OAAO,EAAE,KAAK,CAAQ;IACtB,IAAI,EAAE,KAAK,CAAQ;gBAIP,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Ref.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/Ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,W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Ac,GACd,SAAS,CAAA;AAEb,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,IAAI,OAAO,CAChE,gBAAgB,EAChB;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CACf,CAAA"}
|
package/script/oas/ref/Ref.js
CHANGED
|
@@ -10,14 +10,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
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");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _OasRef_fields,
|
|
13
|
+
var _OasRef_fields, _OasRef_oasDocument;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OasRef = void 0;
|
|
16
16
|
const refFns_js_1 = require("../../helpers/refFns.js");
|
|
17
17
|
const ts_pattern_1 = require("ts-pattern");
|
|
18
18
|
const MAX_LOOKUPS = 10;
|
|
19
19
|
class OasRef {
|
|
20
|
-
constructor(fields,
|
|
20
|
+
constructor(fields, oasDocument) {
|
|
21
21
|
Object.defineProperty(this, "oasType", {
|
|
22
22
|
enumerable: true,
|
|
23
23
|
configurable: true,
|
|
@@ -31,9 +31,9 @@ class OasRef {
|
|
|
31
31
|
value: 'ref'
|
|
32
32
|
});
|
|
33
33
|
_OasRef_fields.set(this, void 0);
|
|
34
|
-
|
|
34
|
+
_OasRef_oasDocument.set(this, void 0);
|
|
35
35
|
__classPrivateFieldSet(this, _OasRef_fields, fields, "f");
|
|
36
|
-
__classPrivateFieldSet(this,
|
|
36
|
+
__classPrivateFieldSet(this, _OasRef_oasDocument, oasDocument, "f");
|
|
37
37
|
}
|
|
38
38
|
resolve(lookupsPerformed = 0) {
|
|
39
39
|
if (lookupsPerformed >= MAX_LOOKUPS) {
|
|
@@ -46,7 +46,7 @@ class OasRef {
|
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
48
|
resolveOnce() {
|
|
49
|
-
const c = this.
|
|
49
|
+
const c = this.oasDocument.components;
|
|
50
50
|
const refName = (0, refFns_js_1.toRefName)(this.$ref);
|
|
51
51
|
const refType = this.refType;
|
|
52
52
|
const resolved = (0, ts_pattern_1.match)(refType)
|
|
@@ -84,9 +84,9 @@ class OasRef {
|
|
|
84
84
|
get description() {
|
|
85
85
|
return __classPrivateFieldGet(this, _OasRef_fields, "f").description;
|
|
86
86
|
}
|
|
87
|
-
get
|
|
88
|
-
return __classPrivateFieldGet(this,
|
|
87
|
+
get oasDocument() {
|
|
88
|
+
return __classPrivateFieldGet(this, _OasRef_oasDocument, "f");
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
exports.OasRef = OasRef;
|
|
92
|
-
_OasRef_fields = new WeakMap(),
|
|
92
|
+
_OasRef_fields = new WeakMap(), _OasRef_oasDocument = new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import type { OperationGenerator } from '../dsl/OperationInsertable.js';
|
|
3
|
-
import type { ModelGenerator } from '../dsl/ModelInsertable.js';
|
|
2
|
+
import type { OperationGenerator } from '../dsl/operation/OperationInsertable.js';
|
|
3
|
+
import type { ModelGenerator } from '../dsl/model/ModelInsertable.js';
|
|
4
4
|
export declare const createServer: (generators: (OperationGenerator | ModelGenerator)[]) => Hono;
|
|
5
5
|
//# sourceMappingURL=createServer.d.ts.map
|