@teambit/harmony.testing.load-aspect 0.0.458 → 0.0.460
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.
- package/dist/load-aspect.js +10 -17
- package/dist/load-aspect.js.map +1 -1
- package/load-aspect.ts +1 -2
- package/package.json +6 -7
package/dist/load-aspect.js
CHANGED
|
@@ -77,15 +77,8 @@ function _node() {
|
|
|
77
77
|
return data;
|
|
78
78
|
}
|
|
79
79
|
function _legacy2() {
|
|
80
|
-
const data = require("@teambit/legacy.consumer-component");
|
|
81
|
-
_legacy2 = function () {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
return data;
|
|
85
|
-
}
|
|
86
|
-
function _legacy3() {
|
|
87
80
|
const data = require("@teambit/legacy.consumer-config");
|
|
88
|
-
|
|
81
|
+
_legacy2 = function () {
|
|
89
82
|
return data;
|
|
90
83
|
};
|
|
91
84
|
return data;
|
|
@@ -104,9 +97,9 @@ function _dependencies() {
|
|
|
104
97
|
};
|
|
105
98
|
return data;
|
|
106
99
|
}
|
|
107
|
-
function
|
|
100
|
+
function _legacy3() {
|
|
108
101
|
const data = require("@teambit/legacy.extension-data");
|
|
109
|
-
|
|
102
|
+
_legacy3 = function () {
|
|
110
103
|
return data;
|
|
111
104
|
};
|
|
112
105
|
return data;
|
|
@@ -150,7 +143,7 @@ async function loadManyAspects(targetAspects, cwd = process.cwd(), runtime = 'ma
|
|
|
150
143
|
const coreAspectIds = getCoreAspectIds();
|
|
151
144
|
// tried alternative to avoid this. however, in some cases, during build, this component is in a capsule, so the list
|
|
152
145
|
// of core-aspects registered during load-bit doesn't apply here.
|
|
153
|
-
|
|
146
|
+
_legacy3().ExtensionDataList.registerManyCoreExtensionNames(coreAspectIds);
|
|
154
147
|
const config = await getConfig(cwd);
|
|
155
148
|
const configMap = config.toObject();
|
|
156
149
|
configMap['teambit.harmony/bit'] = {
|
|
@@ -232,15 +225,15 @@ function clearGlobalsIfNeeded() {
|
|
|
232
225
|
return;
|
|
233
226
|
}
|
|
234
227
|
delete _legacy().loadConsumer.cache;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
228
|
+
_legacy().ComponentLoader.onComponentLoadSubscribers = [];
|
|
229
|
+
_legacy2().ComponentOverrides.componentOverridesLoadingRegistry = {};
|
|
230
|
+
_legacy2().ComponentConfig.componentConfigLoadingRegistry = {};
|
|
238
231
|
_workspaceModules2().PackageJsonTransformer.packageJsonTransformersRegistry = [];
|
|
239
232
|
// @ts-ignore
|
|
240
|
-
|
|
241
|
-
|
|
233
|
+
_legacy().ComponentLoader.loadDeps = undefined;
|
|
234
|
+
_legacy3().ExtensionDataList.coreExtensionsNames = new Map();
|
|
242
235
|
// @ts-ignore
|
|
243
|
-
|
|
236
|
+
_legacy2().LegacyWorkspaceConfig.workspaceConfigLoadingRegistry = undefined;
|
|
244
237
|
}
|
|
245
238
|
|
|
246
239
|
//# sourceMappingURL=load-aspect.js.map
|
package/dist/load-aspect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_path","data","require","_legacy","_workspaceModules","_scopeModules","_fs","_harmony","_harmonyConfig","_component","_cli","_node","_legacy2","_legacy3","_workspaceModules2","_dependencies","_legacy4","getPackageName","aspect","id","name","getCoreAspectIds","aspectIdsFile","join","__dirname","file","readFileSync","JSON","parse","loadAspect","targetAspect","cwd","process","runtime","harmony","loadManyAspects","get","targetAspects","clearGlobalsIfNeeded","coreAspectIds","ExtensionDataList","registerManyCoreExtensionNames","config","getConfig","configMap","toObject","Harmony","load","CLIAspect","DependenciesAspect","NodeAspect","run","runtimeDef","ComponentID","fromString","mainFilePath","getMainFilePath","packagePath","resolve","files","readdirSync","runtimePath","find","path","includes","Error","runtimeC","manifest","_runtimes","length","addRuntimeIfNeeded","default","addRuntime","methodsOnResult","Object","keys","main","filter","method","endsWith","packageName","scope","replace","fullName","replaceAll","consumerInfo","getWorkspaceInfo","scopePath","findScopePath","globalConfigOpts","configOpts","global","shouldThrow","Config","loadGlobal","loadConsumer","cache","PackageJsonTransformer","packageJsonTransformersRegistry","ComponentLoader","onComponentLoadSubscribers","ComponentOverrides","componentOverridesLoadingRegistry","ComponentConfig","componentConfigLoadingRegistry","loadDeps","undefined","coreExtensionsNames","Map","LegacyWorkspaceConfig","workspaceConfigLoadingRegistry"],"sources":["load-aspect.ts"],"sourcesContent":["import { resolve, join } from 'path';\nimport { loadConsumer } from '@teambit/legacy.consumer';\nimport { getWorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport { readdirSync, readFileSync } from 'fs';\nimport type { Aspect, Extension } from '@teambit/harmony';\nimport { Harmony } from '@teambit/harmony';\nimport type { ConfigOptions } from '@teambit/harmony/harmony-config';\nimport { Config } from '@teambit/harmony/harmony-config';\nimport { ComponentID } from '@teambit/component';\nimport { CLIAspect } from '@teambit/cli';\nimport { NodeAspect } from '@teambit/node';\nimport { ComponentLoader } from '@teambit/legacy.consumer-component';\nimport { LegacyWorkspaceConfig, ComponentOverrides, ComponentConfig } from '@teambit/legacy.consumer-config';\nimport { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependenciesAspect } from '@teambit/dependencies';\nimport { ExtensionDataList } from '@teambit/legacy.extension-data';\n\nfunction getPackageName(aspect: any, id: ComponentID) {\n return `@teambit/${id.name}`;\n // const [owner, name] = aspect.id.split('.');\n // return `@${owner}/${replaceAll(name, '/', '.')}`;\n}\n\n/**\n * we keep a static list of core-aspect-ids here in this component in order to not depend on bit aspect.\n * it gets updated during Circle tag process.\n */\nfunction getCoreAspectIds() {\n const aspectIdsFile = join(__dirname, 'core-aspects-ids.json');\n const file = readFileSync(aspectIdsFile, 'utf8');\n return JSON.parse(file);\n}\n\n/**\n * ! important ! prefer using `loadManyAspects` instead of this function. otherwise, you may end up with\n * different instances of \"Workspace\" aspect for example for each one of the aspects you load.\n *\n * to make this work, export the main also as default (e.g. `export default LanesMain;`).\n * otherwise, it'll show an error \"TypeError: Cannot read property 'runtime' of undefined\".\n */\nexport async function loadAspect<T>(targetAspect: Aspect, cwd = process.cwd(), runtime = 'main'): Promise<T> {\n const harmony = await loadManyAspects([targetAspect], cwd, runtime);\n return harmony.get(targetAspect.id);\n}\n\n/**\n * returns an instance of Harmony. with this instance, you can get any aspect you loaded (or its dependencies).\n * e.g. `const workspace = harmony.get<Workspace>(WorkspaceAspect.id);`\n * when used for tests, specify all aspects you need and call it once. this way, you make sure all of them are in sync\n * and use the same instances of each other.\n */\nexport async function loadManyAspects(\n targetAspects: Aspect[],\n cwd = process.cwd(),\n runtime = 'main'\n): Promise<Harmony> {\n clearGlobalsIfNeeded();\n const coreAspectIds = getCoreAspectIds();\n // tried alternative to avoid this. however, in some cases, during build, this component is in a capsule, so the list\n // of core-aspects registered during load-bit doesn't apply here.\n ExtensionDataList.registerManyCoreExtensionNames(coreAspectIds);\n\n const config = await getConfig(cwd);\n const configMap = config.toObject();\n configMap['teambit.harmony/bit'] = {\n cwd,\n };\n\n // CLIAspect is needed for register the main runtime. NodeAspect is needed to get the default env if nothing\n // was configured. If it's not loaded here, it'll throw an error later that there is no node-env.\n // DependenciesAspect is needed to make ComponentLoader.loadDeps hook works.\n const harmony = await Harmony.load([CLIAspect, DependenciesAspect, NodeAspect, ...targetAspects], runtime, configMap);\n\n await harmony.run(async (aspect, runtimeDef) => {\n const id = ComponentID.fromString(aspect.id);\n const mainFilePath = getMainFilePath(aspect, id);\n const packagePath = resolve(join(mainFilePath, '..'));\n const files = readdirSync(packagePath);\n const runtimePath = files.find((path) => path.includes(`.${runtimeDef.name}.runtime.js`));\n if (!runtimePath) throw new Error(`could not find runtime '${runtimeDef.name}' for aspect ID '${aspect.id}'`);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const runtimeC = require(join(packagePath, runtimePath));\n if (aspect.manifest._runtimes.length === 0 || targetAspects.includes(aspect.id)) {\n // core-aspects running outside of bit-bin repo end up here. they don't have runtime.\n // this makes sure to load them from the path were they're imported\n addRuntimeIfNeeded(runtimeC, aspect);\n }\n });\n\n return harmony;\n}\n\nfunction addRuntimeIfNeeded(runtimeC: any, aspect: Extension) {\n if (runtimeC.default) {\n aspect.manifest.addRuntime(runtimeC.default);\n return;\n }\n const methodsOnResult = Object.keys(runtimeC);\n if (methodsOnResult.length === 1) {\n aspect.manifest.addRuntime(runtimeC[methodsOnResult[0]]);\n return;\n }\n const main = methodsOnResult.filter((method) => method.endsWith('Main'));\n if (main.length === 1) {\n aspect.manifest.addRuntime(runtimeC[main[0]]);\n return;\n }\n throw new Error(`error: ${aspect.id} does not export its main-runtime as default.\ngo to the aspect-main file and add a new line with \"export default YourAspectMain\"`);\n}\n\nfunction getMainFilePath(aspect: any, id: ComponentID) {\n let packageName = getPackageName(aspect, id);\n try {\n // try core aspects\n return require.resolve(packageName);\n } catch {\n // fallback to a naive way of converting componentId to pkg-name. (it won't work when the component has special pkg name settings)\n packageName = `@${id.scope.replace('.', '/')}.${id.fullName.replaceAll('/', '.')}`;\n return require.resolve(packageName);\n }\n}\n\nexport async function getConfig(cwd = process.cwd()) {\n const consumerInfo = await getWorkspaceInfo(cwd);\n const scopePath = findScopePath(cwd);\n const globalConfigOpts = {\n name: '.bitrc.jsonc',\n };\n const configOpts: ConfigOptions = {\n global: globalConfigOpts,\n shouldThrow: false,\n cwd: consumerInfo?.path || scopePath,\n };\n\n if (consumerInfo) {\n const config = Config.load('workspace.jsonc', configOpts);\n return config;\n }\n\n if (scopePath && !consumerInfo) {\n return Config.load('scope.jsonc', configOpts);\n }\n\n return Config.loadGlobal(globalConfigOpts);\n}\n\nfunction clearGlobalsIfNeeded() {\n if (!loadConsumer.cache && !PackageJsonTransformer.packageJsonTransformersRegistry.length) {\n return;\n }\n delete loadConsumer.cache;\n ComponentLoader.onComponentLoadSubscribers = [];\n ComponentOverrides.componentOverridesLoadingRegistry = {};\n ComponentConfig.componentConfigLoadingRegistry = {};\n PackageJsonTransformer.packageJsonTransformersRegistry = [];\n // @ts-ignore\n ComponentLoader.loadDeps = undefined;\n ExtensionDataList.coreExtensionsNames = new Map();\n // @ts-ignore\n LegacyWorkspaceConfig.workspaceConfigLoadingRegistry = undefined;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,IAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,GAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,eAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,cAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,KAAA;EAAA,MAAAT,IAAA,GAAAC,O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YAAY,EAAE;IAC9B,OAAOQ,uBAAM,CAAC9C,IAAI,CAAC,aAAa,EAAE2C,UAAU,CAAC;EAC/C;EAEA,OAAOG,uBAAM,CAACC,UAAU,CAACL,gBAAgB,CAAC;AAC5C;AAEA,SAASnD,oBAAoBA,CAAA,EAAG;EAC9B,IAAI,CAACyD,sBAAY,CAACC,KAAK,IAAI,CAACC,2CAAsB,CAACC,+BAA+B,CAAC7B,MAAM,EAAE;IACzF;EACF;EACA,OAAO0B,sBAAY,CAACC,KAAK;EACzBG,0BAAe,CAACC,0BAA0B,GAAG,EAAE;EAC/CC,6BAAkB,CAACC,iCAAiC,GAAG,CAAC,CAAC;EACzDC,0BAAe,CAACC,8BAA8B,GAAG,CAAC,CAAC;EACnDP,2CAAsB,CAACC,+BAA+B,GAAG,EAAE;EAC3D;EACAC,0BAAe,CAACM,QAAQ,GAAGC,SAAS;EACpClE,4BAAiB,CAACmE,mBAAmB,GAAG,IAAIC,GAAG,CAAC,CAAC;EACjD;EACAC,gCAAqB,CAACC,8BAA8B,GAAGJ,SAAS;AAClE","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_path","data","require","_legacy","_workspaceModules","_scopeModules","_fs","_harmony","_harmonyConfig","_component","_cli","_node","_legacy2","_workspaceModules2","_dependencies","_legacy3","getPackageName","aspect","id","name","getCoreAspectIds","aspectIdsFile","join","__dirname","file","readFileSync","JSON","parse","loadAspect","targetAspect","cwd","process","runtime","harmony","loadManyAspects","get","targetAspects","clearGlobalsIfNeeded","coreAspectIds","ExtensionDataList","registerManyCoreExtensionNames","config","getConfig","configMap","toObject","Harmony","load","CLIAspect","DependenciesAspect","NodeAspect","run","runtimeDef","ComponentID","fromString","mainFilePath","getMainFilePath","packagePath","resolve","files","readdirSync","runtimePath","find","path","includes","Error","runtimeC","manifest","_runtimes","length","addRuntimeIfNeeded","default","addRuntime","methodsOnResult","Object","keys","main","filter","method","endsWith","packageName","scope","replace","fullName","replaceAll","consumerInfo","getWorkspaceInfo","scopePath","findScopePath","globalConfigOpts","configOpts","global","shouldThrow","Config","loadGlobal","loadConsumer","cache","PackageJsonTransformer","packageJsonTransformersRegistry","ComponentLoader","onComponentLoadSubscribers","ComponentOverrides","componentOverridesLoadingRegistry","ComponentConfig","componentConfigLoadingRegistry","loadDeps","undefined","coreExtensionsNames","Map","LegacyWorkspaceConfig","workspaceConfigLoadingRegistry"],"sources":["load-aspect.ts"],"sourcesContent":["import { resolve, join } from 'path';\nimport { loadConsumer, ComponentLoader } from '@teambit/legacy.consumer';\nimport { getWorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport { readdirSync, readFileSync } from 'fs';\nimport type { Aspect, Extension } from '@teambit/harmony';\nimport { Harmony } from '@teambit/harmony';\nimport type { ConfigOptions } from '@teambit/harmony/harmony-config';\nimport { Config } from '@teambit/harmony/harmony-config';\nimport { ComponentID } from '@teambit/component';\nimport { CLIAspect } from '@teambit/cli';\nimport { NodeAspect } from '@teambit/node';\nimport { LegacyWorkspaceConfig, ComponentOverrides, ComponentConfig } from '@teambit/legacy.consumer-config';\nimport { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependenciesAspect } from '@teambit/dependencies';\nimport { ExtensionDataList } from '@teambit/legacy.extension-data';\n\nfunction getPackageName(aspect: any, id: ComponentID) {\n return `@teambit/${id.name}`;\n // const [owner, name] = aspect.id.split('.');\n // return `@${owner}/${replaceAll(name, '/', '.')}`;\n}\n\n/**\n * we keep a static list of core-aspect-ids here in this component in order to not depend on bit aspect.\n * it gets updated during Circle tag process.\n */\nfunction getCoreAspectIds() {\n const aspectIdsFile = join(__dirname, 'core-aspects-ids.json');\n const file = readFileSync(aspectIdsFile, 'utf8');\n return JSON.parse(file);\n}\n\n/**\n * ! important ! prefer using `loadManyAspects` instead of this function. otherwise, you may end up with\n * different instances of \"Workspace\" aspect for example for each one of the aspects you load.\n *\n * to make this work, export the main also as default (e.g. `export default LanesMain;`).\n * otherwise, it'll show an error \"TypeError: Cannot read property 'runtime' of undefined\".\n */\nexport async function loadAspect<T>(targetAspect: Aspect, cwd = process.cwd(), runtime = 'main'): Promise<T> {\n const harmony = await loadManyAspects([targetAspect], cwd, runtime);\n return harmony.get(targetAspect.id);\n}\n\n/**\n * returns an instance of Harmony. with this instance, you can get any aspect you loaded (or its dependencies).\n * e.g. `const workspace = harmony.get<Workspace>(WorkspaceAspect.id);`\n * when used for tests, specify all aspects you need and call it once. this way, you make sure all of them are in sync\n * and use the same instances of each other.\n */\nexport async function loadManyAspects(\n targetAspects: Aspect[],\n cwd = process.cwd(),\n runtime = 'main'\n): Promise<Harmony> {\n clearGlobalsIfNeeded();\n const coreAspectIds = getCoreAspectIds();\n // tried alternative to avoid this. however, in some cases, during build, this component is in a capsule, so the list\n // of core-aspects registered during load-bit doesn't apply here.\n ExtensionDataList.registerManyCoreExtensionNames(coreAspectIds);\n\n const config = await getConfig(cwd);\n const configMap = config.toObject();\n configMap['teambit.harmony/bit'] = {\n cwd,\n };\n\n // CLIAspect is needed for register the main runtime. NodeAspect is needed to get the default env if nothing\n // was configured. If it's not loaded here, it'll throw an error later that there is no node-env.\n // DependenciesAspect is needed to make ComponentLoader.loadDeps hook works.\n const harmony = await Harmony.load([CLIAspect, DependenciesAspect, NodeAspect, ...targetAspects], runtime, configMap);\n\n await harmony.run(async (aspect, runtimeDef) => {\n const id = ComponentID.fromString(aspect.id);\n const mainFilePath = getMainFilePath(aspect, id);\n const packagePath = resolve(join(mainFilePath, '..'));\n const files = readdirSync(packagePath);\n const runtimePath = files.find((path) => path.includes(`.${runtimeDef.name}.runtime.js`));\n if (!runtimePath) throw new Error(`could not find runtime '${runtimeDef.name}' for aspect ID '${aspect.id}'`);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const runtimeC = require(join(packagePath, runtimePath));\n if (aspect.manifest._runtimes.length === 0 || targetAspects.includes(aspect.id)) {\n // core-aspects running outside of bit-bin repo end up here. they don't have runtime.\n // this makes sure to load them from the path were they're imported\n addRuntimeIfNeeded(runtimeC, aspect);\n }\n });\n\n return harmony;\n}\n\nfunction addRuntimeIfNeeded(runtimeC: any, aspect: Extension) {\n if (runtimeC.default) {\n aspect.manifest.addRuntime(runtimeC.default);\n return;\n }\n const methodsOnResult = Object.keys(runtimeC);\n if (methodsOnResult.length === 1) {\n aspect.manifest.addRuntime(runtimeC[methodsOnResult[0]]);\n return;\n }\n const main = methodsOnResult.filter((method) => method.endsWith('Main'));\n if (main.length === 1) {\n aspect.manifest.addRuntime(runtimeC[main[0]]);\n return;\n }\n throw new Error(`error: ${aspect.id} does not export its main-runtime as default.\ngo to the aspect-main file and add a new line with \"export default YourAspectMain\"`);\n}\n\nfunction getMainFilePath(aspect: any, id: ComponentID) {\n let packageName = getPackageName(aspect, id);\n try {\n // try core aspects\n return require.resolve(packageName);\n } catch {\n // fallback to a naive way of converting componentId to pkg-name. (it won't work when the component has special pkg name settings)\n packageName = `@${id.scope.replace('.', '/')}.${id.fullName.replaceAll('/', '.')}`;\n return require.resolve(packageName);\n }\n}\n\nexport async function getConfig(cwd = process.cwd()) {\n const consumerInfo = await getWorkspaceInfo(cwd);\n const scopePath = findScopePath(cwd);\n const globalConfigOpts = {\n name: '.bitrc.jsonc',\n };\n const configOpts: ConfigOptions = {\n global: globalConfigOpts,\n shouldThrow: false,\n cwd: consumerInfo?.path || scopePath,\n };\n\n if (consumerInfo) {\n const config = Config.load('workspace.jsonc', configOpts);\n return config;\n }\n\n if (scopePath && !consumerInfo) {\n return Config.load('scope.jsonc', configOpts);\n }\n\n return Config.loadGlobal(globalConfigOpts);\n}\n\nfunction clearGlobalsIfNeeded() {\n if (!loadConsumer.cache && !PackageJsonTransformer.packageJsonTransformersRegistry.length) {\n return;\n }\n delete loadConsumer.cache;\n ComponentLoader.onComponentLoadSubscribers = [];\n ComponentOverrides.componentOverridesLoadingRegistry = {};\n ComponentConfig.componentConfigLoadingRegistry = {};\n PackageJsonTransformer.packageJsonTransformersRegistry = [];\n // @ts-ignore\n ComponentLoader.loadDeps = undefined;\n ExtensionDataList.coreExtensionsNames = new Map();\n // @ts-ignore\n LegacyWorkspaceConfig.workspaceConfigLoadingRegistry = undefined;\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,IAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,GAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,eAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,cAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,UAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,KAAA;EAAA,MAAAT,IAAA,GAAAC,OAA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AgB,CAAC;AAC5C;AAEA,SAASnD,oBAAoBA,CAAA,EAAG;EAC9B,IAAI,CAACyD,sBAAY,CAACC,KAAK,IAAI,CAACC,2CAAsB,CAACC,+BAA+B,CAAC7B,MAAM,EAAE;IACzF;EACF;EACA,OAAO0B,sBAAY,CAACC,KAAK;EACzBG,yBAAe,CAACC,0BAA0B,GAAG,EAAE;EAC/CC,6BAAkB,CAACC,iCAAiC,GAAG,CAAC,CAAC;EACzDC,0BAAe,CAACC,8BAA8B,GAAG,CAAC,CAAC;EACnDP,2CAAsB,CAACC,+BAA+B,GAAG,EAAE;EAC3D;EACAC,yBAAe,CAACM,QAAQ,GAAGC,SAAS;EACpClE,4BAAiB,CAACmE,mBAAmB,GAAG,IAAIC,GAAG,CAAC,CAAC;EACjD;EACAC,gCAAqB,CAACC,8BAA8B,GAAGJ,SAAS;AAClE","ignoreList":[]}
|
package/load-aspect.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve, join } from 'path';
|
|
2
|
-
import { loadConsumer } from '@teambit/legacy.consumer';
|
|
2
|
+
import { loadConsumer, ComponentLoader } from '@teambit/legacy.consumer';
|
|
3
3
|
import { getWorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';
|
|
4
4
|
import { findScopePath } from '@teambit/scope.modules.find-scope-path';
|
|
5
5
|
import { readdirSync, readFileSync } from 'fs';
|
|
@@ -10,7 +10,6 @@ import { Config } from '@teambit/harmony/harmony-config';
|
|
|
10
10
|
import { ComponentID } from '@teambit/component';
|
|
11
11
|
import { CLIAspect } from '@teambit/cli';
|
|
12
12
|
import { NodeAspect } from '@teambit/node';
|
|
13
|
-
import { ComponentLoader } from '@teambit/legacy.consumer-component';
|
|
14
13
|
import { LegacyWorkspaceConfig, ComponentOverrides, ComponentConfig } from '@teambit/legacy.consumer-config';
|
|
15
14
|
import { PackageJsonTransformer } from '@teambit/workspace.modules.node-modules-linker';
|
|
16
15
|
import { DependenciesAspect } from '@teambit/dependencies';
|
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/harmony.testing.load-aspect",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.460",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/testing/load-aspect",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "testing/load-aspect",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.460"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.4.12",
|
|
13
13
|
"@teambit/scope.modules.find-scope-path": "0.0.52",
|
|
14
14
|
"@teambit/workspace.modules.workspace-locator": "0.0.51",
|
|
15
|
-
"@teambit/legacy.consumer-
|
|
16
|
-
"@teambit/legacy.consumer
|
|
17
|
-
"@teambit/legacy.
|
|
18
|
-
"@teambit/
|
|
19
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.421"
|
|
15
|
+
"@teambit/legacy.consumer-config": "0.0.190",
|
|
16
|
+
"@teambit/legacy.consumer": "0.0.190",
|
|
17
|
+
"@teambit/legacy.extension-data": "0.0.192",
|
|
18
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.423"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"@types/mocha": "9.1.0",
|