@teambit/dependency-resolver 0.0.1064 → 0.0.1066

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
- {"version":3,"names":["DependenciesService","render","env","descriptor","getDescriptor","id","config","highlight","language","ignoreIllegals","getDependencies","undefined","dependencies","name","JSON","stringify","displayName","transform","context","detectors","getDepDetectors"],"sources":["dependencies.service.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, Newline } from 'ink';\nimport { EnvService, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';\nimport highlight from 'cli-highlight';\nimport { DependencyDetector } from './dependency-detector';\n\nexport type DependenciesDescriptor = {\n id: string;\n displayName: string;\n config?: string;\n};\n\ntype DependenciesTransformationMap = ServiceTransformationMap & {\n getDepDetectors: () => DependencyDetector[] | null;\n};\n\nexport class DependenciesService implements EnvService<{}, DependenciesDescriptor> {\n name = 'Dependencies';\n\n async render(env: EnvDefinition) {\n const descriptor = await this.getDescriptor(env);\n\n return (\n <Text key={descriptor?.id}>\n <Text color=\"cyan\">configured dependencies: </Text>\n <Newline />\n <Text>\n {descriptor?.config && highlight(descriptor?.config, { language: 'javascript', ignoreIllegals: true })}\n </Text>\n <Newline />\n </Text>\n );\n }\n\n async getDescriptor(env: EnvDefinition): Promise<DependenciesDescriptor | undefined> {\n if (!env.env.getDependencies) return undefined;\n const dependencies = await env.env.getDependencies();\n return {\n id: this.name,\n config: dependencies ? JSON.stringify(dependencies, null, 2) : undefined,\n displayName: this.name,\n };\n }\n\n transform(env: Env, context: EnvContext): DependenciesTransformationMap | undefined {\n // Old env\n if (!env?.detectors) return undefined;\n return {\n getDepDetectors: () => env.detectors()(context),\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AA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1
+ {"version":3,"names":["DependenciesService","render","env","descriptor","getDescriptor","id","config","highlight","language","ignoreIllegals","getDependencies","undefined","dependencies","name","JSON","stringify","displayName","transform","context","detectors","getDepDetectors"],"sources":["dependencies.service.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, Newline } from 'ink';\nimport { EnvService, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';\nimport highlight from 'cli-highlight';\nimport { DependencyDetector } from './dependency-detector';\n\nexport type DependenciesDescriptor = {\n id: string;\n displayName: string;\n config?: string;\n};\n\ntype DependenciesTransformationMap = ServiceTransformationMap & {\n getDepDetectors: () => DependencyDetector[] | null;\n};\n\nexport class DependenciesService implements EnvService<{}, DependenciesDescriptor> {\n name = 'Dependencies';\n\n async render(env: EnvDefinition) {\n const descriptor = await this.getDescriptor(env);\n\n return (\n <Text key={descriptor?.id}>\n <Text color=\"cyan\">configured dependencies: </Text>\n <Newline />\n <Text>\n {descriptor?.config && highlight(descriptor?.config, { language: 'javascript', ignoreIllegals: true })}\n </Text>\n <Newline />\n </Text>\n );\n }\n\n async getDescriptor(env: EnvDefinition): Promise<DependenciesDescriptor | undefined> {\n if (!env.env.getDependencies) return undefined;\n const dependencies = await env.env.getDependencies();\n return {\n id: this.name,\n config: dependencies ? JSON.stringify(dependencies, null, 2) : undefined,\n displayName: this.name,\n };\n }\n\n transform(env: Env, context: EnvContext): DependenciesTransformationMap | undefined {\n // Old env\n if (!env?.detectors) return undefined;\n return {\n getDepDetectors: () => env.detectors()(context),\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAaO,MAAMA,mBAAmB,CAAmD;EAAA;IAAA,8CAC1E,cAAc;EAAA;EAErB,MAAMC,MAAM,CAACC,GAAkB,EAAE;IAC/B,MAAMC,UAAU,GAAG,MAAM,IAAI,CAACC,aAAa,CAACF,GAAG,CAAC;IAEhD,oBACE,+BAAC,WAAI;MAAC,GAAG,EAAEC,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEE;IAAG,gBACxB,+BAAC,WAAI;MAAC,KAAK,EAAC;IAAM,GAAC,2BAAyB,CAAO,eACnD,+BAAC,cAAO,OAAG,eACX,+BAAC,WAAI,QACF,CAAAF,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,MAAM,KAAI,IAAAC,uBAAS,EAACJ,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,MAAM,EAAE;MAAEE,QAAQ,EAAE,YAAY;MAAEC,cAAc,EAAE;IAAK,CAAC,CAAC,CACjG,eACP,+BAAC,cAAO,OAAG,CACN;EAEX;EAEA,MAAML,aAAa,CAACF,GAAkB,EAA+C;IACnF,IAAI,CAACA,GAAG,CAACA,GAAG,CAACQ,eAAe,EAAE,OAAOC,SAAS;IAC9C,MAAMC,YAAY,GAAG,MAAMV,GAAG,CAACA,GAAG,CAACQ,eAAe,EAAE;IACpD,OAAO;MACLL,EAAE,EAAE,IAAI,CAACQ,IAAI;MACbP,MAAM,EAAEM,YAAY,GAAGE,IAAI,CAACC,SAAS,CAACH,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,GAAGD,SAAS;MACxEK,WAAW,EAAE,IAAI,CAACH;IACpB,CAAC;EACH;EAEAI,SAAS,CAACf,GAAQ,EAAEgB,OAAmB,EAA6C;IAClF;IACA,IAAI,EAAChB,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEiB,SAAS,GAAE,OAAOR,SAAS;IACrC,OAAO;MACLS,eAAe,EAAE,MAAMlB,GAAG,CAACiB,SAAS,EAAE,CAACD,OAAO;IAChD,CAAC;EACH;AACF;AAAC"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_dependency-resolver@0.0.1064/dist/dependency-resolver.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_dependency-resolver@0.0.1064/dist/dependency-resolver.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_dependency-resolver@0.0.1066/dist/dependency-resolver.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.dependencies_dependency-resolver@0.0.1066/dist/dependency-resolver.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/dist/types.d.ts CHANGED
@@ -47,7 +47,6 @@ export declare type RelativePath = {
47
47
  sourceRelativePath: PathLinux;
48
48
  destinationRelativePath: PathLinux;
49
49
  importSpecifiers?: ImportSpecifier[];
50
- isCustomResolveUsed?: boolean;
51
50
  importSource?: string;
52
51
  };
53
52
  /**
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { ComponentConfig, ComponentFS } from '@teambit/component';\nimport { PathLinux } from '@teambit/legacy/dist/utils/path';\n\nimport { ComponentManifest } from './manifest/component-manifest';\nimport { PackageName } from './dependencies';\n\nexport type RegistryName = string;\n\nexport type Registry = {\n uri: string;\n alwaysAuth: boolean;\n authHeaderValue?: string;\n originalAuthType: string;\n originalAuthValue: string;\n};\n\nexport type RegistriesMap = Record<RegistryName, Registry>;\n\n// Exact format TBD\nexport interface RawComponentState {\n filesystem: ComponentFS;\n config: ComponentConfig;\n}\n\n/**\n * Import Specifier data.\n * For example, `import foo from './bar' `, \"foo\" is the import-specifier and is default.\n * Conversely, `import { foo } from './bar' `, here, \"foo\" is non-default.\n */\nexport type Specifier = {\n isDefault: boolean;\n name: string;\n};\n\n/**\n * ImportSpecifier are used to generate links from component to its dependencies.\n * For example, a component might have a dependency: \"import { foo } from './bar' \", when a link is generated, we use\n * the import-specifier name, which is \"foo\" to generate the link correctly.\n */\nexport type ImportSpecifier = {\n mainFile: Specifier;\n linkFile?: Specifier; // relevant only when the dependency is a link file (e.g. index.js which import and export the variable from other file)\n};\n\n/**\n * a dependency component may have multiple files that are required from the parent component, each\n * one of the files has its RelativePath instance.\n *\n * For example:\n * main component: \"foo\" => foo.js => `const isString = require('../utils/is-string'); const isArray = require('../utils/is-array');\n * dependency: \"utils\" => utils/is-string.js, utils/is-array.js\n * In this example, the component \"foo\" has one dependency \"utils\" with two RelativePaths.\n * one for utils/is-string.js file and the second for utils/is-array.js file\n */\nexport type RelativePath = {\n sourceRelativePath: PathLinux; // location of the link file\n destinationRelativePath: PathLinux; // destination written inside the link file\n importSpecifiers?: ImportSpecifier[];\n isCustomResolveUsed?: boolean; // custom resolve can be configured on consumer bit.json file in resolveModules attribute\n importSource?: string; // available when isCustomResolveUsed=true, contains the import path. e.g. \"import x from 'src/utils'\", importSource is 'src/utils'.\n};\n\n/**\n * A definition of one dependency statement in a file\n * For example `import('something')` or require('something')\n */\ninterface FileDependencyDefinition {\n // The path itself as appear in the source code (what inside the () for example)\n // This can be a module path like 'my-package' or relative (for legacy support)\n dependencyPath: string;\n // Used for legacy support\n relativePaths?: RelativePath[];\n // Used for statements like `import type {x} from 'y'\n isType?: boolean;\n}\n\nexport type FileDependenciesDefinition = FileDependencyDefinition[];\n\nexport type ComponentsManifestsMap = Map<PackageName, ComponentManifest>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { ComponentConfig, ComponentFS } from '@teambit/component';\nimport { PathLinux } from '@teambit/legacy/dist/utils/path';\n\nimport { ComponentManifest } from './manifest/component-manifest';\nimport { PackageName } from './dependencies';\n\nexport type RegistryName = string;\n\nexport type Registry = {\n uri: string;\n alwaysAuth: boolean;\n authHeaderValue?: string;\n originalAuthType: string;\n originalAuthValue: string;\n};\n\nexport type RegistriesMap = Record<RegistryName, Registry>;\n\n// Exact format TBD\nexport interface RawComponentState {\n filesystem: ComponentFS;\n config: ComponentConfig;\n}\n\n/**\n * Import Specifier data.\n * For example, `import foo from './bar' `, \"foo\" is the import-specifier and is default.\n * Conversely, `import { foo } from './bar' `, here, \"foo\" is non-default.\n */\nexport type Specifier = {\n isDefault: boolean;\n name: string;\n};\n\n/**\n * ImportSpecifier are used to generate links from component to its dependencies.\n * For example, a component might have a dependency: \"import { foo } from './bar' \", when a link is generated, we use\n * the import-specifier name, which is \"foo\" to generate the link correctly.\n */\nexport type ImportSpecifier = {\n mainFile: Specifier;\n linkFile?: Specifier; // relevant only when the dependency is a link file (e.g. index.js which import and export the variable from other file)\n};\n\n/**\n * a dependency component may have multiple files that are required from the parent component, each\n * one of the files has its RelativePath instance.\n *\n * For example:\n * main component: \"foo\" => foo.js => `const isString = require('../utils/is-string'); const isArray = require('../utils/is-array');\n * dependency: \"utils\" => utils/is-string.js, utils/is-array.js\n * In this example, the component \"foo\" has one dependency \"utils\" with two RelativePaths.\n * one for utils/is-string.js file and the second for utils/is-array.js file\n */\nexport type RelativePath = {\n sourceRelativePath: PathLinux; // location of the link file\n destinationRelativePath: PathLinux; // destination written inside the link file\n importSpecifiers?: ImportSpecifier[];\n importSource?: string; // available when isCustomResolveUsed=true, contains the import path. e.g. \"import x from 'src/utils'\", importSource is 'src/utils'.\n};\n\n/**\n * A definition of one dependency statement in a file\n * For example `import('something')` or require('something')\n */\ninterface FileDependencyDefinition {\n // The path itself as appear in the source code (what inside the () for example)\n // This can be a module path like 'my-package' or relative (for legacy support)\n dependencyPath: string;\n // Used for legacy support\n relativePaths?: RelativePath[];\n // Used for statements like `import type {x} from 'y'\n isType?: boolean;\n}\n\nexport type FileDependenciesDefinition = FileDependencyDefinition[];\n\nexport type ComponentsManifestsMap = Map<PackageName, ComponentManifest>;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/dependency-resolver",
3
- "version": "0.0.1064",
3
+ "version": "0.0.1066",
4
4
  "homepage": "https://bit.cloud/teambit/dependencies/dependency-resolver",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.dependencies",
8
8
  "name": "dependency-resolver",
9
- "version": "0.0.1064"
9
+ "version": "0.0.1066"
10
10
  },
11
11
  "dependencies": {
12
12
  "cli-highlight": "2.1.9",
@@ -32,22 +32,22 @@
32
32
  "@pnpm/network.ca-file": "1.0.2",
33
33
  "@teambit/legacy-bit-id": "0.0.423",
34
34
  "@teambit/component-id": "0.0.427",
35
- "@teambit/envs": "0.0.1064",
36
- "@teambit/aspect-loader": "0.0.1064",
37
- "@teambit/component": "0.0.1064",
38
- "@teambit/logger": "0.0.810",
35
+ "@teambit/envs": "0.0.1066",
36
+ "@teambit/aspect-loader": "0.0.1066",
37
+ "@teambit/component": "0.0.1066",
38
+ "@teambit/logger": "0.0.812",
39
39
  "@teambit/bit-error": "0.0.402",
40
- "@teambit/graphql": "0.0.1064",
41
- "@teambit/bit-roots": "0.0.54",
42
- "@teambit/bit": "0.1.51",
43
- "@teambit/cli": "0.0.717",
44
- "@teambit/config": "0.0.730",
45
- "@teambit/global-config": "0.0.719",
40
+ "@teambit/graphql": "0.0.1066",
41
+ "@teambit/bit-roots": "0.0.56",
42
+ "@teambit/bit": "0.1.53",
43
+ "@teambit/cli": "0.0.719",
44
+ "@teambit/config": "0.0.732",
45
+ "@teambit/global-config": "0.0.721",
46
46
  "@teambit/harmony.modules.requireable-component": "0.0.491",
47
- "@teambit/snapping": "0.0.379",
48
- "@teambit/isolator": "0.0.1064",
47
+ "@teambit/snapping": "0.0.381",
48
+ "@teambit/isolator": "0.0.1066",
49
49
  "@teambit/component-package-version": "0.0.422",
50
- "@teambit/component-issues": "0.0.90",
50
+ "@teambit/component-issues": "0.0.91",
51
51
  "@teambit/component-version": "0.0.408"
52
52
  },
53
53
  "devDependencies": {
@@ -65,7 +65,7 @@
65
65
  "@teambit/dependencies.aspect-docs.dependency-resolver": "0.0.161"
66
66
  },
67
67
  "peerDependencies": {
68
- "@teambit/legacy": "1.0.497",
68
+ "@teambit/legacy": "1.0.499",
69
69
  "react": "^16.8.0 || ^17.0.0",
70
70
  "react-dom": "^16.8.0 || ^17.0.0"
71
71
  },