@teambit/application 0.0.401 → 0.0.404

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/app.cmd.js CHANGED
@@ -51,7 +51,7 @@ class AppListCmd {
51
51
  constructor(applicationAspect) {
52
52
  this.applicationAspect = applicationAspect;
53
53
  (0, _defineProperty2().default)(this, "name", 'list');
54
- (0, _defineProperty2().default)(this, "description", 'list all registered applications');
54
+ (0, _defineProperty2().default)(this, "description", 'list all registered apps');
55
55
  (0, _defineProperty2().default)(this, "alias", '');
56
56
  (0, _defineProperty2().default)(this, "group", 'apps');
57
57
  (0, _defineProperty2().default)(this, "options", [['j', 'json', 'return the component data in json format']]);
@@ -77,7 +77,7 @@ exports.AppListCmd = AppListCmd;
77
77
  class AppCmd {
78
78
  constructor() {
79
79
  (0, _defineProperty2().default)(this, "name", 'app <sub-command>');
80
- (0, _defineProperty2().default)(this, "description", 'manage applications');
80
+ (0, _defineProperty2().default)(this, "description", 'Manages apps');
81
81
  (0, _defineProperty2().default)(this, "alias", '');
82
82
  (0, _defineProperty2().default)(this, "group", 'apps');
83
83
  (0, _defineProperty2().default)(this, "commands", []);
@@ -1 +1 @@
1
- {"version":3,"names":["AppListCmd","constructor","applicationAspect","report","args","json","appComponents","mapApps","JSON","stringify","length","chalk","yellow","rows","flatMap","id","apps","map","app","name","table","CLITable","render","AppCmd"],"sources":["app.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\nexport class AppListCmd implements Command {\n name = 'list';\n description = 'list all registered applications';\n alias = '';\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const appComponents = this.applicationAspect.mapApps();\n if (json) return JSON.stringify(appComponents, null, 2);\n if (!appComponents.length) return chalk.yellow('no apps found');\n\n const rows = appComponents.flatMap(([id, apps]) => {\n return apps.map((app) => [id, app.name]);\n });\n\n const table = new CLITable(['id', 'name'], rows);\n return table.render();\n }\n}\n\nexport class AppCmd implements Command {\n name = 'app <sub-command>';\n description = 'manage applications';\n alias = '';\n group = 'apps';\n commands: Command[] = [];\n options = [] as CommandOptions;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [string]) {\n // it should never be here. Yargs throws an error before reaching this method.\n return `Please specify a sub-command`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAJA;AAEA;AAKO,MAAMA,UAAN,CAAoC;EAOzCC,WAAW,CAASC,iBAAT,EAA6C;IAAA,KAApCA,iBAAoC,GAApCA,iBAAoC;IAAA,8CANjD,MAMiD;IAAA,qDAL1C,kCAK0C;IAAA,+CAJhD,EAIgD;IAAA,+CAHhD,MAGgD;IAAA,iDAF9C,CAAC,CAAC,GAAD,EAAM,MAAN,EAAc,0CAAd,CAAD,CAE8C;EAAE;;EAE9C,MAANC,MAAM,CAACC,IAAD,EAAiB;IAAEC;EAAF,CAAjB,EAA8C;IACxD,MAAMC,aAAa,GAAG,KAAKJ,iBAAL,CAAuBK,OAAvB,EAAtB;IACA,IAAIF,IAAJ,EAAU,OAAOG,IAAI,CAACC,SAAL,CAAeH,aAAf,EAA8B,IAA9B,EAAoC,CAApC,CAAP;IACV,IAAI,CAACA,aAAa,CAACI,MAAnB,EAA2B,OAAOC,gBAAA,CAAMC,MAAN,CAAa,eAAb,CAAP;IAE3B,MAAMC,IAAI,GAAGP,aAAa,CAACQ,OAAd,CAAsB,CAAC,CAACC,EAAD,EAAKC,IAAL,CAAD,KAAgB;MACjD,OAAOA,IAAI,CAACC,GAAL,CAAUC,GAAD,IAAS,CAACH,EAAD,EAAKG,GAAG,CAACC,IAAT,CAAlB,CAAP;IACD,CAFY,CAAb;IAIA,MAAMC,KAAK,GAAG,KAAIC,oBAAJ,EAAa,CAAC,IAAD,EAAO,MAAP,CAAb,EAA6BR,IAA7B,CAAd;IACA,OAAOO,KAAK,CAACE,MAAN,EAAP;EACD;;AApBwC;;;;AAuBpC,MAAMC,MAAN,CAAgC;EAAA;IAAA,8CAC9B,mBAD8B;IAAA,qDAEvB,qBAFuB;IAAA,+CAG7B,EAH6B;IAAA,+CAI7B,MAJ6B;IAAA,kDAKf,EALe;IAAA,iDAM3B,EAN2B;EAAA;;EAQrC;EACY,MAANpB,MAAM,CAACC,IAAD,EAAiB;IAC3B;IACA,OAAQ,8BAAR;EACD;;AAZoC"}
1
+ {"version":3,"names":["AppListCmd","constructor","applicationAspect","report","args","json","appComponents","mapApps","JSON","stringify","length","chalk","yellow","rows","flatMap","id","apps","map","app","name","table","CLITable","render","AppCmd"],"sources":["app.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\nexport class AppListCmd implements Command {\n name = 'list';\n description = 'list all registered apps';\n alias = '';\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const appComponents = this.applicationAspect.mapApps();\n if (json) return JSON.stringify(appComponents, null, 2);\n if (!appComponents.length) return chalk.yellow('no apps found');\n\n const rows = appComponents.flatMap(([id, apps]) => {\n return apps.map((app) => [id, app.name]);\n });\n\n const table = new CLITable(['id', 'name'], rows);\n return table.render();\n }\n}\n\nexport class AppCmd implements Command {\n name = 'app <sub-command>';\n description = 'Manages apps';\n alias = '';\n group = 'apps';\n commands: Command[] = [];\n options = [] as CommandOptions;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [string]) {\n // it should never be here. Yargs throws an error before reaching this method.\n return `Please specify a sub-command`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAJA;AAEA;AAKO,MAAMA,UAAN,CAAoC;EAOzCC,WAAW,CAASC,iBAAT,EAA6C;IAAA,KAApCA,iBAAoC,GAApCA,iBAAoC;IAAA,8CANjD,MAMiD;IAAA,qDAL1C,0BAK0C;IAAA,+CAJhD,EAIgD;IAAA,+CAHhD,MAGgD;IAAA,iDAF9C,CAAC,CAAC,GAAD,EAAM,MAAN,EAAc,0CAAd,CAAD,CAE8C;EAAE;;EAE9C,MAANC,MAAM,CAACC,IAAD,EAAiB;IAAEC;EAAF,CAAjB,EAA8C;IACxD,MAAMC,aAAa,GAAG,KAAKJ,iBAAL,CAAuBK,OAAvB,EAAtB;IACA,IAAIF,IAAJ,EAAU,OAAOG,IAAI,CAACC,SAAL,CAAeH,aAAf,EAA8B,IAA9B,EAAoC,CAApC,CAAP;IACV,IAAI,CAACA,aAAa,CAACI,MAAnB,EAA2B,OAAOC,gBAAA,CAAMC,MAAN,CAAa,eAAb,CAAP;IAE3B,MAAMC,IAAI,GAAGP,aAAa,CAACQ,OAAd,CAAsB,CAAC,CAACC,EAAD,EAAKC,IAAL,CAAD,KAAgB;MACjD,OAAOA,IAAI,CAACC,GAAL,CAAUC,GAAD,IAAS,CAACH,EAAD,EAAKG,GAAG,CAACC,IAAT,CAAlB,CAAP;IACD,CAFY,CAAb;IAIA,MAAMC,KAAK,GAAG,KAAIC,oBAAJ,EAAa,CAAC,IAAD,EAAO,MAAP,CAAb,EAA6BR,IAA7B,CAAd;IACA,OAAOO,KAAK,CAACE,MAAN,EAAP;EACD;;AApBwC;;;;AAuBpC,MAAMC,MAAN,CAAgC;EAAA;IAAA,8CAC9B,mBAD8B;IAAA,qDAEvB,cAFuB;IAAA,+CAG7B,EAH6B;IAAA,+CAI7B,MAJ6B;IAAA,kDAKf,EALe;IAAA,iDAM3B,EAN2B;EAAA;;EAQrC;EACY,MAANpB,MAAM,CAACC,IAAD,EAAiB;IAC3B;IACA,OAAQ,8BAAR;EACD;;AAZoC"}
package/dist/run.cmd.d.ts CHANGED
@@ -15,6 +15,10 @@ export declare class RunCmd implements Command {
15
15
  private logger;
16
16
  name: string;
17
17
  description: string;
18
+ arguments: {
19
+ name: string;
20
+ description: string;
21
+ }[];
18
22
  alias: string;
19
23
  group: string;
20
24
  options: CommandOptions;
package/dist/run.cmd.js CHANGED
@@ -49,8 +49,12 @@ class RunCmd {
49
49
  application, logger) {
50
50
  this.application = application;
51
51
  this.logger = logger;
52
- (0, _defineProperty2().default)(this, "name", 'run <app>');
53
- (0, _defineProperty2().default)(this, "description", 'run an application');
52
+ (0, _defineProperty2().default)(this, "name", 'run <app-name>');
53
+ (0, _defineProperty2().default)(this, "description", "run an app (independent of bit's dev server)");
54
+ (0, _defineProperty2().default)(this, "arguments", [{
55
+ name: 'app-name',
56
+ description: "the app's name is registered by the app (run 'bit app list' to list the names of the available apps)"
57
+ }]);
54
58
  (0, _defineProperty2().default)(this, "alias", 'c');
55
59
  (0, _defineProperty2().default)(this, "group", 'apps');
56
60
  (0, _defineProperty2().default)(this, "options", [['d', 'dev', 'start the application in dev mode.'], ['v', 'verbose', 'showing verbose output for inspection and prints stack trace'], ['', 'skip-watch', 'avoid running the watch process that compiles components in the background']]);
@@ -1 +1 @@
1
- {"version":3,"names":["RunCmd","constructor","application","logger","render","appName","dev","skipWatch","port","runApp"],"sources":["run.cmd.tsx"],"sourcesContent":["import React from 'react';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Text } from 'ink';\nimport { Logger } from '@teambit/logger';\nimport { ApplicationMain } from './application.main.runtime';\n\ntype RunOptions = {\n dev: boolean;\n verbose: boolean;\n skipWatch: boolean;\n};\n\nexport class RunCmd implements Command {\n name = 'run <app>';\n description = 'run an application';\n alias = 'c';\n group = 'apps';\n options = [\n ['d', 'dev', 'start the application in dev mode.'],\n ['v', 'verbose', 'showing verbose output for inspection and prints stack trace'],\n ['', 'skip-watch', 'avoid running the watch process that compiles components in the background'],\n ] as CommandOptions;\n\n constructor(\n /**\n * access to the extension instance.\n */\n private application: ApplicationMain,\n\n private logger: Logger\n ) {}\n\n async render([appName]: [string], { dev, skipWatch }: RunOptions): Promise<React.ReactElement> {\n // remove wds logs until refactoring webpack to a worker through the Worker aspect.\n const { port } = await this.application.runApp(appName, {\n dev,\n skipWatch,\n });\n\n if (port) {\n return (\n <Text>\n {appName} app is running on http://localhost:{port}\n </Text>\n );\n }\n return <Text>{appName} app is running</Text>;\n // return <UIServerConsole appName={appName} futureUiServer={uiServer} />;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAUO,MAAMA,MAAN,CAAgC;EAWrCC,WAAW;EACT;AACJ;AACA;EACYC,WAJC,EAMDC,MANC,EAOT;IAAA,KAHQD,WAGR,GAHQA,WAGR;IAAA,KADQC,MACR,GADQA,MACR;IAAA,8CAjBK,WAiBL;IAAA,qDAhBY,oBAgBZ;IAAA,+CAfM,GAeN;IAAA,+CAdM,MAcN;IAAA,iDAbQ,CACR,CAAC,GAAD,EAAM,KAAN,EAAa,oCAAb,CADQ,EAER,CAAC,GAAD,EAAM,SAAN,EAAiB,8DAAjB,CAFQ,EAGR,CAAC,EAAD,EAAK,YAAL,EAAmB,4EAAnB,CAHQ,CAaR;EAAE;;EAEQ,MAANC,MAAM,CAAC,CAACC,OAAD,CAAD,EAAsB;IAAEC,GAAF;IAAOC;EAAP,CAAtB,EAAmF;IAC7F;IACA,MAAM;MAAEC;IAAF,IAAW,MAAM,KAAKN,WAAL,CAAiBO,MAAjB,CAAwBJ,OAAxB,EAAiC;MACtDC,GADsD;MAEtDC;IAFsD,CAAjC,CAAvB;;IAKA,IAAIC,IAAJ,EAAU;MACR,oBACE,+BAAC,WAAD,QACGH,OADH,0CACgDG,IADhD,CADF;IAKD;;IACD,oBAAO,+BAAC,WAAD,QAAOH,OAAP,oBAAP,CAd6F,CAe7F;EACD;;AApCoC"}
1
+ {"version":3,"names":["RunCmd","constructor","application","logger","name","description","render","appName","dev","skipWatch","port","runApp"],"sources":["run.cmd.tsx"],"sourcesContent":["import React from 'react';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { Text } from 'ink';\nimport { Logger } from '@teambit/logger';\nimport { ApplicationMain } from './application.main.runtime';\n\ntype RunOptions = {\n dev: boolean;\n verbose: boolean;\n skipWatch: boolean;\n};\n\nexport class RunCmd implements Command {\n name = 'run <app-name>';\n description = \"run an app (independent of bit's dev server)\";\n arguments = [\n {\n name: 'app-name',\n description:\n \"the app's name is registered by the app (run 'bit app list' to list the names of the available apps)\",\n },\n ];\n alias = 'c';\n group = 'apps';\n options = [\n ['d', 'dev', 'start the application in dev mode.'],\n ['v', 'verbose', 'showing verbose output for inspection and prints stack trace'],\n ['', 'skip-watch', 'avoid running the watch process that compiles components in the background'],\n ] as CommandOptions;\n\n constructor(\n /**\n * access to the extension instance.\n */\n private application: ApplicationMain,\n\n private logger: Logger\n ) {}\n\n async render([appName]: [string], { dev, skipWatch }: RunOptions): Promise<React.ReactElement> {\n // remove wds logs until refactoring webpack to a worker through the Worker aspect.\n const { port } = await this.application.runApp(appName, {\n dev,\n skipWatch,\n });\n\n if (port) {\n return (\n <Text>\n {appName} app is running on http://localhost:{port}\n </Text>\n );\n }\n return <Text>{appName} app is running</Text>;\n // return <UIServerConsole appName={appName} futureUiServer={uiServer} />;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAUO,MAAMA,MAAN,CAAgC;EAkBrCC,WAAW;EACT;AACJ;AACA;EACYC,WAJC,EAMDC,MANC,EAOT;IAAA,KAHQD,WAGR,GAHQA,WAGR;IAAA,KADQC,MACR,GADQA,MACR;IAAA,8CAxBK,gBAwBL;IAAA,qDAvBY,8CAuBZ;IAAA,mDAtBU,CACV;MACEC,IAAI,EAAE,UADR;MAEEC,WAAW,EACT;IAHJ,CADU,CAsBV;IAAA,+CAfM,GAeN;IAAA,+CAdM,MAcN;IAAA,iDAbQ,CACR,CAAC,GAAD,EAAM,KAAN,EAAa,oCAAb,CADQ,EAER,CAAC,GAAD,EAAM,SAAN,EAAiB,8DAAjB,CAFQ,EAGR,CAAC,EAAD,EAAK,YAAL,EAAmB,4EAAnB,CAHQ,CAaR;EAAE;;EAEQ,MAANC,MAAM,CAAC,CAACC,OAAD,CAAD,EAAsB;IAAEC,GAAF;IAAOC;EAAP,CAAtB,EAAmF;IAC7F;IACA,MAAM;MAAEC;IAAF,IAAW,MAAM,KAAKR,WAAL,CAAiBS,MAAjB,CAAwBJ,OAAxB,EAAiC;MACtDC,GADsD;MAEtDC;IAFsD,CAAjC,CAAvB;;IAKA,IAAIC,IAAJ,EAAU;MACR,oBACE,+BAAC,WAAD,QACGH,OADH,0CACgDG,IADhD,CADF;IAKD;;IACD,oBAAO,+BAAC,WAAD,QAAOH,OAAP,oBAAP,CAd6F,CAe7F;EACD;;AA3CoC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/application",
3
- "version": "0.0.401",
3
+ "version": "0.0.404",
4
4
  "homepage": "https://bit.dev/teambit/harmony/application",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "application",
9
- "version": "0.0.401"
9
+ "version": "0.0.404"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -16,15 +16,15 @@
16
16
  "@babel/runtime": "7.12.18",
17
17
  "core-js": "^3.0.0",
18
18
  "@teambit/harmony": "0.3.3",
19
- "@teambit/builder": "0.0.759",
20
- "@teambit/component": "0.0.759",
21
- "@teambit/isolator": "0.0.759",
22
- "@teambit/envs": "0.0.759",
19
+ "@teambit/builder": "0.0.762",
20
+ "@teambit/component": "0.0.762",
21
+ "@teambit/isolator": "0.0.762",
22
+ "@teambit/envs": "0.0.762",
23
23
  "@teambit/cli-table": "0.0.34",
24
- "@teambit/cli": "0.0.501",
25
- "@teambit/aspect-loader": "0.0.759",
26
- "@teambit/logger": "0.0.594",
27
- "@teambit/workspace": "0.0.759"
24
+ "@teambit/cli": "0.0.503",
25
+ "@teambit/aspect-loader": "0.0.762",
26
+ "@teambit/logger": "0.0.596",
27
+ "@teambit/workspace": "0.0.762"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/react": "^17.0.8",
@@ -36,7 +36,7 @@
36
36
  "@types/node": "12.20.4"
37
37
  },
38
38
  "peerDependencies": {
39
- "@teambit/legacy": "1.0.281",
39
+ "@teambit/legacy": "1.0.283",
40
40
  "react-dom": "^16.8.0 || ^17.0.0",
41
41
  "react": "^16.8.0 || ^17.0.0"
42
42
  },
@@ -64,7 +64,7 @@
64
64
  "react": "-"
65
65
  },
66
66
  "peerDependencies": {
67
- "@teambit/legacy": "1.0.281",
67
+ "@teambit/legacy": "1.0.283",
68
68
  "react-dom": "^16.8.0 || ^17.0.0",
69
69
  "react": "^16.8.0 || ^17.0.0"
70
70
  }
@@ -1,2 +1,2 @@
1
- export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.401/dist/application.composition.js')]
2
- export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.401/dist/application.docs.mdx')]
1
+ export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.404/dist/application.composition.js')]
2
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.404/dist/application.docs.mdx')]
package/run.cmd.tsx CHANGED
@@ -11,8 +11,15 @@ type RunOptions = {
11
11
  };
12
12
 
13
13
  export class RunCmd implements Command {
14
- name = 'run <app>';
15
- description = 'run an application';
14
+ name = 'run <app-name>';
15
+ description = "run an app (independent of bit's dev server)";
16
+ arguments = [
17
+ {
18
+ name: 'app-name',
19
+ description:
20
+ "the app's name is registered by the app (run 'bit app list' to list the names of the available apps)",
21
+ },
22
+ ];
16
23
  alias = 'c';
17
24
  group = 'apps';
18
25
  options = [