@teambit/semantics.entities.semantic-schema 0.0.17 → 0.0.18
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/schemas/parameter.d.ts +2 -1
- package/dist/schemas/parameter.js +3 -2
- package/dist/schemas/parameter.js.map +1 -1
- package/dist/schemas/variable.d.ts +2 -1
- package/dist/schemas/variable.js +3 -2
- package/dist/schemas/variable.js.map +1 -1
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.18.tgz +0 -0
- package/package.json +2 -2
- package/{preview-1654313169583.js → preview-1654572446572.js} +1 -1
- package/schemas/parameter.ts +2 -1
- package/schemas/variable.ts +8 -2
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.17.tgz +0 -0
|
@@ -2,9 +2,10 @@ import { Location, SchemaNode } from '../schema-node';
|
|
|
2
2
|
export declare class ParameterSchema extends SchemaNode {
|
|
3
3
|
readonly location: Location;
|
|
4
4
|
readonly name: string;
|
|
5
|
+
readonly isOptional: boolean;
|
|
5
6
|
readonly defaultValue?: any;
|
|
6
7
|
readonly description?: string;
|
|
7
8
|
readonly type: SchemaNode;
|
|
8
|
-
constructor(location: Location, name: string, type: SchemaNode, defaultValue?: any, description?: string);
|
|
9
|
+
constructor(location: Location, name: string, type: SchemaNode, isOptional: boolean, defaultValue?: any, description?: string);
|
|
9
10
|
toString(): string;
|
|
10
11
|
}
|
|
@@ -11,16 +11,17 @@ const class_transformer_1 = require("class-transformer");
|
|
|
11
11
|
const schema_node_1 = require("../schema-node");
|
|
12
12
|
const class_transformers_1 = require("../class-transformers");
|
|
13
13
|
class ParameterSchema extends schema_node_1.SchemaNode {
|
|
14
|
-
constructor(location, name, type, defaultValue, description) {
|
|
14
|
+
constructor(location, name, type, isOptional, defaultValue, description) {
|
|
15
15
|
super();
|
|
16
16
|
this.location = location;
|
|
17
17
|
this.name = name;
|
|
18
|
+
this.isOptional = isOptional;
|
|
18
19
|
this.defaultValue = defaultValue;
|
|
19
20
|
this.description = description;
|
|
20
21
|
this.type = type;
|
|
21
22
|
}
|
|
22
23
|
toString() {
|
|
23
|
-
return `${this.name}: ${this.type.toString()}`;
|
|
24
|
+
return `${this.name}${this.isOptional ? '?' : ''}: ${this.type.toString()}`;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../schemas/parameter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AACtD,8DAA4D;AAE5D,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YACW,QAAkB,EAClB,IAAY,EACrB,IAAgB,EACP,YAAkB,EAClB,WAAoB;QAE7B,KAAK,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../schemas/parameter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8C;AAC9C,gDAAsD;AACtD,8DAA4D;AAE5D,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YACW,QAAkB,EAClB,IAAY,EACrB,IAAgB,EACP,UAAmB,EACnB,YAAkB,EAClB,WAAoB;QAE7B,KAAK,EAAE,CAAC;QAPC,aAAQ,GAAR,QAAQ,CAAU;QAClB,SAAI,GAAJ,IAAI,CAAQ;QAEZ,eAAU,GAAV,UAAU,CAAS;QACnB,iBAAY,GAAZ,YAAY,CAAM;QAClB,gBAAW,GAAX,WAAW,CAAS;QAG7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC9E,CAAC;CACF;AAhBC;IADC,IAAA,6BAAS,EAAC,wCAAmB,CAAC;6CACL;AAF5B,0CAkBC"}
|
|
@@ -6,7 +6,8 @@ export declare class VariableSchema extends SchemaNode {
|
|
|
6
6
|
readonly location: Location;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly signature: string;
|
|
9
|
+
readonly isOptional: boolean;
|
|
9
10
|
type: SchemaNode;
|
|
10
|
-
constructor(location: Location, name: string, signature: string, type: SchemaNode);
|
|
11
|
+
constructor(location: Location, name: string, signature: string, type: SchemaNode, isOptional: boolean);
|
|
11
12
|
toString(): string;
|
|
12
13
|
}
|
package/dist/schemas/variable.js
CHANGED
|
@@ -18,15 +18,16 @@ const class_transformers_1 = require("../class-transformers");
|
|
|
18
18
|
* can be also a property or property-signature
|
|
19
19
|
*/
|
|
20
20
|
class VariableSchema extends schema_node_1.SchemaNode {
|
|
21
|
-
constructor(location, name, signature, type) {
|
|
21
|
+
constructor(location, name, signature, type, isOptional) {
|
|
22
22
|
super();
|
|
23
23
|
this.location = location;
|
|
24
24
|
this.name = name;
|
|
25
25
|
this.signature = signature;
|
|
26
|
+
this.isOptional = isOptional;
|
|
26
27
|
this.type = type;
|
|
27
28
|
}
|
|
28
29
|
toString() {
|
|
29
|
-
return `${chalk_1.default.bold(this.name)}: ${this.type.toString()}`;
|
|
30
|
+
return `${chalk_1.default.bold(this.name)}${this.isOptional ? '?' : ''}: ${this.type.toString()}`;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../schemas/variable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,kDAA0B;AAC1B,gDAAsD;AACtD,8DAA4D;AAE5D;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAAU;IAG5C,
|
|
1
|
+
{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../schemas/variable.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,kDAA0B;AAC1B,gDAAsD;AACtD,8DAA4D;AAE5D;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAAU;IAG5C,YACW,QAAkB,EAClB,IAAY,EACZ,SAAiB,EAC1B,IAAgB,EACP,UAAmB;QAE5B,KAAK,EAAE,CAAC;QANC,aAAQ,GAAR,QAAQ,CAAU;QAClB,SAAI,GAAJ,IAAI,CAAQ;QACZ,cAAS,GAAT,SAAS,CAAQ;QAEjB,eAAU,GAAV,UAAU,CAAS;QAG5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO,GAAG,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC1F,CAAC;CACF;AAfC;IADC,IAAA,6BAAS,EAAC,wCAAmB,CAAC;4CACd;AAFnB,wCAiBC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/semantics.entities.semantic-schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"homepage": "https://bit.dev/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.18"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.semantics_entities_semantic-schema@0.0.
|
|
1
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.semantics_entities_semantic-schema@0.0.18/dist/semantic-schema.docs.md')]
|
package/schemas/parameter.ts
CHANGED
|
@@ -9,6 +9,7 @@ export class ParameterSchema extends SchemaNode {
|
|
|
9
9
|
readonly location: Location,
|
|
10
10
|
readonly name: string,
|
|
11
11
|
type: SchemaNode,
|
|
12
|
+
readonly isOptional: boolean,
|
|
12
13
|
readonly defaultValue?: any,
|
|
13
14
|
readonly description?: string
|
|
14
15
|
) {
|
|
@@ -17,6 +18,6 @@ export class ParameterSchema extends SchemaNode {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
toString() {
|
|
20
|
-
return `${this.name}: ${this.type.toString()}`;
|
|
21
|
+
return `${this.name}${this.isOptional ? '?' : ''}: ${this.type.toString()}`;
|
|
21
22
|
}
|
|
22
23
|
}
|
package/schemas/variable.ts
CHANGED
|
@@ -9,12 +9,18 @@ import { schemaObjToInstance } from '../class-transformers';
|
|
|
9
9
|
export class VariableSchema extends SchemaNode {
|
|
10
10
|
@Transform(schemaObjToInstance)
|
|
11
11
|
type: SchemaNode;
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(
|
|
13
|
+
readonly location: Location,
|
|
14
|
+
readonly name: string,
|
|
15
|
+
readonly signature: string,
|
|
16
|
+
type: SchemaNode,
|
|
17
|
+
readonly isOptional: boolean
|
|
18
|
+
) {
|
|
13
19
|
super();
|
|
14
20
|
this.type = type;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
toString() {
|
|
18
|
-
return `${chalk.bold(this.name)}: ${this.type.toString()}`;
|
|
24
|
+
return `${chalk.bold(this.name)}${this.isOptional ? '?' : ''}: ${this.type.toString()}`;
|
|
19
25
|
}
|
|
20
26
|
}
|
|
Binary file
|