@teambit/config 0.0.514 → 0.0.517

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/use.cmd.d.ts CHANGED
@@ -5,6 +5,10 @@ export declare class UseCmd implements Command {
5
5
  name: string;
6
6
  group: string;
7
7
  description: string;
8
+ arguments: {
9
+ name: string;
10
+ description: string;
11
+ }[];
8
12
  alias: string;
9
13
  options: CommandOptions;
10
14
  loader: boolean;
package/dist/use.cmd.js CHANGED
@@ -48,9 +48,13 @@ function _chalk() {
48
48
  class UseCmd {
49
49
  constructor(config) {
50
50
  this.config = config;
51
- (0, _defineProperty2().default)(this, "name", 'use [ids...]');
51
+ (0, _defineProperty2().default)(this, "name", 'use [component-ids...]');
52
52
  (0, _defineProperty2().default)(this, "group", 'collaborate');
53
- (0, _defineProperty2().default)(this, "description", 'set up aspects in the workspace/scope config');
53
+ (0, _defineProperty2().default)(this, "description", 'set aspects in the workspace/scope config to make them loadable by the workspace/scope');
54
+ (0, _defineProperty2().default)(this, "arguments", [{
55
+ name: 'component-ids...',
56
+ description: 'the component IDs of the aspects'
57
+ }]);
54
58
  (0, _defineProperty2().default)(this, "alias", '');
55
59
  (0, _defineProperty2().default)(this, "options", []);
56
60
  (0, _defineProperty2().default)(this, "loader", true);
@@ -1 +1 @@
1
- {"version":3,"names":["UseCmd","constructor","config","report","ids","workspaceConfig","scopeConfig","Error","preAddingAspectFunctions","preAddingAspectsSlot","toArray","componentIds","Promise","all","map","func","flat","forEach","compId","setExtension","overrideExisting","ignoreVersion","write","dir","path","dirname","chalk","green","join"],"sources":["use.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport path from 'path';\nimport chalk from 'chalk';\nimport { ConfigMain } from '@teambit/config';\n\nexport class UseCmd implements Command {\n name = 'use [ids...]';\n group = 'collaborate';\n description = 'set up aspects in the workspace/scope config';\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private config: ConfigMain) {}\n\n async report([ids = []]: [string[]]): Promise<any> {\n const config = this.config.workspaceConfig || this.config.scopeConfig;\n if (!config) {\n throw new Error(`please run \"bit use\" from either a workspace or a scope`);\n }\n const preAddingAspectFunctions = this.config.preAddingAspectsSlot?.toArray();\n if (!preAddingAspectFunctions) throw new Error(`can't find any registration to the preAddingAspects slot`);\n const componentIds = (await Promise.all(preAddingAspectFunctions.map(([, func]) => func(ids)))).flat();\n\n componentIds.forEach((compId) => {\n config.setExtension(\n compId,\n {},\n {\n overrideExisting: false,\n ignoreVersion: false,\n }\n );\n });\n await config.write({ dir: path.dirname(config.path) });\n\n return chalk.green(`the following aspect(s) were saved into ${\n this.config.workspaceConfig ? 'workspace.jsonc' : 'scopes.jsonc'\n } file:\n${componentIds.join('\\n')}`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,MAAN,CAAgC;EAUrCC,WAAW,CAASC,MAAT,EAA6B;IAAA,KAApBA,MAAoB,GAApBA,MAAoB;IAAA,8CATjC,cASiC;IAAA,+CARhC,aAQgC;IAAA,qDAP1B,8CAO0B;IAAA,+CANhC,EAMgC;IAAA,iDAL9B,EAK8B;IAAA,gDAJ/B,IAI+B;IAAA,mDAH5B,IAG4B;IAAA,kDAF7B,IAE6B;EAAE;;EAE9B,MAANC,MAAM,CAAC,CAACC,GAAG,GAAG,EAAP,CAAD,EAAuC;IAAA;;IACjD,MAAMF,MAAM,GAAG,KAAKA,MAAL,CAAYG,eAAZ,IAA+B,KAAKH,MAAL,CAAYI,WAA1D;;IACA,IAAI,CAACJ,MAAL,EAAa;MACX,MAAM,IAAIK,KAAJ,CAAW,yDAAX,CAAN;IACD;;IACD,MAAMC,wBAAwB,4BAAG,KAAKN,MAAL,CAAYO,oBAAf,0DAAG,sBAAkCC,OAAlC,EAAjC;IACA,IAAI,CAACF,wBAAL,EAA+B,MAAM,IAAID,KAAJ,CAAW,0DAAX,CAAN;IAC/B,MAAMI,YAAY,GAAG,CAAC,MAAMC,OAAO,CAACC,GAAR,CAAYL,wBAAwB,CAACM,GAAzB,CAA6B,CAAC,GAAGC,IAAH,CAAD,KAAcA,IAAI,CAACX,GAAD,CAA/C,CAAZ,CAAP,EAA2EY,IAA3E,EAArB;IAEAL,YAAY,CAACM,OAAb,CAAsBC,MAAD,IAAY;MAC/BhB,MAAM,CAACiB,YAAP,CACED,MADF,EAEE,EAFF,EAGE;QACEE,gBAAgB,EAAE,KADpB;QAEEC,aAAa,EAAE;MAFjB,CAHF;IAQD,CATD;IAUA,MAAMnB,MAAM,CAACoB,KAAP,CAAa;MAAEC,GAAG,EAAEC,eAAA,CAAKC,OAAL,CAAavB,MAAM,CAACsB,IAApB;IAAP,CAAb,CAAN;IAEA,OAAOE,gBAAA,CAAMC,KAAN,CAAa,2CAClB,KAAKzB,MAAL,CAAYG,eAAZ,GAA8B,iBAA9B,GAAkD,cACnD;AACL,EAAEM,YAAY,CAACiB,IAAb,CAAkB,IAAlB,CAAwB,EAHf,CAAP;EAID;;AArCoC"}
1
+ {"version":3,"names":["UseCmd","constructor","config","name","description","report","ids","workspaceConfig","scopeConfig","Error","preAddingAspectFunctions","preAddingAspectsSlot","toArray","componentIds","Promise","all","map","func","flat","forEach","compId","setExtension","overrideExisting","ignoreVersion","write","dir","path","dirname","chalk","green","join"],"sources":["use.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport path from 'path';\nimport chalk from 'chalk';\nimport { ConfigMain } from '@teambit/config';\n\nexport class UseCmd implements Command {\n name = 'use [component-ids...]';\n group = 'collaborate';\n description = 'set aspects in the workspace/scope config to make them loadable by the workspace/scope';\n arguments = [{ name: 'component-ids...', description: 'the component IDs of the aspects' }];\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n\n constructor(private config: ConfigMain) {}\n\n async report([ids = []]: [string[]]): Promise<any> {\n const config = this.config.workspaceConfig || this.config.scopeConfig;\n if (!config) {\n throw new Error(`please run \"bit use\" from either a workspace or a scope`);\n }\n const preAddingAspectFunctions = this.config.preAddingAspectsSlot?.toArray();\n if (!preAddingAspectFunctions) throw new Error(`can't find any registration to the preAddingAspects slot`);\n const componentIds = (await Promise.all(preAddingAspectFunctions.map(([, func]) => func(ids)))).flat();\n\n componentIds.forEach((compId) => {\n config.setExtension(\n compId,\n {},\n {\n overrideExisting: false,\n ignoreVersion: false,\n }\n );\n });\n await config.write({ dir: path.dirname(config.path) });\n\n return chalk.green(`the following aspect(s) were saved into ${\n this.config.workspaceConfig ? 'workspace.jsonc' : 'scopes.jsonc'\n } file:\n${componentIds.join('\\n')}`);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGO,MAAMA,MAAN,CAAgC;EAWrCC,WAAW,CAASC,MAAT,EAA6B;IAAA,KAApBA,MAAoB,GAApBA,MAAoB;IAAA,8CAVjC,wBAUiC;IAAA,+CAThC,aASgC;IAAA,qDAR1B,wFAQ0B;IAAA,mDAP5B,CAAC;MAAEC,IAAI,EAAE,kBAAR;MAA4BC,WAAW,EAAE;IAAzC,CAAD,CAO4B;IAAA,+CANhC,EAMgC;IAAA,iDAL9B,EAK8B;IAAA,gDAJ/B,IAI+B;IAAA,mDAH5B,IAG4B;IAAA,kDAF7B,IAE6B;EAAE;;EAE9B,MAANC,MAAM,CAAC,CAACC,GAAG,GAAG,EAAP,CAAD,EAAuC;IAAA;;IACjD,MAAMJ,MAAM,GAAG,KAAKA,MAAL,CAAYK,eAAZ,IAA+B,KAAKL,MAAL,CAAYM,WAA1D;;IACA,IAAI,CAACN,MAAL,EAAa;MACX,MAAM,IAAIO,KAAJ,CAAW,yDAAX,CAAN;IACD;;IACD,MAAMC,wBAAwB,4BAAG,KAAKR,MAAL,CAAYS,oBAAf,0DAAG,sBAAkCC,OAAlC,EAAjC;IACA,IAAI,CAACF,wBAAL,EAA+B,MAAM,IAAID,KAAJ,CAAW,0DAAX,CAAN;IAC/B,MAAMI,YAAY,GAAG,CAAC,MAAMC,OAAO,CAACC,GAAR,CAAYL,wBAAwB,CAACM,GAAzB,CAA6B,CAAC,GAAGC,IAAH,CAAD,KAAcA,IAAI,CAACX,GAAD,CAA/C,CAAZ,CAAP,EAA2EY,IAA3E,EAArB;IAEAL,YAAY,CAACM,OAAb,CAAsBC,MAAD,IAAY;MAC/BlB,MAAM,CAACmB,YAAP,CACED,MADF,EAEE,EAFF,EAGE;QACEE,gBAAgB,EAAE,KADpB;QAEEC,aAAa,EAAE;MAFjB,CAHF;IAQD,CATD;IAUA,MAAMrB,MAAM,CAACsB,KAAP,CAAa;MAAEC,GAAG,EAAEC,eAAA,CAAKC,OAAL,CAAazB,MAAM,CAACwB,IAApB;IAAP,CAAb,CAAN;IAEA,OAAOE,gBAAA,CAAMC,KAAN,CAAa,2CAClB,KAAK3B,MAAL,CAAYK,eAAZ,GAA8B,iBAA9B,GAAkD,cACnD;AACL,EAAEM,YAAY,CAACiB,IAAb,CAAkB,IAAlB,CAAwB,EAHf,CAAP;EAID;;AAtCoC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/config",
3
- "version": "0.0.514",
3
+ "version": "0.0.517",
4
4
  "homepage": "https://bit.dev/teambit/harmony/config",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "config",
9
- "version": "0.0.514"
9
+ "version": "0.0.517"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -16,7 +16,7 @@
16
16
  "@babel/runtime": "7.12.18",
17
17
  "core-js": "^3.0.0",
18
18
  "@teambit/harmony": "0.3.3",
19
- "@teambit/cli": "0.0.501",
19
+ "@teambit/cli": "0.0.504",
20
20
  "@teambit/bit-error": "0.0.394"
21
21
  },
22
22
  "devDependencies": {
@@ -30,7 +30,7 @@
30
30
  "@types/node": "12.20.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@teambit/legacy": "1.0.281",
33
+ "@teambit/legacy": "1.0.284",
34
34
  "react-dom": "^16.8.0 || ^17.0.0",
35
35
  "react": "^16.8.0 || ^17.0.0"
36
36
  },
@@ -58,7 +58,7 @@
58
58
  "react": "-"
59
59
  },
60
60
  "peerDependencies": {
61
- "@teambit/legacy": "1.0.281",
61
+ "@teambit/legacy": "1.0.284",
62
62
  "react-dom": "^16.8.0 || ^17.0.0",
63
63
  "react": "^16.8.0 || ^17.0.0"
64
64
  }