@teambit/application 1.0.82 → 1.0.83

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.
@@ -87,7 +87,7 @@ class AppContext extends _envs().ExecutionContext {
87
87
  }
88
88
 
89
89
  /**
90
- * get an instance of an aspect.
90
+ * get an instance of an aspect.
91
91
  * make sure it is loaded prior to requesting it.
92
92
  */
93
93
  getAspect(aspectId) {
@@ -1 +1 @@
1
- {"version":3,"names":["_envs","data","require","_logger","AppContext","ExecutionContext","constructor","appName","harmony","dev","appComponent","workdir","execContext","hostRootDir","port","workspaceComponentPath","envVariables","upper","envRuntime","components","createLogger","name","loggerMain","get","LoggerAspect","id","appComponentId","loggerName","toString","getAspect","aspectId","compose","appContext","overrides","exports"],"sources":["app-context.ts"],"sourcesContent":["import { ExecutionContext } from '@teambit/envs';\nimport { Harmony } from '@teambit/harmony';\nimport { Component } from '@teambit/component';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\n\nexport class AppContext extends ExecutionContext {\n constructor(\n /**\n * name of the app\n */\n readonly appName: string,\n\n /**\n * instance of harmony.\n */\n readonly harmony: Harmony,\n\n /**\n * determine whether to serve the application in dev mode.\n */\n readonly dev: boolean,\n\n /**\n * application component instance.\n */\n readonly appComponent: Component,\n\n /**\n * working directory of the component.\n */\n readonly workdir: string,\n\n /**\n * execution context of the app.\n */\n readonly execContext: ExecutionContext,\n\n /**\n * A path for the host root dir\n * Host root dir is the dir where we run the app from\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n readonly hostRootDir?: string,\n\n /**\n * A port to run the app on\n */\n readonly port?: number,\n\n /**\n * path to the application component in the workspace\n */\n readonly workspaceComponentPath?: string,\n\n /**\n * list of env variables to include.\n */\n readonly envVariables: Record<string, string> = {}\n ) {\n super(execContext.upper, execContext.envRuntime, execContext.components);\n }\n\n /**\n * return a logger instance for the env.\n */\n createLogger(name?: string): Logger {\n const loggerMain = this.harmony.get<LoggerMain>(LoggerAspect.id);\n const appComponentId = this.appComponent.id;\n const loggerName = name ? `${appComponentId.toString()}::${name}` : appComponentId.toString();\n\n return loggerMain.createLogger(loggerName);\n }\n\n /**\n * get an instance of an aspect. \n * make sure it is loaded prior to requesting it.\n */\n getAspect<T>(aspectId: string): T|undefined {\n return this.harmony.get<T>(aspectId);\n }\n\n static compose(appContext: AppContext, overrides?: Partial<AppContext>) {\n return new AppContext(\n overrides?.appName || appContext?.appName,\n overrides?.harmony || appContext?.harmony,\n overrides?.dev || appContext?.dev,\n overrides?.appComponent || appContext?.appComponent,\n overrides?.workdir || appContext?.workdir,\n overrides?.execContext || appContext?.execContext,\n overrides?.hostRootDir || appContext?.hostRootDir,\n overrides?.port || appContext?.port,\n overrides?.workspaceComponentPath || appContext?.workspaceComponentPath,\n overrides?.envVariables || appContext?.envVariables,\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,UAAU,SAASC,wBAAgB,CAAC;EAC/CC,WAAWA;EACT;AACJ;AACA;EACaC,OAAe;EAExB;AACJ;AACA;EACaC,OAAgB;EAEzB;AACJ;AACA;EACaC,GAAY;EAErB;AACJ;AACA;EACaC,YAAuB;EAEhC;AACJ;AACA;EACaC,OAAe;EAExB;AACJ;AACA;EACaC,WAA6B;EAEtC;AACJ;AACA;AACA;AACA;AACA;EACaC,WAAoB;EAE7B;AACJ;AACA;EACaC,IAAa;EAEtB;AACJ;AACA;EACaC,sBAA+B;EAExC;AACJ;AACA;EACaC,YAAoC,GAAG,CAAC,CAAC,EAClD;IACA,KA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AAVA,UAAU,uBAAVA,UAAU,CAAExB,OAAO,GACzC,CAAAyB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAExB,GAAG,MAAIuB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEvB,GAAG,GACjC,CAAAwB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEvB,YAAY,MAAIsB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEtB,YAAY,GACnD,CAAAuB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEtB,OAAO,MAAIqB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAErB,OAAO,GACzC,CAAAsB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAErB,WAAW,MAAIoB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEpB,WAAW,GACjD,CAAAqB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEpB,WAAW,MAAImB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEnB,WAAW,GACjD,CAAAoB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEnB,IAAI,MAAIkB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAElB,IAAI,GACnC,CAAAmB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAElB,sBAAsB,MAAIiB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEjB,sBAAsB,GACvE,CAAAkB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEjB,YAAY,MAAIgB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEhB,YAAY,CACrD,CAAC;EACH;AACF;AAACkB,OAAA,CAAA9B,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_envs","data","require","_logger","AppContext","ExecutionContext","constructor","appName","harmony","dev","appComponent","workdir","execContext","hostRootDir","port","workspaceComponentPath","envVariables","upper","envRuntime","components","createLogger","name","loggerMain","get","LoggerAspect","id","appComponentId","loggerName","toString","getAspect","aspectId","compose","appContext","overrides","exports"],"sources":["app-context.ts"],"sourcesContent":["import { ExecutionContext } from '@teambit/envs';\nimport { Harmony } from '@teambit/harmony';\nimport { Component } from '@teambit/component';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\n\nexport class AppContext extends ExecutionContext {\n constructor(\n /**\n * name of the app\n */\n readonly appName: string,\n\n /**\n * instance of harmony.\n */\n readonly harmony: Harmony,\n\n /**\n * determine whether to serve the application in dev mode.\n */\n readonly dev: boolean,\n\n /**\n * application component instance.\n */\n readonly appComponent: Component,\n\n /**\n * working directory of the component.\n */\n readonly workdir: string,\n\n /**\n * execution context of the app.\n */\n readonly execContext: ExecutionContext,\n\n /**\n * A path for the host root dir\n * Host root dir is the dir where we run the app from\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n readonly hostRootDir?: string,\n\n /**\n * A port to run the app on\n */\n readonly port?: number,\n\n /**\n * path to the application component in the workspace\n */\n readonly workspaceComponentPath?: string,\n\n /**\n * list of env variables to include.\n */\n readonly envVariables: Record<string, string> = {}\n ) {\n super(execContext.upper, execContext.envRuntime, execContext.components);\n }\n\n /**\n * return a logger instance for the env.\n */\n createLogger(name?: string): Logger {\n const loggerMain = this.harmony.get<LoggerMain>(LoggerAspect.id);\n const appComponentId = this.appComponent.id;\n const loggerName = name ? `${appComponentId.toString()}::${name}` : appComponentId.toString();\n\n return loggerMain.createLogger(loggerName);\n }\n\n /**\n * get an instance of an aspect.\n * make sure it is loaded prior to requesting it.\n */\n getAspect<T>(aspectId: string): T | undefined {\n return this.harmony.get<T>(aspectId);\n }\n\n static compose(appContext: AppContext, overrides?: Partial<AppContext>) {\n return new AppContext(\n overrides?.appName || appContext?.appName,\n overrides?.harmony || appContext?.harmony,\n overrides?.dev || appContext?.dev,\n overrides?.appComponent || appContext?.appComponent,\n overrides?.workdir || appContext?.workdir,\n overrides?.execContext || appContext?.execContext,\n overrides?.hostRootDir || appContext?.hostRootDir,\n overrides?.port || appContext?.port,\n overrides?.workspaceComponentPath || appContext?.workspaceComponentPath,\n overrides?.envVariables || appContext?.envVariables\n );\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,UAAU,SAASC,wBAAgB,CAAC;EAC/CC,WAAWA;EACT;AACJ;AACA;EACaC,OAAe;EAExB;AACJ;AACA;EACaC,OAAgB;EAEzB;AACJ;AACA;EACaC,GAAY;EAErB;AACJ;AACA;EACaC,YAAuB;EAEhC;AACJ;AACA;EACaC,OAAe;EAExB;AACJ;AACA;EACaC,WAA6B;EAEtC;AACJ;AACA;AACA;AACA;AACA;EACaC,WAAoB;EAE7B;AACJ;AACA;EACaC,IAAa;EAEtB;AACJ;AACA;EACaC,sBAA+B;EAExC;AACJ;AACA;EACaC,YAAoC,GAAG,CAAC,CAAC,EAClD;IACA,KAAK,CAACJ,WAAW,CAACK,KAAK,EAAEL,WAAW,CAACM,UAAU,EAAEN,WAAW,CAACO,UAAU,CAAC;IAAC,KAlDhEZ,OAAe,GAAfA,OAAe;IAAA,KAKfC,OAAgB,GAAhBA,OAAgB;IAAA,KAKhBC,GAAY,GAAZA,GAAY;IAAA,KAKZC,YAAuB,GAAvBA,YAAuB;IAAA,KAKvBC,OAAe,GAAfA,OAAe;IAAA,KAKfC,WAA6B,GAA7BA,WAA6B;IAAA,KAQ7BC,WAAoB,GAApBA,WAAoB;IAAA,KAKpBC,IAAa,GAAbA,IAAa;IAAA,KAKbC,sBAA+B,GAA/BA,sBAA+B;IAAA,KAK/BC,YAAoC,GAApCA,YAAoC;EAG/C;;EAEA;AACF;AACA;EACEI,YAAYA,C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A,UAAU,CAAEpB,WAAW,GACjD,CAAAqB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEpB,WAAW,MAAImB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEnB,WAAW,GACjD,CAAAoB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEnB,IAAI,MAAIkB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAElB,IAAI,GACnC,CAAAmB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAElB,sBAAsB,MAAIiB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEjB,sBAAsB,GACvE,CAAAkB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEjB,YAAY,MAAIgB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEhB,YAAY,CACrD,CAAC;EACH;AACF;AAACkB,OAAA,CAAA9B,UAAA,GAAAA,UAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.82/dist/application.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.82/dist/application.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.83/dist/application.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.83/dist/application.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/application",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/application",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "application",
9
- "version": "1.0.82"
9
+ "version": "1.0.83"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -19,16 +19,16 @@
19
19
  "@teambit/lane-id": "0.0.311",
20
20
  "@teambit/harmony": "0.4.6",
21
21
  "@teambit/bit-error": "0.0.404",
22
- "@teambit/builder": "1.0.82",
23
- "@teambit/component": "1.0.82",
24
- "@teambit/isolator": "1.0.82",
25
- "@teambit/envs": "1.0.82",
26
- "@teambit/logger": "0.0.921",
22
+ "@teambit/builder": "1.0.83",
23
+ "@teambit/component": "1.0.83",
24
+ "@teambit/isolator": "1.0.83",
25
+ "@teambit/envs": "1.0.83",
26
+ "@teambit/logger": "0.0.922",
27
27
  "@teambit/cli-table": "0.0.45",
28
- "@teambit/cli": "0.0.828",
29
- "@teambit/aspect-loader": "1.0.82",
30
- "@teambit/watcher": "1.0.82",
31
- "@teambit/workspace": "1.0.82"
28
+ "@teambit/cli": "0.0.829",
29
+ "@teambit/aspect-loader": "1.0.83",
30
+ "@teambit/watcher": "1.0.83",
31
+ "@teambit/workspace": "1.0.83"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^17.0.8",
@@ -41,7 +41,7 @@
41
41
  "@types/testing-library__jest-dom": "5.9.5"
42
42
  },
43
43
  "peerDependencies": {
44
- "@teambit/legacy": "1.0.612",
44
+ "@teambit/legacy": "1.0.614",
45
45
  "react": "^16.8.0 || ^17.0.0",
46
46
  "react-dom": "^16.8.0 || ^17.0.0"
47
47
  },