@teambit/schema 0.0.554 → 0.0.555
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/parser.d.ts +6 -0
- package/dist/schema-extractor.d.ts +3 -0
- package/dist/schema.main.runtime.d.ts +27 -1
- package/dist/schemas/export.d.ts +23 -1
- package/dist/schemas/module.d.ts +8 -1
- package/dist/semantic-schema.d.ts +3 -0
- package/package-tar/teambit-schema-0.0.555.tgz +0 -0
- package/package.json +8 -8
- package/tsconfig.json +0 -1
- package/package-tar/teambit-schema-0.0.554.tgz +0 -0
package/dist/parser.d.ts
CHANGED
|
@@ -7,16 +7,42 @@ import { Module } from './schemas';
|
|
|
7
7
|
import { SemanticSchema } from './semantic-schema';
|
|
8
8
|
export declare type ParserSlot = SlotRegistry<Parser>;
|
|
9
9
|
export declare type SchemaConfig = {
|
|
10
|
+
/**
|
|
11
|
+
* default parser
|
|
12
|
+
*/
|
|
10
13
|
defaultParser: string;
|
|
11
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* extension for extracting component schemas.
|
|
17
|
+
*/
|
|
12
18
|
export declare class SchemaMain {
|
|
19
|
+
/**
|
|
20
|
+
* parsers slot.
|
|
21
|
+
*/
|
|
13
22
|
private parserSlot;
|
|
14
23
|
private envs;
|
|
15
24
|
private config;
|
|
16
|
-
constructor(
|
|
25
|
+
constructor(
|
|
26
|
+
/**
|
|
27
|
+
* parsers slot.
|
|
28
|
+
*/
|
|
29
|
+
parserSlot: ParserSlot, envs: EnvsMain, config: SchemaConfig);
|
|
30
|
+
/**
|
|
31
|
+
* get the default parser.
|
|
32
|
+
*/
|
|
17
33
|
getDefaultParser(): Parser;
|
|
34
|
+
/**
|
|
35
|
+
* parse a module into a component schema.
|
|
36
|
+
*/
|
|
18
37
|
parseModule(path: string): Module;
|
|
38
|
+
/**
|
|
39
|
+
* get a schema of a component.
|
|
40
|
+
* @param component target component.
|
|
41
|
+
*/
|
|
19
42
|
getSchema(component: Component): Promise<SemanticSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* register a new parser.
|
|
45
|
+
*/
|
|
20
46
|
registerParser(parser: Parser): SchemaMain;
|
|
21
47
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
22
48
|
static dependencies: import("@teambit/harmony").Aspect[];
|
package/dist/schemas/export.d.ts
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
declare type Primitive = string | number | boolean | null | undefined;
|
|
2
2
|
export declare type StaticProperties = Map<string, Primitive>;
|
|
3
3
|
export declare class Export {
|
|
4
|
+
/**
|
|
5
|
+
* named export identifier of the module export.
|
|
6
|
+
*/
|
|
4
7
|
readonly identifier: string;
|
|
8
|
+
/**
|
|
9
|
+
* static properties attached to this export
|
|
10
|
+
* @example
|
|
11
|
+
* export hello = () => {};
|
|
12
|
+
* hello.value = "text"; // <-- staticProperty
|
|
13
|
+
* hello.count = 3; // <-- static property
|
|
14
|
+
*/
|
|
5
15
|
readonly staticProperties?: StaticProperties | undefined;
|
|
6
|
-
constructor(
|
|
16
|
+
constructor(
|
|
17
|
+
/**
|
|
18
|
+
* named export identifier of the module export.
|
|
19
|
+
*/
|
|
20
|
+
identifier: string,
|
|
21
|
+
/**
|
|
22
|
+
* static properties attached to this export
|
|
23
|
+
* @example
|
|
24
|
+
* export hello = () => {};
|
|
25
|
+
* hello.value = "text"; // <-- staticProperty
|
|
26
|
+
* hello.count = 3; // <-- static property
|
|
27
|
+
*/
|
|
28
|
+
staticProperties?: StaticProperties | undefined);
|
|
7
29
|
}
|
|
8
30
|
export {};
|
package/dist/schemas/module.d.ts
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.555",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/semantics/schema",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.semantics",
|
|
8
8
|
"name": "schema",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.555"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.2.11",
|
|
13
13
|
"graphql-tag": "2.12.1",
|
|
14
14
|
"@babel/runtime": "7.12.18",
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
|
-
"@teambit/component": "0.0.
|
|
17
|
-
"@teambit/cli": "0.0.
|
|
18
|
-
"@teambit/envs": "0.0.
|
|
19
|
-
"@teambit/graphql": "0.0.
|
|
16
|
+
"@teambit/component": "0.0.555",
|
|
17
|
+
"@teambit/cli": "0.0.386",
|
|
18
|
+
"@teambit/envs": "0.0.555",
|
|
19
|
+
"@teambit/graphql": "0.0.555"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/mocha": "5.2.7",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/node": "12.20.4"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@teambit/legacy": "1.0.
|
|
30
|
+
"@teambit/legacy": "1.0.172",
|
|
31
31
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
32
32
|
"react": "^16.8.0 || ^17.0.0"
|
|
33
33
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "-"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@teambit/legacy": "1.0.
|
|
58
|
+
"@teambit/legacy": "1.0.172",
|
|
59
59
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0"
|
|
61
61
|
}
|
package/tsconfig.json
CHANGED
|
Binary file
|