@teambit/semantics.entities.semantic-schema 0.0.77 → 0.0.79
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/dist/api-schema.d.ts +3 -3
- package/dist/api-schema.js +160 -115
- package/dist/api-schema.js.map +1 -1
- package/dist/export.d.ts +2 -2
- package/dist/export.js +27 -23
- package/dist/export.js.map +1 -1
- package/dist/index.js +134 -39
- package/dist/index.js.map +1 -1
- package/dist/schema-node-constructor.js +1 -1
- package/dist/schema-node-constructor.js.map +1 -1
- package/dist/schema-node.js +45 -40
- package/dist/schema-node.js.map +1 -1
- package/dist/schema-registry.js +36 -23
- package/dist/schema-registry.js.map +1 -1
- package/dist/schemas/array-literal-expression.js +43 -23
- package/dist/schemas/array-literal-expression.js.map +1 -1
- package/dist/schemas/class.d.ts +17 -17
- package/dist/schemas/class.js +116 -83
- package/dist/schemas/class.js.map +1 -1
- package/dist/schemas/conditional-type.js +58 -36
- package/dist/schemas/conditional-type.js.map +1 -1
- package/dist/schemas/constructor.js +46 -18
- package/dist/schemas/constructor.js.map +1 -1
- package/dist/schemas/decorator.d.ts +12 -12
- package/dist/schemas/decorator.js +64 -40
- package/dist/schemas/decorator.js.map +1 -1
- package/dist/schemas/docs/doc.d.ts +10 -10
- package/dist/schemas/docs/doc.js +66 -51
- package/dist/schemas/docs/doc.js.map +1 -1
- package/dist/schemas/docs/index.js +57 -10
- package/dist/schemas/docs/index.js.map +1 -1
- package/dist/schemas/docs/property-like-tag.d.ts +5 -5
- package/dist/schemas/docs/property-like-tag.js +51 -32
- package/dist/schemas/docs/property-like-tag.js.map +1 -1
- package/dist/schemas/docs/return-tag.d.ts +6 -6
- package/dist/schemas/docs/return-tag.js +47 -29
- package/dist/schemas/docs/return-tag.js.map +1 -1
- package/dist/schemas/docs/tag.d.ts +5 -5
- package/dist/schemas/docs/tag.js +68 -58
- package/dist/schemas/docs/tag.js.map +1 -1
- package/dist/schemas/enum-member.d.ts +11 -11
- package/dist/schemas/enum-member.js +59 -40
- package/dist/schemas/enum-member.js.map +1 -1
- package/dist/schemas/enum.d.ts +8 -8
- package/dist/schemas/enum.js +81 -52
- package/dist/schemas/enum.js.map +1 -1
- package/dist/schemas/export.d.ts +9 -9
- package/dist/schemas/export.js +84 -58
- package/dist/schemas/export.js.map +1 -1
- package/dist/schemas/expression-with-arguments.js +53 -31
- package/dist/schemas/expression-with-arguments.js.map +1 -1
- package/dist/schemas/function-like.d.ts +16 -16
- package/dist/schemas/function-like.js +136 -99
- package/dist/schemas/function-like.js.map +1 -1
- package/dist/schemas/get-accessor.js +67 -42
- package/dist/schemas/get-accessor.js.map +1 -1
- package/dist/schemas/ignored.d.ts +1 -1
- package/dist/schemas/ignored.js +49 -30
- package/dist/schemas/ignored.js.map +1 -1
- package/dist/schemas/index-signature.js +55 -28
- package/dist/schemas/index-signature.js.map +1 -1
- package/dist/schemas/index.js +620 -107
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/indexed-access-type.js +50 -30
- package/dist/schemas/indexed-access-type.js.map +1 -1
- package/dist/schemas/inference-type.d.ts +8 -8
- package/dist/schemas/inference-type.js +54 -38
- package/dist/schemas/inference-type.js.map +1 -1
- package/dist/schemas/interface.d.ts +11 -11
- package/dist/schemas/interface.js +100 -67
- package/dist/schemas/interface.js.map +1 -1
- package/dist/schemas/keyword-type.js +35 -22
- package/dist/schemas/keyword-type.js.map +1 -1
- package/dist/schemas/literal-type.js +35 -22
- package/dist/schemas/literal-type.js.map +1 -1
- package/dist/schemas/literal-value.js +36 -23
- package/dist/schemas/literal-value.js.map +1 -1
- package/dist/schemas/module.d.ts +1 -1
- package/dist/schemas/module.js +81 -57
- package/dist/schemas/module.js.map +1 -1
- package/dist/schemas/named-tuple.d.ts +3 -3
- package/dist/schemas/named-tuple.js +48 -28
- package/dist/schemas/named-tuple.js.map +1 -1
- package/dist/schemas/object-literal-expression.js +47 -30
- package/dist/schemas/object-literal-expression.js.map +1 -1
- package/dist/schemas/parameter.d.ts +5 -5
- package/dist/schemas/parameter.js +83 -61
- package/dist/schemas/parameter.js.map +1 -1
- package/dist/schemas/parenthesized-type.js +45 -26
- package/dist/schemas/parenthesized-type.js.map +1 -1
- package/dist/schemas/property-assignment.d.ts +10 -10
- package/dist/schemas/property-assignment.js +61 -34
- package/dist/schemas/property-assignment.js.map +1 -1
- package/dist/schemas/set-accessor.d.ts +2 -2
- package/dist/schemas/set-accessor.js +60 -35
- package/dist/schemas/set-accessor.js.map +1 -1
- package/dist/schemas/template-literal-type-span.js +48 -28
- package/dist/schemas/template-literal-type-span.js.map +1 -1
- package/dist/schemas/template-literal-type.js +47 -27
- package/dist/schemas/template-literal-type.js.map +1 -1
- package/dist/schemas/this-type.js +29 -19
- package/dist/schemas/this-type.js.map +1 -1
- package/dist/schemas/tuple-type.js +42 -23
- package/dist/schemas/tuple-type.js.map +1 -1
- package/dist/schemas/type-array.js +45 -26
- package/dist/schemas/type-array.js.map +1 -1
- package/dist/schemas/type-intersection.js +45 -26
- package/dist/schemas/type-intersection.js.map +1 -1
- package/dist/schemas/type-literal.js +56 -37
- package/dist/schemas/type-literal.js.map +1 -1
- package/dist/schemas/type-operator.js +48 -28
- package/dist/schemas/type-operator.js.map +1 -1
- package/dist/schemas/type-predicate.d.ts +1 -1
- package/dist/schemas/type-predicate.js +56 -36
- package/dist/schemas/type-predicate.js.map +1 -1
- package/dist/schemas/type-query.js +51 -31
- package/dist/schemas/type-query.js.map +1 -1
- package/dist/schemas/type-ref.d.ts +8 -8
- package/dist/schemas/type-ref.js +138 -101
- package/dist/schemas/type-ref.js.map +1 -1
- package/dist/schemas/type-union.js +50 -31
- package/dist/schemas/type-union.js.map +1 -1
- package/dist/schemas/type.js +74 -43
- package/dist/schemas/type.js.map +1 -1
- package/dist/schemas/unimplemented-schema.js +37 -24
- package/dist/schemas/unimplemented-schema.js.map +1 -1
- package/dist/schemas/unknown-schema.js +37 -24
- package/dist/schemas/unknown-schema.js.map +1 -1
- package/dist/schemas/unresolved-schema.js +32 -22
- package/dist/schemas/unresolved-schema.js.map +1 -1
- package/dist/schemas/variable-like.d.ts +11 -11
- package/dist/schemas/variable-like.js +84 -51
- package/dist/schemas/variable-like.js.map +1 -1
- package/dist/type.js +1 -1
- package/dist/type.js.map +1 -1
- package/dist/unknown-schema-factory.js +13 -7
- package/dist/unknown-schema-factory.js.map +1 -1
- package/package.json +4 -4
- package/schemas/type.ts +2 -2
- package/types/asset.d.ts +15 -3
- package/dist/preview-1736711473672.js +0 -7
|
@@ -1,47 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.EnumMemberSchema = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, signature: this.signature, value: this.value, doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject() });
|
|
7
|
+
function _schemaNode() {
|
|
8
|
+
const data = require("../schema-node");
|
|
9
|
+
_schemaNode = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _docs() {
|
|
15
|
+
const data = require("./docs");
|
|
16
|
+
_docs = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
class EnumMemberSchema extends _schemaNode().SchemaNode {
|
|
22
|
+
constructor(location, name, signature, value, doc) {
|
|
23
|
+
super();
|
|
24
|
+
this.location = location;
|
|
25
|
+
this.name = name;
|
|
26
|
+
this.signature = signature;
|
|
27
|
+
this.value = value;
|
|
28
|
+
this.doc = doc;
|
|
29
|
+
}
|
|
30
|
+
toString() {
|
|
31
|
+
if (!this.value) return this.name;
|
|
32
|
+
return `${this.name}=${this.value}`;
|
|
33
|
+
}
|
|
34
|
+
toFullSignature(options) {
|
|
35
|
+
let result = '';
|
|
36
|
+
if (options?.showDocs && this.doc) {
|
|
37
|
+
result += `${this.doc.toFullSignature()}\n`;
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const value = obj.value;
|
|
42
|
-
const doc = obj.doc ? docs_1.DocSchema.fromObject(obj.doc) : undefined;
|
|
43
|
-
return new EnumMemberSchema(location, name, signature, value, doc);
|
|
39
|
+
if (this.value !== undefined) {
|
|
40
|
+
result += `${this.name} = ${this.value}`;
|
|
41
|
+
} else {
|
|
42
|
+
result += `${this.name}`;
|
|
44
43
|
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
toObject() {
|
|
47
|
+
return {
|
|
48
|
+
...super.toObject(),
|
|
49
|
+
name: this.name,
|
|
50
|
+
signature: this.signature,
|
|
51
|
+
value: this.value,
|
|
52
|
+
doc: this.doc?.toObject()
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static fromObject(obj) {
|
|
56
|
+
const location = obj.location;
|
|
57
|
+
const name = obj.name;
|
|
58
|
+
const signature = obj.signature;
|
|
59
|
+
const value = obj.value;
|
|
60
|
+
const doc = obj.doc ? _docs().DocSchema.fromObject(obj.doc) : undefined;
|
|
61
|
+
return new EnumMemberSchema(location, name, signature, value, doc);
|
|
62
|
+
}
|
|
45
63
|
}
|
|
46
64
|
exports.EnumMemberSchema = EnumMemberSchema;
|
|
65
|
+
|
|
47
66
|
//# sourceMappingURL=enum-member.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaNode","data","require","_docs","EnumMemberSchema","SchemaNode","constructor","location","name","signature","value","doc","toString","toFullSignature","options","result","showDocs","undefined","toObject","fromObject","obj","DocSchema","exports"],"sources":["enum-member.ts"],"sourcesContent":["import { SchemaLocation, SchemaNode } from '../schema-node';\nimport { DocSchema } from './docs';\n\nexport class EnumMemberSchema extends SchemaNode {\n readonly doc?: DocSchema;\n\n constructor(\n readonly location: SchemaLocation,\n readonly name: string,\n readonly signature: string,\n readonly value?: string,\n doc?: DocSchema\n ) {\n super();\n this.doc = doc;\n }\n\n toString() {\n if (!this.value) return this.name;\n return `${this.name}=${this.value}`;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n let result = '';\n\n if (options?.showDocs && this.doc) {\n result += `${this.doc.toFullSignature()}\\n`;\n }\n\n if (this.value !== undefined) {\n result += `${this.name} = ${this.value}`;\n } else {\n result += `${this.name}`;\n }\n\n return result;\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n signature: this.signature,\n value: this.value,\n doc: this.doc?.toObject(),\n };\n }\n\n static fromObject(obj: Record<string, any>): EnumMemberSchema {\n const location = obj.location;\n const name = obj.name;\n const signature = obj.signature;\n const value = obj.value;\n const doc = obj.doc ? DocSchema.fromObject(obj.doc) : undefined;\n return new EnumMemberSchema(location, name, signature, value, doc);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,gBAAgB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,GAAGa,GAAG,CAACb,QAAQ;IAC7B,MAAMC,IAAI,GAAGY,GAAG,CAACZ,IAAI;IACrB,MAAMC,SAAS,GAAGW,GAAG,CAACX,SAAS;IAC/B,MAAMC,KAAK,GAAGU,GAAG,CAACV,KAAK;IACvB,MAAMC,GAAG,GAAGS,GAAG,CAACT,GAAG,GAAGU,iBAAS,CAACF,UAAU,CAACC,GAAG,CAACT,GAAG,CAAC,GAAGM,SAAS;IAC/D,OAAO,IAAIb,gBAAgB,CAACG,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,KAAK,EAAEC,GAAG,CAAC;EACpE;AACF;AAACW,OAAA,CAAAlB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
package/dist/schemas/enum.d.ts
CHANGED
|
@@ -17,20 +17,20 @@ export declare class EnumSchema extends SchemaNode {
|
|
|
17
17
|
members: Record<string, any>[];
|
|
18
18
|
doc: {
|
|
19
19
|
__schema: string;
|
|
20
|
-
name: string;
|
|
20
|
+
name: string | undefined;
|
|
21
21
|
location: SchemaLocation;
|
|
22
|
-
signature: string;
|
|
22
|
+
signature: string | undefined;
|
|
23
23
|
raw: string;
|
|
24
|
-
comment: string;
|
|
24
|
+
comment: string | undefined;
|
|
25
25
|
tags: {
|
|
26
26
|
__schema: string;
|
|
27
27
|
location: SchemaLocation;
|
|
28
|
-
name: string;
|
|
29
|
-
signature: string;
|
|
28
|
+
name: string | undefined;
|
|
29
|
+
signature: string | undefined;
|
|
30
30
|
tagName: string;
|
|
31
|
-
comment: string;
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
31
|
+
comment: string | undefined;
|
|
32
|
+
}[] | undefined;
|
|
33
|
+
} | undefined;
|
|
34
34
|
signature: string;
|
|
35
35
|
};
|
|
36
36
|
static fromObject(obj: Record<string, any>): EnumSchema;
|
package/dist/schemas/enum.js
CHANGED
|
@@ -1,58 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
6
|
exports.EnumSchema = void 0;
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
7
|
+
function _chalk() {
|
|
8
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
9
|
+
_chalk = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _schemaNode() {
|
|
15
|
+
const data = require("../schema-node");
|
|
16
|
+
_schemaNode = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _docs() {
|
|
22
|
+
const data = require("./docs");
|
|
23
|
+
_docs = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _() {
|
|
29
|
+
const data = require("..");
|
|
30
|
+
_ = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
36
|
+
class EnumSchema extends _schemaNode().SchemaNode {
|
|
37
|
+
constructor(location, name, members, signature, doc) {
|
|
38
|
+
super();
|
|
39
|
+
this.location = location;
|
|
40
|
+
this.name = name;
|
|
41
|
+
this.signature = signature;
|
|
42
|
+
this.doc = doc;
|
|
43
|
+
this.members = members;
|
|
44
|
+
}
|
|
45
|
+
getNodes() {
|
|
46
|
+
return this.members;
|
|
47
|
+
}
|
|
48
|
+
toString(options) {
|
|
49
|
+
const boldUnderline = options?.color ? _chalk().default.bold.underline : str => str;
|
|
50
|
+
const membersStr = this.members.map(m => `* ${m.toString(options)}`).join('\n');
|
|
51
|
+
return `${boldUnderline(this.name)}\n${membersStr}`;
|
|
52
|
+
}
|
|
53
|
+
toFullSignature(options) {
|
|
54
|
+
let result = '';
|
|
55
|
+
if (options?.showDocs && this.doc) {
|
|
56
|
+
result += `${this.doc.toFullSignature()}\n`;
|
|
55
57
|
}
|
|
58
|
+
result += `enum ${this.name} {\n`;
|
|
59
|
+
const membersStr = this.members.map(member => {
|
|
60
|
+
const memberStr = member.toFullSignature(options);
|
|
61
|
+
return ` ${memberStr}`;
|
|
62
|
+
}).join(',\n');
|
|
63
|
+
result += `${membersStr}\n`;
|
|
64
|
+
result += `}`;
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
toObject() {
|
|
68
|
+
return {
|
|
69
|
+
...super.toObject(),
|
|
70
|
+
name: this.name,
|
|
71
|
+
members: this.members.map(member => member.toObject()),
|
|
72
|
+
doc: this.doc?.toObject(),
|
|
73
|
+
signature: this.signature
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static fromObject(obj) {
|
|
77
|
+
const location = obj.location;
|
|
78
|
+
const name = obj.name;
|
|
79
|
+
const members = obj.members.map(member => _().SchemaRegistry.fromObject(member));
|
|
80
|
+
const signature = obj.signature;
|
|
81
|
+
const doc = obj.doc ? _docs().DocSchema.fromObject(obj.doc) : undefined;
|
|
82
|
+
return new EnumSchema(location, name, members, signature, doc);
|
|
83
|
+
}
|
|
56
84
|
}
|
|
57
85
|
exports.EnumSchema = EnumSchema;
|
|
86
|
+
|
|
58
87
|
//# sourceMappingURL=enum.js.map
|
package/dist/schemas/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_schemaNode","_docs","_","e","__esModule","default","EnumSchema","SchemaNode","constructor","location","name","members","signature","doc","getNodes","toString","options","boldUnderline","color","chalk","bold","underline","str","membersStr","map","m","join","toFullSignature","result","showDocs","member","memberStr","toObject","fromObject","obj","SchemaRegistry","DocSchema","undefined","exports"],"sources":["enum.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { SchemaLocation, SchemaNode } from '../schema-node';\nimport { DocSchema } from './docs';\nimport { SchemaRegistry } from '..';\n\nexport class EnumSchema extends SchemaNode {\n readonly doc?: DocSchema;\n readonly members: SchemaNode[];\n\n constructor(\n readonly location: SchemaLocation,\n readonly name: string,\n members: SchemaNode[],\n readonly signature: string,\n doc?: DocSchema\n ) {\n super();\n this.doc = doc;\n this.members = members;\n }\n\n getNodes() {\n return this.members;\n }\n\n toString(options) {\n const boldUnderline = options?.color ? chalk.bold.underline : (str: string) => str;\n const membersStr = this.members.map((m) => `* ${m.toString(options)}`).join('\\n');\n return `${boldUnderline(this.name)}\\n${membersStr}`;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n let result = '';\n\n if (options?.showDocs && this.doc) {\n result += `${this.doc.toFullSignature()}\\n`;\n }\n\n result += `enum ${this.name} {\\n`;\n\n const membersStr = this.members\n .map((member) => {\n const memberStr = member.toFullSignature(options);\n return ` ${memberStr}`;\n })\n .join(',\\n');\n\n result += `${membersStr}\\n`;\n\n result += `}`;\n\n return result;\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n members: this.members.map((member) => member.toObject()),\n doc: this.doc?.toObject(),\n signature: this.signature,\n };\n }\n\n static fromObject(obj: Record<string, any>): EnumSchema {\n const location = obj.location;\n const name = obj.name;\n const members = obj.members.map((member: any) => SchemaRegistry.fromObject(member));\n const signature = obj.signature;\n const doc = obj.doc ? DocSchema.fromObject(obj.doc) : undefined;\n return new EnumSchema(location, name, members, signature, doc);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,EAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,CAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoC,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7B,MAAMG,UAAU,SAASC,wBAAU,CAAC;EAIzCC,WAAWA,CACAC,QAAwB,EACxBC,IAAY,EACrBC,OAAqB,EACZC,SAAiB,EAC1BC,GAAe,EACf;IACA,KAAK,CAAC,CAAC;IAAC,KANCJ,QAAwB,GAAxBA,QAAwB;IAAA,KACxBC,IAAY,GAAZA,IAAY;IAAA,KAEZE,SAAiB,GAAjBA,SAAiB;IAI1B,IAAI,CAACC,GAAG,GAAGA,GAAG;IACd,IAAI,CAACF,OAAO,GAAGA,OAAO;EACxB;EAEAG,QAAQA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MACxDnB,GAAG,EAAE,IAAI,CAACA,GAAG,EAAEmB,QAAQ,CAAC,CAAC;MACzBpB,SAAS,EAAE,IAAI,CAACA;IAClB,CAAC;EACH;EAEA,OAAOqB,UAAUA,CAACC,GAAwB,EAAc;IACtD,MAAMzB,QAAQ,GAAGyB,GAAG,CAACzB,QAAQ;IAC7B,MAAMC,IAAI,GAAGwB,GAAG,CAACxB,IAAI;IACrB,MAAMC,OAAO,GAAGuB,GAAG,CAACvB,OAAO,CAACa,GAAG,CAAEM,MAAW,IAAKK,kBAAc,CAACF,UAAU,CAACH,MAAM,CAAC,CAAC;IACnF,MAAMlB,SAAS,GAAGsB,GAAG,CAACtB,SAAS;IAC/B,MAAMC,GAAG,GAAGqB,GAAG,CAACrB,GAAG,GAAGuB,iBAAS,CAACH,UAAU,CAACC,GAAG,CAACrB,GAAG,CAAC,GAAGwB,SAAS;IAC/D,OAAO,IAAI/B,UAAU,CAACG,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAEC,GAAG,CAAC;EAChE;AACF;AAACyB,OAAA,CAAAhC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/dist/schemas/export.d.ts
CHANGED
|
@@ -18,23 +18,23 @@ export declare class ExportSchema extends SchemaNode {
|
|
|
18
18
|
name: string;
|
|
19
19
|
doc: {
|
|
20
20
|
__schema: string;
|
|
21
|
-
name: string;
|
|
21
|
+
name: string | undefined;
|
|
22
22
|
location: SchemaLocation;
|
|
23
|
-
signature: string;
|
|
23
|
+
signature: string | undefined;
|
|
24
24
|
raw: string;
|
|
25
|
-
comment: string;
|
|
25
|
+
comment: string | undefined;
|
|
26
26
|
tags: {
|
|
27
27
|
__schema: string;
|
|
28
28
|
location: SchemaLocation;
|
|
29
|
-
name: string;
|
|
30
|
-
signature: string;
|
|
29
|
+
name: string | undefined;
|
|
30
|
+
signature: string | undefined;
|
|
31
31
|
tagName: string;
|
|
32
|
-
comment: string;
|
|
33
|
-
}[];
|
|
34
|
-
};
|
|
32
|
+
comment: string | undefined;
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
} | undefined;
|
|
35
35
|
location: SchemaLocation;
|
|
36
36
|
exportNode: Record<string, any>;
|
|
37
|
-
alias: string;
|
|
37
|
+
alias: string | undefined;
|
|
38
38
|
};
|
|
39
39
|
static fromObject(obj: Record<string, any>): ExportSchema;
|
|
40
40
|
static isExportSchema(node: SchemaNode): node is ExportSchema;
|
package/dist/schemas/export.js
CHANGED
|
@@ -1,66 +1,92 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.ExportSchema = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
signature += `export { ${originalName} };\n`;
|
|
44
|
-
}
|
|
45
|
-
const exportNodeSignature = this.exportNode.toFullSignature(options);
|
|
46
|
-
signature += `\n${exportNodeSignature}`;
|
|
47
|
-
return signature;
|
|
48
|
-
}
|
|
49
|
-
toObject() {
|
|
50
|
-
var _a;
|
|
51
|
-
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), location: this.location, exportNode: this.exportNode.toObject(), alias: this.alias });
|
|
7
|
+
function _schemaNode() {
|
|
8
|
+
const data = require("../schema-node");
|
|
9
|
+
_schemaNode = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _docs() {
|
|
15
|
+
const data = require("./docs");
|
|
16
|
+
_docs = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _schemaRegistry() {
|
|
22
|
+
const data = require("../schema-registry");
|
|
23
|
+
_schemaRegistry = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
class ExportSchema extends _schemaNode().SchemaNode {
|
|
29
|
+
constructor(location, name, exportNode, alias, doc) {
|
|
30
|
+
super();
|
|
31
|
+
this.location = location;
|
|
32
|
+
this.name = name;
|
|
33
|
+
this.exportNode = exportNode;
|
|
34
|
+
this.alias = alias;
|
|
35
|
+
this.doc = doc;
|
|
36
|
+
this.signature = exportNode.signature || this.toFullSignature();
|
|
37
|
+
}
|
|
38
|
+
toString(options) {
|
|
39
|
+
let signature = '';
|
|
40
|
+
const alias = this.alias || this.name;
|
|
41
|
+
const originalName = this.exportNode.name || this.name;
|
|
42
|
+
if (alias !== originalName) {
|
|
43
|
+
signature += `export { ${originalName} as ${alias} };\n`;
|
|
44
|
+
} else {
|
|
45
|
+
signature += `export { ${originalName} };\n`;
|
|
52
46
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
const exportNodeSignature = this.exportNode.toString(options);
|
|
48
|
+
signature += `\n${exportNodeSignature}`;
|
|
49
|
+
return signature;
|
|
50
|
+
}
|
|
51
|
+
toFullSignature(options) {
|
|
52
|
+
let signature = '';
|
|
53
|
+
if (options?.showDocs && this.doc) {
|
|
54
|
+
const docString = this.doc.toFullSignature();
|
|
55
|
+
signature += `${docString}\n`;
|
|
60
56
|
}
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
const alias = this.alias || this.name;
|
|
58
|
+
const originalName = this.exportNode.name || this.name;
|
|
59
|
+
if (alias !== originalName) {
|
|
60
|
+
signature += `export { ${originalName} as ${alias} };\n`;
|
|
61
|
+
} else {
|
|
62
|
+
signature += `export { ${originalName} };\n`;
|
|
63
63
|
}
|
|
64
|
+
const exportNodeSignature = this.exportNode.toFullSignature(options);
|
|
65
|
+
signature += `\n${exportNodeSignature}`;
|
|
66
|
+
return signature;
|
|
67
|
+
}
|
|
68
|
+
toObject() {
|
|
69
|
+
return {
|
|
70
|
+
...super.toObject(),
|
|
71
|
+
name: this.name,
|
|
72
|
+
doc: this.doc?.toObject(),
|
|
73
|
+
location: this.location,
|
|
74
|
+
exportNode: this.exportNode.toObject(),
|
|
75
|
+
alias: this.alias
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static fromObject(obj) {
|
|
79
|
+
const name = obj.name;
|
|
80
|
+
const location = obj.location;
|
|
81
|
+
const exportNode = _schemaRegistry().SchemaRegistry.fromObject(obj.exportNode);
|
|
82
|
+
const alias = obj.alias;
|
|
83
|
+
const doc = obj.doc ? _docs().DocSchema.fromObject(obj.doc) : undefined;
|
|
84
|
+
return new ExportSchema(location, name, exportNode, alias, doc);
|
|
85
|
+
}
|
|
86
|
+
static isExportSchema(node) {
|
|
87
|
+
return 'exportNode' in node;
|
|
88
|
+
}
|
|
64
89
|
}
|
|
65
90
|
exports.ExportSchema = ExportSchema;
|
|
91
|
+
|
|
66
92
|
//# sourceMappingURL=export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaNode","data","require","_docs","_schemaRegistry","ExportSchema","SchemaNode","constructor","location","name","exportNode","alias","doc","signature","toFullSignature","toString","options","originalName","exportNodeSignature","showDocs","docString","toObject","fromObject","obj","SchemaRegistry","DocSchema","undefined","isExportSchema","node","exports"],"sources":["export.ts"],"sourcesContent":["import { SchemaNode, SchemaLocation } from '../schema-node';\nimport { DocSchema } from './docs';\nimport { SchemaRegistry } from '../schema-registry';\n\nexport class ExportSchema extends SchemaNode {\n alias?: string;\n exportNode: SchemaNode;\n readonly doc?: DocSchema;\n readonly signature?: string;\n\n constructor(\n readonly location: SchemaLocation,\n readonly name: string,\n exportNode: SchemaNode,\n alias?: string,\n doc?: DocSchema\n ) {\n super();\n this.exportNode = exportNode;\n this.alias = alias;\n this.doc = doc;\n this.signature = exportNode.signature || this.toFullSignature();\n }\n\n toString(options?: { color?: boolean }): string {\n let signature = '';\n\n const alias = this.alias || this.name;\n const originalName = this.exportNode.name || this.name;\n\n if (alias !== originalName) {\n signature += `export { ${originalName} as ${alias} };\\n`;\n } else {\n signature += `export { ${originalName} };\\n`;\n }\n\n const exportNodeSignature = this.exportNode.toString(options);\n\n signature += `\\n${exportNodeSignature}`;\n\n return signature;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n let signature = '';\n\n if (options?.showDocs && this.doc) {\n const docString = this.doc.toFullSignature();\n signature += `${docString}\\n`;\n }\n\n const alias = this.alias || this.name;\n const originalName = this.exportNode.name || this.name;\n\n if (alias !== originalName) {\n signature += `export { ${originalName} as ${alias} };\\n`;\n } else {\n signature += `export { ${originalName} };\\n`;\n }\n\n const exportNodeSignature = this.exportNode.toFullSignature(options);\n\n signature += `\\n${exportNodeSignature}`;\n\n return signature;\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n doc: this.doc?.toObject(),\n location: this.location,\n exportNode: this.exportNode.toObject(),\n alias: this.alias,\n };\n }\n\n static fromObject(obj: Record<string, any>): ExportSchema {\n const name = obj.name;\n const location = obj.location;\n const exportNode = SchemaRegistry.fromObject(obj.exportNode);\n const alias = obj.alias;\n const doc = obj.doc ? DocSchema.fromObject(obj.doc) : undefined;\n return new ExportSchema(location, name, exportNode, alias, doc);\n }\n\n static isExportSchema(node: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,GAAGc,GAAG,CAACd,IAAI;IACrB,MAAMD,QAAQ,GAAGe,GAAG,CAACf,QAAQ;IAC7B,MAAME,UAAU,GAAGc,gCAAc,CAACF,UAAU,CAACC,GAAG,CAACb,UAAU,CAAC;IAC5D,MAAMC,KAAK,GAAGY,GAAG,CAACZ,KAAK;IACvB,MAAMC,GAAG,GAAGW,GAAG,CAACX,GAAG,GAAGa,iBAAS,CAACH,UAAU,CAACC,GAAG,CAACX,GAAG,CAAC,GAAGc,SAAS;IAC/D,OAAO,IAAIrB,YAAY,CAACG,QAAQ,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,GAAG,CAAC;EACjE;EAEA,OAAOe,cAAcA,CAACC,IAAgB,EAAwB;IAC5D,OAAO,YAAY,IAAIA,IAAI;EAC7B;AACF;AAACC,OAAA,CAAAxB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -1,37 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.ExpressionWithTypeArgumentsSchema = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
7
|
+
function _schemaNode() {
|
|
8
|
+
const data = require("../schema-node");
|
|
9
|
+
_schemaNode = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _schemaRegistry() {
|
|
15
|
+
const data = require("../schema-registry");
|
|
16
|
+
_schemaRegistry = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
class ExpressionWithTypeArgumentsSchema extends _schemaNode().SchemaNode {
|
|
22
|
+
constructor(typeArgs, expression, name, location) {
|
|
23
|
+
super();
|
|
24
|
+
this.name = name;
|
|
25
|
+
this.location = location;
|
|
26
|
+
this.typeArgs = typeArgs;
|
|
27
|
+
this.expression = expression;
|
|
28
|
+
}
|
|
29
|
+
toString() {
|
|
30
|
+
return this.name;
|
|
31
|
+
}
|
|
32
|
+
toFullSignature(options) {
|
|
33
|
+
let result = this.name;
|
|
34
|
+
if (this.typeArgs && this.typeArgs.length > 0) {
|
|
35
|
+
const typeArgsStr = this.typeArgs.map(arg => arg.toFullSignature(options)).join(', ');
|
|
36
|
+
result += `<${typeArgsStr}>`;
|
|
34
37
|
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
toObject() {
|
|
41
|
+
return {
|
|
42
|
+
...super.toObject(),
|
|
43
|
+
name: this.name,
|
|
44
|
+
location: this.location,
|
|
45
|
+
typeArgs: this.typeArgs.map(typeArg => typeArg.toObject()),
|
|
46
|
+
expression: this.expression
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static fromObject(obj) {
|
|
50
|
+
const name = obj.name;
|
|
51
|
+
const location = obj.location;
|
|
52
|
+
const typeArgs = obj.typeArgs.map(typeArg => _schemaRegistry().SchemaRegistry.fromObject(typeArg));
|
|
53
|
+
const expression = _schemaRegistry().SchemaRegistry.fromObject(obj.expression);
|
|
54
|
+
return new ExpressionWithTypeArgumentsSchema(typeArgs, expression, name, location);
|
|
55
|
+
}
|
|
35
56
|
}
|
|
36
57
|
exports.ExpressionWithTypeArgumentsSchema = ExpressionWithTypeArgumentsSchema;
|
|
58
|
+
|
|
37
59
|
//# sourceMappingURL=expression-with-arguments.js.map
|