@teambit/semantics.entities.semantic-schema 0.0.65 → 0.0.67
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/preview-1708259356169.js +7 -0
- package/dist/schemas/array-literal-expression.d.ts +12 -0
- package/dist/schemas/array-literal-expression.js +24 -0
- package/dist/schemas/array-literal-expression.js.map +1 -0
- package/dist/schemas/class.d.ts +3 -1
- package/dist/schemas/class.js +10 -6
- package/dist/schemas/class.js.map +1 -1
- package/dist/schemas/decorator.d.ts +32 -0
- package/dist/schemas/decorator.js +37 -0
- package/dist/schemas/decorator.js.map +1 -0
- package/dist/schemas/function-like.d.ts +4 -2
- package/dist/schemas/function-like.js +14 -10
- package/dist/schemas/function-like.js.map +1 -1
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.js +11 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/literal-value.d.ts +11 -0
- package/dist/schemas/literal-value.js +25 -0
- package/dist/schemas/literal-value.js.map +1 -0
- package/dist/schemas/object-literal-expression.d.ts +13 -0
- package/dist/schemas/object-literal-expression.js +28 -0
- package/dist/schemas/object-literal-expression.js.map +1 -0
- package/dist/schemas/property-assignment.d.ts +32 -0
- package/dist/schemas/property-assignment.js +31 -0
- package/dist/schemas/property-assignment.js.map +1 -0
- package/package.json +9 -7
- package/schemas/array-literal-expression.ts +25 -0
- package/schemas/class.ts +17 -3
- package/schemas/decorator.ts +41 -0
- package/schemas/function-like.ts +17 -7
- package/schemas/index.ts +5 -0
- package/schemas/literal-value.ts +25 -0
- package/schemas/object-literal-expression.ts +30 -0
- package/schemas/property-assignment.ts +36 -0
- package/tsconfig.json +32 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
- package/.bit-capsule-ready +0 -0
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.65.tgz +0 -0
- package/schema.json +0 -102109
- package/teambit_semantics_entities_semantic_schema-preview.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
;
|
|
2
|
+
import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/95c2f3515392701f327019ce43202e7563a02128/teambit.semantics_entities_semantic-schema@0.0.67/dist/semantic-schema.docs.md';
|
|
3
|
+
|
|
4
|
+
export const compositions = [];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[]};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchemaLocation, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class ArrayLiteralExpressionSchema extends SchemaNode {
|
|
3
|
+
readonly members: SchemaNode[];
|
|
4
|
+
readonly location: SchemaLocation;
|
|
5
|
+
constructor(members: SchemaNode[], location: SchemaLocation);
|
|
6
|
+
toObject(): {
|
|
7
|
+
members: Record<string, any>[];
|
|
8
|
+
location: SchemaLocation;
|
|
9
|
+
};
|
|
10
|
+
static fromObject(obj: Record<string, any>): ArrayLiteralExpressionSchema;
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArrayLiteralExpressionSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
5
|
+
const schema_registry_1 = require("../schema-registry");
|
|
6
|
+
class ArrayLiteralExpressionSchema extends schema_node_1.SchemaNode {
|
|
7
|
+
constructor(members, location) {
|
|
8
|
+
super();
|
|
9
|
+
this.members = members;
|
|
10
|
+
this.location = location;
|
|
11
|
+
}
|
|
12
|
+
toObject() {
|
|
13
|
+
return Object.assign(Object.assign({}, super.toObject()), { members: this.members.map((member) => member.toObject()), location: this.location });
|
|
14
|
+
}
|
|
15
|
+
static fromObject(obj) {
|
|
16
|
+
const members = obj.members.map((member) => schema_registry_1.SchemaRegistry.fromObject(member));
|
|
17
|
+
return new ArrayLiteralExpressionSchema(members, obj.location);
|
|
18
|
+
}
|
|
19
|
+
toString() {
|
|
20
|
+
return `[${this.members.join(', ')}]`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ArrayLiteralExpressionSchema = ArrayLiteralExpressionSchema;
|
|
24
|
+
//# sourceMappingURL=array-literal-expression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-literal-expression.js","sourceRoot":"","sources":["../../schemas/array-literal-expression.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAC5D,wDAAoD;AAEpD,MAAa,4BAA6B,SAAQ,wBAAU;IAC1D,YAAqB,OAAqB,EAAW,QAAwB;QAC3E,KAAK,EAAE,CAAC;QADW,YAAO,GAAP,OAAO,CAAc;QAAW,aAAQ,GAAR,QAAQ,CAAgB;IAE7E,CAAC;IAED,QAAQ;QACN,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EACxD,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACvB;IACJ,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAwB;QACxC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/E,OAAO,IAAI,4BAA4B,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACxC,CAAC;CACF;AArBD,oEAqBC"}
|
package/dist/schemas/class.d.ts
CHANGED
|
@@ -8,9 +8,10 @@ export declare class ClassSchema extends SchemaNode {
|
|
|
8
8
|
readonly typeParams?: string[];
|
|
9
9
|
readonly extendsNodes?: ExpressionWithTypeArgumentsSchema[];
|
|
10
10
|
readonly implementNodes?: ExpressionWithTypeArgumentsSchema[];
|
|
11
|
+
readonly decorators?: SchemaNode[];
|
|
11
12
|
readonly members: SchemaNode[];
|
|
12
13
|
readonly doc?: DocSchema;
|
|
13
|
-
constructor(name: string, members: SchemaNode[], location: SchemaLocation, signature: string, doc?: DocSchema, typeParams?: string[], extendsNodes?: ExpressionWithTypeArgumentsSchema[], implementNodes?: ExpressionWithTypeArgumentsSchema[]);
|
|
14
|
+
constructor(name: string, members: SchemaNode[], location: SchemaLocation, signature: string, doc?: DocSchema, typeParams?: string[], extendsNodes?: ExpressionWithTypeArgumentsSchema[], implementNodes?: ExpressionWithTypeArgumentsSchema[], decorators?: SchemaNode[]);
|
|
14
15
|
getNodes(): SchemaNode[];
|
|
15
16
|
toString(): string;
|
|
16
17
|
toObject(): {
|
|
@@ -46,6 +47,7 @@ export declare class ClassSchema extends SchemaNode {
|
|
|
46
47
|
typeArgs: Record<string, any>[];
|
|
47
48
|
expression: SchemaNode;
|
|
48
49
|
}[];
|
|
50
|
+
decorators: Record<string, any>[];
|
|
49
51
|
};
|
|
50
52
|
static fromObject(obj: Record<string, any>): ClassSchema;
|
|
51
53
|
}
|
package/dist/schemas/class.js
CHANGED
|
@@ -10,7 +10,7 @@ const docs_1 = require("./docs");
|
|
|
10
10
|
const expression_with_arguments_1 = require("./expression-with-arguments");
|
|
11
11
|
const schema_registry_1 = require("../schema-registry");
|
|
12
12
|
class ClassSchema extends schema_node_1.SchemaNode {
|
|
13
|
-
constructor(name, members, location, signature, doc, typeParams, extendsNodes, implementNodes) {
|
|
13
|
+
constructor(name, members, location, signature, doc, typeParams, extendsNodes, implementNodes, decorators) {
|
|
14
14
|
super();
|
|
15
15
|
this.name = name;
|
|
16
16
|
this.location = location;
|
|
@@ -18,6 +18,7 @@ class ClassSchema extends schema_node_1.SchemaNode {
|
|
|
18
18
|
this.typeParams = typeParams;
|
|
19
19
|
this.extendsNodes = extendsNodes;
|
|
20
20
|
this.implementNodes = implementNodes;
|
|
21
|
+
this.decorators = decorators;
|
|
21
22
|
this.members = members;
|
|
22
23
|
this.doc = doc;
|
|
23
24
|
}
|
|
@@ -25,15 +26,17 @@ class ClassSchema extends schema_node_1.SchemaNode {
|
|
|
25
26
|
return this.members;
|
|
26
27
|
}
|
|
27
28
|
toString() {
|
|
29
|
+
var _a;
|
|
28
30
|
const membersStr = this.members.map((m) => `* ${m.toString()}`).join('\n');
|
|
29
|
-
|
|
31
|
+
const decoratorsStr = (_a = this.decorators) === null || _a === void 0 ? void 0 : _a.map((decorator) => decorator.toString()).join('\n');
|
|
32
|
+
return `${this.decorators ? `${decoratorsStr}\n` : ''}${chalk_1.default.bold.underline(this.name)}\n${membersStr}`;
|
|
30
33
|
}
|
|
31
34
|
toObject() {
|
|
32
|
-
var _a, _b, _c;
|
|
33
|
-
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, members: this.members.map((member) => member.toObject()), doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), signature: this.signature, typeParams: this.typeParams, extendsNodes: (_b = this.extendsNodes) === null || _b === void 0 ? void 0 : _b.map((node) => node.toObject()), implementNodes: (_c = this.implementNodes) === null || _c === void 0 ? void 0 : _c.map((node) => node.toObject()) });
|
|
35
|
+
var _a, _b, _c, _d;
|
|
36
|
+
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, members: this.members.map((member) => member.toObject()), doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), signature: this.signature, typeParams: this.typeParams, extendsNodes: (_b = this.extendsNodes) === null || _b === void 0 ? void 0 : _b.map((node) => node.toObject()), implementNodes: (_c = this.implementNodes) === null || _c === void 0 ? void 0 : _c.map((node) => node.toObject()), decorators: (_d = this.decorators) === null || _d === void 0 ? void 0 : _d.map((decorator) => decorator.toObject()) });
|
|
34
37
|
}
|
|
35
38
|
static fromObject(obj) {
|
|
36
|
-
var _a, _b;
|
|
39
|
+
var _a, _b, _c;
|
|
37
40
|
const name = obj.name;
|
|
38
41
|
const members = obj.members.map((member) => schema_registry_1.SchemaRegistry.fromObject(member));
|
|
39
42
|
const location = obj.location;
|
|
@@ -42,7 +45,8 @@ class ClassSchema extends schema_node_1.SchemaNode {
|
|
|
42
45
|
const typeParams = obj.typeParams;
|
|
43
46
|
const extendsNodes = (_a = obj.extendsNodes) === null || _a === void 0 ? void 0 : _a.map((node) => expression_with_arguments_1.ExpressionWithTypeArgumentsSchema.fromObject(node));
|
|
44
47
|
const implementNodes = (_b = obj.implementNodes) === null || _b === void 0 ? void 0 : _b.map((node) => expression_with_arguments_1.ExpressionWithTypeArgumentsSchema.fromObject(node));
|
|
45
|
-
|
|
48
|
+
const decorators = (_c = obj.decorators) === null || _c === void 0 ? void 0 : _c.map((decorator) => schema_registry_1.SchemaRegistry.fromObject(decorator));
|
|
49
|
+
return new ClassSchema(name, members, location, signature, doc, typeParams, extendsNodes, implementNodes, decorators);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
exports.ClassSchema = ClassSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../schemas/class.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA4D;AAC5D,iCAAmC;AACnC,2EAAgF;AAChF,wDAAoD;AAEpD,MAAa,WAAY,SAAQ,wBAAU;IAIzC,YACW,IAAY,EACrB,OAAqB,EACZ,QAAwB,EACxB,SAAiB,EAC1B,GAAe,EACN,UAAqB,EACrB,YAAkD,EAClD,cAAoD;
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../schemas/class.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA4D;AAC5D,iCAAmC;AACnC,2EAAgF;AAChF,wDAAoD;AAEpD,MAAa,WAAY,SAAQ,wBAAU;IAIzC,YACW,IAAY,EACrB,OAAqB,EACZ,QAAwB,EACxB,SAAiB,EAC1B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C,IAAS,EAAE,EAAE,CAAC,6DAAiC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAClH,MAAM,UAAU,GAAG,MAAA,GAAG,CAAC,UAAU,0CAAE,GAAG,CAAC,CAAC,SAAc,EAAE,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACjG,OAAO,IAAI,WAAW,CACpB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,GAAG,EACH,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,CACX,CAAC;IACJ,CAAC;CACF;AAlED,kCAkEC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SchemaLocation, SchemaNode } from '../schema-node';
|
|
2
|
+
import { DocSchema } from './docs';
|
|
3
|
+
export declare class DecoratorSchema extends SchemaNode {
|
|
4
|
+
readonly location: SchemaLocation;
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly doc?: DocSchema;
|
|
7
|
+
readonly args?: SchemaNode[];
|
|
8
|
+
constructor(location: SchemaLocation, name: string, doc?: DocSchema, args?: SchemaNode[]);
|
|
9
|
+
getNodes(): SchemaNode[];
|
|
10
|
+
toString(): string;
|
|
11
|
+
toObject(): {
|
|
12
|
+
name: string;
|
|
13
|
+
doc: {
|
|
14
|
+
__schema: string;
|
|
15
|
+
name: string;
|
|
16
|
+
location: SchemaLocation;
|
|
17
|
+
signature: string;
|
|
18
|
+
raw: string;
|
|
19
|
+
comment: string;
|
|
20
|
+
tags: {
|
|
21
|
+
__schema: string;
|
|
22
|
+
location: SchemaLocation;
|
|
23
|
+
name: string;
|
|
24
|
+
signature: string;
|
|
25
|
+
tagName: string;
|
|
26
|
+
comment: string;
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
args: Record<string, any>[];
|
|
30
|
+
};
|
|
31
|
+
static fromObject(obj: Record<string, any>): DecoratorSchema;
|
|
32
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DecoratorSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
5
|
+
const schema_registry_1 = require("../schema-registry");
|
|
6
|
+
const docs_1 = require("./docs");
|
|
7
|
+
class DecoratorSchema extends schema_node_1.SchemaNode {
|
|
8
|
+
constructor(location, name, doc, args) {
|
|
9
|
+
super();
|
|
10
|
+
this.location = location;
|
|
11
|
+
this.name = name;
|
|
12
|
+
this.doc = doc;
|
|
13
|
+
this.args = args;
|
|
14
|
+
}
|
|
15
|
+
getNodes() {
|
|
16
|
+
return this.args || [];
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
var _a;
|
|
20
|
+
// name and args
|
|
21
|
+
const argsStr = (_a = this.args) === null || _a === void 0 ? void 0 : _a.map((arg) => arg.toString()).join(', ');
|
|
22
|
+
return `@${this.name}${argsStr ? `(${argsStr})` : ''}`;
|
|
23
|
+
}
|
|
24
|
+
toObject() {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), args: (_b = this.args) === null || _b === void 0 ? void 0 : _b.map((arg) => arg.toObject()) });
|
|
27
|
+
}
|
|
28
|
+
static fromObject(obj) {
|
|
29
|
+
const location = obj.location;
|
|
30
|
+
const name = obj.name;
|
|
31
|
+
const doc = obj.doc ? docs_1.DocSchema.fromObject(obj.doc) : undefined;
|
|
32
|
+
const args = obj.args ? obj.args.map((arg) => schema_registry_1.SchemaRegistry.fromObject(arg)) : undefined;
|
|
33
|
+
return new DecoratorSchema(location, name, doc, args);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DecoratorSchema = DecoratorSchema;
|
|
37
|
+
//# sourceMappingURL=decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.js","source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AU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAChE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1F,OAAO,IAAI,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;CACF;AApCD,0CAoCC"}
|
|
@@ -10,17 +10,18 @@ export declare class FunctionLikeSchema extends SchemaNode {
|
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly modifiers: Modifier[];
|
|
12
12
|
readonly typeParams?: string[];
|
|
13
|
+
readonly decorators?: SchemaNode[];
|
|
13
14
|
readonly returnType: SchemaNode;
|
|
14
15
|
readonly params: ParameterSchema[];
|
|
15
16
|
readonly doc?: DocSchema;
|
|
16
17
|
readonly signature?: string | undefined;
|
|
17
|
-
constructor(location: SchemaLocation, name: string, params: ParameterSchema[], returnType: SchemaNode, signature: string, modifiers?: Modifier[], doc?: DocSchema, typeParams?: string[]);
|
|
18
|
+
constructor(location: SchemaLocation, name: string, params: ParameterSchema[], returnType: SchemaNode, signature: string, modifiers?: Modifier[], doc?: DocSchema, typeParams?: string[], decorators?: SchemaNode[]);
|
|
18
19
|
getNodes(): SchemaNode[];
|
|
19
20
|
toString(): string;
|
|
20
21
|
isDeprecated(): boolean;
|
|
21
22
|
isPrivate(): boolean;
|
|
22
23
|
generateSignature(): string;
|
|
23
|
-
static createSignature(name: string, params: ParameterSchema[], returnType: SchemaNode): string;
|
|
24
|
+
static createSignature(name: string, params: ParameterSchema[], returnType: SchemaNode, decorators?: SchemaNode[]): string;
|
|
24
25
|
toObject(): {
|
|
25
26
|
name: string;
|
|
26
27
|
params: {
|
|
@@ -52,6 +53,7 @@ export declare class FunctionLikeSchema extends SchemaNode {
|
|
|
52
53
|
}[];
|
|
53
54
|
};
|
|
54
55
|
typeParams: string[];
|
|
56
|
+
decorators: Record<string, any>[];
|
|
55
57
|
};
|
|
56
58
|
static fromObject(obj: Record<string, any>): FunctionLikeSchema;
|
|
57
59
|
private modifiersToString;
|
|
@@ -14,25 +14,27 @@ const schema_registry_1 = require("../schema-registry");
|
|
|
14
14
|
* function-like can be a function, method, arrow-function, variable-function, etc.
|
|
15
15
|
*/
|
|
16
16
|
class FunctionLikeSchema extends schema_node_1.SchemaNode {
|
|
17
|
-
constructor(location, name, params, returnType, signature, modifiers = [], doc, typeParams
|
|
18
|
-
) {
|
|
17
|
+
constructor(location, name, params, returnType, signature, modifiers = [], doc, typeParams, decorators) {
|
|
19
18
|
super();
|
|
20
19
|
this.location = location;
|
|
21
20
|
this.name = name;
|
|
22
21
|
this.modifiers = modifiers;
|
|
23
22
|
this.typeParams = typeParams;
|
|
23
|
+
this.decorators = decorators;
|
|
24
24
|
this.params = params;
|
|
25
25
|
this.returnType = returnType;
|
|
26
26
|
this.doc = doc;
|
|
27
27
|
this.signature = signature || FunctionLikeSchema.createSignature(this.name, this.params, this.returnType);
|
|
28
28
|
}
|
|
29
29
|
getNodes() {
|
|
30
|
-
return [...this.params, this.returnType];
|
|
30
|
+
return [...this.params, this.returnType, ...(this.decorators || [])];
|
|
31
31
|
}
|
|
32
32
|
toString() {
|
|
33
|
+
var _a;
|
|
33
34
|
const paramsStr = this.params.map((param) => param.toString()).join(', ');
|
|
34
35
|
const typeParamsStr = this.typeParams ? `<${this.typeParams.join(', ')}>` : '';
|
|
35
|
-
|
|
36
|
+
const decoratorsStr = (_a = this.decorators) === null || _a === void 0 ? void 0 : _a.map((decorator) => decorator.toString()).join('\n');
|
|
37
|
+
return `${this.decorators ? `${decoratorsStr}\n` : ''}${this.modifiersToString()}${typeParamsStr}${chalk_1.default.bold(this.name)}(${paramsStr}): ${this.returnType.toString()}`;
|
|
36
38
|
}
|
|
37
39
|
isDeprecated() {
|
|
38
40
|
var _a;
|
|
@@ -43,9 +45,9 @@ class FunctionLikeSchema extends schema_node_1.SchemaNode {
|
|
|
43
45
|
return Boolean(this.modifiers.find((m) => m === 'private') || ((_a = this.doc) === null || _a === void 0 ? void 0 : _a.hasTag(tag_1.TagName.private)));
|
|
44
46
|
}
|
|
45
47
|
generateSignature() {
|
|
46
|
-
return FunctionLikeSchema.createSignature(this.name, this.params, this.returnType);
|
|
48
|
+
return FunctionLikeSchema.createSignature(this.name, this.params, this.returnType, this.decorators);
|
|
47
49
|
}
|
|
48
|
-
static createSignature(name, params, returnType) {
|
|
50
|
+
static createSignature(name, params, returnType, decorators) {
|
|
49
51
|
const paramsStr = params
|
|
50
52
|
.map((param) => {
|
|
51
53
|
let type = param.type.toString();
|
|
@@ -54,14 +56,16 @@ class FunctionLikeSchema extends schema_node_1.SchemaNode {
|
|
|
54
56
|
return `${param.name}${param.isOptional ? '?' : ''}: ${type}`;
|
|
55
57
|
})
|
|
56
58
|
.join(', ');
|
|
57
|
-
|
|
59
|
+
const decoratorsStr = decorators === null || decorators === void 0 ? void 0 : decorators.map((decorator) => decorator.toString()).join('\n');
|
|
60
|
+
return `${decorators ? `${decoratorsStr}\n` : ''}${name}(${paramsStr}): ${returnType.toString()}`;
|
|
58
61
|
}
|
|
59
62
|
toObject() {
|
|
60
|
-
var _a;
|
|
61
|
-
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, params: this.params.map((param) => param.toObject()), returnType: this.returnType.toObject(), signature: this.signature, modifiers: this.modifiers, doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), typeParams: this.typeParams });
|
|
63
|
+
var _a, _b;
|
|
64
|
+
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, params: this.params.map((param) => param.toObject()), returnType: this.returnType.toObject(), signature: this.signature, modifiers: this.modifiers, doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), typeParams: this.typeParams, decorators: (_b = this.decorators) === null || _b === void 0 ? void 0 : _b.map((decorator) => decorator.toObject()) });
|
|
62
65
|
}
|
|
63
66
|
static fromObject(obj) {
|
|
64
|
-
|
|
67
|
+
var _a;
|
|
68
|
+
return new FunctionLikeSchema(obj.location, obj.name, obj.params.map((param) => parameter_1.ParameterSchema.fromObject(param)), schema_registry_1.SchemaRegistry.fromObject(obj.returnType), obj.signature, obj.modifiers, obj.doc ? docs_1.DocSchema.fromObject(obj.doc) : undefined, obj.typeParams, (_a = obj.decorators) === null || _a === void 0 ? void 0 : _a.map((decorator) => schema_registry_1.SchemaRegistry.fromObject(decorator)));
|
|
65
69
|
}
|
|
66
70
|
modifiersToString() {
|
|
67
71
|
const modifiersToPrint = this.modifiers.filter((modifier) => modifier !== 'export');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-like.js","sourceRoot":"","sources":["../../schemas/function-like.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA4D;AAC5D,2CAA8C;AAC9C,iCAAmC;AACnC,oCAAqC;AACrC,wDAAoD;AAapD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,wBAAU;IAMhD,YACW,QAAwB,EACxB,IAAY,EACrB,MAAyB,EACzB,UAAsB,EACtB,SAAiB,EACR,YAAwB,EAAE,EACnC,GAAe,EACN,UAAqB,
|
|
1
|
+
{"version":3,"file":"function-like.js","sourceRoot":"","sources":["../../schemas/function-like.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,gDAA4D;AAC5D,2CAA8C;AAC9C,iCAAmC;AACnC,oCAAqC;AACrC,wDAAoD;AAapD;;GAEG;AACH,MAAa,kBAAmB,SAAQ,wBAAU;IAMhD,YACW,QAAwB,EACxB,IAAY,EACrB,MAAyB,EACzB,UAAsB,EACtB,SAAiB,EACR,YAAwB,EAAE,EACnC,GAAe,EACN,UAAqB,EACrB,UAAyB;QAElC,KAAK,EAAE,CAAC;QAVC,aAAQ,GAAR,QAAQ,CAAgB;QACx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G,CAAC,UAAU,0CAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CACzE,CAAC;IACJ,CAAC;IAEO,iBAAiB;QACvB,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QACpF,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,CAAC;CACF;AAlGD,gDAkGC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -39,4 +39,9 @@ export { ConditionalTypeSchema } from './conditional-type';
|
|
|
39
39
|
export { ExpressionWithTypeArgumentsSchema } from './expression-with-arguments';
|
|
40
40
|
export { NamedTupleSchema } from './named-tuple';
|
|
41
41
|
export { UnImplementedSchema } from './unimplemented-schema';
|
|
42
|
+
export { ObjectLiteralExpressionSchema } from './object-literal-expression';
|
|
43
|
+
export { ArrayLiteralExpressionSchema } from './array-literal-expression';
|
|
44
|
+
export { PropertyAssignmentSchema } from './property-assignment';
|
|
45
|
+
export { DecoratorSchema } from './decorator';
|
|
46
|
+
export { LiteralValueSchema } from './literal-value';
|
|
42
47
|
export * from './docs';
|
package/dist/schemas/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.UnImplementedSchema = exports.NamedTupleSchema = exports.ExpressionWithTypeArgumentsSchema = exports.ConditionalTypeSchema = exports.UnresolvedSchema = exports.UnknownSchema = exports.ThisTypeSchema = exports.TemplateLiteralTypeSpanSchema = exports.TemplateLiteralTypeSchema = exports.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumMemberSchema = exports.EnumSchema = exports.ParameterSchema = exports.TupleTypeSchema = exports.TypeOperatorSchema = exports.TypeArraySchema = exports.KeywordTypeSchema = exports.LiteralTypeSchema = exports.InferenceTypeSchema = exports.TypeQuerySchema = exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableLikeSchema = exports.TypeRefSchema = exports.FunctionLikeSchema = exports.ModuleSchema = void 0;
|
|
17
|
+
exports.LiteralValueSchema = exports.DecoratorSchema = exports.PropertyAssignmentSchema = exports.ArrayLiteralExpressionSchema = exports.ObjectLiteralExpressionSchema = exports.UnImplementedSchema = exports.NamedTupleSchema = exports.ExpressionWithTypeArgumentsSchema = exports.ConditionalTypeSchema = exports.UnresolvedSchema = exports.UnknownSchema = exports.ThisTypeSchema = exports.TemplateLiteralTypeSpanSchema = exports.TemplateLiteralTypeSchema = exports.IndexedAccessSchema = exports.TypePredicateSchema = exports.ParenthesizedTypeSchema = exports.EnumMemberSchema = exports.EnumSchema = exports.ParameterSchema = exports.TupleTypeSchema = exports.TypeOperatorSchema = exports.TypeArraySchema = exports.KeywordTypeSchema = exports.LiteralTypeSchema = exports.InferenceTypeSchema = exports.TypeQuerySchema = exports.SetAccessorSchema = exports.GetAccessorSchema = exports.InterfaceSchema = exports.IndexSignatureSchema = exports.TypeLiteralSchema = exports.TypeUnionSchema = exports.TypeIntersectionSchema = exports.TypeSchema = exports.ConstructorSchema = exports.ClassSchema = exports.VariableLikeSchema = exports.TypeRefSchema = exports.FunctionLikeSchema = exports.ModuleSchema = void 0;
|
|
18
18
|
/**
|
|
19
19
|
* Ensure that any new Schema class ends with the word 'Schema'
|
|
20
20
|
* This will make sure that the Class Name is not minimized during prod bundling process
|
|
@@ -92,5 +92,15 @@ var named_tuple_1 = require("./named-tuple");
|
|
|
92
92
|
Object.defineProperty(exports, "NamedTupleSchema", { enumerable: true, get: function () { return named_tuple_1.NamedTupleSchema; } });
|
|
93
93
|
var unimplemented_schema_1 = require("./unimplemented-schema");
|
|
94
94
|
Object.defineProperty(exports, "UnImplementedSchema", { enumerable: true, get: function () { return unimplemented_schema_1.UnImplementedSchema; } });
|
|
95
|
+
var object_literal_expression_1 = require("./object-literal-expression");
|
|
96
|
+
Object.defineProperty(exports, "ObjectLiteralExpressionSchema", { enumerable: true, get: function () { return object_literal_expression_1.ObjectLiteralExpressionSchema; } });
|
|
97
|
+
var array_literal_expression_1 = require("./array-literal-expression");
|
|
98
|
+
Object.defineProperty(exports, "ArrayLiteralExpressionSchema", { enumerable: true, get: function () { return array_literal_expression_1.ArrayLiteralExpressionSchema; } });
|
|
99
|
+
var property_assignment_1 = require("./property-assignment");
|
|
100
|
+
Object.defineProperty(exports, "PropertyAssignmentSchema", { enumerable: true, get: function () { return property_assignment_1.PropertyAssignmentSchema; } });
|
|
101
|
+
var decorator_1 = require("./decorator");
|
|
102
|
+
Object.defineProperty(exports, "DecoratorSchema", { enumerable: true, get: function () { return decorator_1.DecoratorSchema; } });
|
|
103
|
+
var literal_value_1 = require("./literal-value");
|
|
104
|
+
Object.defineProperty(exports, "LiteralValueSchema", { enumerable: true, get: function () { return literal_value_1.LiteralValueSchema; } });
|
|
95
105
|
__exportStar(require("./docs"), exports);
|
|
96
106
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,uCAA2C;AAAlC,yGAAA,aAAa,OA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AAA,eAAe,OAAA;AACxB,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,6CAAiD;AAAxC,+GAAA,gBAAgB,OAAA;AACzB,2DAA+D;AAAtD,6HAAA,uBAAuB,OAAA;AAChC,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAoE;AAA3D,kIAAA,yBAAyB,OAAA;AAClC,2EAA6E;AAApE,2IAAA,6BAA6B,OAAA;AACtC,yCAA6C;AAApC,2GAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,uDAA2D;AAAlD,yHAAA,qBAAqB,OAAA;AAC9B,yEAAgF;AAAvE,8IAAA,iCAAiC,OAAA;AAC1C,6CAAiD;AAAxC,+GAAA,gBAAgB,OAAA;AACzB,+DAA6D;AAApD,2HAAA,mBAAmB,OAAA;AAC5B,yEAA4E;AAAnE,0IAAA,6BAA6B,OAAA;AACtC,uEAA0E;AAAjE,wIAAA,4BAA4B,OAAA;AACrC,6DAAiE;AAAxD,+HAAA,wBAAwB,OAAA;AACjC,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,yCAAuB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SchemaLocation, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class LiteralValueSchema extends SchemaNode {
|
|
3
|
+
readonly location: SchemaLocation;
|
|
4
|
+
readonly value: string;
|
|
5
|
+
constructor(location: SchemaLocation, value: string);
|
|
6
|
+
toString(): string;
|
|
7
|
+
toObject(): {
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
static fromObject(obj: Record<string, any>): LiteralValueSchema;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiteralValueSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
5
|
+
class LiteralValueSchema extends schema_node_1.SchemaNode {
|
|
6
|
+
constructor(location, value) {
|
|
7
|
+
super();
|
|
8
|
+
this.location = location;
|
|
9
|
+
this.value = value;
|
|
10
|
+
this.value = this.value.replace(/^['"]|['"]$/g, '');
|
|
11
|
+
}
|
|
12
|
+
toString() {
|
|
13
|
+
return this.value;
|
|
14
|
+
}
|
|
15
|
+
toObject() {
|
|
16
|
+
return Object.assign(Object.assign({}, super.toObject()), { value: this.value });
|
|
17
|
+
}
|
|
18
|
+
static fromObject(obj) {
|
|
19
|
+
const location = obj.location;
|
|
20
|
+
const value = obj.value;
|
|
21
|
+
return new LiteralValueSchema(location, value);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.LiteralValueSchema = LiteralValueSchema;
|
|
25
|
+
//# sourceMappingURL=literal-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal-value.js","sourceRoot":"","sources":["../../schemas/literal-value.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAE5D,MAAa,kBAAmB,SAAQ,wBAAU;IAChD,YAAqB,QAAwB,EAAW,KAAa;QACnE,KAAK,EAAE,CAAC;QADW,aAAQ,GAAR,QAAQ,CAAgB;QAAW,UAAK,GAAL,KAAK,CAAQ;QAEnE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,QAAQ;QACN,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,KAAK,EAAE,IAAI,CAAC,KAAK,IACjB;IACJ,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAwB;QACxC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,OAAO,IAAI,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;CACF;AAtBD,gDAsBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SchemaLocation, SchemaNode } from '../schema-node';
|
|
2
|
+
export declare class ObjectLiteralExpressionSchema extends SchemaNode {
|
|
3
|
+
readonly members: SchemaNode[];
|
|
4
|
+
readonly location: SchemaLocation;
|
|
5
|
+
constructor(members: SchemaNode[], location: SchemaLocation);
|
|
6
|
+
getNodes(): SchemaNode[];
|
|
7
|
+
toString(): string;
|
|
8
|
+
toObject(): {
|
|
9
|
+
members: Record<string, any>[];
|
|
10
|
+
location: SchemaLocation;
|
|
11
|
+
};
|
|
12
|
+
static fromObject(obj: Record<string, any>): ObjectLiteralExpressionSchema;
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectLiteralExpressionSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
5
|
+
const schema_registry_1 = require("../schema-registry");
|
|
6
|
+
class ObjectLiteralExpressionSchema extends schema_node_1.SchemaNode {
|
|
7
|
+
constructor(members, location) {
|
|
8
|
+
super();
|
|
9
|
+
this.members = members;
|
|
10
|
+
this.location = location;
|
|
11
|
+
}
|
|
12
|
+
getNodes() {
|
|
13
|
+
return this.members;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return `{\n${this.members.map((member) => `\t${member.toString()}`).join('\n')}\n}`;
|
|
17
|
+
}
|
|
18
|
+
toObject() {
|
|
19
|
+
return Object.assign(Object.assign({}, super.toObject()), { members: this.members.map((element) => element.toObject()), location: this.location });
|
|
20
|
+
}
|
|
21
|
+
static fromObject(obj) {
|
|
22
|
+
const members = obj.members.map((member) => schema_registry_1.SchemaRegistry.fromObject(member));
|
|
23
|
+
const location = obj.location;
|
|
24
|
+
return new ObjectLiteralExpressionSchema(members, location);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ObjectLiteralExpressionSchema = ObjectLiteralExpressionSchema;
|
|
28
|
+
//# sourceMappingURL=object-literal-expression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-literal-expression.js","sourceRoot":"","sources":["../../schemas/object-literal-expression.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAC5D,wDAAoD;AAEpD,MAAa,6BAA8B,SAAQ,wBAAU;IAC3D,YAAqB,OAAqB,EAAW,QAAwB;QAC3E,KAAK,EAAE,CAAC;QADW,YAAO,GAAP,OAAO,CAAc;QAAW,aAAQ,GAAR,QAAQ,CAAgB;IAE7E,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IACtF,CAAC;IAED,QAAQ;QACN,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAC1D,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACvB;IACJ,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAwB;QACxC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,OAAO,IAAI,6BAA6B,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;CACF;AA1BD,sEA0BC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SchemaNode, SchemaLocation } from '../schema-node';
|
|
2
|
+
import { DocSchema } from './docs';
|
|
3
|
+
export declare class PropertyAssignmentSchema extends SchemaNode {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly value: SchemaNode;
|
|
6
|
+
readonly location: SchemaLocation;
|
|
7
|
+
readonly doc?: DocSchema;
|
|
8
|
+
constructor(name: string, value: SchemaNode, location: SchemaLocation, doc?: DocSchema);
|
|
9
|
+
toString(): string;
|
|
10
|
+
toObject(): {
|
|
11
|
+
name: string;
|
|
12
|
+
value: Record<string, any>;
|
|
13
|
+
doc: {
|
|
14
|
+
__schema: string;
|
|
15
|
+
name: string;
|
|
16
|
+
location: SchemaLocation;
|
|
17
|
+
signature: string;
|
|
18
|
+
raw: string;
|
|
19
|
+
comment: string;
|
|
20
|
+
tags: {
|
|
21
|
+
__schema: string;
|
|
22
|
+
location: SchemaLocation;
|
|
23
|
+
name: string;
|
|
24
|
+
signature: string;
|
|
25
|
+
tagName: string;
|
|
26
|
+
comment: string;
|
|
27
|
+
}[];
|
|
28
|
+
};
|
|
29
|
+
location: SchemaLocation;
|
|
30
|
+
};
|
|
31
|
+
static fromObject(obj: Record<string, any>): PropertyAssignmentSchema;
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyAssignmentSchema = void 0;
|
|
4
|
+
const schema_node_1 = require("../schema-node");
|
|
5
|
+
const schema_registry_1 = require("../schema-registry");
|
|
6
|
+
const docs_1 = require("./docs");
|
|
7
|
+
class PropertyAssignmentSchema extends schema_node_1.SchemaNode {
|
|
8
|
+
constructor(name, value, location, doc) {
|
|
9
|
+
super();
|
|
10
|
+
this.name = name;
|
|
11
|
+
this.value = value;
|
|
12
|
+
this.location = location;
|
|
13
|
+
this.doc = doc;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return `${this.name}: ${this.value.toString()}`;
|
|
17
|
+
}
|
|
18
|
+
toObject() {
|
|
19
|
+
var _a;
|
|
20
|
+
return Object.assign(Object.assign({}, super.toObject()), { name: this.name, value: this.value.toObject(), doc: (_a = this.doc) === null || _a === void 0 ? void 0 : _a.toObject(), location: this.location });
|
|
21
|
+
}
|
|
22
|
+
static fromObject(obj) {
|
|
23
|
+
const name = obj.name;
|
|
24
|
+
const value = schema_registry_1.SchemaRegistry.fromObject(obj.value);
|
|
25
|
+
const location = obj.location;
|
|
26
|
+
const doc = obj.doc ? docs_1.DocSchema.fromObject(obj.doc) : undefined;
|
|
27
|
+
return new PropertyAssignmentSchema(name, value, location, doc);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.PropertyAssignmentSchema = PropertyAssignmentSchema;
|
|
31
|
+
//# sourceMappingURL=property-assignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-assignment.js","sourceRoot":"","sources":["../../schemas/property-assignment.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAC5D,wDAAoD;AACpD,iCAAmC;AAEnC,MAAa,wBAAyB,SAAQ,wBAAU;IACtD,YACW,IAAY,EACZ,KAAiB,EACjB,QAAwB,EACxB,GAAe;QAExB,KAAK,EAAE,CAAC;QALC,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAY;QACjB,aAAQ,GAAR,QAAQ,CAAgB;QACxB,QAAG,GAAH,GAAG,CAAY;IAG1B,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;IAClD,CAAC;IAED,QAAQ;;QACN,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,EAC5B,GAAG,EAAE,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,EAAE,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IACvB;IACJ,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAwB;QACxC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,KAAK,GAAG,gCAAc,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC9B,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAS,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAChE,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClE,CAAC;CACF;AA/BD,4DA+BC"}
|
package/package.json
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/semantics.entities.semantic-schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/semantics/entities/semantic-schema",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.semantics",
|
|
8
8
|
"name": "entities/semantic-schema",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.67"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"chalk": "
|
|
12
|
+
"chalk": "2.4.2",
|
|
13
13
|
"lodash": "4.17.21",
|
|
14
14
|
"@teambit/component-id": "1.2.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@babel/runtime": "7.20.0",
|
|
18
|
-
"@types/jest": "26.0.20",
|
|
19
17
|
"@types/lodash": "4.14.165",
|
|
20
18
|
"@types/mocha": "9.1.0",
|
|
21
|
-
"@types/
|
|
19
|
+
"@types/jest": "26.0.20",
|
|
20
|
+
"@types/node": "12.20.4",
|
|
21
|
+
"@babel/runtime": "7.20.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {},
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
|
+
"optionalDependencies": {},
|
|
26
|
+
"peerDependenciesMeta": {},
|
|
25
27
|
"private": false,
|
|
26
28
|
"engines": {
|
|
27
29
|
"node": ">=12.22.0"
|
|
@@ -40,4 +42,4 @@
|
|
|
40
42
|
"angular",
|
|
41
43
|
"angular-components"
|
|
42
44
|
]
|
|
43
|
-
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SchemaLocation, SchemaNode } from '../schema-node';
|
|
2
|
+
import { SchemaRegistry } from '../schema-registry';
|
|
3
|
+
|
|
4
|
+
export class ArrayLiteralExpressionSchema extends SchemaNode {
|
|
5
|
+
constructor(readonly members: SchemaNode[], readonly location: SchemaLocation) {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
toObject() {
|
|
10
|
+
return {
|
|
11
|
+
...super.toObject(),
|
|
12
|
+
members: this.members.map((member) => member.toObject()),
|
|
13
|
+
location: this.location,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static fromObject(obj: Record<string, any>): ArrayLiteralExpressionSchema {
|
|
18
|
+
const members = obj.members.map((member) => SchemaRegistry.fromObject(member));
|
|
19
|
+
return new ArrayLiteralExpressionSchema(members, obj.location);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
toString(): string {
|
|
23
|
+
return `[${this.members.join(', ')}]`;
|
|
24
|
+
}
|
|
25
|
+
}
|