@teambit/envs 0.0.640 → 0.0.644

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 +1 @@
1
- export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.640/dist/envs.docs.mdx')]
1
+ export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@0.0.644/dist/envs.docs.mdx')]
@@ -7,7 +7,7 @@ import type { BuildTask } from '@teambit/builder';
7
7
  import type { SchemaExtractor } from '@teambit/schema';
8
8
  import type { WebpackConfigTransformer } from '@teambit/webpack';
9
9
  import type { PackageJsonProps } from '@teambit/pkg';
10
- import type { VariantPolicyConfigObject } from '@teambit/dependency-resolver';
10
+ import type { EnvPolicyConfigObject } from '@teambit/dependency-resolver';
11
11
  import { ElementsWrapperContext } from '@teambit/elements';
12
12
  import type { Capsule } from '@teambit/isolator';
13
13
  import type { Component } from '@teambit/component';
@@ -47,7 +47,7 @@ export interface DependenciesEnv extends Environment {
47
47
  * Returns the list of dependencies
48
48
  * Required for any task
49
49
  */
50
- getDependencies?: () => VariantPolicyConfigObject | Promise<VariantPolicyConfigObject>;
50
+ getDependencies?: () => EnvPolicyConfigObject | Promise<EnvPolicyConfigObject>;
51
51
  }
