@teambit/envs 1.0.536 → 1.0.537
Sign up to get free protection for your applications and to get access to all the features.
package/dist/environment.d.ts
CHANGED
@@ -6,7 +6,7 @@ import type { Bundler, BundlerContext, DevServer, DevServerContext } from '@team
|
|
6
6
|
import type { BuildTask } from '@teambit/builder';
|
7
7
|
import type { SchemaExtractor } from '@teambit/schema';
|
8
8
|
import type { WebpackConfigTransformer } from '@teambit/webpack';
|
9
|
-
import type { PackageJsonProps } from '@teambit/pkg';
|
9
|
+
import type { ModifyPackageJsonFunc, PackageJsonProps } from '@teambit/pkg';
|
10
10
|
import type { DependencyDetector, EnvPolicyConfigObject } from '@teambit/dependency-resolver';
|
11
11
|
import type { Capsule } from '@teambit/isolator';
|
12
12
|
import type { Component } from '@teambit/component';
|
@@ -96,6 +96,11 @@ export interface PackageEnv extends Environment {
|
|
96
96
|
* return `.npmignore` entries to be written before packing the component
|
97
97
|
*/
|
98
98
|
getNpmIgnore?: (npmIgnoreContext?: GetNpmIgnoreContext) => string[];
|
99
|
+
/**
|
100
|
+
* in case the static "getPackageJsonProps" is not enough, and the package.json props need to be modified
|
101
|
+
* per component, use this function.
|
102
|
+
*/
|
103
|
+
modifyPackageJson?: ModifyPackageJsonFunc;
|
99
104
|
}
|
100
105
|
export interface LinterEnv extends Environment {
|
101
106
|
/**
|
package/dist/environment.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["hasCompiler","obj","getCompiler"],"sources":["environment.ts"],"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 { DependencyDetector, EnvPolicyConfigObject } from '@teambit/dependency-resolver';\nimport type { Capsule } from '@teambit/isolator';\nimport type { Component } from '@teambit/component';\nimport { EnvPreviewConfig } from '@teambit/preview';\nimport { SchemaNodeTransformer, SchemaTransformer } from '@teambit/typescript';\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?: (\n config?: any,\n tsserverPath?: string,\n contextPath?: string,\n schemaTransformers?: SchemaTransformer[],\n apiTransformers?: SchemaNodeTransformer[]\n ) => SchemaExtractor;\n\n /**\n * Returns the dev patterns to match doc files\n */\n getDocsDevPatterns?: (component: Component) => string[];\n\n /**\n * Returns the dev patterns to match composition files\n */\n getCompositionsDevPatterns?: (component: Component) => string[];\n\n /**\n * Returns additional dev patterns for the component.\n * Patterns that were provided by getDocsDevPatterns, getTestsDevPatterns will be considered as dev files as well, without need to add them here.\n */\n getDevPatterns?: (component: Component) => string[];\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 /**\n * Returns a list of additional test host dependencies\n * this will be added to the tester context\n * This can be used in cases when you want specific dependencies to be resolved from the env during testing\n * but you don't want these dependencies as peer dependencies of the component (as they are not used during runtime)\n * An example for this is @angular/compiler, which during running tests you want to resolve from the env, but you don't\n * need it during component runtime.\n */\n getAdditionalTestHostDependencies?: () => string[] | Promise<string[]>;\n\n /**\n * Returns a list of additional host dependencies\n * this list will be provided as globals on the window after bit preview bundle\n * by default bit will merge this list with the peers from the getDependencies function\n */\n getAdditionalHostDependencies?: () => string[] | Promise<string[]>;\n\n /**\n * Returns a list of dependency detectors\n * this list will be used to detect all the dependencies in each file of the component\n */\n getDepDetectors?: () => DependencyDetector[] | null;\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 /**\n * Returns a bundler for the env template.\n * this bundler will be used to bundle the docs/compositions (or other preview) apps\n * Required for `bit build` & `bit tag`\n */\n getTemplateBundler?: (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 /**\n * Returns the dev patterns to match test files\n */\n getTestsDevPatterns?: (component: Component) => string[];\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"],"mappings":";;;;;;AAAA;;AAoBA;AACA;AACA;;
|
1
|
+
{"version":3,"names":["hasCompiler","obj","getCompiler"],"sources":["environment.ts"],"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 { ModifyPackageJsonFunc, PackageJsonProps } from '@teambit/pkg';\nimport type { DependencyDetector, EnvPolicyConfigObject } from '@teambit/dependency-resolver';\nimport type { Capsule } from '@teambit/isolator';\nimport type { Component } from '@teambit/component';\nimport { EnvPreviewConfig } from '@teambit/preview';\nimport { SchemaNodeTransformer, SchemaTransformer } from '@teambit/typescript';\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?: (\n config?: any,\n tsserverPath?: string,\n contextPath?: string,\n schemaTransformers?: SchemaTransformer[],\n apiTransformers?: SchemaNodeTransformer[]\n ) => SchemaExtractor;\n\n /**\n * Returns the dev patterns to match doc files\n */\n getDocsDevPatterns?: (component: Component) => string[];\n\n /**\n * Returns the dev patterns to match composition files\n */\n getCompositionsDevPatterns?: (component: Component) => string[];\n\n /**\n * Returns additional dev patterns for the component.\n * Patterns that were provided by getDocsDevPatterns, getTestsDevPatterns will be considered as dev files as well, without need to add them here.\n */\n getDevPatterns?: (component: Component) => string[];\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 /**\n * Returns a list of additional test host dependencies\n * this will be added to the tester context\n * This can be used in cases when you want specific dependencies to be resolved from the env during testing\n * but you don't want these dependencies as peer dependencies of the component (as they are not used during runtime)\n * An example for this is @angular/compiler, which during running tests you want to resolve from the env, but you don't\n * need it during component runtime.\n */\n getAdditionalTestHostDependencies?: () => string[] | Promise<string[]>;\n\n /**\n * Returns a list of additional host dependencies\n * this list will be provided as globals on the window after bit preview bundle\n * by default bit will merge this list with the peers from the getDependencies function\n */\n getAdditionalHostDependencies?: () => string[] | Promise<string[]>;\n\n /**\n * Returns a list of dependency detectors\n * this list will be used to detect all the dependencies in each file of the component\n */\n getDepDetectors?: () => DependencyDetector[] | null;\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 /**\n * in case the static \"getPackageJsonProps\" is not enough, and the package.json props need to be modified\n * per component, use this function.\n */\n modifyPackageJson?: ModifyPackageJsonFunc;\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 /**\n * Returns a bundler for the env template.\n * this bundler will be used to bundle the docs/compositions (or other preview) apps\n * Required for `bit build` & `bit tag`\n */\n getTemplateBundler?: (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 /**\n * Returns the dev patterns to match test files\n */\n getTestsDevPatterns?: (component: Component) => string[];\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"],"mappings":";;;;;;AAAA;;AAoBA;AACA;AACA;;AAgNO,SAASA,WAAWA,CAACC,GAAgB,EAAsB;EAChE,OAAO,OAAOA,GAAG,CAACC,WAAW,KAAK,UAAU;AAC9C","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.envs_envs@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.envs_envs@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.envs_envs@1.0.537/dist/env.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.envs_envs@1.0.537/dist/envs.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/envs",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.537",
|
4
4
|
"homepage": "https://bit.cloud/teambit/envs/envs",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.envs",
|
8
8
|
"name": "envs",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.537"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"comment-json": "4.2.5",
|
@@ -18,31 +18,31 @@
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
19
19
|
"@teambit/bit-error": "0.0.404",
|
20
20
|
"@teambit/component-id": "1.2.2",
|
21
|
-
"@teambit/dependency-resolver": "1.0.
|
22
|
-
"@teambit/component": "1.0.
|
23
|
-
"@teambit/aspect-loader": "1.0.
|
24
|
-
"@teambit/cli": "0.0.
|
25
|
-
"@teambit/logger": "0.0.
|
26
|
-
"@teambit/worker": "0.0.
|
27
|
-
"@teambit/builder": "1.0.
|
28
|
-
"@teambit/bundler": "1.0.
|
29
|
-
"@teambit/compiler": "1.0.
|
30
|
-
"@teambit/formatter": "1.0.
|
31
|
-
"@teambit/isolator": "1.0.
|
32
|
-
"@teambit/linter": "1.0.
|
33
|
-
"@teambit/pkg": "1.0.
|
34
|
-
"@teambit/preview": "1.0.
|
35
|
-
"@teambit/schema": "1.0.
|
36
|
-
"@teambit/tester": "1.0.
|
37
|
-
"@teambit/typescript": "1.0.
|
38
|
-
"@teambit/webpack": "1.0.
|
39
|
-
"@teambit/graphql": "1.0.
|
40
|
-
"@teambit/component-issues": "0.0.
|
41
|
-
"@teambit/component.sources": "0.0.
|
42
|
-
"@teambit/dev-files": "1.0.
|
43
|
-
"@teambit/issues": "1.0.
|
44
|
-
"@teambit/legacy.consumer-component": "0.0.
|
45
|
-
"@teambit/legacy.extension-data": "0.0.
|
21
|
+
"@teambit/dependency-resolver": "1.0.537",
|
22
|
+
"@teambit/component": "1.0.537",
|
23
|
+
"@teambit/aspect-loader": "1.0.537",
|
24
|
+
"@teambit/cli": "0.0.1114",
|
25
|
+
"@teambit/logger": "0.0.1207",
|
26
|
+
"@teambit/worker": "0.0.1418",
|
27
|
+
"@teambit/builder": "1.0.537",
|
28
|
+
"@teambit/bundler": "1.0.537",
|
29
|
+
"@teambit/compiler": "1.0.537",
|
30
|
+
"@teambit/formatter": "1.0.537",
|
31
|
+
"@teambit/isolator": "1.0.537",
|
32
|
+
"@teambit/linter": "1.0.537",
|
33
|
+
"@teambit/pkg": "1.0.537",
|
34
|
+
"@teambit/preview": "1.0.537",
|
35
|
+
"@teambit/schema": "1.0.537",
|
36
|
+
"@teambit/tester": "1.0.537",
|
37
|
+
"@teambit/typescript": "1.0.537",
|
38
|
+
"@teambit/webpack": "1.0.537",
|
39
|
+
"@teambit/graphql": "1.0.537",
|
40
|
+
"@teambit/component-issues": "0.0.155",
|
41
|
+
"@teambit/component.sources": "0.0.80",
|
42
|
+
"@teambit/dev-files": "1.0.537",
|
43
|
+
"@teambit/issues": "1.0.537",
|
44
|
+
"@teambit/legacy.consumer-component": "0.0.29",
|
45
|
+
"@teambit/legacy.extension-data": "0.0.30",
|
46
46
|
"@teambit/toolbox.array.duplications-finder": "0.0.3",
|
47
47
|
"@teambit/cli-table": "0.0.50"
|
48
48
|
},
|