@teambit/semantics.entities.semantic-schema 0.0.78 → 0.0.80
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/types/asset.d.ts +15 -3
- package/dist/preview-1737084088495.js +0 -7
package/dist/schemas/type-ref.js
CHANGED
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
6
|
exports.TypeRefSchema = void 0;
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
function _component() {
|
|
8
|
+
const data = require("@teambit/component");
|
|
9
|
+
_component = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _chalk() {
|
|
15
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
16
|
+
_chalk = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _schemaNode() {
|
|
22
|
+
const data = require("../schema-node");
|
|
23
|
+
_schemaNode = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _schemaRegistry() {
|
|
29
|
+
const data = require("../schema-registry");
|
|
30
|
+
_schemaRegistry = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
36
|
/**
|
|
12
37
|
* can be one of the following:
|
|
13
38
|
* 1. a reference to another "export" in the same component
|
|
@@ -15,105 +40,117 @@ const schema_registry_1 = require("../schema-registry");
|
|
|
15
40
|
* 3. a reference to another component.
|
|
16
41
|
* 4. a reference to a package.
|
|
17
42
|
*/
|
|
18
|
-
class TypeRefSchema extends
|
|
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
|
-
|
|
55
|
-
nameToString(options) {
|
|
56
|
-
const dim = (options === null || options === void 0 ? void 0 : options.color) ? chalk_1.default.dim : (str) => str;
|
|
57
|
-
if (this.componentId) {
|
|
58
|
-
const compStr = dim(`(component: ${this.componentId.toStringWithoutVersion()})`);
|
|
59
|
-
return `${compStr} ${this.name}`;
|
|
60
|
-
}
|
|
61
|
-
if (this.packageName) {
|
|
62
|
-
const pkgStr = dim(`(package: ${this.packageName})`);
|
|
63
|
-
return `${pkgStr} ${this.name}`;
|
|
64
|
-
}
|
|
65
|
-
return this.name;
|
|
66
|
-
}
|
|
67
|
-
toFullSignature(options) {
|
|
68
|
-
let signature = this.name;
|
|
69
|
-
if (this.typeArgs && this.typeArgs.length > 0) {
|
|
70
|
-
const argsSignatures = this.typeArgs.map((arg) => arg.toFullSignature(options)).join(', ');
|
|
71
|
-
signature += `<${argsSignatures}>`;
|
|
72
|
-
}
|
|
73
|
-
if ((options === null || options === void 0 ? void 0 : options.showDocs) && this.doc) {
|
|
74
|
-
const docString = this.doc.toFullSignature();
|
|
75
|
-
signature = `${docString}\n${signature}`;
|
|
76
|
-
}
|
|
77
|
-
return signature;
|
|
43
|
+
class TypeRefSchema extends _schemaNode().SchemaNode {
|
|
44
|
+
/**
|
|
45
|
+
* optional type arguments, e.g. type Foo = Bar<X, Y>. The X and Y are type arguments.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
constructor(location,
|
|
49
|
+
/**
|
|
50
|
+
* name of the reference to type.
|
|
51
|
+
*/
|
|
52
|
+
name,
|
|
53
|
+
/**
|
|
54
|
+
* target component id. existing if the type is defined in another component.
|
|
55
|
+
*/
|
|
56
|
+
componentId,
|
|
57
|
+
/**
|
|
58
|
+
* target package name. existing if type is defined in different package.
|
|
59
|
+
*/
|
|
60
|
+
packageName,
|
|
61
|
+
/**
|
|
62
|
+
* if the reference is not exported from the component, it can be internal to the file.
|
|
63
|
+
*/
|
|
64
|
+
internalFilePath) {
|
|
65
|
+
super();
|
|
66
|
+
this.location = location;
|
|
67
|
+
this.name = name;
|
|
68
|
+
this.packageName = packageName;
|
|
69
|
+
this.internalFilePath = internalFilePath;
|
|
70
|
+
this.componentId = componentId;
|
|
71
|
+
}
|
|
72
|
+
withTypeArgs(typeArgs) {
|
|
73
|
+
this.typeArgs = typeArgs;
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
toString(options) {
|
|
77
|
+
const name = this.nameToString(options);
|
|
78
|
+
if (!this.typeArgs) {
|
|
79
|
+
return name;
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const args = this.typeArgs.map(arg => arg.toString(options)).join(', ');
|
|
82
|
+
return `${name}<${args}>`;
|
|
83
|
+
}
|
|
84
|
+
nameToString(options) {
|
|
85
|
+
const dim = options?.color ? _chalk().default.dim : str => str;
|
|
86
|
+
if (this.componentId) {
|
|
87
|
+
const compStr = dim(`(component: ${this.componentId.toStringWithoutVersion()})`);
|
|
88
|
+
return `${compStr} ${this.name}`;
|
|
84
89
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
isInternalReference() {
|
|
89
|
-
return !!this.internalFilePath && this.isFromThisComponent();
|
|
90
|
+
if (this.packageName) {
|
|
91
|
+
const pkgStr = dim(`(package: ${this.packageName})`);
|
|
92
|
+
return `${pkgStr} ${this.name}`;
|
|
90
93
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
return this.name;
|
|
95
|
+
}
|
|
96
|
+
toFullSignature(options) {
|
|
97
|
+
let signature = this.name;
|
|
98
|
+
if (this.typeArgs && this.typeArgs.length > 0) {
|
|
99
|
+
const argsSignatures = this.typeArgs.map(arg => arg.toFullSignature(options)).join(', ');
|
|
100
|
+
signature += `<${argsSignatures}>`;
|
|
96
101
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
if (options?.showDocs && this.doc) {
|
|
103
|
+
const docString = this.doc.toFullSignature();
|
|
104
|
+
signature = `${docString}\n${signature}`;
|
|
100
105
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
return signature;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* whether this type was already exported in this component
|
|
111
|
+
*/
|
|
112
|
+
isFromThisComponent() {
|
|
113
|
+
return !this.componentId && !this.packageName;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* whether this type is internal to the file.
|
|
118
|
+
*/
|
|
119
|
+
isInternalReference() {
|
|
120
|
+
return !!this.internalFilePath && this.isFromThisComponent();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* whether this type is exported from this component.
|
|
125
|
+
*/
|
|
126
|
+
isExported() {
|
|
127
|
+
return this.isFromThisComponent() && !this.isInternalReference();
|
|
128
|
+
}
|
|
129
|
+
toObject() {
|
|
130
|
+
return {
|
|
131
|
+
...super.toObject(),
|
|
132
|
+
name: this.name,
|
|
133
|
+
componentId: this.componentId ? this.componentId.toObject() : undefined,
|
|
134
|
+
packageName: this.packageName,
|
|
135
|
+
internalFilePath: this.internalFilePath,
|
|
136
|
+
typeArgs: this.typeArgs?.map(type => type.toObject())
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static fromObject(obj) {
|
|
140
|
+
const location = obj.location;
|
|
141
|
+
const name = obj.name;
|
|
142
|
+
let componentId;
|
|
143
|
+
try {
|
|
144
|
+
componentId = obj.componentId ? _component().ComponentID.fromObject(obj.componentId) : undefined;
|
|
145
|
+
} catch {
|
|
146
|
+
componentId = undefined;
|
|
116
147
|
}
|
|
148
|
+
const packageName = obj.packageName;
|
|
149
|
+
const internalFilePath = obj.internalFilePath;
|
|
150
|
+
const typeArgs = obj.typeArgs?.map(type => _schemaRegistry().SchemaRegistry.fromObject(type));
|
|
151
|
+
return new TypeRefSchema(location, name, componentId, packageName, internalFilePath).withTypeArgs(typeArgs);
|
|
152
|
+
}
|
|
117
153
|
}
|
|
118
154
|
exports.TypeRefSchema = TypeRefSchema;
|
|
155
|
+
|
|
119
156
|
//# sourceMappingURL=type-ref.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_component","data","require","_chalk","_interopRequireDefault","_schemaNode","_schemaRegistry","e","__esModule","default","TypeRefSchema","SchemaNode","constructor","location","name","componentId","packageName","internalFilePath","withTypeArgs","typeArgs","toString","options","nameToString","args","map","arg","join","dim","color","chalk","str","compStr","toStringWithoutVersion","pkgStr","toFullSignature","signature","length","argsSignatures","showDocs","doc","docString","isFromThisComponent","isInternalReference","isExported","toObject","undefined","type","fromObject","obj","ComponentID","SchemaRegistry","exports"],"sources":["type-ref.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component';\nimport chalk from 'chalk';\nimport { SchemaLocation, SchemaNode } from '../schema-node';\nimport { SchemaRegistry } from '../schema-registry';\n\nexport type PlainTypeRefSchema = {\n name: string;\n componentId?: string;\n packageName?: string;\n};\n\n/**\n * can be one of the following:\n * 1. a reference to another \"export\" in the same component\n * 2 a reference to another declaration in the same file (internal)\n * 3. a reference to another component.\n * 4. a reference to a package.\n */\nexport class TypeRefSchema extends SchemaNode {\n /**\n * optional type arguments, e.g. type Foo = Bar<X, Y>. The X and Y are type arguments.\n */\n typeArgs?: SchemaNode[];\n\n readonly componentId?: ComponentID;\n\n constructor(\n readonly location: SchemaLocation,\n /**\n * name of the reference to type.\n */\n readonly name: string,\n /**\n * target component id. existing if the type is defined in another component.\n */\n componentId?: ComponentID,\n /**\n * target package name. existing if type is defined in different package.\n */\n readonly packageName?: string,\n /**\n * if the reference is not exported from the component, it can be internal to the file.\n */\n readonly internalFilePath?: string\n ) {\n super();\n this.componentId = componentId;\n }\n\n withTypeArgs(typeArgs: SchemaNode[]) {\n this.typeArgs = typeArgs;\n return this;\n }\n\n toString(options?: { color?: boolean }) {\n const name = this.nameToString(options);\n if (!this.typeArgs) {\n return name;\n }\n const args = this.typeArgs.map((arg) => arg.toString(options)).join(', ');\n return `${name}<${args}>`;\n }\n\n private nameToString(options?: { color?: boolean }) {\n const dim = options?.color ? chalk.dim : (str: string) => str;\n if (this.componentId) {\n const compStr = dim(`(component: ${this.componentId.toStringWithoutVersion()})`);\n return `${compStr} ${this.name}`;\n }\n if (this.packageName) {\n const pkgStr = dim(`(package: ${this.packageName})`);\n return `${pkgStr} ${this.name}`;\n }\n return this.name;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n let signature = this.name;\n\n if (this.typeArgs && this.typeArgs.length > 0) {\n const argsSignatures = this.typeArgs.map((arg) => arg.toFullSignature(options)).join(', ');\n signature += `<${argsSignatures}>`;\n }\n\n if (options?.showDocs && this.doc) {\n const docString = this.doc.toFullSignature();\n signature = `${docString}\\n${signature}`;\n }\n\n return signature;\n }\n\n /**\n * whether this type was already exported in this component\n */\n isFromThisComponent() {\n return !this.componentId && !this.packageName;\n }\n\n /**\n * whether this type is internal to the file.\n */\n isInternalReference() {\n return !!this.internalFilePath && this.isFromThisComponent();\n }\n\n /**\n * whether this type is exported from this component.\n */\n isExported() {\n return this.isFromThisComponent() && !this.isInternalReference();\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n componentId: this.componentId ? this.componentId.toObject() : undefined,\n packageName: this.packageName,\n internalFilePath: this.internalFilePath,\n typeArgs: this.typeArgs?.map((type) => type.toObject()),\n };\n }\n\n static fromObject(obj: Record<string, any>): TypeRefSchema {\n const location = obj.location;\n const name = obj.name;\n let componentId;\n try {\n componentId = obj.componentId ? ComponentID.fromObject(obj.componentId) : undefined;\n } catch {\n componentId = undefined;\n }\n const packageName = obj.packageName;\n const internalFilePath = obj.internalFilePath;\n const typeArgs = obj.typeArgs?.map((type: any) => SchemaRegistry.fromObject(type));\n return new TypeRefSchema(location, name, componentId, packageName, internalFilePath).withTypeArgs(typeArgs);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,YAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,WAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,eAAA,Y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AEC,gBAAgB,CAAC,CAACC,YAAY,CAACC,QAAQ,CAAC;EAC7G;AACF;AAACgC,OAAA,CAAAzC,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1,37 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.TypeUnionSchema = 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
|
-
return new TypeUnionSchema(location, types);
|
|
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 TypeUnionSchema extends _schemaNode().SchemaNode {
|
|
22
|
+
constructor(location, types) {
|
|
23
|
+
super();
|
|
24
|
+
this.location = location;
|
|
25
|
+
this.types = types;
|
|
26
|
+
}
|
|
27
|
+
toString(options) {
|
|
28
|
+
return `${this.types.map(type => type.toString(options)).join(' | ')}`;
|
|
29
|
+
}
|
|
30
|
+
toFullSignature(options) {
|
|
31
|
+
const typeSignatures = this.types.map(type => type.toFullSignature(options));
|
|
32
|
+
let signature = typeSignatures.join(' | ');
|
|
33
|
+
if (options?.showDocs && this.doc) {
|
|
34
|
+
const docString = this.doc.toFullSignature();
|
|
35
|
+
signature = `${docString}\n${signature}`;
|
|
34
36
|
}
|
|
37
|
+
return signature;
|
|
38
|
+
}
|
|
39
|
+
getNodes() {
|
|
40
|
+
return this.types;
|
|
41
|
+
}
|
|
42
|
+
toObject() {
|
|
43
|
+
return {
|
|
44
|
+
...super.toObject(),
|
|
45
|
+
types: this.types.map(type => type.toObject())
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static fromObject(obj) {
|
|
49
|
+
const location = obj.location;
|
|
50
|
+
const types = obj.types.map(type => _schemaRegistry().SchemaRegistry.fromObject(type));
|
|
51
|
+
return new TypeUnionSchema(location, types);
|
|
52
|
+
}
|
|
35
53
|
}
|
|
36
54
|
exports.TypeUnionSchema = TypeUnionSchema;
|
|
55
|
+
|
|
37
56
|
//# sourceMappingURL=type-union.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_schemaNode","data","require","_schemaRegistry","TypeUnionSchema","SchemaNode","constructor","location","types","toString","options","map","type","join","toFullSignature","typeSignatures","signature","showDocs","doc","docString","getNodes","toObject","fromObject","obj","SchemaRegistry","exports"],"sources":["type-union.ts"],"sourcesContent":["import { SchemaLocation, SchemaNode } from '../schema-node';\nimport { SchemaRegistry } from '../schema-registry';\n\nexport class TypeUnionSchema extends SchemaNode {\n readonly types: SchemaNode[];\n constructor(\n readonly location: SchemaLocation,\n types: SchemaNode[]\n ) {\n super();\n this.types = types;\n }\n toString(options?: { color?: boolean }) {\n return `${this.types.map((type) => type.toString(options)).join(' | ')}`;\n }\n toFullSignature(options?: { showDocs?: boolean }): string {\n const typeSignatures = this.types.map((type) => type.toFullSignature(options));\n let signature = typeSignatures.join(' | ');\n\n if (options?.showDocs && this.doc) {\n const docString = this.doc.toFullSignature();\n signature = `${docString}\\n${signature}`;\n }\n\n return signature;\n }\n getNodes() {\n return this.types;\n }\n toObject() {\n return {\n ...super.toObject(),\n types: this.types.map((type) => type.toObject()),\n };\n }\n static fromObject(obj: Record<string, any>): TypeUnionSchema {\n const location = obj.location;\n const types = obj.types.map((type: any) => SchemaRegistry.fromObject(type));\n return new TypeUnionSchema(location, types);\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,gBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,eAAe,SAASC,wBAAU,CAAC;EAE9CC,WAAWA,CACAC,QAAwB,EACjCC,KAAmB,EACnB;IACA,KAAK,CAAC,CAAC;IAAC,KAHCD,QAAwB,GAAxBA,QAAwB;IAIjC,IAAI,CAACC,KAAK,GAAGA,KAAK;EACpB;EACAC,QAAQA,CAACC,OAA6B,EAAE;IACtC,OAAO,GAAG,IAAI,CAACF,KAAK,CAACG,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACH,QAAQ,CAACC,OAAO,CAAC,CAAC,CAACG,IAAI,CAAC,KAAK,CAAC,EAAE;EAC1E;EACAC,eAAeA,CAACJ,OAAgC,EAAU;IACxD,MAAMK,cAAc,GAAG,IAAI,CAACP,KAAK,CAACG,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACE,eAAe,CAACJ,OAAO,CAAC,CAAC;IAC9E,IAAIM,SAAS,GAAGD,cAAc,CAACF,IAAI,CAAC,KAAK,CAAC;IAE1C,IAAIH,OAAO,EAAEO,QAAQ,IAAI,IAAI,CAACC,GAAG,EAAE;MACjC,MAAMC,SAAS,GAAG,IAAI,CAACD,GAAG,CAACJ,eAAe,CAAC,CAAC;MAC5CE,SAAS,GAAG,GAAGG,SAAS,KAAKH,SAAS,EAAE;IAC1C;IAEA,OAAOA,SAAS;EAClB;EACAI,QAAQA,CAAA,EAAG;IACT,OAAO,IAAI,CAACZ,KAAK;EACnB;EACAa,QAAQA,CAAA,EAAG;IACT,OAAO;MACL,GAAG,KAAK,CAACA,QAAQ,CAAC,CAAC;MACnBb,KAAK,EAAE,IAAI,CAACA,KAAK,CAACG,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACS,QAAQ,CAAC,CAAC;IACjD,CAAC;EACH;EACA,OAAOC,UAAUA,CAACC,GAAwB,EAAmB;IAC3D,MAAMhB,QAAQ,GAAGgB,GAAG,CAAChB,QAAQ;IAC7B,MAAMC,KAAK,GAAGe,GAAG,CAACf,KAAK,CAACG,GAAG,CAAEC,IAAS,IAAKY,gCAAc,CAACF,UAAU,CAACV,IAAI,CAAC,CAAC;IAC3E,OAAO,IAAIR,eAAe,CAACG,QAAQ,EAAEC,KAAK,CAAC;EAC7C;AACF;AAACiB,OAAA,CAAArB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
package/dist/schemas/type.js
CHANGED
|
@@ -1,49 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
6
|
exports.TypeSchema = 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
|
-
|
|
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 _schemaRegistry() {
|
|
29
|
+
const data = require("../schema-registry");
|
|
30
|
+
_schemaRegistry = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
36
|
+
class TypeSchema extends _schemaNode().SchemaNode {
|
|
37
|
+
constructor(location, name, type, signature, doc) {
|
|
38
|
+
super();
|
|
39
|
+
this.location = location;
|
|
40
|
+
this.name = name;
|
|
41
|
+
this.signature = signature;
|
|
42
|
+
this.type = type;
|
|
43
|
+
this.doc = doc;
|
|
44
|
+
}
|
|
45
|
+
toString(options) {
|
|
46
|
+
const bold = options?.color ? _chalk().default.bold : str => str;
|
|
47
|
+
return `type ${bold(this.name)}: ${this.type.toString(options)}`;
|
|
48
|
+
}
|
|
49
|
+
toFullSignature(options) {
|
|
50
|
+
const typeSignature = this.type.toFullSignature(options);
|
|
51
|
+
let signature = `type ${this.name}: ${typeSignature}`;
|
|
52
|
+
if (options?.showDocs && this.doc) {
|
|
53
|
+
const docString = this.doc.toFullSignature();
|
|
54
|
+
signature = `${docString}\n${signature}`;
|
|
46
55
|
}
|
|
56
|
+
return signature;
|
|
57
|
+
}
|
|
58
|
+
getNodes() {
|
|
59
|
+
return [this.type];
|
|
60
|
+
}
|
|
61
|
+
toObject() {
|
|
62
|
+
return {
|
|
63
|
+
...super.toObject(),
|
|
64
|
+
name: this.name,
|
|
65
|
+
type: this.type.toObject(),
|
|
66
|
+
signature: this.signature
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static fromObject(obj) {
|
|
70
|
+
const location = obj.location;
|
|
71
|
+
const name = obj.name;
|
|
72
|
+
const type = _schemaRegistry().SchemaRegistry.fromObject(obj.type);
|
|
73
|
+
const signature = obj.signature;
|
|
74
|
+
const doc = obj.doc ? _docs().DocSchema.fromObject(obj.doc) : undefined;
|
|
75
|
+
return new TypeSchema(location, name, type, signature, doc);
|
|
76
|
+
}
|
|
47
77
|
}
|
|
48
78
|
exports.TypeSchema = TypeSchema;
|
|
79
|
+
|
|
49
80
|
//# sourceMappingURL=type.js.map
|
package/dist/schemas/type.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_schemaNode","_docs","_schemaRegistry","e","__esModule","default","TypeSchema","SchemaNode","constructor","location","name","type","signature","doc","toString","options","bold","color","chalk","str","toFullSignature","typeSignature","showDocs","docString","getNodes","toObject","fromObject","obj","SchemaRegistry","DocSchema","undefined","exports"],"sources":["type.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { SchemaLocation, SchemaNode } from '../schema-node';\nimport { DocSchema } from './docs';\nimport { SchemaRegistry } from '../schema-registry';\n\nexport class TypeSchema extends SchemaNode {\n readonly type: SchemaNode;\n readonly doc?: DocSchema;\n\n constructor(\n readonly location: SchemaLocation,\n readonly name: string,\n type: SchemaNode,\n readonly signature: string,\n doc?: DocSchema\n ) {\n super();\n this.type = type;\n this.doc = doc;\n }\n\n toString(options?: { color?: boolean }) {\n const bold = options?.color ? chalk.bold : (str: string) => str;\n return `type ${bold(this.name)}: ${this.type.toString(options)}`;\n }\n\n toFullSignature(options?: { showDocs?: boolean }): string {\n const typeSignature = this.type.toFullSignature(options);\n\n let signature = `type ${this.name}: ${typeSignature}`;\n\n if (options?.showDocs && this.doc) {\n const docString = this.doc.toFullSignature();\n signature = `${docString}\\n${signature}`;\n }\n\n return signature;\n }\n\n getNodes() {\n return [this.type];\n }\n\n toObject() {\n return {\n ...super.toObject(),\n name: this.name,\n type: this.type.toObject(),\n signature: this.signature,\n };\n }\n\n static fromObject(obj: Record<string, any>): TypeSchema {\n const location = obj.location;\n const name = obj.name;\n const type = SchemaRegistry.fromObject(obj.type);\n const signature = obj.signature;\n const doc = obj.doc ? DocSchema.fromObject(obj.doc) : undefined;\n return new TypeSchema(location, name, type, 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,gBAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,eAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAC,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7C,MAAMG,UAAU,SAASC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AE,IAAI,CAACA;IAClB,CAAC;EACH;EAEA,OAAOc,UAAUA,CAACC,GAAwB,EAAc;IACtD,MAAMlB,QAAQ,GAAGkB,GAAG,CAAClB,QAAQ;IAC7B,MAAMC,IAAI,GAAGiB,GAAG,CAACjB,IAAI;IACrB,MAAMC,IAAI,GAAGiB,gCAAc,CAACF,UAAU,CAACC,GAAG,CAAChB,IAAI,CAAC;IAChD,MAAMC,SAAS,GAAGe,GAAG,CAACf,SAAS;IAC/B,MAAMC,GAAG,GAAGc,GAAG,CAACd,GAAG,GAAGgB,iBAAS,CAACH,UAAU,CAACC,GAAG,CAACd,GAAG,CAAC,GAAGiB,SAAS;IAC/D,OAAO,IAAIxB,UAAU,CAACG,QAAQ,EAAEC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,GAAG,CAAC;EAC7D;AACF;AAACkB,OAAA,CAAAzB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.UnImplementedSchema = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
7
|
+
function _schemaNode() {
|
|
8
|
+
const data = require("../schema-node");
|
|
9
|
+
_schemaNode = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
class UnImplementedSchema extends _schemaNode().SchemaNode {
|
|
15
|
+
constructor(location, name, type) {
|
|
16
|
+
super();
|
|
17
|
+
this.location = location;
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.type = type;
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `<<unimplemented schema ${this.name} of type ${this.type}>>`;
|
|
23
|
+
}
|
|
24
|
+
toFullSignature() {
|
|
25
|
+
return `<<unimplemented schema ${this.name} of type ${this.type}>>`;
|
|
26
|
+
}
|
|
27
|
+
toObject() {
|
|
28
|
+
return {
|
|
29
|
+
...super.toObject(),
|
|
30
|
+
type: this.type
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static fromObject(obj) {
|
|
34
|
+
const location = obj.location;
|
|
35
|
+
const name = obj.name;
|
|
36
|
+
const type = obj.type;
|
|
37
|
+
return new UnImplementedSchema(location, name, type);
|
|
38
|
+
}
|
|
27
39
|
}
|
|
28
40
|
exports.UnImplementedSchema = UnImplementedSchema;
|
|
41
|
+
|
|
29
42
|
//# sourceMappingURL=unimplemented-schema.js.map
|