52
52
  export declare type GetNpmIgnoreContext = {
53
53
  capsule: Capsule;
@@ -1 +1 @@
1
- {"version":3,"sources":["environment.ts"],"names":["hasCompiler","obj","getCompiler"],"mappings":";;;;;;;AAAA;;AAoBA;AACA;AACA;AA+JO,SAASA,WAAT,CAAqBC,GAArB,EAA2D;AAChE,SAAO,OAAOA,GAAG,CAACC,WAAX,KAA2B,UAAlC;AACD","sourcesContent":["// TODO: @gilad refactor to an abstract env.\nimport type { Linter, LinterContext } from '@teambit/linter';\nimport type { Formatter, FormatterContext } from '@teambit/formatter';\nimport type { Tester } from '@teambit/tester';\nimport type { Compiler } from '@teambit/compiler';\nimport type { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport type { BuildTask } from '@teambit/builder';\nimport type { SchemaExtractor } from '@teambit/schema';\nimport type { WebpackConfigTransformer } from '@teambit/webpack';\nimport type { PackageJsonProps } from '@teambit/pkg';\nimport type { VariantPolicyConfigObject } from '@teambit/dependency-resolver';\nimport { ElementsWrapperContext } from '@teambit/elements';\nimport type { Capsule } from '@teambit/isolator';\nimport type { Component } from '@teambit/component';\nimport { EnvPreviewConfig } from '@teambit/preview';\n\nexport type EnvDescriptor = {\n type: string;\n};\n\n/**\n * add a custom type and include all properties from within the environment.\n */\nexport interface Environment {\n /**\n * name of the environment.\n */\n name?: string;\n\n /**\n * description of the environment.\n */\n description?: string;\n\n /**\n * icon of the environment.\n */\n icon?: string;\n\n [key: string]: any; // :TODO need to define an abstract type for service handlers (now using any)\n\n /**\n * Returns the Environment descriptor\n * Required for any task\n */\n __getDescriptor?: () => Promise<EnvDescriptor>;\n\n /**\n * Returns a schema generator instance\n */\n getSchemaExtractor?: (config?: any) => SchemaExtractor;\n}\n\nexport interface DependenciesEnv extends Environment {\n /**\n * Returns the list of dependencies\n * Required for any task\n */\n getDependencies?: () => VariantPolicyConfigObject | Promise<VariantPolicyConfigObject>;\n}\n\nexport type GetNpmIgnoreContext = {\n capsule: Capsule;\n component: Component;\n};\nexport interface PackageEnv extends Environment {\n /**\n * define the package json properties to add to each component.\n * Used by `bit link` to augment package.json with new properties\n */\n getPackageJsonProps?: () => PackageJsonProps;\n\n /**\n * return `.npmignore` entries to be written before packing the component\n */\n getNpmIgnore?: (npmIgnoreContext?: GetNpmIgnoreContext) => string[];\n}\n\nexport interface LinterEnv extends Environment {\n /**\n * Returns & configures the linter to use (ESLint, ...)\n * Required for `bit lint`\n */\n getLinter?: (context: LinterContext, transformers: any[]) => Linter;\n}\n\nexport interface FormatterEnv extends Environment {\n /**\n * Returns & configures the formatter to use (prettier, ...)\n * Required for `bit format`\n */\n getFormatter?: (context: FormatterContext, transformers: any[]) => Formatter;\n}\n\nexport interface PreviewEnv extends Environment {\n /**\n * Returns a paths to a function which mounts a given component to DOM\n * Required for `bit start` & `bit build`\n */\n getMounter?: () => string;\n\n /**\n * Returns a path to a docs template.\n * Required for `bit start` & `bit build`\n */\n getDocsTemplate?: () => string;\n\n /**\n * Returns a bundler for the preview.\n * Required for `bit build` & `bit start`\n */\n getBundler?: (context: BundlerContext, transformers: any[]) => Promise<Bundler>;\n\n /**\n * Returns preview config like the strategy name to use when bundling the components for the preview\n */\n getPreviewConfig?: () => EnvPreviewConfig;\n}\n\nexport interface ElementsEnv extends Environment {\n /**\n * Returns a function that gets the context and wrap the component with a web component\n * Required for `bit build`\n */\n getElementsWrapper: (context: ElementsWrapperContext) => string;\n\n /**\n * Returns a bundler for elements.\n * Required for `bit build``\n */\n getElementsBundler: (context: BundlerContext, transformers: any[]) => Promise<Bundler>;\n}\n\nexport type PipeServiceModifiersMap = Record<string, PipeServiceModifier>;\n\nexport interface PipeServiceModifier {\n transformers?: Function[];\n module?: any;\n}\n\nexport interface BuilderEnv extends PreviewEnv {\n /**\n * @deprecated Fatal: a breaking API was introduced. Use getBuildPipe() instead.\n */\n getPipe?: () => BuildTask[];\n\n /**\n * Returns the component build pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getBuildPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n\n /**\n * Returns the component tag pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getTagPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n\n /**\n * Returns the component snap pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getSnapPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n}\n\nexport interface TesterEnv extends Environment {\n /**\n * Returns a tester\n * Required for `bit start` & `bit test`\n */\n getTester?: (path: string, tester: any) => Tester;\n}\n\nexport interface CompilerEnv {\n /**\n * Returns a compiler\n * Required for making and reading dists, especially for `bit compile`\n */\n getCompiler: () => Compiler;\n}\n\nexport function hasCompiler(obj: Environment): obj is CompilerEnv {\n return typeof obj.getCompiler === 'function';\n}\n\nexport interface DevEnv extends PreviewEnv {\n /**\n * Required for `bit start`\n */\n getDevEnvId?: (context?: any) => string;\n\n /**\n * Returns and configures the dev server\n * Required for `bit start`\n */\n getDevServer?: (\n context: DevServerContext,\n transformers: WebpackConfigTransformer[]\n ) => DevServer | Promise<DevServer>;\n}\n"]}
1
+ {"version":3,"sources":["environment.ts"],"names":["hasCompiler","obj","getCompiler"],"mappings":";;;;;;;AAAA;;AAoBA;AACA;AACA;AA+JO,SAASA,WAAT,CAAqBC,GAArB,EAA2D;AAChE,SAAO,OAAOA,GAAG,CAACC,WAAX,KAA2B,UAAlC;AACD","sourcesContent":["// TODO: @gilad refactor to an abstract env.\nimport type { Linter, LinterContext } from '@teambit/linter';\nimport type { Formatter, FormatterContext } from '@teambit/formatter';\nimport type { Tester } from '@teambit/tester';\nimport type { Compiler } from '@teambit/compiler';\nimport type { Bundler, BundlerContext, DevServer, DevServerContext } from '@teambit/bundler';\nimport type { BuildTask } from '@teambit/builder';\nimport type { SchemaExtractor } from '@teambit/schema';\nimport type { WebpackConfigTransformer } from '@teambit/webpack';\nimport type { PackageJsonProps } from '@teambit/pkg';\nimport type { EnvPolicyConfigObject } from '@teambit/dependency-resolver';\nimport { ElementsWrapperContext } from '@teambit/elements';\nimport type { Capsule } from '@teambit/isolator';\nimport type { Component } from '@teambit/component';\nimport { EnvPreviewConfig } from '@teambit/preview';\n\nexport type EnvDescriptor = {\n type: string;\n};\n\n/**\n * add a custom type and include all properties from within the environment.\n */\nexport interface Environment {\n /**\n * name of the environment.\n */\n name?: string;\n\n /**\n * description of the environment.\n */\n description?: string;\n\n /**\n * icon of the environment.\n */\n icon?: string;\n\n [key: string]: any; // :TODO need to define an abstract type for service handlers (now using any)\n\n /**\n * Returns the Environment descriptor\n * Required for any task\n */\n __getDescriptor?: () => Promise<EnvDescriptor>;\n\n /**\n * Returns a schema generator instance\n */\n getSchemaExtractor?: (config?: any) => SchemaExtractor;\n}\n\nexport interface DependenciesEnv extends Environment {\n /**\n * Returns the list of dependencies\n * Required for any task\n */\n getDependencies?: () => EnvPolicyConfigObject | Promise<EnvPolicyConfigObject>;\n}\n\nexport type GetNpmIgnoreContext = {\n capsule: Capsule;\n component: Component;\n};\nexport interface PackageEnv extends Environment {\n /**\n * define the package json properties to add to each component.\n * Used by `bit link` to augment package.json with new properties\n */\n getPackageJsonProps?: () => PackageJsonProps;\n\n /**\n * return `.npmignore` entries to be written before packing the component\n */\n getNpmIgnore?: (npmIgnoreContext?: GetNpmIgnoreContext) => string[];\n}\n\nexport interface LinterEnv extends Environment {\n /**\n * Returns & configures the linter to use (ESLint, ...)\n * Required for `bit lint`\n */\n getLinter?: (context: LinterContext, transformers: any[]) => Linter;\n}\n\nexport interface FormatterEnv extends Environment {\n /**\n * Returns & configures the formatter to use (prettier, ...)\n * Required for `bit format`\n */\n getFormatter?: (context: FormatterContext, transformers: any[]) => Formatter;\n}\n\nexport interface PreviewEnv extends Environment {\n /**\n * Returns a paths to a function which mounts a given component to DOM\n * Required for `bit start` & `bit build`\n */\n getMounter?: () => string;\n\n /**\n * Returns a path to a docs template.\n * Required for `bit start` & `bit build`\n */\n getDocsTemplate?: () => string;\n\n /**\n * Returns a bundler for the preview.\n * Required for `bit build` & `bit start`\n */\n getBundler?: (context: BundlerContext, transformers: any[]) => Promise<Bundler>;\n\n /**\n * Returns preview config like the strategy name to use when bundling the components for the preview\n */\n getPreviewConfig?: () => EnvPreviewConfig;\n}\n\nexport interface ElementsEnv extends Environment {\n /**\n * Returns a function that gets the context and wrap the component with a web component\n * Required for `bit build`\n */\n getElementsWrapper: (context: ElementsWrapperContext) => string;\n\n /**\n * Returns a bundler for elements.\n * Required for `bit build``\n */\n getElementsBundler: (context: BundlerContext, transformers: any[]) => Promise<Bundler>;\n}\n\nexport type PipeServiceModifiersMap = Record<string, PipeServiceModifier>;\n\nexport interface PipeServiceModifier {\n transformers?: Function[];\n module?: any;\n}\n\nexport interface BuilderEnv extends PreviewEnv {\n /**\n * @deprecated Fatal: a breaking API was introduced. Use getBuildPipe() instead.\n */\n getPipe?: () => BuildTask[];\n\n /**\n * Returns the component build pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getBuildPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n\n /**\n * Returns the component tag pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getTagPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n\n /**\n * Returns the component snap pipeline\n * Either `getBuildPipe`, `getTagPipe`, or `getSnapPipe` is required for `bit build`\n */\n getSnapPipe?: (modifiersMap?: PipeServiceModifiersMap) => BuildTask[];\n}\n\nexport interface TesterEnv extends Environment {\n /**\n * Returns a tester\n * Required for `bit start` & `bit test`\n */\n getTester?: (path: string, tester: any) => Tester;\n}\n\nexport interface CompilerEnv {\n /**\n * Returns a compiler\n * Required for making and reading dists, especially for `bit compile`\n */\n getCompiler: () => Compiler;\n}\n\nexport function hasCompiler(obj: Environment): obj is CompilerEnv {\n return typeof obj.getCompiler === 'function';\n}\n\nexport interface DevEnv extends PreviewEnv {\n /**\n * Required for `bit start`\n */\n getDevEnvId?: (context?: any) => string;\n\n /**\n * Returns and configures the dev server\n * Required for `bit start`\n */\n getDevServer?: (\n context: DevServerContext,\n transformers: WebpackConfigTransformer[]\n ) => DevServer | Promise<DevServer>;\n}\n"]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/envs",
3
- "version": "0.0.640",
3
+ "version": "0.0.644",
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.640"
9
+ "version": "0.0.644"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/harmony": "0.2.11",
@@ -16,23 +16,23 @@
16
16
  "p-map-series": "2.1.0",
17
17
  "@babel/runtime": "7.12.18",
18
18
  "core-js": "^3.0.0",
19
- "@teambit/component": "0.0.640",
20
- "@teambit/builder": "0.0.640",
21
- "@teambit/bundler": "0.0.640",
22
- "@teambit/compiler": "0.0.640",
23
- "@teambit/dependency-resolver": "0.0.640",
24
- "@teambit/elements": "0.0.93",
25
- "@teambit/formatter": "0.0.191",
26
- "@teambit/isolator": "0.0.640",
27
- "@teambit/linter": "0.0.640",
28
- "@teambit/pkg": "0.0.640",
29
- "@teambit/preview": "0.0.640",
30
- "@teambit/schema": "0.0.640",
31
- "@teambit/tester": "0.0.640",
32
- "@teambit/webpack": "0.0.640",
33
- "@teambit/graphql": "0.0.640",
34
- "@teambit/cli": "0.0.437",
35
- "@teambit/logger": "0.0.527",
19
+ "@teambit/component": "0.0.644",
20
+ "@teambit/builder": "0.0.644",
21
+ "@teambit/bundler": "0.0.644",
22
+ "@teambit/compiler": "0.0.644",
23
+ "@teambit/dependency-resolver": "0.0.644",
24
+ "@teambit/elements": "0.0.97",
25
+ "@teambit/formatter": "0.0.195",
26
+ "@teambit/isolator": "0.0.644",
27
+ "@teambit/linter": "0.0.644",
28
+ "@teambit/pkg": "0.0.644",
29
+ "@teambit/preview": "0.0.644",
30
+ "@teambit/schema": "0.0.644",
31
+ "@teambit/tester": "0.0.644",
32
+ "@teambit/webpack": "0.0.644",
33
+ "@teambit/graphql": "0.0.644",
34
+ "@teambit/cli": "0.0.439",
35
+ "@teambit/logger": "0.0.529",
36
36
  "@teambit/cli-table": "0.0.33",
37
37
  "@teambit/bit-error": "0.0.394"
38
38
  },
@@ -47,7 +47,7 @@
47
47
  "@teambit/envs.aspect-docs.envs": "0.0.131"
48
48
  },
49
49
  "peerDependencies": {
50
- "@teambit/legacy": "1.0.213",
50
+ "@teambit/legacy": "1.0.217",
51
51
  "react-dom": "^16.8.0 || ^17.0.0",
52
52
  "react": "^16.8.0 || ^17.0.0"
53
53
  },
@@ -75,7 +75,7 @@
75
75
  "react": "-"
76
76
  },
77
77
  "peerDependencies": {
78
- "@teambit/legacy": "1.0.213",
78
+ "@teambit/legacy": "1.0.217",
79
79
  "react-dom": "^16.8.0 || ^17.0.0",
80
80
  "react": "^16.8.0 || ^17.0.0"
81
81
  }