@teambit/schema 1.0.623 → 1.0.624

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.623/dist/schema.composition.js';
2
- import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.623/dist/mock/button/button.composition.js';
3
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.623/dist/schema.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.624/dist/schema.composition.js';
2
+ import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.624/dist/mock/button/button.composition.js';
3
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.624/dist/schema.docs.mdx';
4
4
 
5
5
  export const compositions = [compositions_0, compositions_1];
6
6
  export const overview = [overview_0];
@@ -33,7 +33,7 @@ class SchemaCommand {
33
33
  Shows detailed information about exported elements including classes, interfaces, functions, types, and enums with their respective signatures and documentation.
34
34
 
35
35
  ${(0, _legacy().PATTERN_HELP)('schema')}`);
36
- _defineProperty(this, "group", 'development');
36
+ _defineProperty(this, "group", 'info-analysis');
37
37
  _defineProperty(this, "options", [['r', 'remote', 'fetch schema from remote scope (works for components not in workspace)'], ['j', 'json', 'return the component schema in json format']]);
38
38
  }
39
39
  async report([pattern], {
@@ -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 { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentMain } from '@teambit/component';\nimport pMapSeries from 'p-map-series';\nimport { Logger } from '@teambit/logger';\nimport { 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 = 'development';\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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ACe,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 { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentMain } from '@teambit/component';\nimport pMapSeries from 'p-map-series';\nimport { Logger } from '@teambit/logger';\nimport { 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,W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AAK;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,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/schema",
3
- "version": "1.0.623",
3
+ "version": "1.0.624",
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.623"
9
+ "version": "1.0.624"
10
10
  },
11
11
  "dependencies": {
12
12
  "p-map-series": "2.1.0",
@@ -15,19 +15,19 @@
15
15
  "fs-extra": "10.0.0",
16
16
  "@teambit/harmony": "0.4.7",
17
17
  "@teambit/semantics.entities.semantic-schema": "0.0.86",
18
- "@teambit/envs": "1.0.623",
19
- "@teambit/component": "1.0.623",
20
- "@teambit/formatter": "1.0.623",
21
- "@teambit/cli": "0.0.1200",
18
+ "@teambit/envs": "1.0.624",
19
+ "@teambit/component": "1.0.624",
20
+ "@teambit/formatter": "1.0.624",
21
+ "@teambit/cli": "0.0.1201",
22
22
  "@teambit/legacy.constants": "0.0.11",
23
- "@teambit/logger": "0.0.1293",
24
- "@teambit/graphql": "1.0.623",
25
- "@teambit/builder": "1.0.623",
23
+ "@teambit/logger": "0.0.1294",
24
+ "@teambit/graphql": "1.0.624",
25
+ "@teambit/builder": "1.0.624",
26
26
  "@teambit/defender.prettier.config-mutator": "0.0.105",
27
27
  "@teambit/scope.network": "0.0.50",
28
- "@teambit/scope": "1.0.623",
29
- "@teambit/typescript": "1.0.623",
30
- "@teambit/workspace": "1.0.623"
28
+ "@teambit/scope": "1.0.624",
29
+ "@teambit/typescript": "1.0.624",
30
+ "@teambit/workspace": "1.0.624"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/fs-extra": "9.0.7",
@@ -36,7 +36,7 @@
36
36
  "@teambit/component-id": "1.2.4",
37
37
  "@teambit/harmony.envs.core-aspect-env": "0.0.69",
38
38
  "@teambit/harmony.testing.load-aspect": "0.0.307",
39
- "@teambit/tracker": "1.0.623",
39
+ "@teambit/tracker": "1.0.624",
40
40
  "@teambit/workspace.testing.mock-workspace": "0.0.89"
41
41
  },
42
42
  "peerDependencies": {