@teambit/envs 0.0.885 → 0.0.887

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.
@@ -15,7 +15,7 @@ class EnvNotConfiguredForComponent extends _bitError().BitError {
15
15
  constructor(id, componentId) {
16
16
  const suffix = componentId ? ` for the component ${componentId}` : '';
17
17
  super(`environment with ID: "${id}" is not configured as extension${suffix}.
18
- you probably need to add this environment as a key to your variant in the workspace.jsonc. for example, "your-variant": { "${id}": {} }
18
+ you probably need to set this environment to your component(s). for example, "bit env set <component-pattern> ${id}"
19
19
  `);
20
20
  }
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["EnvNotConfiguredForComponent","BitError","constructor","id","componentId","suffix"],"sources":["env-not-configured-for-component.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport class EnvNotConfiguredForComponent extends BitError {\n constructor(id: string, componentId?: string) {\n const suffix = componentId ? ` for the component ${componentId}` : '';\n super(`environment with ID: \"${id}\" is not configured as extension${suffix}.\nyou probably need to add this environment as a key to your variant in the workspace.jsonc. for example, \"your-variant\": { \"${id}\": {} }\n`);\n }\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,4BAA4B,SAASC,oBAAQ,CAAC;EACzDC,WAAW,CAACC,EAAU,EAAEC,WAAoB,EAAE;IAC5C,MAAMC,MAAM,GAAGD,WAAW,GAAI,sBAAqBA,WAAY,EAAC,GAAG,EAAE;IACrE,KAAK,CAAE,yBAAwBD,EAAG,mCAAkCE,MAAO;AAC/E,6HAA6HF,EAAG;AAChI,CAAC,CAAC;EACA;AACF;AAAC"}
1
+ {"version":3,"names":["EnvNotConfiguredForComponent","BitError","constructor","id","componentId","suffix"],"sources":["env-not-configured-for-component.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport class EnvNotConfiguredForComponent extends BitError {\n constructor(id: string, componentId?: string) {\n const suffix = componentId ? ` for the component ${componentId}` : '';\n super(`environment with ID: \"${id}\" is not configured as extension${suffix}.\nyou probably need to set this environment to your component(s). for example, \"bit env set <component-pattern> ${id}\"\n`);\n }\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,4BAA4B,SAASC,oBAAQ,CAAC;EACzDC,WAAW,CAACC,EAAU,EAAEC,WAAoB,EAAE;IAC5C,MAAMC,MAAM,GAAGD,WAAW,GAAI,sBAAqBA,WAAY,EAAC,GAAG,EAAE;IACrE,KAAK,CAAE,yBAAwBD,EAAG,mCAAkCE,MAAO;AAC/E,gHAAgHF,EAAG;AACnH,CAAC,CAAC;EACA;AACF;AAAC"}
@@ -22,20 +22,20 @@ export declare class Runtime {
22
22
  /**
23
23
  * execute a service on a specific env.
24
24
  */
25
- runEnv<T>(envRuntimeId: string, service: EnvService<T>, options?: {
25
+ runEnv<T extends ServiceExecutionResult>(envRuntimeId: string, service: EnvService<T>, options?: {
26
26
  [key: string]: any;
27
27
  }): Promise<EnvsExecutionResult<T>>;
28
28
  /**
29
29
  * execute a service once for all environments.
30
30
  */
31
- runOnce<T>(service: EnvService<T>, options?: {
31
+ runOnce<T extends ServiceExecutionResult>(service: EnvService<T>, options?: {
32
32
  [key: string]: any;
33
33
  }): Promise<any>;
34
34
  getEnvExecutionContext(): ExecutionContext[];
35
35
  /**
36
36
  * execute a service on each one of the environments.
37
37
  */
38
- run<T>(
38
+ run<T extends ServiceExecutionResult>(
39
39
  /**
40
40
  * environment service to execute.
41
41
  */
@@ -1 +1 @@
1
- {"version":3,"names":["Runtime","constructor","runtimeEnvs","logger","runEnv","envRuntimeId","service","options","envRuntime","find","runtime","id","ComponentID","fromString","withoutVersion","_legacy","toStringWithoutVersion","EnvNotFoundInRuntime","run","runOnce","Error","envsExecutionContext","getEnvExecutionContext","serviceResult","map","env","ExecutionContext","runtimes","errors","contexts","mapSeries","data","err","error","message","consoleFailure","name","push","EnvsExecutionResult"],"sources":["runtime.ts"],"sourcesContent":["import { Logger } from '@teambit/logger';\nimport { ComponentID } from '@teambit/component';\nimport mapSeries from 'p-map-series';\nimport { EnvNotFoundInRuntime } from '../exceptions';\nimport { ExecutionContext } from '../context';\nimport { EnvService, ServiceExecutionResult } from '../services';\nimport { EnvRuntime } from './env-runtime';\nimport { EnvsExecutionResult } from './envs-execution-result';\n\nexport interface EnvResult<T extends ServiceExecutionResult> {\n env: EnvRuntime;\n data?: T;\n error?: Error;\n}\n\nexport class Runtime {\n constructor(\n /**\n * runtime instances of the environments.\n */\n readonly runtimeEnvs: EnvRuntime[],\n\n private logger: Logger\n ) {}\n\n /**\n * execute a service on a specific env.\n */\n runEnv<T>(\n envRuntimeId: string,\n service: EnvService<T>,\n options?: { [key: string]: any }\n ): Promise<EnvsExecutionResult<T>> {\n const envRuntime = this.runtimeEnvs.find((runtime) => {\n const id = ComponentID.fromString(runtime.id);\n const withoutVersion = id._legacy.toStringWithoutVersion();\n return withoutVersion === envRuntimeId;\n });\n if (!envRuntime) throw new EnvNotFoundInRuntime(envRuntimeId);\n return this.run(service, options, [envRuntime]);\n }\n\n /**\n * execute a service once for all environments.\n */\n async runOnce<T>(service: EnvService<T>, options?: { [key: string]: any }): Promise<any> {\n if (!service.runOnce) throw new Error('a service must implement `runOnce()` in order to be executed');\n const envsExecutionContext = this.getEnvExecutionContext();\n const serviceResult = await service.runOnce(envsExecutionContext, options);\n return serviceResult;\n }\n\n getEnvExecutionContext(): ExecutionContext[] {\n const envsExecutionContext = this.runtimeEnvs.map((env) => new ExecutionContext(this, env));\n return envsExecutionContext;\n }\n\n /**\n * execute a service on each one of the environments.\n */\n async run<T>(\n /**\n * environment service to execute.\n */\n service: EnvService<T>,\n\n /**\n * options to proxy to the service upon execution.\n */\n options?: { [key: string]: any },\n runtimes?: EnvRuntime[]\n ): Promise<EnvsExecutionResult<T>> {\n if (!service.run) throw new Error('a service must implement `run()` in order to be executed');\n const errors: Error[] = [];\n const contexts: EnvResult<T>[] = await mapSeries(runtimes || this.runtimeEnvs, async (env) => {\n try {\n // @ts-ignore\n const serviceResult = await service.run(new ExecutionContext(this, env), options);\n\n return {\n env,\n data: serviceResult,\n };\n } catch (err: any) {\n this.logger.error(err.message, err);\n this.logger.consoleFailure(`service \"${service.name}\" of env \"${env.id}\" has failed. error: ${err.message}`);\n errors.push(err);\n return {\n env,\n error: err,\n };\n }\n });\n\n return new EnvsExecutionResult(contexts);\n }\n}\n"],"mappings":";;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQO,MAAMA,OAAO,CAAC;EACnBC,WAAW;EACT;AACJ;AACA;EACaC,WAAyB,EAE1BC,MAAc,EACtB;IAAA,KAHSD,WAAyB,GAAzBA,WAAyB;IAAA,KAE1BC,MAAc,GAAdA,MAAc;EACrB;;EAEH;AACF;AACA;EACEC,MAAM,CACJC,YAAoB,EACpBC,OAAsB,EACtBC,OAAgC,EACC;IACjC,MAAMC,UAAU,GAAG,IAAI,CAACN,WAAW,CAACO,IAAI,CAAEC,OAAO,IAAK;MACpD,MAAMC,EAAE,GAAGC,wBAAW,CAACC,UAAU,CAACH,OAAO,CAACC,EAAE,CAAC;MAC7C,MAAMG,cAAc,GAAGH,EAAE,CAACI,OAAO,CAACC,sBAAsB,EAAE;MAC1D,OAAOF,cAAc,KAAKT,YAAY;IACxC,CAAC,CAAC;IACF,IAAI,CAACG,UAAU,EAAE,MAAM,KAAIS,kCAAoB,EAACZ,YAAY,CAAC;IAC7D,OAAO,IAAI,CAACa,GAAG,CAACZ,OAAO,EAAEC,OAAO,EAAE,CAACC,UAAU,CAAC,CAAC;EACjD;;EAEA;AACF;AACA;EACE,MAAMW,OAAO,CAAIb,OAAsB,EAAEC,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CAACE,OAAQ,EAAC,CAAC;QAC5GN,MAAM,CAACS,IAAI,CAACL,GAAG,CAAC;QAChB,OAAO;UACLP,GAAG;UACHQ,KAAK,EAAED;QACT,CAAC;MACH;IACF,CAAC,CAAC;IAEF,OAAO,KAAIM,0CAAmB,EAACT,QAAQ,CAAC;EAC1C;AACF;AAAC"}
1
+ {"version":3,"names":["Runtime","constructor","runtimeEnvs","logger","runEnv","envRuntimeId","service","options","envRuntime","find","runtime","id","ComponentID","fromString","withoutVersion","_legacy","toStringWithoutVersion","EnvNotFoundInRuntime","run","runOnce","Error","envsExecutionContext","getEnvExecutionContext","serviceResult","map","env","ExecutionContext","runtimes","errors","contexts","mapSeries","data","err","error","message","consoleFailure","name","push","EnvsExecutionResult"],"sources":["runtime.ts"],"sourcesContent":["import { Logger } from '@teambit/logger';\nimport { ComponentID } from '@teambit/component';\nimport mapSeries from 'p-map-series';\nimport { EnvNotFoundInRuntime } from '../exceptions';\nimport { ExecutionContext } from '../context';\nimport { EnvService, ServiceExecutionResult } from '../services';\nimport { EnvRuntime } from './env-runtime';\nimport { EnvsExecutionResult } from './envs-execution-result';\n\nexport interface EnvResult<T extends ServiceExecutionResult> {\n env: EnvRuntime;\n data?: T;\n error?: Error;\n}\n\nexport class Runtime {\n constructor(\n /**\n * runtime instances of the environments.\n */\n readonly runtimeEnvs: EnvRuntime[],\n\n private logger: Logger\n ) {}\n\n /**\n * execute a service on a specific env.\n */\n runEnv<T extends ServiceExecutionResult>(\n envRuntimeId: string,\n service: EnvService<T>,\n options?: { [key: string]: any }\n ): Promise<EnvsExecutionResult<T>> {\n const envRuntime = this.runtimeEnvs.find((runtime) => {\n const id = ComponentID.fromString(runtime.id);\n const withoutVersion = id._legacy.toStringWithoutVersion();\n return withoutVersion === envRuntimeId;\n });\n if (!envRuntime) throw new EnvNotFoundInRuntime(envRuntimeId);\n return this.run(service, options, [envRuntime]);\n }\n\n /**\n * execute a service once for all environments.\n */\n async runOnce<T extends ServiceExecutionResult>(\n service: EnvService<T>,\n options?: { [key: string]: any }\n ): Promise<any> {\n if (!service.runOnce) throw new Error('a service must implement `runOnce()` in order to be executed');\n const envsExecutionContext = this.getEnvExecutionContext();\n const serviceResult = await service.runOnce(envsExecutionContext, options);\n return serviceResult;\n }\n\n getEnvExecutionContext(): ExecutionContext[] {\n const envsExecutionContext = this.runtimeEnvs.map((env) => new ExecutionContext(this, env));\n return envsExecutionContext;\n }\n\n /**\n * execute a service on each one of the environments.\n */\n async run<T extends ServiceExecutionResult>(\n /**\n * environment service to execute.\n */\n service: EnvService<T>,\n\n /**\n * options to proxy to the service upon execution.\n */\n options?: { [key: string]: any },\n runtimes?: EnvRuntime[]\n ): Promise<EnvsExecutionResult<T>> {\n if (!service.run) throw new Error('a service must implement `run()` in order to be executed');\n const errors: Error[] = [];\n const contexts: EnvResult<T>[] = await mapSeries(runtimes || this.runtimeEnvs, async (env) => {\n try {\n // @ts-ignore\n const serviceResult = await service.run(new ExecutionContext(this, env), options);\n\n return {\n env,\n data: serviceResult,\n };\n } catch (err: any) {\n this.logger.error(err.message, err);\n this.logger.consoleFailure(`service \"${service.name}\" of env \"${env.id}\" has failed. error: ${err.message}`);\n errors.push(err);\n return {\n env,\n error: err,\n };\n }\n });\n\n return new EnvsExecutionResult(contexts);\n }\n}\n"],"mappings":";;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQO,MAAMA,OAAO,CAAC;EACnBC,WAAW;EACT;AACJ;AACA;EACaC,WAAyB,EAE1BC,MAAc,EACtB;IAAA,KAHSD,WAAyB,GAAzBA,WAAyB;IAAA,KAE1BC,MAAc,GAAdA,MAAc;EACrB;;EAEH;AACF;AACA;EACEC,MAAM,CACJC,YAAoB,E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AM,IAAAC,qBAAS,EAACH,QAAQ,IAAI,IAAI,CAACzB,WAAW,EAAE,MAAOuB,GAAG,IAAK;MAC5F,IAAI;QACF;QACA,MAAMF,aAAa,GAAG,MAAMjB,OAAO,CAACY,GAAG,CAAC,KAAIQ,2BAAgB,EAAC,IAAI,EAAED,GAAG,CAAC,EAAElB,OAAO,CAAC;QAEjF,OAAO;UACLkB,GAAG;UACHM,IAAI,EAAER;QACR,CAAC;MACH,CAAC,CAAC,OAAOS,GAAQ,EAAE;QACjB,IAAI,CAAC7B,MAAM,CAAC8B,KAAK,CAACD,GAAG,CAACE,OAAO,EAAEF,GAAG,CAAC;QACnC,IAAI,CAAC7B,MAAM,CAACgC,cAAc,CAAE,YAAW7B,OAAO,CAAC8B,IAAK,aAAYX,GAAG,CAACd,EAAG,wBAAuBqB,GAAG,CAACE,OAAQ,EAAC,CAAC;QAC5GN,MAAM,CAACS,IAAI,CAACL,GAAG,CAAC;QAChB,OAAO;UACLP,GAAG;UACHQ,KAAK,EAAED;QACT,CAAC;MACH;IACF,CAAC,CAAC;IAEF,OAAO,KAAIM,0CAAmB,EAACT,QAAQ,CAAC;EAC1C;AACF;AAAC"}
@@ -4,7 +4,7 @@ export class EnvNotConfiguredForComponent extends BitError {
4
4
  constructor(id: string, componentId?: string) {
5
5
  const suffix = componentId ? ` for the component ${componentId}` : '';
6
6
  super(`environment with ID: "${id}" is not configured as extension${suffix}.
7
- you probably need to add this environment as a key to your variant in the workspace.jsonc. for example, "your-variant": { "${id}": {} }
7
+ you probably need to set this environment to your component(s). for example, "bit env set <component-pattern> ${id}"
8
8
  `);
9
9
  }
10
10
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/envs",
3
- "version": "0.0.885",
3
+ "version": "0.0.887",
4
4
  "homepage": "https://bit.dev/teambit/envs/envs",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.envs",
8
8
  "name": "envs",
9
- "version": "0.0.885"
9
+ "version": "0.0.887"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -14,30 +14,30 @@
14
14
  "ink": "3.2.0",
15
15
  "lodash": "4.17.21",
16
16
  "p-map-series": "2.1.0",
17
- "@babel/runtime": "7.12.18",
17
+ "@babel/runtime": "7.20.0",
18
18
  "core-js": "^3.0.0",
19
19
  "@teambit/harmony": "0.3.3",
20
- "@teambit/component": "0.0.885",
21
- "@teambit/builder": "0.0.885",
22
- "@teambit/bundler": "0.0.885",
23
- "@teambit/compiler": "0.0.885",
24
- "@teambit/dependency-resolver": "0.0.885",
25
- "@teambit/elements": "0.0.338",
26
- "@teambit/formatter": "0.0.436",
27
- "@teambit/isolator": "0.0.885",
28
- "@teambit/linter": "0.0.885",
29
- "@teambit/pkg": "0.0.885",
30
- "@teambit/preview": "0.0.885",
31
- "@teambit/schema": "0.0.885",
32
- "@teambit/tester": "0.0.885",
33
- "@teambit/webpack": "0.0.885",
34
- "@teambit/graphql": "0.0.885",
35
- "@teambit/aspect-loader": "0.0.885",
36
- "@teambit/bit-error": "0.0.400",
37
- "@teambit/cli": "0.0.593",
38
- "@teambit/legacy-bit-id": "0.0.414",
39
- "@teambit/logger": "0.0.686",
40
- "@teambit/cli-table": "0.0.40"
20
+ "@teambit/component": "0.0.887",
21
+ "@teambit/builder": "0.0.887",
22
+ "@teambit/bundler": "0.0.887",
23
+ "@teambit/compiler": "0.0.887",
24
+ "@teambit/dependency-resolver": "0.0.887",
25
+ "@teambit/elements": "0.0.340",
26
+ "@teambit/formatter": "0.0.438",
27
+ "@teambit/isolator": "0.0.887",
28
+ "@teambit/linter": "0.0.887",
29
+ "@teambit/pkg": "0.0.887",
30
+ "@teambit/preview": "0.0.887",
31
+ "@teambit/schema": "0.0.887",
32
+ "@teambit/tester": "0.0.887",
33
+ "@teambit/webpack": "0.0.887",
34
+ "@teambit/graphql": "0.0.887",
35
+ "@teambit/aspect-loader": "0.0.887",
36
+ "@teambit/bit-error": "0.0.401",
37
+ "@teambit/cli": "0.0.595",
38
+ "@teambit/legacy-bit-id": "0.0.415",
39
+ "@teambit/logger": "0.0.688",
40
+ "@teambit/cli-table": "0.0.41"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/react": "^17.0.8",
@@ -47,10 +47,10 @@
47
47
  "@types/jest": "^26.0.0",
48
48
  "@types/react-dom": "^17.0.5",
49
49
  "@types/node": "12.20.4",
50
- "@teambit/envs.aspect-docs.envs": "0.0.146"
50
+ "@teambit/envs.aspect-docs.envs": "0.0.147"
51
51
  },
52
52
  "peerDependencies": {
53
- "@teambit/legacy": "1.0.376",
53
+ "@teambit/legacy": "1.0.379",
54
54
  "react-dom": "^16.8.0 || ^17.0.0",
55
55
  "react": "^16.8.0 || ^17.0.0"
56
56
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.885/dist/env.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.885/dist/envs.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.887/dist/env.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.887/dist/envs.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -26,7 +26,7 @@ export class Runtime {
26
26
  /**
27
27
  * execute a service on a specific env.
28
28
  */
29
- runEnv<T>(
29
+ runEnv<T extends ServiceExecutionResult>(
30
30
  envRuntimeId: string,
31
31
  service: EnvService<T>,
32
32
  options?: { [key: string]: any }
@@ -43,7 +43,10 @@ export class Runtime {
43
43
  /**
44
44
  * execute a service once for all environments.
45
45
  */
46
- async runOnce<T>(service: EnvService<T>, options?: { [key: string]: any }): Promise<any> {
46
+ async runOnce<T extends ServiceExecutionResult>(
47
+ service: EnvService<T>,
48
+ options?: { [key: string]: any }
49
+ ): Promise<any> {
47
50
  if (!service.runOnce) throw new Error('a service must implement `runOnce()` in order to be executed');
48
51
  const envsExecutionContext = this.getEnvExecutionContext();
49
52
  const serviceResult = await service.runOnce(envsExecutionContext, options);
@@ -58,7 +61,7 @@ export class Runtime {
58
61
  /**
59
62
  * execute a service on each one of the environments.
60
63
  */
61
- async run<T>(
64
+ async run<T extends ServiceExecutionResult>(
62
65
  /**
63
66
  * environment service to execute.
64
67
  */