@teambit/semantics.entities.semantic-schema 0.0.9 → 0.0.10
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/api-schema.ts +10 -2
- package/dist/api-schema.js +1 -1
- package/dist/api-schema.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/schema-node.d.ts +6 -0
- package/dist/schemas/class.d.ts +3 -2
- package/dist/schemas/class.js +2 -1
- package/dist/schemas/class.js.map +1 -1
- package/dist/schemas/{function.d.ts → function-like.d.ts} +4 -3
- package/dist/schemas/{function.js → function-like.js} +6 -5
- package/dist/schemas/function-like.js.map +1 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/index.js.map +1 -1
- package/index.ts +2 -2
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.10.tgz +0 -0
- package/package.json +3 -3
- package/{preview-1652498684867.js → preview-1652757984397.js} +1 -1
- package/schema-node.ts +3 -0
- package/schemas/class.ts +2 -2
- package/schemas/{function.ts → function-like.ts} +3 -2
- package/schemas/index.ts +1 -1
- package/dist/schemas/function.js.map +0 -1
- package/package-tar/teambit-semantics.entities.semantic-schema-0.0.9.tgz +0 -0
package/api-schema.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ClassSchema,
|
|
4
|
+
Export,
|
|
5
|
+
FunctionLikeSchema,
|
|
6
|
+
InterfaceSchema,
|
|
7
|
+
Module,
|
|
8
|
+
TypeSchema,
|
|
9
|
+
VariableSchema,
|
|
10
|
+
} from './schemas';
|
|
3
11
|
import { SchemaNode } from './schema-node';
|
|
4
12
|
|
|
5
13
|
export type PlainSemanticSchema = {
|
|
@@ -38,7 +46,7 @@ export class APISchema implements SchemaNode {
|
|
|
38
46
|
getSection(Module, 'Namespaces') +
|
|
39
47
|
getSection(ClassSchema, 'Classes') +
|
|
40
48
|
getSection(InterfaceSchema, 'Interfaces') +
|
|
41
|
-
getSection(
|
|
49
|
+
getSection(FunctionLikeSchema, 'Functions') +
|
|
42
50
|
getSection(VariableSchema, 'Variables') +
|
|
43
51
|
getSection(TypeSchema, 'Types')
|
|
44
52
|
);
|
package/dist/api-schema.js
CHANGED
|
@@ -31,7 +31,7 @@ class APISchema {
|
|
|
31
31
|
return (getSection(schemas_1.Module, 'Namespaces') +
|
|
32
32
|
getSection(schemas_1.ClassSchema, 'Classes') +
|
|
33
33
|
getSection(schemas_1.InterfaceSchema, 'Interfaces') +
|
|
34
|
-
getSection(schemas_1.
|
|
34
|
+
getSection(schemas_1.FunctionLikeSchema, 'Functions') +
|
|
35
35
|
getSection(schemas_1.VariableSchema, 'Variables') +
|
|
36
36
|
getSection(schemas_1.TypeSchema, 'Types'));
|
|
37
37
|
}
|
package/dist/api-schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schema.js","sourceRoot":"","sources":["../api-schema.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"api-schema.js","sourceRoot":"","sources":["../api-schema.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uCAQmB;AAOnB,MAAa,SAAS;IACpB,YAAqB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEvC,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,CACnB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAChD,SAAS,EACT,CAAC,CACF,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ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StaticProperties,
|
|
2
|
+
export type { SchemaNode, Location } from './schema-node';
|
|
3
|
+
export { Export, Module, StaticProperties, FunctionLikeSchema, Modifier, TypeRefSchema, VariableSchema, ClassSchema, ConstructorSchema, TypeSchema, TypeIntersectionSchema, TypeUnionSchema, TypeLiteralSchema, IndexSignatureSchema, InterfaceSchema, GetAccessorSchema, SetAccessorSchema, TypeQuerySchema, InferenceTypeSchema, LiteralTypeSchema, KeywordTypeSchema, TypeArraySchema, TypeOperatorSchema, TupleTypeSchema, ParameterSchema, } from './schemas';
|
|
4
4
|
export type { JSONSchema, JSONSchemaObject } from './json-schema';
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.VariableSchema = exports.TypeRefSchema = exports.
|
|
3
|
+
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.VariableSchema = exports.TypeRefSchema = exports.FunctionLikeSchema = exports.Module = exports.Export = exports.APISchema = void 0;
|
|
4
4
|
var api_schema_1 = require("./api-schema");
|
|
5
5
|
Object.defineProperty(exports, "APISchema", { enumerable: true, get: function () { return api_schema_1.APISchema; } });
|
|
6
6
|
var schemas_1 = require("./schemas");
|
|
7
7
|
Object.defineProperty(exports, "Export", { enumerable: true, get: function () { return schemas_1.Export; } });
|
|
8
8
|
Object.defineProperty(exports, "Module", { enumerable: true, get: function () { return schemas_1.Module; } });
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "FunctionLikeSchema", { enumerable: true, get: function () { return schemas_1.FunctionLikeSchema; } });
|
|
10
10
|
Object.defineProperty(exports, "TypeRefSchema", { enumerable: true, get: function () { return schemas_1.TypeRefSchema; } });
|
|
11
11
|
Object.defineProperty(exports, "VariableSchema", { enumerable: true, get: function () { return schemas_1.VariableSchema; } });
|
|
12
12
|
Object.defineProperty(exports, "ClassSchema", { enumerable: true, get: function () { return schemas_1.ClassSchema; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAElB,qCA0BmB;AAzBjB,iGAAA,MAAM,OAAA;AACN,iGAAA,MAAM,OAAA;AAEN,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAElB,qCA0BmB;AAzBjB,iGAAA,MAAM,OAAA;AACN,iGAAA,MAAM,OAAA;AAEN,6GAAA,kBAAkB,OAAA;AAElB,wGAAA,aAAa,OAAA;AACb,yGAAA,cAAc,OAAA;AACd,sGAAA,WAAW,OAAA;AACX,4GAAA,iBAAiB,OAAA;AACjB,qGAAA,UAAU,OAAA;AACV,iHAAA,sBAAsB,OAAA;AACtB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AACjB,+GAAA,oBAAoB,OAAA;AACpB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,8GAAA,mBAAmB,OAAA;AACnB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,0GAAA,eAAe,OAAA;AACf,6GAAA,kBAAkB,OAAA;AAClB,0GAAA,eAAe,OAAA;AACf,0GAAA,eAAe,OAAA"}
|
package/dist/schema-node.d.ts
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
* an interface for implementing a new schema node.
|
|
3
3
|
*/
|
|
4
4
|
export interface SchemaNode {
|
|
5
|
+
readonly location?: Location;
|
|
5
6
|
getSignature?(): string;
|
|
6
7
|
toString(): string;
|
|
7
8
|
toObject(): Record<string, any> & {
|
|
8
9
|
constructorName: string;
|
|
9
10
|
};
|
|
10
11
|
}
|
|
12
|
+
export declare type Location = {
|
|
13
|
+
file: string;
|
|
14
|
+
line: number;
|
|
15
|
+
character: number;
|
|
16
|
+
};
|
package/dist/schemas/class.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
export declare class ClassSchema implements SchemaNode {
|
|
3
3
|
readonly className: string;
|
|
4
4
|
readonly members: SchemaNode[];
|
|
5
|
-
|
|
5
|
+
readonly location: Location;
|
|
6
|
+
constructor(className: string, members: SchemaNode[], location: Location);
|
|
6
7
|
toObject(): {
|
|
7
8
|
constructorName: string;
|
|
8
9
|
name: string;
|
package/dist/schemas/class.js
CHANGED
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ClassSchema = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
class ClassSchema {
|
|
9
|
-
constructor(className, members) {
|
|
9
|
+
constructor(className, members, location) {
|
|
10
10
|
this.className = className;
|
|
11
11
|
this.members = members;
|
|
12
|
+
this.location = location;
|
|
12
13
|
}
|
|
13
14
|
toObject() {
|
|
14
15
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../schemas/class.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,MAAa,WAAW;IACtB,YAAqB,SAAiB,EAAW,OAAqB;
|
|
1
|
+
{"version":3,"file":"class.js","sourceRoot":"","sources":["../../schemas/class.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,MAAa,WAAW;IACtB,YAAqB,SAAiB,EAAW,OAAqB,EAAW,QAAkB;QAA9E,cAAS,GAAT,SAAS,CAAQ;QAAW,YAAO,GAAP,OAAO,CAAc;QAAW,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEvG,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,SAAS;YACpB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;SACzD,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3E,OAAO,GAAG,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE,CAAC;IAClE,CAAC;CACF;AAfD,kCAeC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { SchemaNode } from '../schema-node';
|
|
1
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
2
2
|
import { ParameterSchema } from './parameter';
|
|
3
3
|
export declare type Modifier = 'static' | 'public' | 'private' | 'protected' | 'readonly' | 'abstract' | 'async' | 'override';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class FunctionLikeSchema implements SchemaNode {
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly params: ParameterSchema[];
|
|
7
7
|
readonly returnType: SchemaNode;
|
|
8
8
|
readonly signature: string;
|
|
9
|
+
readonly location: Location;
|
|
9
10
|
readonly modifiers: Modifier[];
|
|
10
|
-
constructor(name: string, params: ParameterSchema[], returnType: SchemaNode, signature: string, modifiers?: Modifier[]);
|
|
11
|
+
constructor(name: string, params: ParameterSchema[], returnType: SchemaNode, signature: string, location: Location, modifiers?: Modifier[]);
|
|
11
12
|
serialize(): void;
|
|
12
13
|
toJsonSchema(): void;
|
|
13
14
|
getSignature(): string;
|
|
@@ -3,16 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.FunctionLikeSchema = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
class
|
|
8
|
+
class FunctionLikeSchema {
|
|
9
9
|
constructor(name,
|
|
10
10
|
// readonly doc: any,
|
|
11
|
-
params, returnType, signature, modifiers = []) {
|
|
11
|
+
params, returnType, signature, location, modifiers = []) {
|
|
12
12
|
this.name = name;
|
|
13
13
|
this.params = params;
|
|
14
14
|
this.returnType = returnType;
|
|
15
15
|
this.signature = signature;
|
|
16
|
+
this.location = location;
|
|
16
17
|
this.modifiers = modifiers;
|
|
17
18
|
}
|
|
18
19
|
serialize() { }
|
|
@@ -36,5 +37,5 @@ class FunctionSchema {
|
|
|
36
37
|
return `${modifiersStr}${chalk_1.default.bold(this.name)}(${paramsStr}): ${this.returnType.toString()}`;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
exports.
|
|
40
|
-
//# sourceMappingURL=function.js.map
|
|
40
|
+
exports.FunctionLikeSchema = FunctionLikeSchema;
|
|
41
|
+
//# sourceMappingURL=function-like.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-like.js","sourceRoot":"","sources":["../../schemas/function-like.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B,MAAa,kBAAkB;IAC7B,YACW,IAAY;IACrB,qBAAqB;IACZ,MAAyB,EAEzB,UAAsB,EACtB,SAAiB,EACjB,QAAkB,EAClB,YAAwB,EAAE;QAP1B,SAAI,GAAJ,IAAI,CAAQ;QAEZ,WAAM,GAAN,MAAM,CAAmB;QAEzB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAU;QAClB,cAAS,GAAT,SAAS,CAAiB;IAClC,CAAC;IAEJ,SAAS,KAAI,CAAC;IAEd,YAAY,KAAI,CAAC;IAEjB,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;YACtC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,OAAO,GAAG,YAAY,GAAG,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;IAChG,CAAC;CACF;AApCD,gDAoCC"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Module } from './module';
|
|
2
2
|
export { Export, StaticProperties } from './export';
|
|
3
|
-
export {
|
|
3
|
+
export { FunctionLikeSchema, Modifier } from './function-like';
|
|
4
4
|
export { TypeRefSchema } from './type-ref';
|
|
5
5
|
export { VariableSchema } from './variable';
|
|
6
6
|
export { ClassSchema } from './class';
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.VariableSchema = exports.TypeRefSchema = exports.
|
|
3
|
+
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.VariableSchema = exports.TypeRefSchema = exports.FunctionLikeSchema = exports.Export = exports.Module = void 0;
|
|
4
4
|
var module_1 = require("./module");
|
|
5
5
|
Object.defineProperty(exports, "Module", { enumerable: true, get: function () { return module_1.Module; } });
|
|
6
6
|
var export_1 = require("./export");
|
|
7
7
|
Object.defineProperty(exports, "Export", { enumerable: true, get: function () { return export_1.Export; } });
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "
|
|
8
|
+
var function_like_1 = require("./function-like");
|
|
9
|
+
Object.defineProperty(exports, "FunctionLikeSchema", { enumerable: true, get: function () { return function_like_1.FunctionLikeSchema; } });
|
|
10
10
|
var type_ref_1 = require("./type-ref");
|
|
11
11
|
Object.defineProperty(exports, "TypeRefSchema", { enumerable: true, get: function () { return type_ref_1.TypeRefSchema; } });
|
|
12
12
|
var variable_1 = require("./variable");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,iDAA+D;AAAtD,mHAAA,kBAAkB,OAAA;AAC3B,uCAA2C;AAAlC,yGAAA,aAAa,OAAA;AACtB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,yDAA6D;AAApD,2HAAA,sBAAsB,OAAA;AAC/B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,iDAAqD;AAA5C,mHAAA,kBAAkB,OAAA;AAC3B,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AACxB,yCAA8C;AAArC,4GAAA,eAAe,OAAA"}
|
package/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { APISchema } from './api-schema';
|
|
2
|
-
export type { SchemaNode } from './schema-node';
|
|
2
|
+
export type { SchemaNode, Location } from './schema-node';
|
|
3
3
|
export {
|
|
4
4
|
Export,
|
|
5
5
|
Module,
|
|
6
6
|
StaticProperties,
|
|
7
|
-
|
|
7
|
+
FunctionLikeSchema,
|
|
8
8
|
Modifier,
|
|
9
9
|
TypeRefSchema,
|
|
10
10
|
VariableSchema,
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/semantics.entities.semantic-schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
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.10"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"chalk": "4.
|
|
12
|
+
"chalk": "2.4.2",
|
|
13
13
|
"json-schema": "0.4.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
@@ -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.10/dist/semantic-schema.docs.md')]
|
package/schema-node.ts
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
* an interface for implementing a new schema node.
|
|
3
3
|
*/
|
|
4
4
|
export interface SchemaNode {
|
|
5
|
+
readonly location?: Location;
|
|
5
6
|
getSignature?(): string;
|
|
6
7
|
|
|
7
8
|
toString(): string;
|
|
8
9
|
|
|
9
10
|
toObject(): Record<string, any> & { constructorName: string };
|
|
10
11
|
}
|
|
12
|
+
|
|
13
|
+
export type Location = { file: string; line: number; character: number };
|
package/schemas/class.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
3
3
|
|
|
4
4
|
export class ClassSchema implements SchemaNode {
|
|
5
|
-
constructor(readonly className: string, readonly members: SchemaNode[]) {}
|
|
5
|
+
constructor(readonly className: string, readonly members: SchemaNode[], readonly location: Location) {}
|
|
6
6
|
|
|
7
7
|
toObject() {
|
|
8
8
|
return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { SchemaNode } from '../schema-node';
|
|
2
|
+
import { Location, SchemaNode } from '../schema-node';
|
|
3
3
|
import { ParameterSchema } from './parameter';
|
|
4
4
|
|
|
5
5
|
export type Modifier = 'static' | 'public' | 'private' | 'protected' | 'readonly' | 'abstract' | 'async' | 'override';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class FunctionLikeSchema implements SchemaNode {
|
|
8
8
|
constructor(
|
|
9
9
|
readonly name: string,
|
|
10
10
|
// readonly doc: any,
|
|
@@ -12,6 +12,7 @@ export class FunctionSchema implements SchemaNode {
|
|
|
12
12
|
|
|
13
13
|
readonly returnType: SchemaNode,
|
|
14
14
|
readonly signature: string,
|
|
15
|
+
readonly location: Location,
|
|
15
16
|
readonly modifiers: Modifier[] = []
|
|
16
17
|
) {}
|
|
17
18
|
|
package/schemas/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Module } from './module';
|
|
2
2
|
export { Export, StaticProperties } from './export';
|
|
3
|
-
export {
|
|
3
|
+
export { FunctionLikeSchema, Modifier } from './function-like';
|
|
4
4
|
export { TypeRefSchema } from './type-ref';
|
|
5
5
|
export { VariableSchema } from './variable';
|
|
6
6
|
export { ClassSchema } from './class';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../schemas/function.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAM1B,MAAa,cAAc;IACzB,YACW,IAAY;IACrB,qBAAqB;IACZ,MAAyB,EAEzB,UAAsB,EACtB,SAAiB,EACjB,YAAwB,EAAE;QAN1B,SAAI,GAAJ,IAAI,CAAQ;QAEZ,WAAM,GAAN,MAAM,CAAmB;QAEzB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAiB;IAClC,CAAC;IAEJ,SAAS,KAAI,CAAC;IAEd,YAAY,KAAI,CAAC;IAEjB,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,QAAQ;QACN,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,I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