@teambit/schema 1.0.749 → 1.0.751

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.
@@ -1,6 +1,6 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.749/dist/schema.composition.js';
2
- import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.749/dist/mock/button/button.composition.js';
3
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.749/dist/schema.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.751/dist/schema.composition.js';
2
+ import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.751/dist/mock/button/button.composition.js';
3
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.751/dist/schema.docs.mdx';
4
4
 
5
5
  export const compositions = [compositions_0, compositions_1];
6
6
  export const overview = [overview_0];
@@ -28,9 +28,10 @@ class SchemaCommand {
28
28
  this.component = component;
29
29
  this.logger = logger;
30
30
  _defineProperty(this, "name", 'schema <pattern>');
31
- _defineProperty(this, "description", 'extracts and displays the API schema (types, functions, classes, interfaces) of the specified component/s.');
32
- _defineProperty(this, "extendedDescription", `Extracts TypeScript definitions to provide a comprehensive view of a component's public API.
33
- Shows detailed information about exported elements including classes, interfaces, functions, types, and enums with their respective signatures and documentation.
31
+ _defineProperty(this, "description", 'display component API schema and type definitions');
32
+ _defineProperty(this, "extendedDescription", `extracts and displays the public API structure of components including types, functions, classes, and interfaces.
33
+ shows detailed type information, function signatures, and JSDoc documentation for exported elements.
34
+ useful for understanding component interfaces and generating documentation.
34
35
 
35
36
  ${(0, _legacy().PATTERN_HELP)('schema')}`);
36
37
  _defineProperty(this, "group", 'info-analysis');
@@ -1 +1 @@
1
- {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_legacy","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","SchemaCommand","constructor","schema","component","logger","PATTERN_HELP","report","pattern","remote","schemas","getSchemas","map","toStringPerType","join","json","toObject","getSchemaFromRemote","host","getHost","ids","idsByPattern","components","getMany","longRunningLog","createLongProcessLogger","length","results","pMapSeries","logProgress","id","toString","getSchema","undefined","end","exports"],"sources":["schema.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport type { ComponentMain } from '@teambit/component';\nimport pMapSeries from 'p-map-series';\nimport type { Logger } from '@teambit/logger';\nimport type { APISchema } from '@teambit/semantics.entities.semantic-schema';\nimport { PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { SchemaMain } from './schema.main.runtime';\n\nexport class SchemaCommand implements Command {\n name = 'schema <pattern>';\n description =\n 'extracts and displays the API schema (types, functions, classes, interfaces) of the specified component/s.';\n extendedDescription = `Extracts TypeScript definitions to provide a comprehensive view of a component's public API.\nShows detailed information about exported elements including classes, interfaces, functions, types, and enums with their respective signatures and documentation.\n\n${PATTERN_HELP('schema')}`;\n group = 'info-analysis';\n options = [\n ['r', 'remote', 'fetch schema from remote scope (works for components not in workspace)'],\n ['j', 'json', 'return the component schema in json format'],\n ] as CommandOptions;\n\n constructor(\n private schema: SchemaMain,\n private component: ComponentMain,\n private logger: Logger\n ) {}\n\n async report([pattern]: [string], { remote }: { remote: boolean }): Promise<string> {\n const schemas = await this.getSchemas([pattern], remote);\n return schemas.map((schema) => schema.toStringPerType()).join('\\n\\n\\n');\n }\n\n async json([pattern]: [string], { remote }: { remote: boolean }): Promise<Record<string, any>> {\n const schemas = await this.getSchemas([pattern], remote);\n return schemas.map((schema) => schema.toObject());\n }\n\n private async getSchemas([pattern]: [string], remote = false): Promise<APISchema[]> {\n if (remote) {\n const schema = await this.schema.getSchemaFromRemote(pattern);\n return [schema];\n }\n const host = this.component.getHost();\n const ids = await host.idsByPattern(pattern, true);\n const components = await host.getMany(ids);\n const longRunningLog = this.logger.createLongProcessLogger('generating schema', ids.length);\n const results = await pMapSeries(components, (component) => {\n longRunningLog.logProgress(component.id.toString());\n return this.schema.getSchema(component, undefined, true);\n });\n longRunningLog.end();\n return results;\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB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AAW,EAAEC,MAAM,GAAG,KAAK,EAAwB;IAClF,IAAIA,MAAM,EAAE;MACV,MAAMN,MAAM,GAAG,MAAM,IAAI,CAACA,MAAM,CAACc,mBAAmB,CAACT,OAAO,CAAC;MAC7D,OAAO,CAACL,MAAM,CAAC;IACjB;IACA,MAAMe,IAAI,GAAG,IAAI,CAACd,SAAS,CAACe,OAAO,CAAC,CAAC;IACrC,MAAMC,GAAG,GAAG,MAAMF,IAAI,CAACG,YAAY,CAACb,OAAO,EAAE,IAAI,CAAC;IAClD,MAAMc,UAAU,GAAG,MAAMJ,IAAI,CAACK,OAAO,CAACH,GAAG,CAAC;IAC1C,MAAMI,cAAc,GAAG,IAAI,CAACnB,MAAM,CAACoB,uBAAuB,CAAC,mBAAmB,EAAEL,GAAG,CAACM,MAAM,CAAC;IAC3F,MAAMC,OAAO,GAAG,MAAM,IAAAC,qBAAU,EAACN,UAAU,EAAGlB,SAAS,IAAK;MAC1DoB,cAAc,CAACK,WAAW,CAACzB,SAAS,CAAC0B,EAAE,CAACC,QAAQ,CAAC,CAAC,CAAC;MACnD,OAAO,IAAI,CAAC5B,MAAM,CAAC6B,SAAS,CAAC5B,SAAS,EAAE6B,SAAS,EAAE,IAAI,CAAC;IAC1D,CAAC,CAAC;IACFT,cAAc,CAACU,GAAG,CAAC,CAAC;IACpB,OAAOP,OAAO;EAChB;AACF;AAACQ,OAAA,CAAAlC,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_legacy","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","SchemaCommand","constructor","schema","component","logger","PATTERN_HELP","report","pattern","remote","schemas","getSchemas","map","toStringPerType","join","json","toObject","getSchemaFromRemote","host","getHost","ids","idsByPattern","components","getMany","longRunningLog","createLongProcessLogger","length","results","pMapSeries","logProgress","id","toString","getSchema","undefined","end","exports"],"sources":["schema.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport type { ComponentMain } from '@teambit/component';\nimport pMapSeries from 'p-map-series';\nimport type { Logger } from '@teambit/logger';\nimport type { APISchema } from '@teambit/semantics.entities.semantic-schema';\nimport { PATTERN_HELP } from '@teambit/legacy.constants';\nimport type { SchemaMain } from './schema.main.runtime';\n\nexport class SchemaCommand implements Command {\n name = 'schema <pattern>';\n description = 'display component API schema and type definitions';\n extendedDescription = `extracts and displays the public API structure of components including types, functions, classes, and interfaces.\nshows detailed type information, function signatures, and JSDoc documentation for exported elements.\nuseful for understanding component interfaces and generating documentation.\n\n${PATTERN_HELP('schema')}`;\n group = 'info-analysis';\n options = [\n ['r', 'remote', 'fetch schema from remote scope (works for components not in workspace)'],\n ['j', 'json', 'return the component schema in json format'],\n ] as CommandOptions;\n\n constructor(\n private schema: SchemaMain,\n private component: ComponentMain,\n private logger: Logger\n ) {}\n\n async report([pattern]: [string], { remote }: { remote: boolean }): Promise<string> {\n const schemas = await this.getSchemas([pattern], remote);\n return schemas.map((schema) => schema.toStringPerType()).join('\\n\\n\\n');\n }\n\n async json([pattern]: [string], { remote }: { remote: boolean }): Promise<Record<string, any>> {\n const schemas = await this.getSchemas([pattern], remote);\n return schemas.map((schema) => schema.toObject());\n }\n\n private async getSchemas([pattern]: [string], remote = false): Promise<APISchema[]> {\n if (remote) {\n const schema = await this.schema.getSchemaFromRemote(pattern);\n return [schema];\n }\n const host = this.component.getHost();\n const ids = await host.idsByPattern(pattern, true);\n const components = await host.getMany(ids);\n const longRunningLog = this.logger.createLongProcessLogger('generating schema', ids.length);\n const results = await pMapSeries(components, (component) => {\n longRunningLog.logProgress(component.id.toString());\n return this.schema.getSchema(component, undefined, true);\n });\n longRunningLog.end();\n return results;\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA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I,CAACK,OAAO,CAACH,GAAG,CAAC;IAC1C,MAAMI,cAAc,GAAG,IAAI,CAACnB,MAAM,CAACoB,uBAAuB,CAAC,mBAAmB,EAAEL,GAAG,CAACM,MAAM,CAAC;IAC3F,MAAMC,OAAO,GAAG,MAAM,IAAAC,qBAAU,EAACN,UAAU,EAAGlB,SAAS,IAAK;MAC1DoB,cAAc,CAACK,WAAW,CAACzB,SAAS,CAAC0B,EAAE,CAACC,QAAQ,CAAC,CAAC,CAAC;MACnD,OAAO,IAAI,CAAC5B,MAAM,CAAC6B,SAAS,CAAC5B,SAAS,EAAE6B,SAAS,EAAE,IAAI,CAAC;IAC1D,CAAC,CAAC;IACFT,cAAc,CAACU,GAAG,CAAC,CAAC;IACpB,OAAOP,OAAO;EAChB;AACF;AAACQ,OAAA,CAAAlC,aAAA,GAAAA,aAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "name": "@teambit/schema",
3
- "version": "1.0.749",
3
+ "version": "1.0.751",
4
4
  "homepage": "https://bit.cloud/teambit/semantics/schema",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.semantics",
8
8
  "name": "schema",
9
- "version": "1.0.749"
9
+ "version": "1.0.751"
10
10
  },
11
11
  "dependencies": {
12
12
  "p-map-series": "2.1.0",
13
13
  "graphql-tag": "2.12.1",
14
14
  "graphql-type-json": "0.3.2",
15
15
  "fs-extra": "10.0.0",
16
- "@teambit/semantics.entities.semantic-schema": "0.0.92",
17
16
  "@teambit/harmony": "0.4.7",
18
- "@teambit/cli": "0.0.1272",
19
- "@teambit/legacy.constants": "0.0.17",
20
- "@teambit/logger": "0.0.1365",
21
- "@teambit/defender.prettier.config-mutator": "0.0.109",
22
- "@teambit/scope.network": "0.0.73",
23
- "@teambit/envs": "1.0.749",
24
- "@teambit/component": "1.0.749",
25
- "@teambit/formatter": "1.0.749",
26
- "@teambit/graphql": "1.0.749",
27
- "@teambit/builder": "1.0.749",
28
- "@teambit/scope": "1.0.749",
29
- "@teambit/typescript": "1.0.749",
30
- "@teambit/workspace": "1.0.749"
17
+ "@teambit/semantics.entities.semantic-schema": "0.0.93",
18
+ "@teambit/envs": "1.0.751",
19
+ "@teambit/component": "1.0.751",
20
+ "@teambit/formatter": "1.0.751",
21
+ "@teambit/cli": "0.0.1273",
22
+ "@teambit/legacy.constants": "0.0.18",
23
+ "@teambit/logger": "0.0.1366",
24
+ "@teambit/graphql": "1.0.751",
25
+ "@teambit/builder": "1.0.751",
26
+ "@teambit/defender.prettier.config-mutator": "0.0.110",
27
+ "@teambit/scope.network": "0.0.74",
28
+ "@teambit/scope": "1.0.751",
29
+ "@teambit/typescript": "1.0.751",
30
+ "@teambit/workspace": "1.0.751"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/fs-extra": "9.0.7",
34
34
  "chai-subset": "^1.6.0",
35
35
  "@types/mocha": "9.1.0",
36
36
  "@teambit/component-id": "1.2.4",
37
- "@teambit/harmony.testing.load-aspect": "0.0.332",
38
37
  "@teambit/harmony.envs.core-aspect-env": "0.0.78",
39
- "@teambit/tracker": "1.0.749",
40
- "@teambit/workspace.testing.mock-workspace": "0.0.122"
38
+ "@teambit/harmony.testing.load-aspect": "0.0.333",
39
+ "@teambit/tracker": "1.0.751",
40
+ "@teambit/workspace.testing.mock-workspace": "0.0.123"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^17.0.0 || ^18.0.0",