@teambit/install 1.0.281 → 1.0.283

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="2" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.workspace/install@1.0.281" tests="2" failures="0" errors="0" skipped="0">
4
- <testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices in correct order" time="0.163"/>
5
- <testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices with context information" time="0.001"/>
3
+ <testsuite name="teambit.workspace/install@1.0.283" tests="2" failures="0" errors="0" skipped="0">
4
+ <testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices in correct order" time="0.12"/>
5
+ <testcase classname="dist/pick-outdated-pkgs.spec.js" name="should render choices with context information" time="0.002"/>
6
6
  </testsuite>
7
7
  </testsuites>
@@ -4907,7 +4907,7 @@
4907
4907
  "componentId": {
4908
4908
  "scope": "teambit.workspace",
4909
4909
  "name": "install",
4910
- "version": "1.0.281"
4910
+ "version": "1.0.283"
4911
4911
  },
4912
4912
  "taggedModuleExports": []
4913
4913
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","DependencyTypeNotSupportedInPolicy","BitError","constructor","type","exports"],"sources":["dependency-type-not-supported-in-policy.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport class DependencyTypeNotSupportedInPolicy extends BitError {\n constructor(type: string) {\n super(`the workspace policy does not support ${type} dependencies`);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,kCAAkC,SAASC,oBAAQ,CAAC;EAC/DC,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAAE,yCAAwCA,IAAK,eAAc,CAAC;EACrE;AACF;AAACC,OAAA,CAAAJ,kCAAA,GAAAA,kCAAA","ignoreList":[]}
1
+ {"version":3,"names":["_bitError","data","require","DependencyTypeNotSupportedInPolicy","BitError","constructor","type","exports"],"sources":["dependency-type-not-supported-in-policy.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\n\nexport class DependencyTypeNotSupportedInPolicy extends BitError {\n constructor(type: string) {\n super(`the workspace policy does not support ${type} dependencies`);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,kCAAkC,SAASC,oBAAQ,CAAC;EAC/DC,WAAWA,CAACC,IAAY,EAAE;IACxB,KAAK,CAAC,yCAAyCA,IAAI,eAAe,CAAC;EACrE;AACF;AAACC,OAAA,CAAAJ,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -19,8 +19,8 @@ function _workspace() {
19
19
  };
20
20
  return data;
21
21
  }
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
23
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24
24
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
25
25
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
26
26
  const recurringInstallFlagName = 'recurring-install';
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_workspace","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","recurringInstallFlagName","InstallCmd","constructor","install","workspace","logger","name","description","report","packages","options","startTime","Date","now","OutsideWorkspaceError","updateExisting","consoleWarning","console","chalk","cyan","installOpts","lifecycleType","addMissingPeers","type","dedupe","skipDedupe","import","skipImport","savePrefix","addMissingDeps","compile","skipCompile","includeOptionalDeps","noOptional","writeConfigFiles","skipWriteConfigFiles","updateAll","update","recurringInstall","lockfileOnly","components","endTime","oldNonLoadedEnvs","getOldNonLoadedEnvs","formatOutput","numOfComps","toArray","length","toString","exports","calculateTime","diff","executionTime","summary","green","anotherInstallRequiredOutput","getAnotherInstallRequiredOutput","oldNonLoadedEnvsStr","join","firstPart","flag","suggestRecurringInstall","envsStr","docsLink","msg","yellow"],"sources":["install.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';\nimport { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceInstallOptions } from './install.main.runtime';\n\ntype InstallCmdOptions = {\n type: WorkspaceDependencyLifecycleType;\n skipDedupe: boolean;\n skipImport: boolean;\n skipCompile: boolean;\n skipWriteConfigFiles: boolean;\n update: boolean;\n updateExisting: boolean;\n savePrefix: string;\n addMissingDeps: boolean;\n addMissingPeers: boolean;\n noOptional: boolean;\n recurringInstall: boolean;\n lockfileOnly: boolean;\n};\n\ntype FormatOutputArgs = {\n numOfComps: string;\n startTime: number;\n endTime: number;\n oldNonLoadedEnvs: string[];\n recurringInstall: boolean;\n};\n\nconst recurringInstallFlagName = 'recurring-install';\n\nexport default class InstallCmd implements Command {\n name = 'install [packages...]';\n description = 'installs workspace dependencies';\n extendedDescription =\n 'when no package is specified, all workspace dependencies are installed and all workspace components are imported.';\n helpUrl = 'reference/dependencies/dependency-installation';\n arguments = [{ name: 'packages...', description: 'a list of packages to install (separated by spaces)' }];\n alias = 'in';\n group = 'development';\n options = [\n ['t', 'type [lifecycleType]', '\"runtime\" (default) or \"peer\" (dev is not a valid option)'],\n ['u', 'update', 'update all dependencies to latest version according to their semver range'],\n [\n '',\n 'update-existing',\n 'DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types',\n ],\n ['', 'save-prefix [savePrefix]', 'set the prefix to use when adding dependency to workspace.jsonc'],\n ['', 'skip-dedupe', 'do not dedupe dependencies on installation'],\n ['', 'skip-import', 'do not import bit objects post installation'],\n ['', 'skip-compile', 'do not compile components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ['a', 'add-missing-deps', 'install all missing dependencies'],\n ['', 'add-missing-peers', 'install all missing peer dependencies'],\n [\n '',\n recurringInstallFlagName,\n 'automatically run install again if there are non loaded old envs in your workspace',\n ],\n ['', 'no-optional [noOptional]', 'do not install optional dependencies (works with pnpm only)'],\n ['', 'lockfile-only', 'dependencies are not written to node_modules. Only the lockfile is updated'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([packages = []]: [string[]], options: InstallCmdOptions) {\n const startTime = Date.now();\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (options.updateExisting) {\n this.logger.consoleWarning(\n `--update-existing is deprecated, please omit it. \"bit install\" will update existing dependencies by default`\n );\n }\n this.logger.console(`Resolving component dependencies for workspace: '${chalk.cyan(this.workspace.name)}'`);\n const installOpts: WorkspaceInstallOptions = {\n lifecycleType: options.addMissingPeers ? 'peer' : options.type,\n dedupe: !options.skipDedupe,\n import: !options.skipImport,\n updateExisting: true,\n savePrefix: options.savePrefix,\n addMissingDeps: options.addMissingDeps,\n addMissingPeers: options.addMissingPeers,\n compile: !options.skipCompile,\n includeOptionalDeps: !options.noOptional,\n writeConfigFiles: !options.skipWriteConfigFiles,\n updateAll: options.update,\n recurringInstall: options.recurringInstall,\n lockfileOnly: options.lockfileOnly,\n };\n const components = await this.install.install(packages, installOpts);\n const endTime = Date.now();\n const oldNonLoadedEnvs = this.install.getOldNonLoadedEnvs();\n return formatOutput({\n startTime,\n endTime,\n numOfComps: components.toArray().length.toString(),\n recurringInstall: options[recurringInstallFlagName],\n oldNonLoadedEnvs,\n });\n }\n}\n\nfunction calculateTime(startTime: number, endTime: number) {\n const diff = endTime - startTime;\n return diff / 1000;\n}\n\nfunction formatOutput({\n numOfComps,\n endTime,\n startTime,\n recurringInstall,\n oldNonLoadedEnvs,\n}: FormatOutputArgs): string {\n const executionTime = calculateTime(startTime, endTime);\n const summary = chalk.green(\n `Successfully installed dependencies and compiled ${chalk.cyan(numOfComps)} component(s) in ${chalk.cyan(\n executionTime.toString()\n )} seconds`\n );\n const anotherInstallRequiredOutput = getAnotherInstallRequiredOutput(recurringInstall, oldNonLoadedEnvs);\n return anotherInstallRequiredOutput ? `\\n${anotherInstallRequiredOutput}\\n\\n${summary}` : `\\n${summary}`;\n}\n\nexport function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {\n if (!oldNonLoadedEnvs.length) return '';\n const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');\n const firstPart = `Bit was not able to install all dependencies. Please run \"${chalk.cyan('bit install')}\" again `;\n const flag = chalk.cyan(`--${recurringInstallFlagName}`);\n const suggestRecurringInstall = recurringInstall ? '' : `(or use the \"${flag}\" option next time).`;\n const envsStr = `The following environments need to add support for \"dependency policy\" to fix the warning: ${chalk.cyan(\n oldNonLoadedEnvsStr\n )}`;\n const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`;\n\n const msg = `${firstPart}${suggestRecurringInstall}\\n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H,MAAMyC,IAAI,GAAG1C,gBAAK,CAACC,IAAI,CAAE,KAAInB,wBAAyB,EAAC,CAAC;EACxD,MAAM6D,uBAAuB,GAAGvB,gBAAgB,GAAG,EAAE,GAAI,gBAAesB,IAAK,sBAAqB;EAClG,MAAME,OAAO,GAAI,8FAA6F5C,gBAAK,CAACC,IAAI,CACtHsC,mBACF,CAAE,EAAC;EACH,MAAMM,QAAQ,GAAI,0HAAyH;EAE3I,MAAMC,GAAG,GAAI,GAAEL,SAAU,GAAEE,uBAAwB,KAAIC,OAAQ,KAAIC,QAAS,EAAC;EAC7E,OAAO7C,gBAAK,CAAC+C,MAAM,CAACD,GAAG,CAAC;AAC1B","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_workspace","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","recurringInstallFlagName","InstallCmd","constructor","install","workspace","logger","name","description","report","packages","options","startTime","Date","now","OutsideWorkspaceError","updateExisting","consoleWarning","console","chalk","cyan","installOpts","lifecycleType","addMissingPeers","type","dedupe","skipDedupe","import","skipImport","savePrefix","addMissingDeps","compile","skipCompile","includeOptionalDeps","noOptional","writeConfigFiles","skipWriteConfigFiles","updateAll","update","recurringInstall","lockfileOnly","components","endTime","oldNonLoadedEnvs","getOldNonLoadedEnvs","formatOutput","numOfComps","toArray","length","toString","exports","calculateTime","diff","executionTime","summary","green","anotherInstallRequiredOutput","getAnotherInstallRequiredOutput","oldNonLoadedEnvsStr","join","firstPart","flag","suggestRecurringInstall","envsStr","docsLink","msg","yellow"],"sources":["install.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';\nimport { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceInstallOptions } from './install.main.runtime';\n\ntype InstallCmdOptions = {\n type: WorkspaceDependencyLifecycleType;\n skipDedupe: boolean;\n skipImport: boolean;\n skipCompile: boolean;\n skipWriteConfigFiles: boolean;\n update: boolean;\n updateExisting: boolean;\n savePrefix: string;\n addMissingDeps: boolean;\n addMissingPeers: boolean;\n noOptional: boolean;\n recurringInstall: boolean;\n lockfileOnly: boolean;\n};\n\ntype FormatOutputArgs = {\n numOfComps: string;\n startTime: number;\n endTime: number;\n oldNonLoadedEnvs: string[];\n recurringInstall: boolean;\n};\n\nconst recurringInstallFlagName = 'recurring-install';\n\nexport default class InstallCmd implements Command {\n name = 'install [packages...]';\n description = 'installs workspace dependencies';\n extendedDescription =\n 'when no package is specified, all workspace dependencies are installed and all workspace components are imported.';\n helpUrl = 'reference/dependencies/dependency-installation';\n arguments = [{ name: 'packages...', description: 'a list of packages to install (separated by spaces)' }];\n alias = 'in';\n group = 'development';\n options = [\n ['t', 'type [lifecycleType]', '\"runtime\" (default) or \"peer\" (dev is not a valid option)'],\n ['u', 'update', 'update all dependencies to latest version according to their semver range'],\n [\n '',\n 'update-existing',\n 'DEPRECATED (not needed anymore, it is the default now). update existing dependencies version and types',\n ],\n ['', 'save-prefix [savePrefix]', 'set the prefix to use when adding dependency to workspace.jsonc'],\n ['', 'skip-dedupe', 'do not dedupe dependencies on installation'],\n ['', 'skip-import', 'do not import bit objects post installation'],\n ['', 'skip-compile', 'do not compile components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n ['a', 'add-missing-deps', 'install all missing dependencies'],\n ['', 'add-missing-peers', 'install all missing peer dependencies'],\n [\n '',\n recurringInstallFlagName,\n 'automatically run install again if there are non loaded old envs in your workspace',\n ],\n ['', 'no-optional [noOptional]', 'do not install optional dependencies (works with pnpm only)'],\n ['', 'lockfile-only', 'dependencies are not written to node_modules. Only the lockfile is updated'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([packages = []]: [string[]], options: InstallCmdOptions) {\n const startTime = Date.now();\n if (!this.workspace) throw new OutsideWorkspaceError();\n if (options.updateExisting) {\n this.logger.consoleWarning(\n `--update-existing is deprecated, please omit it. \"bit install\" will update existing dependencies by default`\n );\n }\n this.logger.console(`Resolving component dependencies for workspace: '${chalk.cyan(this.workspace.name)}'`);\n const installOpts: WorkspaceInstallOptions = {\n lifecycleType: options.addMissingPeers ? 'peer' : options.type,\n dedupe: !options.skipDedupe,\n import: !options.skipImport,\n updateExisting: true,\n savePrefix: options.savePrefix,\n addMissingDeps: options.addMissingDeps,\n addMissingPeers: options.addMissingPeers,\n compile: !options.skipCompile,\n includeOptionalDeps: !options.noOptional,\n writeConfigFiles: !options.skipWriteConfigFiles,\n updateAll: options.update,\n recurringInstall: options.recurringInstall,\n lockfileOnly: options.lockfileOnly,\n };\n const components = await this.install.install(packages, installOpts);\n const endTime = Date.now();\n const oldNonLoadedEnvs = this.install.getOldNonLoadedEnvs();\n return formatOutput({\n startTime,\n endTime,\n numOfComps: components.toArray().length.toString(),\n recurringInstall: options[recurringInstallFlagName],\n oldNonLoadedEnvs,\n });\n }\n}\n\nfunction calculateTime(startTime: number, endTime: number) {\n const diff = endTime - startTime;\n return diff / 1000;\n}\n\nfunction formatOutput({\n numOfComps,\n endTime,\n startTime,\n recurringInstall,\n oldNonLoadedEnvs,\n}: FormatOutputArgs): string {\n const executionTime = calculateTime(startTime, endTime);\n const summary = chalk.green(\n `Successfully installed dependencies and compiled ${chalk.cyan(numOfComps)} component(s) in ${chalk.cyan(\n executionTime.toString()\n )} seconds`\n );\n const anotherInstallRequiredOutput = getAnotherInstallRequiredOutput(recurringInstall, oldNonLoadedEnvs);\n return anotherInstallRequiredOutput ? `\\n${anotherInstallRequiredOutput}\\n\\n${summary}` : `\\n${summary}`;\n}\n\nexport function getAnotherInstallRequiredOutput(recurringInstall = false, oldNonLoadedEnvs: string[] = []): string {\n if (!oldNonLoadedEnvs.length) return '';\n const oldNonLoadedEnvsStr = oldNonLoadedEnvs.join(', ');\n const firstPart = `Bit was not able to install all dependencies. Please run \"${chalk.cyan('bit install')}\" again `;\n const flag = chalk.cyan(`--${recurringInstallFlagName}`);\n const suggestRecurringInstall = recurringInstall ? '' : `(or use the \"${flag}\" option next time).`;\n const envsStr = `The following environments need to add support for \"dependency policy\" to fix the warning: ${chalk.cyan(\n oldNonLoadedEnvsStr\n )}`;\n const docsLink = `Read more about how to fix this issue in: https://bit.dev/blog/using-a-static-dependency-policy-in-a-legacy-env-lihfbt9b`;\n\n const msg = `${firstPart}${suggestRecurringInstall}\\n${envsStr}\\n${docsLink}`;\n return chalk.yellow(msg);\n}\n"],"mappings":";;;;;;;AAGA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAsE,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAA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B,gBAAgB,EAAEI,gBAAgB,CAAC;EACxG,OAAOa,4BAA4B,GAAG,KAAKA,4BAA4B,OAAOF,OAAO,EAAE,GAAG,KAAKA,OAAO,EAAE;AAC1G;AAEO,SAASG,+BAA+BA,CAAClB,gBAAgB,GAAG,KAAK,EAAEI,gBAA0B,GAAG,EAAE,EAAU;EACjH,IAAI,CAACA,gBAAgB,CAACK,MAAM,EAAE,OAAO,EAAE;EACvC,MAAMU,mBAAmB,GAAGf,gBAAgB,CAACgB,IAAI,CAAC,IAAI,CAAC;EACvD,MAAMC,SAAS,GAAG,6DAA6DzC,gBAAK,CAACC,IAAI,CAAC,aAAa,CAAC,UAAU;EAClH,MAAMyC,IAAI,GAAG1C,gBAAK,CAACC,IAAI,CAAC,KAAKnB,wBAAwB,EAAE,CAAC;EACxD,MAAM6D,uBAAuB,GAAGvB,gBAAgB,GAAG,EAAE,GAAG,gBAAgBsB,IAAI,sBAAsB;EAClG,MAAME,OAAO,GAAG,8FAA8F5C,gBAAK,CAACC,IAAI,CACtHsC,mBACF,CAAC,EAAE;EACH,MAAMM,QAAQ,GAAG,0HAA0H;EAE3I,MAAMC,GAAG,GAAG,GAAGL,SAAS,GAAGE,uBAAuB,KAAKC,OAAO,KAAKC,QAAQ,EAAE;EAC7E,OAAO7C,gBAAK,CAAC+C,MAAM,CAACD,GAAG,CAAC;AAC1B","ignoreList":[]}
@@ -235,12 +235,12 @@ function _update() {
235
235
  };
236
236
  return data;
237
237
  }
238
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
238
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
239
239
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
240
240
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
241
241
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
242
242
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
243
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
243
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
244
244
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
245
245
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
246
246
  class InstallMain {
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireWildcard","require","_path","_interopRequireDefault","_bitRoots","_compiler","_cli","_chalk","_workspace","_lodash","_generator","_componentIdToPackageName","_application","_variants","_component","_dependenciesFs","_pMapSeries","_harmony","_workspaceModules","_envs","_ipcEvents","_componentIssues","_dependencyResolver","_workspaceConfigFiles","_logger","_issues","_componentPackageVersion","_objectHash","_exceptions","_install","_pickOutdatedPkgs","_link","_install2","_uninstall","_update","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","InstallMain","constructor","dependencyResolver","logger","workspace","variants","compiler","envs","wsConfigFiles","app","generator","preLinkSlot","preInstallSlot","postInstallSlot","ipcEvents","Set","install","packages","options","inInstallContext","_addPackages","addMissingPeers","compDirMap","getComponentsDirectory","mergedRootPolicy","getWorkspacePolicy","depsFilterFn","generateFilterFnForDepsFromLocalRemote","pmInstallOptions","dedupe","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","dependencyFilterFn","overrides","config","hoistPatterns","packageImportMethod","missingPeers","getMissingPeerDependencies","path","missingPeerPackages","entries","map","peerName","range","console","pMapSeries","values","fn","res","_installModules","publishIpcEvent","registerPreLink","register","registerPreInstall","registerPostInstall","onComponentCreate","generateResults","runInstall","installMissing","ids","generateResult","dependencies","concat","installMissingDependencies","isApp","isEnv","id","nonLoadedEnvs","clearComponentCache","component","envId","calculateEnvId","toString","isLoaded","isEnvRegistered","addMissingDeps","skipIfExisting","writeConfigFiles","lifecycleType","DependencyTypeNotSupportedInPolicy","debug","join","resolver","getVersionResolver","resolvedPackagesP","packageName","resolveRemoteVersion","rootDir","resolvedPackages","Promise","all","newWorkspacePolicyEntries","resolvedPackage","version","versionWithPrefix","getVersionWithSavePrefix","overridePrefix","savePrefix","wantedRange","dependencyId","addToRootPolicy","updateExisting","persistConfig","pm","getPackageManager","name","chalk","cyan","getPackageManagerName","hasRootComponents","installer","getInstaller","calcManifestsOpts","nodeLinker","linkOpts","linkTeambitBit","linkCoreAspects","linkDepsResolvedFromEnv","linkNestedDepsInNM","isLegacy","linkedRootDeps","calculateLinks","componentsAndManifests","current","_getComponentsManifestsAndRootPolicy","autoInstallPeers","includeOptionalDeps","neverBuiltDependencies","hoistInjectedDependencies","rootComponents","updateAll","optimizeReportForNonTerminal","lockfileOnly","prevManifests","linkedDependencies","installCycle","hasMissingLocalComponents","forceTeambitHarmonyLink","hasHarmonyInRootPolicy","hasComponentsFromWorkspaceInMissingDeps","dependenciesChanged","installComponents","manifests","componentDirectoryMap","installTeambitBit","cacheCleared","linkCodemods","compile","compileStartTime","process","hrtime","compileOutputMessage","setStatusLine","consumer","componentLoader","clearComponentsCache","clearCache","skipClearFailedToLoadEnvs","compileOnWorkspace","initiator","CompilationInitiator","Install","consoleSuccess","tryWriteConfigFiles","recurringInstall","oldNonLoadedEnvs","getOldNonLoadedEnvs","add","manifestsHash","_getComponentsManifests","skipPrune","pruneModules","componentFsCache","deleteAllDependenciesDataCache","addConfiguredAspectsToWorkspacePolicy","addConfiguredGeneratorEnvsToWorkspacePolicy","rootDeps","devDependencies","omit","manifest","addedNewPkgs","_addMissingPackagesToRootPolicy","mergedRootPolicyWithMissingDeps","shouldWrite","isWorkspaceConfigWriteEnabled","err","clean","silent","throw","consoleFailure","message","rootPolicy","aspectsPackages","getConfiguredUserAspectsPackages","externalsOnly","aspectsPackage","configuredEnvs","getConfiguredEnvs","resolvedEnvs","compact","envIdStr","isCoreEnv","undefined","parsedId","resolveComponentId","inWs","hasId","comps","importAndGetMany","idWithVersion","resolveEnvIdWithPotentialVersionForConfig","split","getPackageName","env","_getMissingPackagesWithoutRootDeps","_getAllMissingPackages","pkg","list","uniq","comp","state","issues","getIssue","IssuesClasses","MissingPackagesDependenciesOnFs","d","missingPackages","flat","dependencyInstaller","installOptions","getComponentManifests","referenceLocalPackages","rootManifests","_getRootManifests","_updateRootDirs","getFailedToLoadEnvs","envsWithoutManifest","Array","from","intersection","rootDirs","bitRootCompsDir","getBitRootsDir","existingDirs","fs","readdir","dirName","dirPath","includes","remove","code","mkdir","recursive","nonRootManifests","workspaceDeps","getWorkspaceDepsOfBitRoots","workspaceDepsMeta","reduce","acc","depName","injected","envManifests","_getEnvManifests","appManifests","_getAppManifests","_getAllUsedEnvIds","fromEntries","getRootComponentDirByRootId","_getEnvDependencies","_getEnvPackage","dependenciesMeta","installConfig","hoistingLimits","policy","getEnvPolicyFromEnvId","selfPolicy","force","toStringWithoutVersion","envComponent","getEnvComponentByEnvId","finalVersion","snapToSemver","listAppsComponents","appPkgName","appManifest","find","Map","components","updateDependencies","componentPolicies","_getComponentsWithDependencyPolicies","variantPatterns","raw","variantPoliciesByPatterns","_variantPatternsToDepPolicesDict","outdatedPkgs","getOutdatedPkgsFromPolicies","patterns","forceVersionBump","outdatedPkgsToUpdate","off","pickOutdatedPkgs","on","updatedVariants","updatedComponents","applyUpdates","_updateVariantsPolicies","_updateComponentsConfig","_reloadConsumer","addDuplicateComponentAndPackageIssue","workspacePolicy","_consumer","removed","pkgName","componentIdToPackageName","found","getOrCreate","DuplicateComponentAndPackage","allComponentIds","listIds","componentId","componentConfigFile","index","depResolverConfig","aspects","DependencyResolverAspect","variantPattern","extensions","addSpecificComponentConfig","shouldMergeWithExisting","shouldMergeWithPrevious","bitMap","write","updateVariantPolicies","setExtension","overrideExisting","uninstallDependencies","removeFromRootPolicy","linker","getLinker","linkingOptions","linkResults","calculateLinkedDeps","workspaceRes","legacyResults","legacyLinkResults","linksResults","legacyLinkCodemodResults","codemodResults","linkToBitRoots","_linkAllComponentsToBitRoots","bitIds","toArray","linkToNodeModulesWithCodemod","rewire","link","createLinks","linkToDir","avoidHardLink","skipIfSymlinkValid","apps","dir","mkdirp","linkPkgsToBitRoots","workspacePath","rootComponentId","getRootComponentDir","remotes","scope","_legacyRemotes","reg","getRegistries","packageScopes","scopes","dependencyList","filtered","dep","ComponentDependency","isHub","some","startsWith","getMany","loadSeedersAsAspects","ComponentMap","as","componentDir","onRootAspectAddedSubscriber","_aspectId","onAspectsResolveSubscriber","aspectComponents","needLink","needInstall","promises","aspectComponent","aspectIdStr","visitedAspects","packagePath","getComponentPackagePath","exists","pathExists","provider","loggerExt","cli","_","createLogger","InstallAspect","registerGotEventSlot","eventName","clearAllComponentsCache","installExt","registerAddComponentsIssues","bind","registerOnComponentCreate","commands","InstallCmd","UninstallCmd","UpdateCmd","LinkCommand","registerOnRootAspectAdded","exports","Slot","withType","WorkspaceAspect","LoggerAspect","VariantsAspect","CLIAspect","CompilerAspect","IssuesAspect","EnvsAspect","ApplicationAspect","IpcEventsAspect","GeneratorAspect","WorkspaceConfigFilesAspect","MainRuntime","missingDeps","issue","addRuntime","_default","depsByProjectPaths","mapValues","hash"],"sources":["install.main.runtime.ts"],"sourcesContent":["import fs, { pathExists } from 'fs-extra';\nimport path from 'path';\nimport { getRootComponentDir, getBitRootsDir, linkPkgsToBitRoots } from '@teambit/bit-roots';\nimport { CompilerMain, CompilerAspect, CompilationInitiator } from '@teambit/compiler';\nimport { CLIMain, CommandList, CLIAspect, MainRuntime } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { WorkspaceAspect, Workspace, ComponentConfigFile } from '@teambit/workspace';\nimport { compact, mapValues, omit, uniq, intersection } from 'lodash';\nimport { ProjectManifest } from '@pnpm/types';\nimport { GenerateResult, GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport { ApplicationMain, ApplicationAspect } from '@teambit/application';\nimport { VariantsMain, Patterns, VariantsAspect } from '@teambit/variants';\nimport { Component, ComponentID, ComponentMap } from '@teambit/component';\nimport { createLinks } from '@teambit/dependencies.fs.linked-dependencies';\nimport pMapSeries from 'p-map-series';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport {\n CodemodResult,\n linkToNodeModulesWithCodemod,\n NodeModulesLinksResult,\n} from '@teambit/workspace.modules.node-modules-linker';\nimport { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { IpcEventsAspect, IpcEventsMain } from '@teambit/ipc-events';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport {\n GetComponentManifestsOptions,\n WorkspaceDependencyLifecycleType,\n DependencyResolverMain,\n DependencyInstaller,\n DependencyResolverAspect,\n PackageManagerInstallOptions,\n ComponentDependency,\n VariantPolicyConfigObject,\n WorkspacePolicyEntry,\n LinkingOptions,\n LinkResults,\n DependencyList,\n MergedOutdatedPkg,\n WorkspacePolicy,\n UpdatedComponent,\n} from '@teambit/dependency-resolver';\nimport { WorkspaceConfigFilesAspect, WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport { snapToSemver } from '@teambit/component-package-version';\nimport hash from 'object-hash';\nimport { DependencyTypeNotSupportedInPolicy } from './exceptions';\nimport { InstallAspect } from './install.aspect';\nimport { pickOutdatedPkgs } from './pick-outdated-pkgs';\nimport { LinkCommand } from './link';\nimport InstallCmd from './install.cmd';\nimport UninstallCmd from './uninstall.cmd';\nimport UpdateCmd from './update.cmd';\n\nexport type WorkspaceLinkOptions = LinkingOptions & {\n rootPolicy?: WorkspacePolicy;\n linkToBitRoots?: boolean;\n includePeers?: boolean;\n};\n\nexport type WorkspaceLinkResults = {\n legacyLinkResults?: NodeModulesLinksResult[];\n legacyLinkCodemodResults?: CodemodResult[];\n} & LinkResults;\n\nexport type WorkspaceInstallOptions = {\n addMissingDeps?: boolean;\n addMissingPeers?: boolean;\n lifecycleType?: WorkspaceDependencyLifecycleType;\n dedupe?: boolean;\n import?: boolean;\n copyPeerToRuntimeOnRoot?: boolean;\n copyPeerToRuntimeOnComponents?: boolean;\n updateExisting?: boolean;\n skipIfExisting?: boolean;\n savePrefix?: string;\n compile?: boolean;\n includeOptionalDeps?: boolean;\n updateAll?: boolean;\n recurringInstall?: boolean;\n optimizeReportForNonTerminal?: boolean;\n lockfileOnly?: boolean;\n writeConfigFiles?: boolean;\n skipPrune?: boolean;\n};\n\nexport type ModulesInstallOptions = Omit<WorkspaceInstallOptions, 'updateExisting' | 'lifecycleType' | 'import'>;\n\ntype PreLink = (linkOpts?: WorkspaceLinkOptions) => Promise<void>;\ntype PreInstall = (installOpts?: WorkspaceInstallOptions) => Promise<void>;\ntype PostInstall = () => Promise<void>;\n\ntype PreLinkSlot = SlotRegistry<PreLink>;\ntype PreInstallSlot = SlotRegistry<PreInstall>;\ntype PostInstallSlot = SlotRegistry<PostInstall>;\n\ntype GetComponentsAndManifestsOptions = Omit<\n GetComponentManifestsOptions,\n 'componentDirectoryMap' | 'rootPolicy' | 'rootDir'\n> &\n Pick<PackageManagerInstallOptions, 'nodeLinker'>;\n\nexport class InstallMain {\n private visitedAspects: Set<string> = new Set();\n\n constructor(\n private dependencyResolver: DependencyResolverMain,\n\n private logger: Logger,\n\n private workspace: Workspace,\n\n private variants: VariantsMain,\n\n private compiler: CompilerMain,\n\n private envs: EnvsMain,\n\n private wsConfigFiles: WorkspaceConfigFilesMain,\n\n private app: ApplicationMain,\n\n private generator: GeneratorMain,\n\n private preLinkSlot: PreLinkSlot,\n\n private preInstallSlot: PreInstallSlot,\n\n private postInstallSlot: PostInstallSlot,\n\n private ipcEvents: IpcEventsMain\n ) {}\n /**\n * Install dependencies for all components in the workspace\n *\n * @returns\n * @memberof Workspace\n */\n async install(packages?: string[], options?: WorkspaceInstallOptions): Promise<ComponentMap<string>> {\n // set workspace in install context\n this.workspace.inInstallContext = true;\n if (packages && packages.length) {\n await this._addPackages(packages, options);\n }\n if (options?.addMissingPeers) {\n const compDirMap = await this.getComponentsDirectory([]);\n const mergedRootPolicy = this.dependencyResolver.getWorkspacePolicy();\n const depsFilterFn = await this.generateFilterFnForDepsFromLocalRemote();\n const pmInstallOptions: PackageManagerInstallOptions = {\n dedupe: options?.dedupe,\n copyPeerToRuntimeOnRoot: options?.copyPeerToRuntimeOnRoot ?? true,\n copyPeerToRuntimeOnComponents: options?.copyPeerToRuntimeOnComponents ?? false,\n dependencyFilterFn: depsFilterFn,\n overrides: this.dependencyResolver.config.overrides,\n hoistPatterns: this.dependencyResolver.config.hoistPatterns,\n packageImportMethod: this.dependencyResolver.config.packageImportMethod,\n };\n const missingPeers = await this.dependencyResolver.getMissingPeerDependencies(\n this.workspace.path,\n mergedRootPolicy,\n compDirMap,\n pmInstallOptions\n );\n if (missingPeers) {\n const missingPeerPackages = Object.entries(missingPeers).map(([peerName, range]) => `${peerName}@${range}`);\n await this._addPackages(missingPeerPackages, options);\n } else {\n this.logger.console('No missing peer dependencies found.');\n }\n }\n await pMapSeries(this.preInstallSlot.values(), (fn) => fn(options)); // import objects if not disabled in options\n const res = await this._installModules(options);\n this.workspace.inInstallContext = false;\n\n await this.ipcEvents.publishIpcEvent('onPostInstall');\n\n return res;\n }\n\n registerPreLink(fn: PreLink) {\n this.preLinkSlot.register(fn);\n }\n\n registerPreInstall(fn: PreInstall) {\n this.preInstallSlot.register(fn);\n }\n\n registerPostInstall(fn: PostInstall) {\n this.postInstallSlot.register(fn);\n }\n\n async onComponentCreate(generateResults: GenerateResult[]) {\n this.workspace.inInstallContext = true;\n let runInstall = false;\n let packages: string[] = [];\n let installMissing = false;\n\n const ids = generateResults.map((generateResult) => {\n if (generateResult.dependencies && generateResult.dependencies.length) {\n packages = packages.concat(generateResult.dependencies);\n runInstall = true;\n }\n if (generateResult.installMissingDependencies) {\n installMissing = true;\n runInstall = true;\n }\n if (generateResult.isApp || generateResult.isEnv) {\n runInstall = true;\n }\n return generateResult.id;\n });\n const nonLoadedEnvs: string[] = [];\n\n ids.map((id) => this.workspace.clearComponentCache(id));\n await pMapSeries(ids, async (id) => {\n const component = await this.workspace.get(id);\n // const envId = await this.envs.getEnvId(component);\n const envId = (await this.envs.calculateEnvId(component)).toString();\n const isLoaded = this.envs.isEnvRegistered(envId);\n if (!isLoaded) {\n nonLoadedEnvs.push(envId);\n }\n return component;\n });\n if (nonLoadedEnvs.length) {\n runInstall = true;\n }\n if (!runInstall) {\n this.workspace.inInstallContext = false;\n return;\n }\n // this.logger.console(\n // `the following environments are not installed yet: ${nonLoadedEnvs.join(', ')}. installing them now...`\n // );\n await this.install(packages, {\n addMissingDeps: installMissing,\n skipIfExisting: true,\n writeConfigFiles: false,\n // skipPrune: true,\n });\n }\n\n private async _addPackages(packages: string[], options?: WorkspaceInstallOptions) {\n if ((options?.lifecycleType as string) === 'dev') {\n throw new DependencyTypeNotSupportedInPolicy(options?.lifecycleType as string);\n }\n this.logger.debug(`installing the following packages: ${packages.join()}`);\n const resolver = await this.dependencyResolver.getVersionResolver();\n const resolvedPackagesP = packages.map((packageName) =>\n resolver.resolveRemoteVersion(packageName, {\n rootDir: this.workspace.path,\n })\n );\n const resolvedPackages = await Promise.all(resolvedPackagesP);\n const newWorkspacePolicyEntries: WorkspacePolicyEntry[] = [];\n resolvedPackages.forEach((resolvedPackage) => {\n if (resolvedPackage.version) {\n const versionWithPrefix = this.dependencyResolver.getVersionWithSavePrefix({\n version: resolvedPackage.version,\n overridePrefix: options?.savePrefix,\n wantedRange: resolvedPackage.wantedRange,\n });\n newWorkspacePolicyEntries.push({\n dependencyId: resolvedPackage.packageName,\n value: {\n version: versionWithPrefix,\n },\n lifecycleType: options?.lifecycleType || 'runtime',\n });\n }\n });\n this.dependencyResolver.addToRootPolicy(newWorkspacePolicyEntries, {\n updateExisting: options?.updateExisting ?? false,\n skipIfExisting: options?.skipIfExisting ?? false,\n });\n await this.dependencyResolver.persistConfig('install');\n }\n\n private async _installModules(options?: ModulesInstallOptions): Promise<ComponentMap<string>> {\n const pm = this.dependencyResolver.getPackageManager();\n this.logger.console(\n `installing dependencies in workspace using ${pm?.name} (${chalk.cyan(\n this.dependencyResolver.getPackageManagerName()\n )})`\n );\n this.logger.debug(`installing dependencies in workspace with options`, options);\n const depsFilterFn = await this.generateFilterFnForDepsFromLocalRemote();\n const hasRootComponents = this.dependencyResolver.hasRootComponents();\n // TODO: pass get install options\n const installer = this.dependencyResolver.getInstaller({});\n const calcManifestsOpts: GetComponentsAndManifestsOptions = {\n copyPeerToRuntimeOnComponents: options?.copyPeerToRuntimeOnComponents ?? false,\n copyPeerToRuntimeOnRoot: options?.copyPeerToRuntimeOnRoot ?? true,\n dedupe: !hasRootComponents && options?.dedupe,\n dependencyFilterFn: depsFilterFn,\n nodeLinker: this.dependencyResolver.nodeLinker(),\n };\n const linkOpts = {\n linkTeambitBit: true,\n linkCoreAspects: this.dependencyResolver.linkCoreAspects(),\n linkDepsResolvedFromEnv: !hasRootComponents,\n linkNestedDepsInNM: !this.workspace.isLegacy && !hasRootComponents,\n };\n const { linkedRootDeps } = await this.calculateLinks(linkOpts);\n // eslint-disable-next-line prefer-const\n let { mergedRootPolicy, componentsAndManifests: current } = await this._getComponentsManifestsAndRootPolicy(\n installer,\n {\n ...calcManifestsOpts,\n addMissingDeps: options?.addMissingDeps,\n linkedRootDeps,\n }\n );\n\n const pmInstallOptions: PackageManagerInstallOptions = {\n ...calcManifestsOpts,\n autoInstallPeers: this.dependencyResolver.config.autoInstallPeers,\n includeOptionalDeps: options?.includeOptionalDeps,\n neverBuiltDependencies: this.dependencyResolver.config.neverBuiltDependencies,\n overrides: this.dependencyResolver.config.overrides,\n hoistPatterns: this.dependencyResolver.config.hoistPatterns,\n hoistInjectedDependencies: this.dependencyResolver.config.hoistInjectedDependencies,\n packageImportMethod: this.dependencyResolver.config.packageImportMethod,\n rootComponents: hasRootComponents,\n updateAll: options?.updateAll,\n optimizeReportForNonTerminal: options?.optimizeReportForNonTerminal,\n lockfileOnly: options?.lockfileOnly,\n };\n const prevManifests = new Set<string>();\n // TODO: this make duplicate\n // this.logger.consoleSuccess();\n const linkedDependencies = {\n [this.workspace.path]: linkedRootDeps,\n };\n const compDirMap = await this.getComponentsDirectory([]);\n let installCycle = 0;\n let hasMissingLocalComponents = true;\n const forceTeambitHarmonyLink = !this.dependencyResolver.hasHarmonyInRootPolicy();\n /* eslint-disable no-await-in-loop */\n do {\n // In case there are missing local components,\n // we'll need to make another round of installation as on the first round the missing local components\n // are not added to the manifests.\n // This is an issue when installation is done using root components.\n hasMissingLocalComponents = hasRootComponents && hasComponentsFromWorkspaceInMissingDeps(current);\n const { dependenciesChanged } = await installer.installComponents(\n this.workspace.path,\n current.manifests,\n mergedRootPolicy,\n current.componentDirectoryMap,\n {\n linkedDependencies,\n installTeambitBit: false,\n forceTeambitHarmonyLink,\n },\n pmInstallOptions\n );\n let cacheCleared = false;\n await this.linkCodemods(compDirMap);\n if (options?.compile ?? true) {\n const compileStartTime = process.hrtime();\n const compileOutputMessage = `compiling components`;\n this.logger.setStatusLine(compileOutputMessage);\n // We need to clear cache before compiling the components or it might compile them with the default env\n // incorrectly in case the env was not loaded correctly before the install\n this.workspace.consumer.componentLoader.clearComponentsCache();\n // We don't want to clear the failed to load envs because we want to show the warning at the end\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n cacheCleared = true;\n await this.compiler.compileOnWorkspace([], { initiator: CompilationInitiator.Install });\n this.logger.consoleSuccess(compileOutputMessage, compileStartTime);\n }\n if (options?.writeConfigFiles ?? true) {\n await this.tryWriteConfigFiles(!cacheCleared);\n }\n if (!dependenciesChanged) break;\n if (!options?.recurringInstall) break;\n const oldNonLoadedEnvs = this.getOldNonLoadedEnvs();\n if (!oldNonLoadedEnvs.length) break;\n prevManifests.add(manifestsHash(current.manifests));\n // If we run compile we do the clear cache before the compilation so no need to clean it again (it's an expensive\n // operation)\n if (!cacheCleared) {\n // We need to clear cache before creating the new component manifests.\n this.workspace.consumer.componentLoader.clearComponentsCache();\n // We don't want to clear the failed to load envs because we want to show the warning at the end\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n }\n current = await this._getComponentsManifests(installer, mergedRootPolicy, calcManifestsOpts);\n installCycle += 1;\n } while ((!prevManifests.has(manifestsHash(current.manifests)) || hasMissingLocalComponents) && installCycle < 5);\n if (!options?.lockfileOnly && !options?.skipPrune) {\n // We clean node_modules only after the last install.\n // Otherwise, we might load an env from a location that we later remove.\n await installer.pruneModules(this.workspace.path);\n }\n await this.workspace.consumer.componentFsCache.deleteAllDependenciesDataCache();\n /* eslint-enable no-await-in-loop */\n return current.componentDirectoryMap;\n }\n\n private async _getComponentsManifestsAndRootPolicy(\n installer: DependencyInstaller,\n options: GetComponentsAndManifestsOptions & {\n addMissingDeps?: boolean;\n linkedRootDeps: Record<string, string>;\n }\n ): Promise<{ componentsAndManifests: ComponentsAndManifests; mergedRootPolicy: WorkspacePolicy }> {\n const mergedRootPolicy = await this.addConfiguredAspectsToWorkspacePolicy();\n await this.addConfiguredGeneratorEnvsToWorkspacePolicy(mergedRootPolicy);\n const componentsAndManifests = await this._getComponentsManifests(installer, mergedRootPolicy, options);\n if (!options?.addMissingDeps) {\n return { componentsAndManifests, mergedRootPolicy };\n }\n const rootDeps = new Set(\n Object.keys({\n ...componentsAndManifests.manifests[this.workspace.path].devDependencies,\n ...componentsAndManifests.manifests[this.workspace.path].dependencies,\n ...options.linkedRootDeps,\n })\n );\n Object.values(omit(componentsAndManifests.manifests, [this.workspace.path])).forEach((manifest) => {\n if ((manifest as ProjectManifest).name) {\n rootDeps.add((manifest as ProjectManifest).name!); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n });\n const addedNewPkgs = await this._addMissingPackagesToRootPolicy(rootDeps);\n if (!addedNewPkgs) {\n return { componentsAndManifests, mergedRootPolicy };\n }\n const mergedRootPolicyWithMissingDeps = await this.addConfiguredAspectsToWorkspacePolicy();\n await this.addConfiguredGeneratorEnvsToWorkspacePolicy(mergedRootPolicyWithMissingDeps);\n return {\n mergedRootPolicy: mergedRootPolicyWithMissingDeps,\n componentsAndManifests: await this._getComponentsManifests(installer, mergedRootPolicyWithMissingDeps, options),\n };\n }\n\n /**\n * The function `tryWriteConfigFiles` attempts to write workspace config files, and if it fails, it logs an error\n * message.\n * @returns If the condition `!shouldWrite` is true, then nothing is being returned. Otherwise, if the `writeConfigFiles`\n * function is successfully executed, nothing is being returned. If an error occurs during the execution of\n * `writeConfigFiles`, an error message is being returned.\n */\n private async tryWriteConfigFiles(clearCache: boolean) {\n const shouldWrite = this.wsConfigFiles.isWorkspaceConfigWriteEnabled();\n if (!shouldWrite) return;\n if (clearCache) {\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n }\n const { err } = await this.wsConfigFiles.writeConfigFiles({\n clean: true,\n silent: true,\n dedupe: true,\n throw: false,\n });\n if (err) {\n this.logger.consoleFailure(\n `failed generating workspace config files, please run \"bit ws-config write\" manually. error: ${err.message}`\n );\n }\n }\n\n private async addConfiguredAspectsToWorkspacePolicy(): Promise<WorkspacePolicy> {\n const rootPolicy = this.dependencyResolver.getWorkspacePolicy();\n const aspectsPackages = await this.workspace.getConfiguredUserAspectsPackages({ externalsOnly: true });\n aspectsPackages.forEach((aspectsPackage) => {\n rootPolicy.add(\n {\n dependencyId: aspectsPackage.packageName,\n value: {\n version: aspectsPackage.version,\n },\n lifecycleType: 'runtime',\n },\n // If it's already exist from the root, take the version from the root policy\n { skipIfExisting: true }\n );\n });\n return rootPolicy;\n }\n\n private async addConfiguredGeneratorEnvsToWorkspacePolicy(rootPolicy: WorkspacePolicy): Promise<void> {\n const configuredEnvs = this.generator.getConfiguredEnvs();\n const resolvedEnvs = compact(\n await Promise.all(\n configuredEnvs.map(async (envIdStr) => {\n if (this.envs.isCoreEnv(envIdStr)) {\n return undefined;\n }\n const parsedId = await this.workspace.resolveComponentId(envIdStr);\n // If we have the env in the workspace, we don't want to install it\n const inWs = await this.workspace.hasId(parsedId);\n if (inWs) {\n return undefined;\n }\n const comps = await this.workspace.importAndGetMany(\n [parsedId],\n `to get the env ${parsedId.toString()} for installation`\n );\n const idWithVersion = await this.workspace.resolveEnvIdWithPotentialVersionForConfig(parsedId);\n const version = idWithVersion.split('@')[1] || '*';\n const packageName = this.dependencyResolver.getPackageName(comps[0]);\n return {\n packageName,\n version,\n };\n })\n )\n );\n\n resolvedEnvs.forEach((env) => {\n rootPolicy.add(\n {\n dependencyId: env.packageName,\n value: {\n version: env.version,\n },\n lifecycleType: 'runtime',\n },\n // If it's already exist from the root, take the version from the root policy\n { skipIfExisting: true }\n );\n });\n }\n\n private async _addMissingPackagesToRootPolicy(\n rootDeps: Set<string>,\n options?: WorkspaceInstallOptions\n ): Promise<boolean> {\n const packages = await this._getMissingPackagesWithoutRootDeps(rootDeps);\n if (packages && packages.length) {\n await this._addPackages(packages, options);\n }\n return packages.length > 0;\n }\n\n private async _getMissingPackagesWithoutRootDeps(rootDeps: Set<string>) {\n const packages = await this._getAllMissingPackages();\n return packages.filter((pkg) => !rootDeps.has(pkg));\n }\n\n private async _getAllMissingPackages(): Promise<string[]> {\n const comps = await this.workspace.list();\n return uniq(\n comps\n .map((comp) => {\n const data = comp.state.issues.getIssue(IssuesClasses.MissingPackagesDependenciesOnFs)?.data || [];\n return data.map((d) => d.missingPackages).flat();\n })\n .flat()\n );\n }\n\n private async _getComponentsManifests(\n dependencyInstaller: DependencyInstaller,\n rootPolicy: WorkspacePolicy,\n installOptions: GetComponentsAndManifestsOptions\n ): Promise<ComponentsAndManifests> {\n const componentDirectoryMap = await this.getComponentsDirectory([]);\n let manifests = await dependencyInstaller.getComponentManifests({\n ...installOptions,\n componentDirectoryMap,\n rootPolicy,\n rootDir: this.workspace.path,\n referenceLocalPackages: this.dependencyResolver.hasRootComponents() && installOptions.nodeLinker === 'isolated',\n });\n\n if (this.dependencyResolver.hasRootComponents()) {\n const rootManifests = await this._getRootManifests(manifests);\n await this._updateRootDirs(Object.keys(rootManifests));\n manifests = {\n ...manifests,\n ...rootManifests,\n };\n }\n return {\n componentDirectoryMap,\n manifests,\n };\n }\n\n /**\n * This function returns a list of old non-loaded environments names.\n * @returns an array of strings called `oldNonLoadedEnvs`. This array contains the names of environment variables that\n * failed to load as extensions and are also don't have an env.jsonc file.\n * If this list is not empty, then the user might need to run another install to make sure all dependencies resolved\n * correctly\n */\n public getOldNonLoadedEnvs() {\n const nonLoadedEnvs = this.envs.getFailedToLoadEnvs();\n const envsWithoutManifest = Array.from(this.dependencyResolver.envsWithoutManifest);\n const oldNonLoadedEnvs = intersection(nonLoadedEnvs, envsWithoutManifest);\n return oldNonLoadedEnvs;\n }\n\n private async _updateRootDirs(rootDirs: string[]) {\n try {\n const bitRootCompsDir = getBitRootsDir(this.workspace.path);\n const existingDirs = await fs.readdir(bitRootCompsDir);\n await Promise.all(\n existingDirs.map(async (dirName) => {\n const dirPath = path.join(bitRootCompsDir, dirName);\n if (!rootDirs.includes(dirPath)) {\n await fs.remove(dirPath);\n }\n })\n );\n } catch (err: any) {\n if (err.code !== 'ENOENT') throw err;\n }\n await Promise.all(rootDirs.map((dirPath) => fs.mkdir(dirPath, { recursive: true })));\n }\n\n private async _getRootManifests(\n manifests: Record<string, ProjectManifest>\n ): Promise<Record<string, ProjectManifest>> {\n const nonRootManifests = Object.values(manifests).filter(({ name }) => name !== 'workspace');\n const workspaceDeps = this.dependencyResolver.getWorkspaceDepsOfBitRoots(nonRootManifests);\n const workspaceDepsMeta = Object.keys(workspaceDeps).reduce((acc, depName) => {\n acc[depName] = { injected: true };\n return acc;\n }, {});\n const envManifests = await this._getEnvManifests(workspaceDeps, workspaceDepsMeta);\n const appManifests = await this._getAppManifests(manifests, workspaceDeps, workspaceDepsMeta);\n return {\n ...envManifests,\n ...appManifests,\n };\n }\n\n private async _getEnvManifests(\n workspaceDeps: Record<string, string>,\n workspaceDepsMeta: Record<string, { injected: true }>\n ): Promise<Record<string, ProjectManifest>> {\n const envs = await this._getAllUsedEnvIds();\n return Object.fromEntries(\n await Promise.all(\n envs.map(async (envId) => {\n return [\n await this.getRootComponentDirByRootId(this.workspace.path, envId),\n {\n dependencies: {\n ...(await this._getEnvDependencies(envId)),\n ...workspaceDeps,\n ...(await this._getEnvPackage(envId)),\n },\n dependenciesMeta: workspaceDepsMeta,\n installConfig: {\n hoistingLimits: 'workspaces',\n },\n },\n ];\n })\n )\n );\n }\n\n private async _getEnvDependencies(envId: ComponentID): Promise<Record<string, string>> {\n const policy = await this.dependencyResolver.getEnvPolicyFromEnvId(envId);\n if (!policy) return {};\n return Object.fromEntries(\n policy.selfPolicy.entries\n .filter(({ force, value }) => force && value.version !== '-')\n .map(({ dependencyId, value }) => [dependencyId, value.version])\n );\n }\n\n /**\n * Return the package name of the env with its version.\n * (only if the env is not a core env and is not in the workspace)\n * @param envId\n * @returns\n */\n private async _getEnvPackage(envId: ComponentID): Promise<Record<string, string> | undefined> {\n if (this.envs.isCoreEnv(envId.toStringWithoutVersion())) return undefined;\n const inWs = await this.workspace.hasId(envId);\n if (inWs) return undefined;\n const envComponent = await this.envs.getEnvComponentByEnvId(envId.toString(), envId.toString());\n if (!envComponent) return undefined;\n const packageName = this.dependencyResolver.getPackageName(envComponent);\n const version = envId.version;\n const finalVersion = snapToSemver(version as string);\n return { [packageName]: finalVersion };\n }\n\n private async _getAppManifests(\n manifests: Record<string, ProjectManifest>,\n workspaceDeps: Record<string, string>,\n workspaceDepsMeta: Record<string, { injected: true }>\n ): Promise<Record<string, ProjectManifest>> {\n return Object.fromEntries(\n compact(\n await Promise.all(\n (\n await this.app.listAppsComponents()\n ).map(async (app) => {\n const appPkgName = this.dependencyResolver.getPackageName(app);\n const appManifest = Object.values(manifests).find(({ name }) => name === appPkgName);\n if (!appManifest) return null;\n const envId = await this.envs.calculateEnvId(app);\n return [\n await this.getRootComponentDirByRootId(this.workspace.path, app.id),\n {\n ...omit(appManifest, ['name', 'version']),\n dependencies: {\n ...(await this._getEnvDependencies(envId)),\n ...appManifest.dependencies,\n ...workspaceDeps,\n },\n dependenciesMeta: {\n ...appManifest.dependenciesMeta,\n ...workspaceDepsMeta,\n },\n installConfig: {\n hoistingLimits: 'workspaces',\n },\n },\n ];\n })\n )\n )\n );\n }\n\n private async _getAllUsedEnvIds(): Promise<ComponentID[]> {\n const envs = new Map<string, ComponentID>();\n const components = await this.workspace.list();\n await pMapSeries(components, async (component) => {\n const envId = await this.envs.calculateEnvId(component);\n envs.set(envId.toString(), envId);\n });\n return Array.from(envs.values());\n }\n\n /**\n * Updates out-of-date dependencies in the workspace.\n *\n * @param options.all {Boolean} updates all outdated dependencies without showing a prompt.\n */\n async updateDependencies(options: {\n forceVersionBump?: 'major' | 'minor' | 'patch' | 'compatible';\n patterns?: string[];\n all: boolean;\n }): Promise<ComponentMap<string> | null> {\n const componentPolicies = await this._getComponentsWithDependencyPolicies();\n const variantPatterns = this.variants.raw();\n const variantPoliciesByPatterns = this._variantPatternsToDepPolicesDict(variantPatterns);\n const components = await this.workspace.list();\n const outdatedPkgs = await this.dependencyResolver.getOutdatedPkgsFromPolicies({\n rootDir: this.workspace.path,\n variantPoliciesByPatterns,\n componentPolicies,\n components,\n patterns: options.patterns,\n forceVersionBump: options.forceVersionBump,\n });\n if (outdatedPkgs == null) {\n this.logger.consoleFailure('No dependencies found that match the patterns');\n return null;\n }\n let outdatedPkgsToUpdate!: MergedOutdatedPkg[];\n if (options.all) {\n outdatedPkgsToUpdate = outdatedPkgs;\n } else {\n this.logger.off();\n outdatedPkgsToUpdate = await pickOutdatedPkgs(outdatedPkgs);\n this.logger.on();\n }\n if (outdatedPkgsToUpdate.length === 0) {\n this.logger.consoleSuccess('No outdated dependencies found');\n if (options.forceVersionBump === 'compatible') {\n this.logger.console(\n \"If you want to find new versions that don't match the current version ranges, retry with the --latest flag\"\n );\n }\n return null;\n }\n const { updatedVariants, updatedComponents } = this.dependencyResolver.applyUpdates(outdatedPkgsToUpdate, {\n variantPoliciesByPatterns,\n });\n await this._updateVariantsPolicies(variantPatterns, updatedVariants);\n await this._updateComponentsConfig(updatedComponents);\n await this.workspace._reloadConsumer();\n return this._installModules({ dedupe: true });\n }\n\n async addDuplicateComponentAndPackageIssue(components: Component[]) {\n const workspacePolicy = this.dependencyResolver.getWorkspacePolicy();\n components.forEach((component) => {\n if (component.state._consumer.removed) return;\n const pkgName = componentIdToPackageName(component.state._consumer);\n const found = workspacePolicy.find(pkgName);\n if (found) {\n component.state.issues.getOrCreate(IssuesClasses.DuplicateComponentAndPackage).data = found.dependencyId;\n }\n });\n }\n\n private async _getComponentsWithDependencyPolicies() {\n const allComponentIds = this.workspace.listIds();\n const componentPolicies = [] as Array<{ componentId: ComponentID; policy: any }>;\n (\n await Promise.all<ComponentConfigFile | undefined>(\n allComponentIds.map((componentId) => this.workspace.componentConfigFile(componentId))\n )\n ).forEach((componentConfigFile, index) => {\n if (!componentConfigFile) return;\n const depResolverConfig = componentConfigFile.aspects.get(DependencyResolverAspect.id);\n if (!depResolverConfig) return;\n const componentId = allComponentIds[index];\n componentPolicies.push({ componentId, policy: depResolverConfig.config.policy });\n });\n return componentPolicies;\n }\n\n private _variantPatternsToDepPolicesDict(variantPatterns: Patterns): Record<string, VariantPolicyConfigObject> {\n const variantPoliciesByPatterns: Record<string, VariantPolicyConfigObject> = {};\n for (const [variantPattern, extensions] of Object.entries(variantPatterns)) {\n if (extensions[DependencyResolverAspect.id]?.policy) {\n variantPoliciesByPatterns[variantPattern] = extensions[DependencyResolverAspect.id]?.policy;\n }\n }\n return variantPoliciesByPatterns;\n }\n\n private async _updateComponentsConfig(updatedComponents: UpdatedComponent[]) {\n if (updatedComponents.length === 0) return;\n await Promise.all(\n updatedComponents.map(({ componentId, config }) => {\n return this.workspace.addSpecificComponentConfig(componentId, DependencyResolverAspect.id, config, {\n shouldMergeWithExisting: true,\n shouldMergeWithPrevious: true,\n });\n })\n );\n await this.workspace.bitMap.write('update (dependencies)');\n }\n\n private async _updateVariantsPolicies(variantPatterns: Record<string, any>, updateVariantPolicies: string[]) {\n for (const variantPattern of updateVariantPolicies) {\n this.variants.setExtension(\n variantPattern,\n DependencyResolverAspect.id,\n variantPatterns[variantPattern][DependencyResolverAspect.id],\n { overrideExisting: true }\n );\n }\n await this.dependencyResolver.persistConfig('update dependencies');\n }\n\n /**\n * Uninstall the specified packages from dependencies.\n *\n * @param {string[]} the list of packages that should be removed from dependencies.\n */\n async uninstallDependencies(packages: string[]) {\n this.dependencyResolver.removeFromRootPolicy(packages);\n await this.dependencyResolver.persistConfig('uninstall dependencies');\n return this._installModules({ dedupe: true });\n }\n\n /**\n * This function returns all the locations of the external links that should be created inside node_modules.\n * This information may then be passed to the package manager, which will create the links on its own.\n */\n async calculateLinks(\n options: WorkspaceLinkOptions = {}\n ): Promise<{ linkResults: WorkspaceLinkResults; linkedRootDeps: Record<string, string> }> {\n await pMapSeries(this.preLinkSlot.values(), (fn) => fn(options)); // import objects if not disabled in options\n const compDirMap = await this.getComponentsDirectory([]);\n const linker = this.dependencyResolver.getLinker({\n rootDir: this.workspace.path,\n linkingOptions: options,\n });\n const { linkResults: res, linkedRootDeps } = await linker.calculateLinkedDeps(\n this.workspace.path,\n compDirMap,\n options\n );\n const workspaceRes = res as WorkspaceLinkResults;\n\n const legacyResults = await this.linkCodemods(compDirMap, options);\n workspaceRes.legacyLinkResults = legacyResults.linksResults;\n workspaceRes.legacyLinkCodemodResults = legacyResults.codemodResults;\n\n if (this.dependencyResolver.hasRootComponents() && options.linkToBitRoots) {\n await this._linkAllComponentsToBitRoots(compDirMap);\n }\n return { linkResults: res, linkedRootDeps };\n }\n\n async linkCodemods(compDirMap: ComponentMap<string>, options?: { rewire?: boolean }) {\n const bitIds = compDirMap.toArray().map(([component]) => component.id);\n return linkToNodeModulesWithCodemod(this.workspace, bitIds, options?.rewire ?? false);\n }\n\n async link(options: WorkspaceLinkOptions = {}): Promise<WorkspaceLinkResults> {\n const { linkResults, linkedRootDeps } = await this.calculateLinks(options);\n await createLinks(options.linkToDir ?? this.workspace.path, linkedRootDeps, {\n avoidHardLink: true,\n skipIfSymlinkValid: true,\n });\n return linkResults;\n }\n\n private async _linkAllComponentsToBitRoots(compDirMap: ComponentMap<string>) {\n const envs = await this._getAllUsedEnvIds();\n const apps = (await this.app.listAppsComponents()).map((component) => component.id);\n await Promise.all(\n [...envs, ...apps].map(async (id) => {\n const dir = await this.getRootComponentDirByRootId(this.workspace.path, id);\n await fs.mkdirp(dir);\n })\n );\n await linkPkgsToBitRoots(\n this.workspace.path,\n compDirMap.components.map((component) => this.dependencyResolver.getPackageName(component))\n );\n }\n\n private async getRootComponentDirByRootId(workspacePath: string, rootComponentId: ComponentID): Promise<string> {\n // Root directories for local envs and apps are created without their version number.\n // This is done in order to avoid changes to the lockfile after such components are tagged.\n const id = (await this.workspace.hasId(rootComponentId))\n ? rootComponentId.toStringWithoutVersion()\n : rootComponentId.toString();\n return getRootComponentDir(workspacePath, id);\n }\n\n /**\n * Generate a filter to pass to the installer\n * This will filter deps which are come from remotes which defined in scope.json\n * those components comes from local remotes, usually doesn't have a package in a registry\n * so no reason to try to install them (it will fail)\n */\n private async generateFilterFnForDepsFromLocalRemote() {\n // TODO: once scope create a new API for this, replace it with the new one\n const remotes = await this.workspace.scope._legacyRemotes();\n const reg = await this.dependencyResolver.getRegistries();\n const packageScopes = Object.keys(reg.scopes);\n return (dependencyList: DependencyList): DependencyList => {\n const filtered = dependencyList.filter((dep) => {\n if (!(dep instanceof ComponentDependency)) {\n return true;\n }\n if (remotes.isHub(dep.componentId.scope)) {\n return true;\n }\n if (packageScopes.some((scope) => dep.packageName.startsWith(`@${scope}/`))) {\n return true;\n }\n return false;\n });\n return filtered;\n };\n }\n\n private async getComponentsDirectory(ids: ComponentID[]): Promise<ComponentMap<string>> {\n const components = ids.length\n ? await this.workspace.getMany(ids)\n : await this.workspace.list(undefined, { loadSeedersAsAspects: false });\n return ComponentMap.as<string>(components, (component) => this.workspace.componentDir(component.id));\n }\n\n private async onRootAspectAddedSubscriber(_aspectId: ComponentID, inWs: boolean): Promise<void> {\n if (!inWs) {\n await this.install();\n }\n }\n private async onAspectsResolveSubscriber(aspectComponents: Component[]): Promise<void> {\n let needLink = false;\n let needInstall = false;\n const promises = aspectComponents.map(async (aspectComponent) => {\n const aspectIdStr = aspectComponent.id.toString();\n if (this.visitedAspects.has(aspectIdStr)) return;\n\n this.visitedAspects.add(aspectIdStr);\n const packagePath = await this.workspace.getComponentPackagePath(aspectComponent);\n const exists = await pathExists(packagePath);\n if (!exists) {\n const inWs = await this.workspace.hasId(aspectComponent.id);\n if (inWs) {\n needLink = true;\n } else {\n needInstall = true;\n }\n }\n });\n await Promise.all(promises);\n if (needInstall) {\n await this.install();\n return;\n }\n if (needLink) {\n await this.link();\n }\n }\n\n static slots = [Slot.withType<PreLinkSlot>(), Slot.withType<PreInstallSlot>(), Slot.withType<PostInstallSlot>()];\n static dependencies = [\n DependencyResolverAspect,\n WorkspaceAspect,\n LoggerAspect,\n VariantsAspect,\n CLIAspect,\n CompilerAspect,\n IssuesAspect,\n EnvsAspect,\n ApplicationAspect,\n IpcEventsAspect,\n GeneratorAspect,\n WorkspaceConfigFilesAspect,\n ];\n\n static runtime = MainRuntime;\n\n static async provider(\n [\n dependencyResolver,\n workspace,\n loggerExt,\n variants,\n cli,\n compiler,\n issues,\n envs,\n app,\n ipcEvents,\n generator,\n wsConfigFiles,\n ]: [\n DependencyResolverMain,\n Workspace,\n LoggerMain,\n VariantsMain,\n CLIMain,\n CompilerMain,\n IssuesMain,\n EnvsMain,\n ApplicationMain,\n IpcEventsMain,\n GeneratorMain,\n WorkspaceConfigFilesMain\n ],\n _,\n [preLinkSlot, preInstallSlot, postInstallSlot]: [PreLinkSlot, PreInstallSlot, PostInstallSlot]\n ) {\n const logger = loggerExt.createLogger(InstallAspect.id);\n ipcEvents.registerGotEventSlot(async (eventName) => {\n if (eventName !== 'onPostInstall') return;\n logger.debug('got onPostInstall event, clear workspace and all components cache');\n await workspace.clearCache();\n workspace.clearAllComponentsCache();\n await pMapSeries(postInstallSlot.values(), (fn) => fn());\n });\n const installExt = new InstallMain(\n dependencyResolver,\n logger,\n workspace,\n variants,\n compiler,\n envs,\n wsConfigFiles,\n app,\n generator,\n preLinkSlot,\n preInstallSlot,\n postInstallSlot,\n ipcEvents\n );\n if (issues) {\n issues.registerAddComponentsIssues(installExt.addDuplicateComponentAndPackageIssue.bind(installExt));\n }\n generator.registerOnComponentCreate(installExt.onComponentCreate.bind(installExt));\n const commands: CommandList = [\n new InstallCmd(installExt, workspace, logger),\n new UninstallCmd(installExt),\n new UpdateCmd(installExt),\n new LinkCommand(installExt, workspace, logger),\n ];\n // For now do not automate installation during aspect resolving\n // workspace.registerOnAspectsResolve(installExt.onAspectsResolveSubscriber.bind(installExt));\n if (workspace) {\n workspace.registerOnRootAspectAdded(installExt.onRootAspectAddedSubscriber.bind(installExt));\n }\n cli.register(...commands);\n return installExt;\n }\n}\n\ntype ComponentsAndManifests = {\n componentDirectoryMap: ComponentMap<string>;\n manifests: Record<string, ProjectManifest>;\n};\n\nfunction hasComponentsFromWorkspaceInMissingDeps({\n componentDirectoryMap,\n manifests,\n}: ComponentsAndManifests): boolean {\n const missingDeps = new Set<string>(\n componentDirectoryMap\n .toArray()\n .map(([{ state }]) => {\n const issue = state.issues.getIssue(IssuesClasses.MissingPackagesDependenciesOnFs);\n if (!issue) return [];\n return issue.data.map((d) => d.missingPackages).flat();\n })\n .flat()\n );\n return Object.values(manifests).some(({ name }) => name && missingDeps.has(name));\n}\n\nInstallAspect.addRuntime(InstallMain);\n\nexport default InstallMain;\n\nfunction manifestsHash(manifests: Record<string, ProjectManifest>): string {\n // We don't care if the type of the dependency changes as it doesn't change the node_modules structure\n const depsByProjectPaths = mapValues(manifests, (manifest) => ({\n ...manifest.devDependencies,\n ...manifest.dependencies,\n }));\n return hash(depsByProjectPaths);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;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;AACnF;AAEA4S,wBAAa,CAAC+B,UAAU,CAACrb,WAAW,CAAC;AAAC,IAAAsb,QAAA,GAAAlB,OAAA,CAAAjd,OAAA,GAEvB6C,WAAW;AAE1B,SAASyK,aAAaA,CAAC1B,SAA0C,EAAU;EACzE;EACA,MAAMwS,kBAAkB,GAAG,IAAAC,mBAAS,EAACzS,SAAS,EAAGqC,QAAQ,IAAAtM,aAAA,CAAAA,aAAA,KACpDsM,QAAQ,CAACF,eAAe,GACxBE,QAAQ,CAACtH,YAAY,CACxB,CAAC;EACH,OAAO,IAAA2X,qBAAI,EAACF,kBAAkB,CAAC;AACjC","ignoreList":[]}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireWildcard","require","_path","_interopRequireDefault","_bitRoots","_compiler","_cli","_chalk","_workspace","_lodash","_generator","_componentIdToPackageName","_application","_variants","_component","_dependenciesFs","_pMapSeries","_harmony","_workspaceModules","_envs","_ipcEvents","_componentIssues","_dependencyResolver","_workspaceConfigFiles","_logger","_issues","_componentPackageVersion","_objectHash","_exceptions","_install","_pickOutdatedPkgs","_link","_install2","_uninstall","_update","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","InstallMain","constructor","dependencyResolver","logger","workspace","variants","compiler","envs","wsConfigFiles","app","generator","preLinkSlot","preInstallSlot","postInstallSlot","ipcEvents","Set","install","packages","options","inInstallContext","_addPackages","addMissingPeers","compDirMap","getComponentsDirectory","mergedRootPolicy","getWorkspacePolicy","depsFilterFn","generateFilterFnForDepsFromLocalRemote","pmInstallOptions","dedupe","copyPeerToRuntimeOnRoot","copyPeerToRuntimeOnComponents","dependencyFilterFn","overrides","config","hoistPatterns","packageImportMethod","missingPeers","getMissingPeerDependencies","path","missingPeerPackages","entries","map","peerName","range","console","pMapSeries","values","fn","res","_installModules","publishIpcEvent","registerPreLink","register","registerPreInstall","registerPostInstall","onComponentCreate","generateResults","runInstall","installMissing","ids","generateResult","dependencies","concat","installMissingDependencies","isApp","isEnv","id","nonLoadedEnvs","clearComponentCache","component","envId","calculateEnvId","toString","isLoaded","isEnvRegistered","addMissingDeps","skipIfExisting","writeConfigFiles","lifecycleType","DependencyTypeNotSupportedInPolicy","debug","join","resolver","getVersionResolver","resolvedPackagesP","packageName","resolveRemoteVersion","rootDir","resolvedPackages","Promise","all","newWorkspacePolicyEntries","resolvedPackage","version","versionWithPrefix","getVersionWithSavePrefix","overridePrefix","savePrefix","wantedRange","dependencyId","addToRootPolicy","updateExisting","persistConfig","pm","getPackageManager","name","chalk","cyan","getPackageManagerName","hasRootComponents","installer","getInstaller","calcManifestsOpts","nodeLinker","linkOpts","linkTeambitBit","linkCoreAspects","linkDepsResolvedFromEnv","linkNestedDepsInNM","isLegacy","linkedRootDeps","calculateLinks","componentsAndManifests","current","_getComponentsManifestsAndRootPolicy","autoInstallPeers","includeOptionalDeps","neverBuiltDependencies","hoistInjectedDependencies","rootComponents","updateAll","optimizeReportForNonTerminal","lockfileOnly","prevManifests","linkedDependencies","installCycle","hasMissingLocalComponents","forceTeambitHarmonyLink","hasHarmonyInRootPolicy","hasComponentsFromWorkspaceInMissingDeps","dependenciesChanged","installComponents","manifests","componentDirectoryMap","installTeambitBit","cacheCleared","linkCodemods","compile","compileStartTime","process","hrtime","compileOutputMessage","setStatusLine","consumer","componentLoader","clearComponentsCache","clearCache","skipClearFailedToLoadEnvs","compileOnWorkspace","initiator","CompilationInitiator","Install","consoleSuccess","tryWriteConfigFiles","recurringInstall","oldNonLoadedEnvs","getOldNonLoadedEnvs","add","manifestsHash","_getComponentsManifests","skipPrune","pruneModules","componentFsCache","deleteAllDependenciesDataCache","addConfiguredAspectsToWorkspacePolicy","addConfiguredGeneratorEnvsToWorkspacePolicy","rootDeps","devDependencies","omit","manifest","addedNewPkgs","_addMissingPackagesToRootPolicy","mergedRootPolicyWithMissingDeps","shouldWrite","isWorkspaceConfigWriteEnabled","err","clean","silent","throw","consoleFailure","message","rootPolicy","aspectsPackages","getConfiguredUserAspectsPackages","externalsOnly","aspectsPackage","configuredEnvs","getConfiguredEnvs","resolvedEnvs","compact","envIdStr","isCoreEnv","undefined","parsedId","resolveComponentId","inWs","hasId","comps","importAndGetMany","idWithVersion","resolveEnvIdWithPotentialVersionForConfig","split","getPackageName","env","_getMissingPackagesWithoutRootDeps","_getAllMissingPackages","pkg","list","uniq","comp","state","issues","getIssue","IssuesClasses","MissingPackagesDependenciesOnFs","d","missingPackages","flat","dependencyInstaller","installOptions","getComponentManifests","referenceLocalPackages","rootManifests","_getRootManifests","_updateRootDirs","getFailedToLoadEnvs","envsWithoutManifest","Array","from","intersection","rootDirs","bitRootCompsDir","getBitRootsDir","existingDirs","fs","readdir","dirName","dirPath","includes","remove","code","mkdir","recursive","nonRootManifests","workspaceDeps","getWorkspaceDepsOfBitRoots","workspaceDepsMeta","reduce","acc","depName","injected","envManifests","_getEnvManifests","appManifests","_getAppManifests","_getAllUsedEnvIds","fromEntries","getRootComponentDirByRootId","_getEnvDependencies","_getEnvPackage","dependenciesMeta","installConfig","hoistingLimits","policy","getEnvPolicyFromEnvId","selfPolicy","force","toStringWithoutVersion","envComponent","getEnvComponentByEnvId","finalVersion","snapToSemver","listAppsComponents","appPkgName","appManifest","find","Map","components","updateDependencies","componentPolicies","_getComponentsWithDependencyPolicies","variantPatterns","raw","variantPoliciesByPatterns","_variantPatternsToDepPolicesDict","outdatedPkgs","getOutdatedPkgsFromPolicies","patterns","forceVersionBump","outdatedPkgsToUpdate","off","pickOutdatedPkgs","on","updatedVariants","updatedComponents","applyUpdates","_updateVariantsPolicies","_updateComponentsConfig","_reloadConsumer","addDuplicateComponentAndPackageIssue","workspacePolicy","_consumer","removed","pkgName","componentIdToPackageName","found","getOrCreate","DuplicateComponentAndPackage","allComponentIds","listIds","componentId","componentConfigFile","index","depResolverConfig","aspects","DependencyResolverAspect","variantPattern","extensions","addSpecificComponentConfig","shouldMergeWithExisting","shouldMergeWithPrevious","bitMap","write","updateVariantPolicies","setExtension","overrideExisting","uninstallDependencies","removeFromRootPolicy","linker","getLinker","linkingOptions","linkResults","calculateLinkedDeps","workspaceRes","legacyResults","legacyLinkResults","linksResults","legacyLinkCodemodResults","codemodResults","linkToBitRoots","_linkAllComponentsToBitRoots","bitIds","toArray","linkToNodeModulesWithCodemod","rewire","link","createLinks","linkToDir","avoidHardLink","skipIfSymlinkValid","apps","dir","mkdirp","linkPkgsToBitRoots","workspacePath","rootComponentId","getRootComponentDir","remotes","scope","_legacyRemotes","reg","getRegistries","packageScopes","scopes","dependencyList","filtered","dep","ComponentDependency","isHub","some","startsWith","getMany","loadSeedersAsAspects","ComponentMap","as","componentDir","onRootAspectAddedSubscriber","_aspectId","onAspectsResolveSubscriber","aspectComponents","needLink","needInstall","promises","aspectComponent","aspectIdStr","visitedAspects","packagePath","getComponentPackagePath","exists","pathExists","provider","loggerExt","cli","_","createLogger","InstallAspect","registerGotEventSlot","eventName","clearAllComponentsCache","installExt","registerAddComponentsIssues","bind","registerOnComponentCreate","commands","InstallCmd","UninstallCmd","UpdateCmd","LinkCommand","registerOnRootAspectAdded","exports","Slot","withType","WorkspaceAspect","LoggerAspect","VariantsAspect","CLIAspect","CompilerAspect","IssuesAspect","EnvsAspect","ApplicationAspect","IpcEventsAspect","GeneratorAspect","WorkspaceConfigFilesAspect","MainRuntime","missingDeps","issue","addRuntime","_default","depsByProjectPaths","mapValues","hash"],"sources":["install.main.runtime.ts"],"sourcesContent":["import fs, { pathExists } from 'fs-extra';\nimport path from 'path';\nimport { getRootComponentDir, getBitRootsDir, linkPkgsToBitRoots } from '@teambit/bit-roots';\nimport { CompilerMain, CompilerAspect, CompilationInitiator } from '@teambit/compiler';\nimport { CLIMain, CommandList, CLIAspect, MainRuntime } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { WorkspaceAspect, Workspace, ComponentConfigFile } from '@teambit/workspace';\nimport { compact, mapValues, omit, uniq, intersection } from 'lodash';\nimport { ProjectManifest } from '@pnpm/types';\nimport { GenerateResult, GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport { ApplicationMain, ApplicationAspect } from '@teambit/application';\nimport { VariantsMain, Patterns, VariantsAspect } from '@teambit/variants';\nimport { Component, ComponentID, ComponentMap } from '@teambit/component';\nimport { createLinks } from '@teambit/dependencies.fs.linked-dependencies';\nimport pMapSeries from 'p-map-series';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport {\n CodemodResult,\n linkToNodeModulesWithCodemod,\n NodeModulesLinksResult,\n} from '@teambit/workspace.modules.node-modules-linker';\nimport { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { IpcEventsAspect, IpcEventsMain } from '@teambit/ipc-events';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport {\n GetComponentManifestsOptions,\n WorkspaceDependencyLifecycleType,\n DependencyResolverMain,\n DependencyInstaller,\n DependencyResolverAspect,\n PackageManagerInstallOptions,\n ComponentDependency,\n VariantPolicyConfigObject,\n WorkspacePolicyEntry,\n LinkingOptions,\n LinkResults,\n DependencyList,\n MergedOutdatedPkg,\n WorkspacePolicy,\n UpdatedComponent,\n} from '@teambit/dependency-resolver';\nimport { WorkspaceConfigFilesAspect, WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { IssuesAspect, IssuesMain } from '@teambit/issues';\nimport { snapToSemver } from '@teambit/component-package-version';\nimport hash from 'object-hash';\nimport { DependencyTypeNotSupportedInPolicy } from './exceptions';\nimport { InstallAspect } from './install.aspect';\nimport { pickOutdatedPkgs } from './pick-outdated-pkgs';\nimport { LinkCommand } from './link';\nimport InstallCmd from './install.cmd';\nimport UninstallCmd from './uninstall.cmd';\nimport UpdateCmd from './update.cmd';\n\nexport type WorkspaceLinkOptions = LinkingOptions & {\n rootPolicy?: WorkspacePolicy;\n linkToBitRoots?: boolean;\n includePeers?: boolean;\n};\n\nexport type WorkspaceLinkResults = {\n legacyLinkResults?: NodeModulesLinksResult[];\n legacyLinkCodemodResults?: CodemodResult[];\n} & LinkResults;\n\nexport type WorkspaceInstallOptions = {\n addMissingDeps?: boolean;\n addMissingPeers?: boolean;\n lifecycleType?: WorkspaceDependencyLifecycleType;\n dedupe?: boolean;\n import?: boolean;\n copyPeerToRuntimeOnRoot?: boolean;\n copyPeerToRuntimeOnComponents?: boolean;\n updateExisting?: boolean;\n skipIfExisting?: boolean;\n savePrefix?: string;\n compile?: boolean;\n includeOptionalDeps?: boolean;\n updateAll?: boolean;\n recurringInstall?: boolean;\n optimizeReportForNonTerminal?: boolean;\n lockfileOnly?: boolean;\n writeConfigFiles?: boolean;\n skipPrune?: boolean;\n};\n\nexport type ModulesInstallOptions = Omit<WorkspaceInstallOptions, 'updateExisting' | 'lifecycleType' | 'import'>;\n\ntype PreLink = (linkOpts?: WorkspaceLinkOptions) => Promise<void>;\ntype PreInstall = (installOpts?: WorkspaceInstallOptions) => Promise<void>;\ntype PostInstall = () => Promise<void>;\n\ntype PreLinkSlot = SlotRegistry<PreLink>;\ntype PreInstallSlot = SlotRegistry<PreInstall>;\ntype PostInstallSlot = SlotRegistry<PostInstall>;\n\ntype GetComponentsAndManifestsOptions = Omit<\n GetComponentManifestsOptions,\n 'componentDirectoryMap' | 'rootPolicy' | 'rootDir'\n> &\n Pick<PackageManagerInstallOptions, 'nodeLinker'>;\n\nexport class InstallMain {\n private visitedAspects: Set<string> = new Set();\n\n constructor(\n private dependencyResolver: DependencyResolverMain,\n\n private logger: Logger,\n\n private workspace: Workspace,\n\n private variants: VariantsMain,\n\n private compiler: CompilerMain,\n\n private envs: EnvsMain,\n\n private wsConfigFiles: WorkspaceConfigFilesMain,\n\n private app: ApplicationMain,\n\n private generator: GeneratorMain,\n\n private preLinkSlot: PreLinkSlot,\n\n private preInstallSlot: PreInstallSlot,\n\n private postInstallSlot: PostInstallSlot,\n\n private ipcEvents: IpcEventsMain\n ) {}\n /**\n * Install dependencies for all components in the workspace\n *\n * @returns\n * @memberof Workspace\n */\n async install(packages?: string[], options?: WorkspaceInstallOptions): Promise<ComponentMap<string>> {\n // set workspace in install context\n this.workspace.inInstallContext = true;\n if (packages && packages.length) {\n await this._addPackages(packages, options);\n }\n if (options?.addMissingPeers) {\n const compDirMap = await this.getComponentsDirectory([]);\n const mergedRootPolicy = this.dependencyResolver.getWorkspacePolicy();\n const depsFilterFn = await this.generateFilterFnForDepsFromLocalRemote();\n const pmInstallOptions: PackageManagerInstallOptions = {\n dedupe: options?.dedupe,\n copyPeerToRuntimeOnRoot: options?.copyPeerToRuntimeOnRoot ?? true,\n copyPeerToRuntimeOnComponents: options?.copyPeerToRuntimeOnComponents ?? false,\n dependencyFilterFn: depsFilterFn,\n overrides: this.dependencyResolver.config.overrides,\n hoistPatterns: this.dependencyResolver.config.hoistPatterns,\n packageImportMethod: this.dependencyResolver.config.packageImportMethod,\n };\n const missingPeers = await this.dependencyResolver.getMissingPeerDependencies(\n this.workspace.path,\n mergedRootPolicy,\n compDirMap,\n pmInstallOptions\n );\n if (missingPeers) {\n const missingPeerPackages = Object.entries(missingPeers).map(([peerName, range]) => `${peerName}@${range}`);\n await this._addPackages(missingPeerPackages, options);\n } else {\n this.logger.console('No missing peer dependencies found.');\n }\n }\n await pMapSeries(this.preInstallSlot.values(), (fn) => fn(options)); // import objects if not disabled in options\n const res = await this._installModules(options);\n this.workspace.inInstallContext = false;\n\n await this.ipcEvents.publishIpcEvent('onPostInstall');\n\n return res;\n }\n\n registerPreLink(fn: PreLink) {\n this.preLinkSlot.register(fn);\n }\n\n registerPreInstall(fn: PreInstall) {\n this.preInstallSlot.register(fn);\n }\n\n registerPostInstall(fn: PostInstall) {\n this.postInstallSlot.register(fn);\n }\n\n async onComponentCreate(generateResults: GenerateResult[]) {\n this.workspace.inInstallContext = true;\n let runInstall = false;\n let packages: string[] = [];\n let installMissing = false;\n\n const ids = generateResults.map((generateResult) => {\n if (generateResult.dependencies && generateResult.dependencies.length) {\n packages = packages.concat(generateResult.dependencies);\n runInstall = true;\n }\n if (generateResult.installMissingDependencies) {\n installMissing = true;\n runInstall = true;\n }\n if (generateResult.isApp || generateResult.isEnv) {\n runInstall = true;\n }\n return generateResult.id;\n });\n const nonLoadedEnvs: string[] = [];\n\n ids.map((id) => this.workspace.clearComponentCache(id));\n await pMapSeries(ids, async (id) => {\n const component = await this.workspace.get(id);\n // const envId = await this.envs.getEnvId(component);\n const envId = (await this.envs.calculateEnvId(component)).toString();\n const isLoaded = this.envs.isEnvRegistered(envId);\n if (!isLoaded) {\n nonLoadedEnvs.push(envId);\n }\n return component;\n });\n if (nonLoadedEnvs.length) {\n runInstall = true;\n }\n if (!runInstall) {\n this.workspace.inInstallContext = false;\n return;\n }\n // this.logger.console(\n // `the following environments are not installed yet: ${nonLoadedEnvs.join(', ')}. installing them now...`\n // );\n await this.install(packages, {\n addMissingDeps: installMissing,\n skipIfExisting: true,\n writeConfigFiles: false,\n // skipPrune: true,\n });\n }\n\n private async _addPackages(packages: string[], options?: WorkspaceInstallOptions) {\n if ((options?.lifecycleType as string) === 'dev') {\n throw new DependencyTypeNotSupportedInPolicy(options?.lifecycleType as string);\n }\n this.logger.debug(`installing the following packages: ${packages.join()}`);\n const resolver = await this.dependencyResolver.getVersionResolver();\n const resolvedPackagesP = packages.map((packageName) =>\n resolver.resolveRemoteVersion(packageName, {\n rootDir: this.workspace.path,\n })\n );\n const resolvedPackages = await Promise.all(resolvedPackagesP);\n const newWorkspacePolicyEntries: WorkspacePolicyEntry[] = [];\n resolvedPackages.forEach((resolvedPackage) => {\n if (resolvedPackage.version) {\n const versionWithPrefix = this.dependencyResolver.getVersionWithSavePrefix({\n version: resolvedPackage.version,\n overridePrefix: options?.savePrefix,\n wantedRange: resolvedPackage.wantedRange,\n });\n newWorkspacePolicyEntries.push({\n dependencyId: resolvedPackage.packageName,\n value: {\n version: versionWithPrefix,\n },\n lifecycleType: options?.lifecycleType || 'runtime',\n });\n }\n });\n this.dependencyResolver.addToRootPolicy(newWorkspacePolicyEntries, {\n updateExisting: options?.updateExisting ?? false,\n skipIfExisting: options?.skipIfExisting ?? false,\n });\n await this.dependencyResolver.persistConfig('install');\n }\n\n private async _installModules(options?: ModulesInstallOptions): Promise<ComponentMap<string>> {\n const pm = this.dependencyResolver.getPackageManager();\n this.logger.console(\n `installing dependencies in workspace using ${pm?.name} (${chalk.cyan(\n this.dependencyResolver.getPackageManagerName()\n )})`\n );\n this.logger.debug(`installing dependencies in workspace with options`, options);\n const depsFilterFn = await this.generateFilterFnForDepsFromLocalRemote();\n const hasRootComponents = this.dependencyResolver.hasRootComponents();\n // TODO: pass get install options\n const installer = this.dependencyResolver.getInstaller({});\n const calcManifestsOpts: GetComponentsAndManifestsOptions = {\n copyPeerToRuntimeOnComponents: options?.copyPeerToRuntimeOnComponents ?? false,\n copyPeerToRuntimeOnRoot: options?.copyPeerToRuntimeOnRoot ?? true,\n dedupe: !hasRootComponents && options?.dedupe,\n dependencyFilterFn: depsFilterFn,\n nodeLinker: this.dependencyResolver.nodeLinker(),\n };\n const linkOpts = {\n linkTeambitBit: true,\n linkCoreAspects: this.dependencyResolver.linkCoreAspects(),\n linkDepsResolvedFromEnv: !hasRootComponents,\n linkNestedDepsInNM: !this.workspace.isLegacy && !hasRootComponents,\n };\n const { linkedRootDeps } = await this.calculateLinks(linkOpts);\n // eslint-disable-next-line prefer-const\n let { mergedRootPolicy, componentsAndManifests: current } = await this._getComponentsManifestsAndRootPolicy(\n installer,\n {\n ...calcManifestsOpts,\n addMissingDeps: options?.addMissingDeps,\n linkedRootDeps,\n }\n );\n\n const pmInstallOptions: PackageManagerInstallOptions = {\n ...calcManifestsOpts,\n autoInstallPeers: this.dependencyResolver.config.autoInstallPeers,\n includeOptionalDeps: options?.includeOptionalDeps,\n neverBuiltDependencies: this.dependencyResolver.config.neverBuiltDependencies,\n overrides: this.dependencyResolver.config.overrides,\n hoistPatterns: this.dependencyResolver.config.hoistPatterns,\n hoistInjectedDependencies: this.dependencyResolver.config.hoistInjectedDependencies,\n packageImportMethod: this.dependencyResolver.config.packageImportMethod,\n rootComponents: hasRootComponents,\n updateAll: options?.updateAll,\n optimizeReportForNonTerminal: options?.optimizeReportForNonTerminal,\n lockfileOnly: options?.lockfileOnly,\n };\n const prevManifests = new Set<string>();\n // TODO: this make duplicate\n // this.logger.consoleSuccess();\n const linkedDependencies = {\n [this.workspace.path]: linkedRootDeps,\n };\n const compDirMap = await this.getComponentsDirectory([]);\n let installCycle = 0;\n let hasMissingLocalComponents = true;\n const forceTeambitHarmonyLink = !this.dependencyResolver.hasHarmonyInRootPolicy();\n /* eslint-disable no-await-in-loop */\n do {\n // In case there are missing local components,\n // we'll need to make another round of installation as on the first round the missing local components\n // are not added to the manifests.\n // This is an issue when installation is done using root components.\n hasMissingLocalComponents = hasRootComponents && hasComponentsFromWorkspaceInMissingDeps(current);\n const { dependenciesChanged } = await installer.installComponents(\n this.workspace.path,\n current.manifests,\n mergedRootPolicy,\n current.componentDirectoryMap,\n {\n linkedDependencies,\n installTeambitBit: false,\n forceTeambitHarmonyLink,\n },\n pmInstallOptions\n );\n let cacheCleared = false;\n await this.linkCodemods(compDirMap);\n if (options?.compile ?? true) {\n const compileStartTime = process.hrtime();\n const compileOutputMessage = `compiling components`;\n this.logger.setStatusLine(compileOutputMessage);\n // We need to clear cache before compiling the components or it might compile them with the default env\n // incorrectly in case the env was not loaded correctly before the install\n this.workspace.consumer.componentLoader.clearComponentsCache();\n // We don't want to clear the failed to load envs because we want to show the warning at the end\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n cacheCleared = true;\n await this.compiler.compileOnWorkspace([], { initiator: CompilationInitiator.Install });\n this.logger.consoleSuccess(compileOutputMessage, compileStartTime);\n }\n if (options?.writeConfigFiles ?? true) {\n await this.tryWriteConfigFiles(!cacheCleared);\n }\n if (!dependenciesChanged) break;\n if (!options?.recurringInstall) break;\n const oldNonLoadedEnvs = this.getOldNonLoadedEnvs();\n if (!oldNonLoadedEnvs.length) break;\n prevManifests.add(manifestsHash(current.manifests));\n // If we run compile we do the clear cache before the compilation so no need to clean it again (it's an expensive\n // operation)\n if (!cacheCleared) {\n // We need to clear cache before creating the new component manifests.\n this.workspace.consumer.componentLoader.clearComponentsCache();\n // We don't want to clear the failed to load envs because we want to show the warning at the end\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n }\n current = await this._getComponentsManifests(installer, mergedRootPolicy, calcManifestsOpts);\n installCycle += 1;\n } while ((!prevManifests.has(manifestsHash(current.manifests)) || hasMissingLocalComponents) && installCycle < 5);\n if (!options?.lockfileOnly && !options?.skipPrune) {\n // We clean node_modules only after the last install.\n // Otherwise, we might load an env from a location that we later remove.\n await installer.pruneModules(this.workspace.path);\n }\n await this.workspace.consumer.componentFsCache.deleteAllDependenciesDataCache();\n /* eslint-enable no-await-in-loop */\n return current.componentDirectoryMap;\n }\n\n private async _getComponentsManifestsAndRootPolicy(\n installer: DependencyInstaller,\n options: GetComponentsAndManifestsOptions & {\n addMissingDeps?: boolean;\n linkedRootDeps: Record<string, string>;\n }\n ): Promise<{ componentsAndManifests: ComponentsAndManifests; mergedRootPolicy: WorkspacePolicy }> {\n const mergedRootPolicy = await this.addConfiguredAspectsToWorkspacePolicy();\n await this.addConfiguredGeneratorEnvsToWorkspacePolicy(mergedRootPolicy);\n const componentsAndManifests = await this._getComponentsManifests(installer, mergedRootPolicy, options);\n if (!options?.addMissingDeps) {\n return { componentsAndManifests, mergedRootPolicy };\n }\n const rootDeps = new Set(\n Object.keys({\n ...componentsAndManifests.manifests[this.workspace.path].devDependencies,\n ...componentsAndManifests.manifests[this.workspace.path].dependencies,\n ...options.linkedRootDeps,\n })\n );\n Object.values(omit(componentsAndManifests.manifests, [this.workspace.path])).forEach((manifest) => {\n if ((manifest as ProjectManifest).name) {\n rootDeps.add((manifest as ProjectManifest).name!); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n });\n const addedNewPkgs = await this._addMissingPackagesToRootPolicy(rootDeps);\n if (!addedNewPkgs) {\n return { componentsAndManifests, mergedRootPolicy };\n }\n const mergedRootPolicyWithMissingDeps = await this.addConfiguredAspectsToWorkspacePolicy();\n await this.addConfiguredGeneratorEnvsToWorkspacePolicy(mergedRootPolicyWithMissingDeps);\n return {\n mergedRootPolicy: mergedRootPolicyWithMissingDeps,\n componentsAndManifests: await this._getComponentsManifests(installer, mergedRootPolicyWithMissingDeps, options),\n };\n }\n\n /**\n * The function `tryWriteConfigFiles` attempts to write workspace config files, and if it fails, it logs an error\n * message.\n * @returns If the condition `!shouldWrite` is true, then nothing is being returned. Otherwise, if the `writeConfigFiles`\n * function is successfully executed, nothing is being returned. If an error occurs during the execution of\n * `writeConfigFiles`, an error message is being returned.\n */\n private async tryWriteConfigFiles(clearCache: boolean) {\n const shouldWrite = this.wsConfigFiles.isWorkspaceConfigWriteEnabled();\n if (!shouldWrite) return;\n if (clearCache) {\n await this.workspace.clearCache({ skipClearFailedToLoadEnvs: true });\n }\n const { err } = await this.wsConfigFiles.writeConfigFiles({\n clean: true,\n silent: true,\n dedupe: true,\n throw: false,\n });\n if (err) {\n this.logger.consoleFailure(\n `failed generating workspace config files, please run \"bit ws-config write\" manually. error: ${err.message}`\n );\n }\n }\n\n private async addConfiguredAspectsToWorkspacePolicy(): Promise<WorkspacePolicy> {\n const rootPolicy = this.dependencyResolver.getWorkspacePolicy();\n const aspectsPackages = await this.workspace.getConfiguredUserAspectsPackages({ externalsOnly: true });\n aspectsPackages.forEach((aspectsPackage) => {\n rootPolicy.add(\n {\n dependencyId: aspectsPackage.packageName,\n value: {\n version: aspectsPackage.version,\n },\n lifecycleType: 'runtime',\n },\n // If it's already exist from the root, take the version from the root policy\n { skipIfExisting: true }\n );\n });\n return rootPolicy;\n }\n\n private async addConfiguredGeneratorEnvsToWorkspacePolicy(rootPolicy: WorkspacePolicy): Promise<void> {\n const configuredEnvs = this.generator.getConfiguredEnvs();\n const resolvedEnvs = compact(\n await Promise.all(\n configuredEnvs.map(async (envIdStr) => {\n if (this.envs.isCoreEnv(envIdStr)) {\n return undefined;\n }\n const parsedId = await this.workspace.resolveComponentId(envIdStr);\n // If we have the env in the workspace, we don't want to install it\n const inWs = await this.workspace.hasId(parsedId);\n if (inWs) {\n return undefined;\n }\n const comps = await this.workspace.importAndGetMany(\n [parsedId],\n `to get the env ${parsedId.toString()} for installation`\n );\n const idWithVersion = await this.workspace.resolveEnvIdWithPotentialVersionForConfig(parsedId);\n const version = idWithVersion.split('@')[1] || '*';\n const packageName = this.dependencyResolver.getPackageName(comps[0]);\n return {\n packageName,\n version,\n };\n })\n )\n );\n\n resolvedEnvs.forEach((env) => {\n rootPolicy.add(\n {\n dependencyId: env.packageName,\n value: {\n version: env.version,\n },\n lifecycleType: 'runtime',\n },\n // If it's already exist from the root, take the version from the root policy\n { skipIfExisting: true }\n );\n });\n }\n\n private async _addMissingPackagesToRootPolicy(\n rootDeps: Set<string>,\n options?: WorkspaceInstallOptions\n ): Promise<boolean> {\n const packages = await this._getMissingPackagesWithoutRootDeps(rootDeps);\n if (packages && packages.length) {\n await this._addPackages(packages, options);\n }\n return packages.length > 0;\n }\n\n private async _getMissingPackagesWithoutRootDeps(rootDeps: Set<string>) {\n const packages = await this._getAllMissingPackages();\n return packages.filter((pkg) => !rootDeps.has(pkg));\n }\n\n private async _getAllMissingPackages(): Promise<string[]> {\n const comps = await this.workspace.list();\n return uniq(\n comps\n .map((comp) => {\n const data = comp.state.issues.getIssue(IssuesClasses.MissingPackagesDependenciesOnFs)?.data || [];\n return data.map((d) => d.missingPackages).flat();\n })\n .flat()\n );\n }\n\n private async _getComponentsManifests(\n dependencyInstaller: DependencyInstaller,\n rootPolicy: WorkspacePolicy,\n installOptions: GetComponentsAndManifestsOptions\n ): Promise<ComponentsAndManifests> {\n const componentDirectoryMap = await this.getComponentsDirectory([]);\n let manifests = await dependencyInstaller.getComponentManifests({\n ...installOptions,\n componentDirectoryMap,\n rootPolicy,\n rootDir: this.workspace.path,\n referenceLocalPackages: this.dependencyResolver.hasRootComponents() && installOptions.nodeLinker === 'isolated',\n });\n\n if (this.dependencyResolver.hasRootComponents()) {\n const rootManifests = await this._getRootManifests(manifests);\n await this._updateRootDirs(Object.keys(rootManifests));\n manifests = {\n ...manifests,\n ...rootManifests,\n };\n }\n return {\n componentDirectoryMap,\n manifests,\n };\n }\n\n /**\n * This function returns a list of old non-loaded environments names.\n * @returns an array of strings called `oldNonLoadedEnvs`. This array contains the names of environment variables that\n * failed to load as extensions and are also don't have an env.jsonc file.\n * If this list is not empty, then the user might need to run another install to make sure all dependencies resolved\n * correctly\n */\n public getOldNonLoadedEnvs() {\n const nonLoadedEnvs = this.envs.getFailedToLoadEnvs();\n const envsWithoutManifest = Array.from(this.dependencyResolver.envsWithoutManifest);\n const oldNonLoadedEnvs = intersection(nonLoadedEnvs, envsWithoutManifest);\n return oldNonLoadedEnvs;\n }\n\n private async _updateRootDirs(rootDirs: string[]) {\n try {\n const bitRootCompsDir = getBitRootsDir(this.workspace.path);\n const existingDirs = await fs.readdir(bitRootCompsDir);\n await Promise.all(\n existingDirs.map(async (dirName) => {\n const dirPath = path.join(bitRootCompsDir, dirName);\n if (!rootDirs.includes(dirPath)) {\n await fs.remove(dirPath);\n }\n })\n );\n } catch (err: any) {\n if (err.code !== 'ENOENT') throw err;\n }\n await Promise.all(rootDirs.map((dirPath) => fs.mkdir(dirPath, { recursive: true })));\n }\n\n private async _getRootManifests(\n manifests: Record<string, ProjectManifest>\n ): Promise<Record<string, ProjectManifest>> {\n const nonRootManifests = Object.values(manifests).filter(({ name }) => name !== 'workspace');\n const workspaceDeps = this.dependencyResolver.getWorkspaceDepsOfBitRoots(nonRootManifests);\n const workspaceDepsMeta = Object.keys(workspaceDeps).reduce((acc, depName) => {\n acc[depName] = { injected: true };\n return acc;\n }, {});\n const envManifests = await this._getEnvManifests(workspaceDeps, workspaceDepsMeta);\n const appManifests = await this._getAppManifests(manifests, workspaceDeps, workspaceDepsMeta);\n return {\n ...envManifests,\n ...appManifests,\n };\n }\n\n private async _getEnvManifests(\n workspaceDeps: Record<string, string>,\n workspaceDepsMeta: Record<string, { injected: true }>\n ): Promise<Record<string, ProjectManifest>> {\n const envs = await this._getAllUsedEnvIds();\n return Object.fromEntries(\n await Promise.all(\n envs.map(async (envId) => {\n return [\n await this.getRootComponentDirByRootId(this.workspace.path, envId),\n {\n dependencies: {\n ...(await this._getEnvDependencies(envId)),\n ...workspaceDeps,\n ...(await this._getEnvPackage(envId)),\n },\n dependenciesMeta: workspaceDepsMeta,\n installConfig: {\n hoistingLimits: 'workspaces',\n },\n },\n ];\n })\n )\n );\n }\n\n private async _getEnvDependencies(envId: ComponentID): Promise<Record<string, string>> {\n const policy = await this.dependencyResolver.getEnvPolicyFromEnvId(envId);\n if (!policy) return {};\n return Object.fromEntries(\n policy.selfPolicy.entries\n .filter(({ force, value }) => force && value.version !== '-')\n .map(({ dependencyId, value }) => [dependencyId, value.version])\n );\n }\n\n /**\n * Return the package name of the env with its version.\n * (only if the env is not a core env and is not in the workspace)\n * @param envId\n * @returns\n */\n private async _getEnvPackage(envId: ComponentID): Promise<Record<string, string> | undefined> {\n if (this.envs.isCoreEnv(envId.toStringWithoutVersion())) return undefined;\n const inWs = await this.workspace.hasId(envId);\n if (inWs) return undefined;\n const envComponent = await this.envs.getEnvComponentByEnvId(envId.toString(), envId.toString());\n if (!envComponent) return undefined;\n const packageName = this.dependencyResolver.getPackageName(envComponent);\n const version = envId.version;\n const finalVersion = snapToSemver(version as string);\n return { [packageName]: finalVersion };\n }\n\n private async _getAppManifests(\n manifests: Record<string, ProjectManifest>,\n workspaceDeps: Record<string, string>,\n workspaceDepsMeta: Record<string, { injected: true }>\n ): Promise<Record<string, ProjectManifest>> {\n return Object.fromEntries(\n compact(\n await Promise.all(\n (\n await this.app.listAppsComponents()\n ).map(async (app) => {\n const appPkgName = this.dependencyResolver.getPackageName(app);\n const appManifest = Object.values(manifests).find(({ name }) => name === appPkgName);\n if (!appManifest) return null;\n const envId = await this.envs.calculateEnvId(app);\n return [\n await this.getRootComponentDirByRootId(this.workspace.path, app.id),\n {\n ...omit(appManifest, ['name', 'version']),\n dependencies: {\n ...(await this._getEnvDependencies(envId)),\n ...appManifest.dependencies,\n ...workspaceDeps,\n },\n dependenciesMeta: {\n ...appManifest.dependenciesMeta,\n ...workspaceDepsMeta,\n },\n installConfig: {\n hoistingLimits: 'workspaces',\n },\n },\n ];\n })\n )\n )\n );\n }\n\n private async _getAllUsedEnvIds(): Promise<ComponentID[]> {\n const envs = new Map<string, ComponentID>();\n const components = await this.workspace.list();\n await pMapSeries(components, async (component) => {\n const envId = await this.envs.calculateEnvId(component);\n envs.set(envId.toString(), envId);\n });\n return Array.from(envs.values());\n }\n\n /**\n * Updates out-of-date dependencies in the workspace.\n *\n * @param options.all {Boolean} updates all outdated dependencies without showing a prompt.\n */\n async updateDependencies(options: {\n forceVersionBump?: 'major' | 'minor' | 'patch' | 'compatible';\n patterns?: string[];\n all: boolean;\n }): Promise<ComponentMap<string> | null> {\n const componentPolicies = await this._getComponentsWithDependencyPolicies();\n const variantPatterns = this.variants.raw();\n const variantPoliciesByPatterns = this._variantPatternsToDepPolicesDict(variantPatterns);\n const components = await this.workspace.list();\n const outdatedPkgs = await this.dependencyResolver.getOutdatedPkgsFromPolicies({\n rootDir: this.workspace.path,\n variantPoliciesByPatterns,\n componentPolicies,\n components,\n patterns: options.patterns,\n forceVersionBump: options.forceVersionBump,\n });\n if (outdatedPkgs == null) {\n this.logger.consoleFailure('No dependencies found that match the patterns');\n return null;\n }\n let outdatedPkgsToUpdate!: MergedOutdatedPkg[];\n if (options.all) {\n outdatedPkgsToUpdate = outdatedPkgs;\n } else {\n this.logger.off();\n outdatedPkgsToUpdate = await pickOutdatedPkgs(outdatedPkgs);\n this.logger.on();\n }\n if (outdatedPkgsToUpdate.length === 0) {\n this.logger.consoleSuccess('No outdated dependencies found');\n if (options.forceVersionBump === 'compatible') {\n this.logger.console(\n \"If you want to find new versions that don't match the current version ranges, retry with the --latest flag\"\n );\n }\n return null;\n }\n const { updatedVariants, updatedComponents } = this.dependencyResolver.applyUpdates(outdatedPkgsToUpdate, {\n variantPoliciesByPatterns,\n });\n await this._updateVariantsPolicies(variantPatterns, updatedVariants);\n await this._updateComponentsConfig(updatedComponents);\n await this.workspace._reloadConsumer();\n return this._installModules({ dedupe: true });\n }\n\n async addDuplicateComponentAndPackageIssue(components: Component[]) {\n const workspacePolicy = this.dependencyResolver.getWorkspacePolicy();\n components.forEach((component) => {\n if (component.state._consumer.removed) return;\n const pkgName = componentIdToPackageName(component.state._consumer);\n const found = workspacePolicy.find(pkgName);\n if (found) {\n component.state.issues.getOrCreate(IssuesClasses.DuplicateComponentAndPackage).data = found.dependencyId;\n }\n });\n }\n\n private async _getComponentsWithDependencyPolicies() {\n const allComponentIds = this.workspace.listIds();\n const componentPolicies = [] as Array<{ componentId: ComponentID; policy: any }>;\n (\n await Promise.all<ComponentConfigFile | undefined>(\n allComponentIds.map((componentId) => this.workspace.componentConfigFile(componentId))\n )\n ).forEach((componentConfigFile, index) => {\n if (!componentConfigFile) return;\n const depResolverConfig = componentConfigFile.aspects.get(DependencyResolverAspect.id);\n if (!depResolverConfig) return;\n const componentId = allComponentIds[index];\n componentPolicies.push({ componentId, policy: depResolverConfig.config.policy });\n });\n return componentPolicies;\n }\n\n private _variantPatternsToDepPolicesDict(variantPatterns: Patterns): Record<string, VariantPolicyConfigObject> {\n const variantPoliciesByPatterns: Record<string, VariantPolicyConfigObject> = {};\n for (const [variantPattern, extensions] of Object.entries(variantPatterns)) {\n if (extensions[DependencyResolverAspect.id]?.policy) {\n variantPoliciesByPatterns[variantPattern] = extensions[DependencyResolverAspect.id]?.policy;\n }\n }\n return variantPoliciesByPatterns;\n }\n\n private async _updateComponentsConfig(updatedComponents: UpdatedComponent[]) {\n if (updatedComponents.length === 0) return;\n await Promise.all(\n updatedComponents.map(({ componentId, config }) => {\n return this.workspace.addSpecificComponentConfig(componentId, DependencyResolverAspect.id, config, {\n shouldMergeWithExisting: true,\n shouldMergeWithPrevious: true,\n });\n })\n );\n await this.workspace.bitMap.write('update (dependencies)');\n }\n\n private async _updateVariantsPolicies(variantPatterns: Record<string, any>, updateVariantPolicies: string[]) {\n for (const variantPattern of updateVariantPolicies) {\n this.variants.setExtension(\n variantPattern,\n DependencyResolverAspect.id,\n variantPatterns[variantPattern][DependencyResolverAspect.id],\n { overrideExisting: true }\n );\n }\n await this.dependencyResolver.persistConfig('update dependencies');\n }\n\n /**\n * Uninstall the specified packages from dependencies.\n *\n * @param {string[]} the list of packages that should be removed from dependencies.\n */\n async uninstallDependencies(packages: string[]) {\n this.dependencyResolver.removeFromRootPolicy(packages);\n await this.dependencyResolver.persistConfig('uninstall dependencies');\n return this._installModules({ dedupe: true });\n }\n\n /**\n * This function returns all the locations of the external links that should be created inside node_modules.\n * This information may then be passed to the package manager, which will create the links on its own.\n */\n async calculateLinks(\n options: WorkspaceLinkOptions = {}\n ): Promise<{ linkResults: WorkspaceLinkResults; linkedRootDeps: Record<string, string> }> {\n await pMapSeries(this.preLinkSlot.values(), (fn) => fn(options)); // import objects if not disabled in options\n const compDirMap = await this.getComponentsDirectory([]);\n const linker = this.dependencyResolver.getLinker({\n rootDir: this.workspace.path,\n linkingOptions: options,\n });\n const { linkResults: res, linkedRootDeps } = await linker.calculateLinkedDeps(\n this.workspace.path,\n compDirMap,\n options\n );\n const workspaceRes = res as WorkspaceLinkResults;\n\n const legacyResults = await this.linkCodemods(compDirMap, options);\n workspaceRes.legacyLinkResults = legacyResults.linksResults;\n workspaceRes.legacyLinkCodemodResults = legacyResults.codemodResults;\n\n if (this.dependencyResolver.hasRootComponents() && options.linkToBitRoots) {\n await this._linkAllComponentsToBitRoots(compDirMap);\n }\n return { linkResults: res, linkedRootDeps };\n }\n\n async linkCodemods(compDirMap: ComponentMap<string>, options?: { rewire?: boolean }) {\n const bitIds = compDirMap.toArray().map(([component]) => component.id);\n return linkToNodeModulesWithCodemod(this.workspace, bitIds, options?.rewire ?? false);\n }\n\n async link(options: WorkspaceLinkOptions = {}): Promise<WorkspaceLinkResults> {\n const { linkResults, linkedRootDeps } = await this.calculateLinks(options);\n await createLinks(options.linkToDir ?? this.workspace.path, linkedRootDeps, {\n avoidHardLink: true,\n skipIfSymlinkValid: true,\n });\n return linkResults;\n }\n\n private async _linkAllComponentsToBitRoots(compDirMap: ComponentMap<string>) {\n const envs = await this._getAllUsedEnvIds();\n const apps = (await this.app.listAppsComponents()).map((component) => component.id);\n await Promise.all(\n [...envs, ...apps].map(async (id) => {\n const dir = await this.getRootComponentDirByRootId(this.workspace.path, id);\n await fs.mkdirp(dir);\n })\n );\n await linkPkgsToBitRoots(\n this.workspace.path,\n compDirMap.components.map((component) => this.dependencyResolver.getPackageName(component))\n );\n }\n\n private async getRootComponentDirByRootId(workspacePath: string, rootComponentId: ComponentID): Promise<string> {\n // Root directories for local envs and apps are created without their version number.\n // This is done in order to avoid changes to the lockfile after such components are tagged.\n const id = (await this.workspace.hasId(rootComponentId))\n ? rootComponentId.toStringWithoutVersion()\n : rootComponentId.toString();\n return getRootComponentDir(workspacePath, id);\n }\n\n /**\n * Generate a filter to pass to the installer\n * This will filter deps which are come from remotes which defined in scope.json\n * those components comes from local remotes, usually doesn't have a package in a registry\n * so no reason to try to install them (it will fail)\n */\n private async generateFilterFnForDepsFromLocalRemote() {\n // TODO: once scope create a new API for this, replace it with the new one\n const remotes = await this.workspace.scope._legacyRemotes();\n const reg = await this.dependencyResolver.getRegistries();\n const packageScopes = Object.keys(reg.scopes);\n return (dependencyList: DependencyList): DependencyList => {\n const filtered = dependencyList.filter((dep) => {\n if (!(dep instanceof ComponentDependency)) {\n return true;\n }\n if (remotes.isHub(dep.componentId.scope)) {\n return true;\n }\n if (packageScopes.some((scope) => dep.packageName.startsWith(`@${scope}/`))) {\n return true;\n }\n return false;\n });\n return filtered;\n };\n }\n\n private async getComponentsDirectory(ids: ComponentID[]): Promise<ComponentMap<string>> {\n const components = ids.length\n ? await this.workspace.getMany(ids)\n : await this.workspace.list(undefined, { loadSeedersAsAspects: false });\n return ComponentMap.as<string>(components, (component) => this.workspace.componentDir(component.id));\n }\n\n private async onRootAspectAddedSubscriber(_aspectId: ComponentID, inWs: boolean): Promise<void> {\n if (!inWs) {\n await this.install();\n }\n }\n private async onAspectsResolveSubscriber(aspectComponents: Component[]): Promise<void> {\n let needLink = false;\n let needInstall = false;\n const promises = aspectComponents.map(async (aspectComponent) => {\n const aspectIdStr = aspectComponent.id.toString();\n if (this.visitedAspects.has(aspectIdStr)) return;\n\n this.visitedAspects.add(aspectIdStr);\n const packagePath = await this.workspace.getComponentPackagePath(aspectComponent);\n const exists = await pathExists(packagePath);\n if (!exists) {\n const inWs = await this.workspace.hasId(aspectComponent.id);\n if (inWs) {\n needLink = true;\n } else {\n needInstall = true;\n }\n }\n });\n await Promise.all(promises);\n if (needInstall) {\n await this.install();\n return;\n }\n if (needLink) {\n await this.link();\n }\n }\n\n static slots = [Slot.withType<PreLinkSlot>(), Slot.withType<PreInstallSlot>(), Slot.withType<PostInstallSlot>()];\n static dependencies = [\n DependencyResolverAspect,\n WorkspaceAspect,\n LoggerAspect,\n VariantsAspect,\n CLIAspect,\n CompilerAspect,\n IssuesAspect,\n EnvsAspect,\n ApplicationAspect,\n IpcEventsAspect,\n GeneratorAspect,\n WorkspaceConfigFilesAspect,\n ];\n\n static runtime = MainRuntime;\n\n static async provider(\n [\n dependencyResolver,\n workspace,\n loggerExt,\n variants,\n cli,\n compiler,\n issues,\n envs,\n app,\n ipcEvents,\n generator,\n wsConfigFiles,\n ]: [\n DependencyResolverMain,\n Workspace,\n LoggerMain,\n VariantsMain,\n CLIMain,\n CompilerMain,\n IssuesMain,\n EnvsMain,\n ApplicationMain,\n IpcEventsMain,\n GeneratorMain,\n WorkspaceConfigFilesMain\n ],\n _,\n [preLinkSlot, preInstallSlot, postInstallSlot]: [PreLinkSlot, PreInstallSlot, PostInstallSlot]\n ) {\n const logger = loggerExt.createLogger(InstallAspect.id);\n ipcEvents.registerGotEventSlot(async (eventName) => {\n if (eventName !== 'onPostInstall') return;\n logger.debug('got onPostInstall event, clear workspace and all components cache');\n await workspace.clearCache();\n workspace.clearAllComponentsCache();\n await pMapSeries(postInstallSlot.values(), (fn) => fn());\n });\n const installExt = new InstallMain(\n dependencyResolver,\n logger,\n workspace,\n variants,\n compiler,\n envs,\n wsConfigFiles,\n app,\n generator,\n preLinkSlot,\n preInstallSlot,\n postInstallSlot,\n ipcEvents\n );\n if (issues) {\n issues.registerAddComponentsIssues(installExt.addDuplicateComponentAndPackageIssue.bind(installExt));\n }\n generator.registerOnComponentCreate(installExt.onComponentCreate.bind(installExt));\n const commands: CommandList = [\n new InstallCmd(installExt, workspace, logger),\n new UninstallCmd(installExt),\n new UpdateCmd(installExt),\n new LinkCommand(installExt, workspace, logger),\n ];\n // For now do not automate installation during aspect resolving\n // workspace.registerOnAspectsResolve(installExt.onAspectsResolveSubscriber.bind(installExt));\n if (workspace) {\n workspace.registerOnRootAspectAdded(installExt.onRootAspectAddedSubscriber.bind(installExt));\n }\n cli.register(...commands);\n return installExt;\n }\n}\n\ntype ComponentsAndManifests = {\n componentDirectoryMap: ComponentMap<string>;\n manifests: Record<string, ProjectManifest>;\n};\n\nfunction hasComponentsFromWorkspaceInMissingDeps({\n componentDirectoryMap,\n manifests,\n}: ComponentsAndManifests): boolean {\n const missingDeps = new Set<string>(\n componentDirectoryMap\n .toArray()\n .map(([{ state }]) => {\n const issue = state.issues.getIssue(IssuesClasses.MissingPackagesDependenciesOnFs);\n if (!issue) return [];\n return issue.data.map((d) => d.missingPackages).flat();\n })\n .flat()\n );\n return Object.values(manifests).some(({ name }) => name && missingDeps.has(name));\n}\n\nInstallAspect.addRuntime(InstallMain);\n\nexport default InstallMain;\n\nfunction manifestsHash(manifests: Record<string, ProjectManifest>): string {\n // We don't care if the type of the dependency changes as it doesn't change the node_modules structure\n const depsByProjectPaths = mapValues(manifests, (manifest) => ({\n ...manifest.devDependencies,\n ...manifest.dependencies,\n }));\n return hash(depsByProjectPaths);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,KAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,IAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,OAAA;EAAA,MAAAR,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,WAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,UAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,QAAA;EAAA,MAAAV,IAAA,GAAAE,OAAA;EAAAQ,OAAA,YAAAA,CA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CAAC,CAAC,KAAK;IACpB,MAAMuN,KAAK,GAAGvN,KAAK,CAACC,MAAM,CAACC,QAAQ,CAACC,gCAAa,CAACC,+BAA+B,CAAC;IAClF,IAAI,CAACmN,KAAK,EAAE,OAAO,EAAE;IACrB,OAAOA,KAAK,CAACrgB,IAAI,CAAC2H,GAAG,CAAEwL,CAAC,IAAKA,CAAC,CAACC,eAAe,CAAC,CAACC,IAAI,CAAC,CAAC;EACxD,CAAC,CAAC,CACDA,IAAI,CAAC,CACV,CAAC;EACD,OAAOrQ,MAAM,CAACgF,MAAM,CAACgG,SAAS,CAAC,CAAC6O,IAAI,CAAC,CAAC;IAAElR;EAAK,CAAC,KAAKA,IAAI,IAAIyU,WAAW,CAACzd,GAAG,CAACgJ,IAAI,CAAC,CAAC;AACnF;AAEA4S,wBAAa,CAAC+B,UAAU,CAACrb,WAAW,CAAC;AAAC,IAAAsb,QAAA,GAAAlB,OAAA,CAAA/c,OAAA,GAEvB2C,WAAW;AAE1B,SAASyK,aAAaA,CAAC1B,SAA0C,EAAU;EACzE;EACA,MAAMwS,kBAAkB,GAAG,IAAAC,mBAAS,EAACzS,SAAS,EAAGqC,QAAQ,IAAArM,aAAA,CAAAA,aAAA,KACpDqM,QAAQ,CAACF,eAAe,GACxBE,QAAQ,CAACtH,YAAY,CACxB,CAAC;EACH,OAAO,IAAA2X,qBAAI,EAACF,kBAAkB,CAAC;AACjC","ignoreList":[]}
@@ -25,7 +25,7 @@ function _linkRow() {
25
25
  };
26
26
  return data;
27
27
  }
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
29
  function ComponentListLinks({
30
30
  componentListLinks,
31
31
  verbose = false
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_getPackageNameFromTarget","_linkRow","obj","__esModule","default","ComponentListLinks","componentListLinks","verbose","length","chalk","cyan","title","bold","links","map","componentLinks","ComponentLinks","join","bound","VerboseComponentLinks","RegularComponentLinks","id","toString","packagePath","getPackageNameFromTarget","to","LinkRow","target","padding","link","VerboseLinkRow","from"],"sources":["component-list-links.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { NodeModulesLinksResult } from '@teambit/workspace.modules.node-modules-linker';\nimport { getPackageNameFromTarget } from './get-package-name-from-target';\nimport { LinkRow, VerboseLinkRow } from './link-row';\n\ntype ComponentListLinksProps = {\n componentListLinks?: NodeModulesLinksResult[];\n verbose: boolean;\n};\n\nexport function ComponentListLinks({ componentListLinks, verbose = false }: ComponentListLinksProps) {\n if (!componentListLinks || !componentListLinks.length) {\n return chalk.cyan('No components link were generated');\n }\n const title = chalk.bold.cyan('Components links');\n const links = componentListLinks.map((componentLinks) => ComponentLinks({ componentLinks, verbose })).join('\\n');\n\n return `${title}\\n${links}`;\n}\n\ntype ComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n verbose: boolean;\n};\nfunction ComponentLinks({ componentLinks, verbose = false }: ComponentLinksProps) {\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n if (verbose) return VerboseComponentLinks({ componentLinks });\n return RegularComponentLinks({ componentLinks });\n}\n\ntype RegularComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n};\nfunction RegularComponentLinks({ componentLinks }: RegularComponentLinksProps) {\n const id = componentLinks.id.toString();\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n const packagePath = getPackageNameFromTarget(componentLinks.bound[0].to);\n return LinkRow({ title: id, target: packagePath, padding: 50 });\n}\n\ntype VerboseComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n};\nfunction VerboseComponentLinks({ componentLinks }: VerboseComponentLinksProps) {\n const id = componentLinks.id.toString();\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n const title = chalk.bold.cyan(id);\n const links = componentLinks.bound.map((link) => VerboseLinkRow({ from: link.from, to: link.to })).join('\\n');\n return `${title}\\n${links}\\n`;\n}\n"],"mappings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CAAC;IAAEJ;EAAe,CAAC,CAAC;EAC7D,OAAOK,qBAAqB,CAAC;IAAEL;EAAe,CAAC,CAAC;AAClD;AAKA,SAASK,qBAAqBA,CAAC;EAAEL;AAA2C,CAAC,EAAE;EAC7E,MAAMM,EAAE,GAAGN,cAAc,CAACM,EAAE,CAACC,QAAQ,CAAC,CAAC;EACvC,IAAI,CAACP,cAAc,CAACG,KAAK,IAAIH,cAAc,CAACG,KAAK,CAACV,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;EACvE,MAAMe,WAAW,GAAG,IAAAC,oDAAwB,EAACT,cAAc,CAACG,KAAK,CAAC,CAAC,CAAC,CAACO,EAAE,CAAC;EACxE,OAAO,IAAAC,kBAAO,EAAC;IAAEf,KAAK,EAAEU,EAAE;IAAEM,MAAM,EAAEJ,WAAW;IAAEK,OAAO,EAAE;EAAG,CAAC,CAAC;AACjE;AAKA,SAAST,qBAAqBA,CAAC;EAAEJ;AAA2C,CAAC,EAAE;EAC7E,MAAMM,EAAE,GAAGN,cAAc,CAACM,EAAE,CAACC,QAAQ,CAAC,CAAC;EACvC,IAAI,CAACP,cAAc,CAACG,KAAK,IAAIH,cAAc,CAACG,KAAK,CAACV,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;EACvE,MAAMG,KAAK,GAAGF,gBAAK,CAACG,IAAI,CAACF,IAAI,CAACW,EAAE,CAAC;EACjC,MAAMR,KAAK,GAAGE,cAAc,CAACG,KAAK,CAACJ,GAAG,CAAEe,IAAI,IAAK,IAAAC,yBAAc,EAAC;IAAEC,IAAI,EAAEF,IAAI,CAACE,IAAI;IAAEN,EAAE,EAAEI,IAAI,CAACJ;EAAG,CAAC,CAAC,CAAC,CAACR,IAAI,CAAC,IAAI,CAAC;EAC7G,OAAQ,GAAEN,KAAM,KAAIE,KAAM,IAAG;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_getPackageNameFromTarget","_linkRow","e","__esModule","default","ComponentListLinks","componentListLinks","verbose","length","chalk","cyan","title","bold","links","map","componentLinks","ComponentLinks","join","bound","VerboseComponentLinks","RegularComponentLinks","id","toString","packagePath","getPackageNameFromTarget","to","LinkRow","target","padding","link","VerboseLinkRow","from"],"sources":["component-list-links.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { NodeModulesLinksResult } from '@teambit/workspace.modules.node-modules-linker';\nimport { getPackageNameFromTarget } from './get-package-name-from-target';\nimport { LinkRow, VerboseLinkRow } from './link-row';\n\ntype ComponentListLinksProps = {\n componentListLinks?: NodeModulesLinksResult[];\n verbose: boolean;\n};\n\nexport function ComponentListLinks({ componentListLinks, verbose = false }: ComponentListLinksProps) {\n if (!componentListLinks || !componentListLinks.length) {\n return chalk.cyan('No components link were generated');\n }\n const title = chalk.bold.cyan('Components links');\n const links = componentListLinks.map((componentLinks) => ComponentLinks({ componentLinks, verbose })).join('\\n');\n\n return `${title}\\n${links}`;\n}\n\ntype ComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n verbose: boolean;\n};\nfunction ComponentLinks({ componentLinks, verbose = false }: ComponentLinksProps) {\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n if (verbose) return VerboseComponentLinks({ componentLinks });\n return RegularComponentLinks({ componentLinks });\n}\n\ntype RegularComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n};\nfunction RegularComponentLinks({ componentLinks }: RegularComponentLinksProps) {\n const id = componentLinks.id.toString();\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n const packagePath = getPackageNameFromTarget(componentLinks.bound[0].to);\n return LinkRow({ title: id, target: packagePath, padding: 50 });\n}\n\ntype VerboseComponentLinksProps = {\n componentLinks: NodeModulesLinksResult;\n};\nfunction VerboseComponentLinks({ componentLinks }: VerboseComponentLinksProps) {\n const id = componentLinks.id.toString();\n if (!componentLinks.bound || componentLinks.bound.length < 1) return '';\n const title = chalk.bold.cyan(id);\n const links = componentLinks.bound.map((link) => VerboseLinkRow({ from: link.from, to: link.to })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  return data;
27
27
  }
28
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
29
  function CoreAspectsLinks({
30
30
  coreAspectsLinks,
31
31
  verbose = false
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_getPackageNameFromTarget","_linkRow","obj","__esModule","default","CoreAspectsLinks","coreAspectsLinks","verbose","length","chalk","cyan","title","links","map","link","CoreAspectLinkRow","coreAspectLink","join","VerboseCoreAspectLink","RegularCoreAspectLink","id","aspectId","toString","packagePath","getPackageNameFromTarget","linkDetail","to","LinkRow","target","padding","bold","VerboseLinkRow","from"],"sources":["core-aspects-links.ts"],"sourcesContent":["import { CoreAspectLinkResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\n\nimport { getPackageNameFromTarget } from './get-package-name-from-target';\nimport { LinkRow, VerboseLinkRow } from './link-row';\n\ntype CoreAspectsLinksProps = {\n coreAspectsLinks?: CoreAspectLinkResult[];\n verbose: boolean;\n};\n\nexport function CoreAspectsLinks({ coreAspectsLinks, verbose = false }: CoreAspectsLinksProps) {\n if (!coreAspectsLinks || !coreAspectsLinks.length) {\n return chalk.cyan('No core aspects were linked');\n }\n const title = chalk.cyan('Core aspects links');\n const links = coreAspectsLinks.map((link) => CoreAspectLinkRow({ coreAspectLink: link, verbose })).join('\\n');\n return `${title}\\n${links}`;\n}\n\ntype CoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n verbose: boolean;\n};\nfunction CoreAspectLinkRow({ coreAspectLink, verbose = false }: CoreAspectLinkProps) {\n if (verbose) return VerboseCoreAspectLink({ coreAspectLink });\n return RegularCoreAspectLink({ coreAspectLink });\n}\n\ntype RegularCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction RegularCoreAspectLink({ coreAspectLink }: RegularCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const packagePath = getPackageNameFromTarget(coreAspectLink.linkDetail.to);\n return LinkRow({ title: id, target: packagePath, padding: 50 });\n}\n\ntype VerboseCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction VerboseCoreAspectLink({ coreAspectLink }: VerboseCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const title = chalk.bold.cyan(id);\n const link = VerboseLinkRow({\n from: coreAspectLink.linkDetail.from,\n to: coreAspectLink.linkDetail.to,\n });\n return `${title}\\n${link}`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,0BAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqD,SAAAC,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAO9C,SAASG,gBAAgBA,CAAC;EAAEC,gBAAgB;EAAEC,OAAO,GAAG;AAA6B,CAAC,EAAE;EAC7F,IAAI,CAACD,gBAAgB,IAAI,CAACA,gBAAgB,CAACE,MAAM,EAAE;IACjD,OAAOC,gBAAK,CAACC,IAAI,CAAC,6BAA6B,CAAC;EAClD;EACA,MAAMC,KAAK,GAAGF,gBAAK,CAACC,IAAI,CAAC,oBAAoB,CAAC;EAC9C,MAAME,KAAK,GAAGN,gBAAgB,CAACO,GAAG,CAAEC,IAAI,IAAKC,iBAAiB,CAAC;IAAEC,cAAc,EAAEF,IAAI;IAAEP;EAAQ,CAAC,CAAC,CAAC,CAACU,IAAI,CAAC,IAAI,CAAC;EAC7G,OAAQ,GAAEN,KAAM,KAAIC,KAAM,EAAC;AAC7B;AAMA,SAASG,iBAAiBA,CAAC;EAAEC,cAAc;EAAET,OAAO,GAAG;AAA2B,CAAC,EAAE;EACnF,IAAIA,OAAO,EAAE,OAAOW,qBAAqB,CAAC;IAAEF;EAAe,CAAC,CAAC;EAC7D,OAAOG,qBAAqB,CAAC;IAAEH;EAAe,CAAC,CAAC;AAClD;AAKA,SAASG,qBAAqBA,CAAC;EAAEH;AAA2C,CAAC,EAAE;EAC7E,MAAMI,EAAE,GAAGJ,cAAc,CAACK,QAAQ,CAACC,QAAQ,CAAC,CAAC;EAC7C,MAAMC,WAAW,GAAG,IAAAC,oDAAwB,EAACR,cAAc,CAACS,UAAU,CAACC,EAAE,CAAC;EAC1E,OAAO,IAAAC,kBAAO,EAAC;IAAEhB,KAAK,EAAES,EAAE;IAAEQ,MAAM,EAAEL,WAAW;IAAEM,OAAO,EAAE;EAAG,CAAC,CAAC;AACjE;AAKA,SAASX,qBAAqBA,CAAC;EAAEF;AAA2C,CAAC,EAAE;EAC7E,MAAMI,EAAE,GAAGJ,cAAc,CAACK,QAAQ,CAACC,QAAQ,CAAC,CAAC;EAC7C,MAAMX,KAAK,GAAGF,gBAAK,CAACqB,IAAI,CAACpB,IAAI,CAACU,EAAE,CAAC;EACjC,MAAMN,IAAI,GAAG,IAAAiB,yBAAc,EAAC;IAC1BC,IAAI,EAAEhB,cAAc,CAACS,UAAU,CAACO,IAAI;IACpCN,EAAE,EAAEV,cAAc,CAACS,UAAU,CAACC;EAChC,CAAC,CAAC;EACF,OAAQ,GAAEf,KAAM,KAAIG,IAAK,EAAC;AAC5B","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_getPackageNameFromTarget","_linkRow","e","__esModule","default","CoreAspectsLinks","coreAspectsLinks","verbose","length","chalk","cyan","title","links","map","link","CoreAspectLinkRow","coreAspectLink","join","VerboseCoreAspectLink","RegularCoreAspectLink","id","aspectId","toString","packagePath","getPackageNameFromTarget","linkDetail","to","LinkRow","target","padding","bold","VerboseLinkRow","from"],"sources":["core-aspects-links.ts"],"sourcesContent":["import { CoreAspectLinkResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\n\nimport { getPackageNameFromTarget } from './get-package-name-from-target';\nimport { LinkRow, VerboseLinkRow } from './link-row';\n\ntype CoreAspectsLinksProps = {\n coreAspectsLinks?: CoreAspectLinkResult[];\n verbose: boolean;\n};\n\nexport function CoreAspectsLinks({ coreAspectsLinks, verbose = false }: CoreAspectsLinksProps) {\n if (!coreAspectsLinks || !coreAspectsLinks.length) {\n return chalk.cyan('No core aspects were linked');\n }\n const title = chalk.cyan('Core aspects links');\n const links = coreAspectsLinks.map((link) => CoreAspectLinkRow({ coreAspectLink: link, verbose })).join('\\n');\n return `${title}\\n${links}`;\n}\n\ntype CoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n verbose: boolean;\n};\nfunction CoreAspectLinkRow({ coreAspectLink, verbose = false }: CoreAspectLinkProps) {\n if (verbose) return VerboseCoreAspectLink({ coreAspectLink });\n return RegularCoreAspectLink({ coreAspectLink });\n}\n\ntype RegularCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction RegularCoreAspectLink({ coreAspectLink }: RegularCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const packagePath = getPackageNameFromTarget(coreAspectLink.linkDetail.to);\n return LinkRow({ title: id, target: packagePath, padding: 50 });\n}\n\ntype VerboseCoreAspectLinkProps = {\n coreAspectLink: CoreAspectLinkResult;\n};\nfunction VerboseCoreAspectLink({ coreAspectLink }: VerboseCoreAspectLinkProps) {\n const id = coreAspectLink.aspectId.toString();\n const title = chalk.bold.cyan(id);\n const link = VerboseLinkRow({\n from: coreAspectLink.linkDetail.from,\n to: coreAspectLink.linkDetail.to,\n });\n return `${title}\\n${link}`;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C;AAClD;AAKA,SAASG,qBAAqBA,CAAC;EAAEH;AAA2C,CAAC,EAAE;EAC7E,MAAMI,EAAE,GAAGJ,cAAc,CAACK,QAAQ,CAACC,QAAQ,CAAC,CAAC;EAC7C,MAAMC,WAAW,GAAG,IAAAC,oDAAwB,EAACR,cAAc,CAACS,UAAU,CAACC,EAAE,CAAC;EAC1E,OAAO,IAAAC,kBAAO,EAAC;IAAEhB,KAAK,EAAES,EAAE;IAAEQ,MAAM,EAAEL,WAAW;IAAEM,OAAO,EAAE;EAAG,CAAC,CAAC;AACjE;AAKA,SAASX,qBAAqBA,CAAC;EAAEF;AAA2C,CAAC,EAAE;EAC7E,MAAMI,EAAE,GAAGJ,cAAc,CAACK,QAAQ,CAACC,QAAQ,CAAC,CAAC;EAC7C,MAAMX,KAAK,GAAGF,gBAAK,CAACqB,IAAI,CAACpB,IAAI,CAACU,EAAE,CAAC;EACjC,MAAMN,IAAI,GAAG,IAAAiB,yBAAc,EAAC;IAC1BC,IAAI,EAAEhB,cAAc,CAACS,UAAU,CAACO,IAAI;IACpCN,EAAE,EAAEV,cAAc,CAACS,UAAU,CAACC;EAChC,CAAC,CAAC;EACF,OAAO,GAAGf,KAAK,KAAKG,IAAI,EAAE;AAC5B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getPackageNameFromTarget","targetPath","subPath","substring","lastIndexOf","packagePath","split","slice","join"],"sources":["get-package-name-from-target.ts"],"sourcesContent":["export function getPackageNameFromTarget(targetPath: string): string {\n const subPath = targetPath.substring(targetPath.lastIndexOf('node_modules'));\n const packagePath = subPath.split('/').slice(0, 3).join('/');\n return `./${packagePath}`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,wBAAwBA,CAACC,UAAkB,EAAU;EACnE,MAAMC,OAAO,GAAGD,UAAU,CAACE,SAAS,CAACF,UAAU,CAACG,WAAW,CAAC,cAAc,CAAC,CAAC;EAC5E,MAAMC,WAAW,GAAGH,OAAO,CAACI,KAAK,CAAC,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;EAC5D,OAAQ,KAAIH,WAAY,EAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"names":["getPackageNameFromTarget","targetPath","subPath","substring","lastIndexOf","packagePath","split","slice","join"],"sources":["get-package-name-from-target.ts"],"sourcesContent":["export function getPackageNameFromTarget(targetPath: string): string {\n const subPath = targetPath.substring(targetPath.lastIndexOf('node_modules'));\n const packagePath = subPath.split('/').slice(0, 3).join('/');\n return `./${packagePath}`;\n}\n"],"mappings":";;;;;;AAAO,SAASA,wBAAwBA,CAACC,UAAkB,EAAU;EACnE,MAAMC,OAAO,GAAGD,UAAU,CAACE,SAAS,CAACF,UAAU,CAACG,WAAW,CAAC,cAAc,CAAC,CAAC;EAC5E,MAAMC,WAAW,GAAGH,OAAO,CAACI,KAAK,CAAC,GAAG,CAAC,CAACC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;EAC5D,OAAO,KAAKH,WAAW,EAAE;AAC3B","ignoreList":[]}
@@ -12,7 +12,7 @@ function _chalk() {
12
12
  };
13
13
  return data;
14
14
  }
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  function LinkRow({
17
17
  title,
18
18
  target,
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","LinkRow","title","target","padding","chalk","bold","padEnd","VerboseLinkRow","from","to"],"sources":["link-row.ts"],"sourcesContent":["import chalk from 'chalk';\n\ntype LinkRowProps = {\n title: string;\n target: string;\n padding?: number;\n};\nexport function LinkRow({ title, target, padding = 50 }: LinkRowProps) {\n return chalk.bold(`${title.padEnd(padding)} ${'>'} ${target}`);\n}\n\ntype VerboseLinkRowProps = {\n from: string;\n to: string;\n};\nexport function VerboseLinkRow({ from, to }: VerboseLinkRowProps) {\n return `${chalk.bold('from')}: ${from}\n${chalk.bold('to')}: ${to}\n`;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAOnB,SAASG,OAAOA,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAEC,OAAO,GAAG;AAAiB,CAAC,EAAE;EACrE,OAAOC,gBAAK,CAACC,IAAI,CAAE,GAAEJ,KAAK,CAACK,MAAM,CAACH,OAAO,CAAE,IAAG,GAAI,IAAGD,MAAO,EAAC,CAAC;AAChE;AAMO,SAASK,cAAcA,CAAC;EAAEC,IAAI;EAAEC;AAAwB,CAAC,EAAE;EAChE,OAAQ,GAAEL,gBAAK,CAACC,IAAI,CAAC,MAAM,CAAE,KAAIG,IAAK;AACxC,EAAEJ,gBAAK,CAACC,IAAI,CAAC,IAAI,CAAE,KAAII,EAAG;AAC1B,CAAC;AACD","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","LinkRow","title","target","padding","chalk","bold","padEnd","VerboseLinkRow","from","to"],"sources":["link-row.ts"],"sourcesContent":["import chalk from 'chalk';\n\ntype LinkRowProps = {\n title: string;\n target: string;\n padding?: number;\n};\nexport function LinkRow({ title, target, padding = 50 }: LinkRowProps) {\n return chalk.bold(`${title.padEnd(padding)} ${'>'} ${target}`);\n}\n\ntype VerboseLinkRowProps = {\n from: string;\n to: string;\n};\nexport function VerboseLinkRow({ from, to }: VerboseLinkRowProps) {\n return `${chalk.bold('from')}: ${from}\n${chalk.bold('to')}: ${to}\n`;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOnB,SAASG,OAAOA,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAEC,OAAO,GAAG;AAAiB,CAAC,EAAE;EACrE,OAAOC,gBAAK,CAACC,IAAI,CAAC,GAAGJ,KAAK,CAACK,MAAM,CAACH,OAAO,CAAC,IAAI,GAAG,IAAID,MAAM,EAAE,CAAC;AAChE;AAMO,SAASK,cAAcA,CAAC;EAAEC,IAAI;EAAEC;AAAwB,CAAC,EAAE;EAChE,OAAO,GAAGL,gBAAK,CAACC,IAAI,CAAC,MAAM,CAAC,KAAKG,IAAI;AACvC,EAAEJ,gBAAK,CAACC,IAAI,CAAC,IAAI,CAAC,KAAKI,EAAE;AACzB,CAAC;AACD","ignoreList":[]}
@@ -18,7 +18,7 @@ function _linkRow() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  function linkToDir(links) {
23
23
  if (!links || !links.length) return '';
24
24
  const title = _chalk().default.bold.cyan('Target Links');
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_linkRow","obj","__esModule","default","linkToDir","links","length","title","chalk","bold","cyan","linksOutput","map","componentId","linksDetail","LinkRow","target","to","join"],"sources":["link-to-dir.ts"],"sourcesContent":["import { LinkToDirResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\nimport { LinkRow } from './link-row';\n\nexport function linkToDir(links?: LinkToDirResult[]) {\n if (!links || !links.length) return '';\n const title = chalk.bold.cyan('Target Links');\n const linksOutput = links\n .map(({ componentId, linksDetail }) => LinkRow({ title: componentId, target: linksDetail.to }))\n .join('\\n');\n\n return `${title}\\n${linksOutput}\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqC,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,SAASG,SAASA,CAACC,KAAyB,EAAE;EACnD,IAAI,CAACA,KAAK,IAAI,CAACA,KAAK,CAACC,MAAM,EAAE,OAAO,EAAE;EACtC,MAAMC,KAAK,GAAGC,gBAAK,CAACC,IAAI,CAACC,IAAI,CAAC,cAAc,CAAC;EAC7C,MAAMC,WAAW,GAAGN,KAAK,CACtBO,GAAG,CAAC,CAAC;IAAEC,WAAW;IAAEC;EAAY,CAAC,KAAK,IAAAC,kBAAO,EAAC;IAAER,KAAK,EAAEM,WAAW;IAAEG,MAAM,EAAEF,WAAW,CAACG;EAAG,CAAC,CAAC,CAAC,CAC9FC,IAAI,CAAC,IAAI,CAAC;EAEb,OAAQ,GAAEX,KAAM,KAAII,WAAY,IAAG;AACrC","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_linkRow","e","__esModule","default","linkToDir","links","length","title","chalk","bold","cyan","linksOutput","map","componentId","linksDetail","LinkRow","target","to","join"],"sources":["link-to-dir.ts"],"sourcesContent":["import { LinkToDirResult } from '@teambit/dependency-resolver';\nimport chalk from 'chalk';\nimport { LinkRow } from './link-row';\n\nexport function linkToDir(links?: LinkToDirResult[]) {\n if (!links || !links.length) return '';\n const title = chalk.bold.cyan('Target Links');\n const linksOutput = links\n .map(({ componentId, linksDetail }) => LinkRow({ title: componentId, target: linksDetail.to }))\n .join('\\n');\n\n return `${title}\\n${linksOutput}\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqC,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B,SAASG,SAASA,CAACC,KAAyB,EAAE;EACnD,IAAI,CAACA,KAAK,IAAI,CAACA,KAAK,CAACC,MAAM,EAAE,OAAO,EAAE;EACtC,MAAMC,KAAK,GAAGC,gBAAK,CAACC,IAAI,CAACC,IAAI,CAAC,cAAc,CAAC;EAC7C,MAAMC,WAAW,GAAGN,KAAK,CACtBO,GAAG,CAAC,CAAC;IAAEC,WAAW;IAAEC;EAAY,CAAC,KAAK,IAAAC,kBAAO,EAAC;IAAER,KAAK,EAAEM,WAAW;IAAEG,MAAM,EAAEF,WAAW,CAACG;EAAG,CAAC,CAAC,CAAC,CAC9FC,IAAI,CAAC,IAAI,CAAC;EAEb,OAAO,GAAGX,KAAK,KAAKI,WAAW,IAAI;AACrC","ignoreList":[]}
@@ -53,8 +53,8 @@ function _linkToDir() {
53
53
  };
54
54
  return data;
55
55
  }
56
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
56
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
57
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
58
58
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
59
59
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
60
60
  class LinkCommand {
@@ -1 +1 @@
1
- {"version":3,"names":["_toolboxTime","data","require","_chalk","_interopRequireDefault","_componentListLinks","_coreAspectsLinks","_nestedDepsInNmLinks","_rewireRow","_linkToDir","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","LinkCommand","constructor","install","workspace","logger","name","description","report","ids","opts","startTime","Date","now","linkResults","json","endTime","numOfComponents","legacyLinkResults","length","timeDiff","timeFormat","coreAspectsLinksWithMainAspect","coreAspectsLinks","teambitBitLink","unshift","numOfCoreAspects","title","coreLinks","CoreAspectsLinks","verbose","compsLinks","ComponentListLinks","componentListLinks","rewireRow","RewireRow","legacyCodemodResults","legacyLinkCodemodResults","nestedLinks","NestedComponentLinksLinks","nestedDepsInNmLinks","targetLinks","linkToDir","linkToDirResults","footer","console","chalk","cyan","linkOpts","linkToBitRoots","rewire","linkCoreAspects","linkTeambitBit","target","fetchObject","skipFetchingObjects","includePeers","peers","link","exports"],"sources":["link.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Logger } from '@teambit/logger';\nimport { timeFormat } from '@teambit/toolbox.time.time-format';\nimport chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceLinkOptions, WorkspaceLinkResults } from '../install.main.runtime';\nimport { ComponentListLinks } from './component-list-links';\nimport { CoreAspectsLinks } from './core-aspects-links';\nimport { NestedComponentLinksLinks } from './nested-deps-in-nm-links';\nimport { RewireRow } from './rewire-row';\nimport { linkToDir } from './link-to-dir';\n\ntype LinkCommandOpts = {\n rewire: boolean;\n verbose: boolean;\n target: string;\n skipFetchingObjects?: boolean;\n peers?: boolean;\n};\nexport class LinkCommand implements Command {\n name = 'link [component-names...]';\n alias = '';\n description = 'create links in the node_modules directory, to core aspects and to components in the workspace';\n helpUrl = 'reference/workspace/component-links';\n extendedDescription: string;\n group = 'development';\n private = false;\n arguments = [{ name: 'component-names...', description: 'names or IDs of the components to link' }];\n options = [\n ['j', 'json', 'return the output as JSON'],\n ['', 'verbose', 'verbose output'],\n ['r', 'rewire', 'Replace relative paths with module paths in code (e.g. \"../foo\" => \"@bit/foo\")'],\n [\n '',\n 'target <dir>',\n 'link to an external directory (similar to npm-link) so other projects could use these components',\n ],\n ['', 'skip-fetching-objects', 'skip fetch missing objects from remotes before linking'],\n ['', 'peers', 'link peer dependencies of the components too'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([ids]: [string[]], opts: LinkCommandOpts) {\n const startTime = Date.now();\n const linkResults = await this.json([ids], opts);\n const endTime = Date.now();\n const numOfComponents = linkResults.legacyLinkResults?.length;\n const timeDiff = timeFormat(endTime - startTime);\n const coreAspectsLinksWithMainAspect = linkResults.coreAspectsLinks || [];\n if (linkResults.teambitBitLink) {\n coreAspectsLinksWithMainAspect.unshift(linkResults.teambitBitLink);\n }\n const numOfCoreAspects = coreAspectsLinksWithMainAspect.length;\n\n const title = `Linked ${numOfComponents} components and ${numOfCoreAspects} core aspects to node_modules for workspace: ${this.workspace.name}`;\n const coreLinks = CoreAspectsLinks({\n coreAspectsLinks: coreAspectsLinksWithMainAspect,\n verbose: opts.verbose,\n });\n const compsLinks = ComponentListLinks({ componentListLinks: linkResults.legacyLinkResults, verbose: opts.verbose });\n const rewireRow = RewireRow({ legacyCodemodResults: linkResults.legacyLinkCodemodResults });\n const nestedLinks = NestedComponentLinksLinks({\n nestedDepsInNmLinks: linkResults.nestedDepsInNmLinks,\n verbose: opts.verbose,\n });\n const targetLinks = linkToDir(linkResults.linkToDirResults);\n const footer = `Finished. ${timeDiff}`;\n return `${title}\\n${coreLinks}\\n${compsLinks}\\n${rewireRow}${nestedLinks}${targetLinks}${footer}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async json([ids]: [string[]], opts: LinkCommandOpts): Promise<WorkspaceLinkResults> {\n this.logger.console(\n `Linking components and core aspects to node_modules for workspaces: '${chalk.cyan(this.workspace.name)}'`\n );\n\n const linkOpts: WorkspaceLinkOptions = {\n linkToBitRoots: true,\n rewire: opts.rewire,\n linkCoreAspects: true,\n linkTeambitBit: true,\n linkToDir: opts.target,\n fetchObject: !opts.skipFetchingObjects,\n includePeers: opts.peers,\n };\n const linkResults = await this.install.link(linkOpts);\n return linkResults;\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,oBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,mBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,iBAAA,YAAAA,C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AACwC,OAAO,CAChB,wEAAuEC,gBAAK,CAACC,IAAI,CAAC,IAAI,CAAC3C,SAAS,CAACE,IAAI,CAAE,GAC1G,CAAC;IAED,MAAM0C,QAA8B,GAAG;MACrCC,cAAc,EAAE,IAAI;MACpBC,MAAM,EAAExC,IAAI,CAACwC,MAAM;MACnBC,eAAe,EAAE,IAAI;MACrBC,cAAc,EAAE,IAAI;MACpBV,SAAS,EAAEhC,IAAI,CAAC2C,MAAM;MACtBC,WAAW,EAAE,CAAC5C,IAAI,CAAC6C,mBAAmB;MACtCC,YAAY,EAAE9C,IAAI,CAAC+C;IACrB,CAAC;IACD,MAAM3C,WAAW,GAAG,MAAM,IAAI,CAACX,OAAO,CAACuD,IAAI,CAACV,QAAQ,CAAC;IACrD,OAAOlC,WAAW;EACpB;AACF;AAAC6C,OAAA,CAAA1D,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_toolboxTime","data","require","_chalk","_interopRequireDefault","_componentListLinks","_coreAspectsLinks","_nestedDepsInNmLinks","_rewireRow","_linkToDir","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","LinkCommand","constructor","install","workspace","logger","name","description","report","ids","opts","startTime","Date","now","linkResults","json","endTime","numOfComponents","legacyLinkResults","length","timeDiff","timeFormat","coreAspectsLinksWithMainAspect","coreAspectsLinks","teambitBitLink","unshift","numOfCoreAspects","title","coreLinks","CoreAspectsLinks","verbose","compsLinks","ComponentListLinks","componentListLinks","rewireRow","RewireRow","legacyCodemodResults","legacyLinkCodemodResults","nestedLinks","NestedComponentLinksLinks","nestedDepsInNmLinks","targetLinks","linkToDir","linkToDirResults","footer","console","chalk","cyan","linkOpts","linkToBitRoots","rewire","linkCoreAspects","linkTeambitBit","target","fetchObject","skipFetchingObjects","includePeers","peers","link","exports"],"sources":["link.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Logger } from '@teambit/logger';\nimport { timeFormat } from '@teambit/toolbox.time.time-format';\nimport chalk from 'chalk';\nimport { Workspace } from '@teambit/workspace';\nimport { InstallMain, WorkspaceLinkOptions, WorkspaceLinkResults } from '../install.main.runtime';\nimport { ComponentListLinks } from './component-list-links';\nimport { CoreAspectsLinks } from './core-aspects-links';\nimport { NestedComponentLinksLinks } from './nested-deps-in-nm-links';\nimport { RewireRow } from './rewire-row';\nimport { linkToDir } from './link-to-dir';\n\ntype LinkCommandOpts = {\n rewire: boolean;\n verbose: boolean;\n target: string;\n skipFetchingObjects?: boolean;\n peers?: boolean;\n};\nexport class LinkCommand implements Command {\n name = 'link [component-names...]';\n alias = '';\n description = 'create links in the node_modules directory, to core aspects and to components in the workspace';\n helpUrl = 'reference/workspace/component-links';\n extendedDescription: string;\n group = 'development';\n private = false;\n arguments = [{ name: 'component-names...', description: 'names or IDs of the components to link' }];\n options = [\n ['j', 'json', 'return the output as JSON'],\n ['', 'verbose', 'verbose output'],\n ['r', 'rewire', 'Replace relative paths with module paths in code (e.g. \"../foo\" => \"@bit/foo\")'],\n [\n '',\n 'target <dir>',\n 'link to an external directory (similar to npm-link) so other projects could use these components',\n ],\n ['', 'skip-fetching-objects', 'skip fetch missing objects from remotes before linking'],\n ['', 'peers', 'link peer dependencies of the components too'],\n ] as CommandOptions;\n\n constructor(\n private install: InstallMain,\n /**\n * workspace extension.\n */\n private workspace: Workspace,\n\n /**\n * logger extension.\n */\n private logger: Logger\n ) {}\n\n async report([ids]: [string[]], opts: LinkCommandOpts) {\n const startTime = Date.now();\n const linkResults = await this.json([ids], opts);\n const endTime = Date.now();\n const numOfComponents = linkResults.legacyLinkResults?.length;\n const timeDiff = timeFormat(endTime - startTime);\n const coreAspectsLinksWithMainAspect = linkResults.coreAspectsLinks || [];\n if (linkResults.teambitBitLink) {\n coreAspectsLinksWithMainAspect.unshift(linkResults.teambitBitLink);\n }\n const numOfCoreAspects = coreAspectsLinksWithMainAspect.length;\n\n const title = `Linked ${numOfComponents} components and ${numOfCoreAspects} core aspects to node_modules for workspace: ${this.workspace.name}`;\n const coreLinks = CoreAspectsLinks({\n coreAspectsLinks: coreAspectsLinksWithMainAspect,\n verbose: opts.verbose,\n });\n const compsLinks = ComponentListLinks({ componentListLinks: linkResults.legacyLinkResults, verbose: opts.verbose });\n const rewireRow = RewireRow({ legacyCodemodResults: linkResults.legacyLinkCodemodResults });\n const nestedLinks = NestedComponentLinksLinks({\n nestedDepsInNmLinks: linkResults.nestedDepsInNmLinks,\n verbose: opts.verbose,\n });\n const targetLinks = linkToDir(linkResults.linkToDirResults);\n const footer = `Finished. ${timeDiff}`;\n return `${title}\\n${coreLinks}\\n${compsLinks}\\n${rewireRow}${nestedLinks}${targetLinks}${footer}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async json([ids]: [string[]], opts: LinkCommandOpts): Promise<WorkspaceLinkResults> {\n this.logger.console(\n `Linking components and core aspects to node_modules for workspaces: '${chalk.cyan(this.workspace.name)}'`\n );\n\n const linkOpts: WorkspaceLinkOptions = {\n linkToBitRoots: true,\n rewire: opts.rewire,\n linkCoreAspects: true,\n linkTeambitBit: true,\n linkToDir: opts.target,\n fetchObject: !opts.skipFetchingObjects,\n includePeers: opts.peers,\n };\n const linkResults = await this.install.link(linkOpts);\n return linkResults;\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,oBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,mBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA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EA;EACA,MAAM7B,IAAIA,CAAC,CAACN,GAAG,CAAa,EAAEC,IAAqB,EAAiC;IAClF,IAAI,CAACL,MAAM,CAACwC,OAAO,CACjB,wEAAwEC,gBAAK,CAACC,IAAI,CAAC,IAAI,CAAC3C,SAAS,CAACE,IAAI,CAAC,GACzG,CAAC;IAED,MAAM0C,QAA8B,GAAG;MACrCC,cAAc,EAAE,IAAI;MACpBC,MAAM,EAAExC,IAAI,CAACwC,MAAM;MACnBC,eAAe,EAAE,IAAI;MACrBC,cAAc,EAAE,IAAI;MACpBV,SAAS,EAAEhC,IAAI,CAAC2C,MAAM;MACtBC,WAAW,EAAE,CAAC5C,IAAI,CAAC6C,mBAAmB;MACtCC,YAAY,EAAE9C,IAAI,CAAC+C;IACrB,CAAC;IACD,MAAM3C,WAAW,GAAG,MAAM,IAAI,CAACX,OAAO,CAACuD,IAAI,CAACV,QAAQ,CAAC;IACrD,OAAOlC,WAAW;EACpB;AACF;AAAC6C,OAAA,CAAA1D,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -18,7 +18,7 @@ function _linkRow() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  function NestedComponentLinksLinks({
23
23
  nestedDepsInNmLinks,
24
24
  verbose = false
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_linkRow","obj","__esModule","default","NestedComponentLinksLinks","nestedDepsInNmLinks","verbose","length","title","chalk","bold","cyan","links","map","nestedComponentLinks","NestedComponentLinks","join","linksDetail","VerboseNestedComponentLinks","id","componentId","toString","link","VerboseLinkRow","from","to"],"sources":["nested-deps-in-nm-links.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { NestedNMDepsLinksResult } from '@teambit/dependency-resolver';\nimport { VerboseLinkRow } from './link-row';\n\ntype NestedComponentLinksLinksProps = {\n nestedDepsInNmLinks?: NestedNMDepsLinksResult[];\n verbose: boolean;\n};\n\nexport function NestedComponentLinksLinks({ nestedDepsInNmLinks, verbose = false }: NestedComponentLinksLinksProps) {\n if (!verbose) return '';\n if (!nestedDepsInNmLinks || !nestedDepsInNmLinks.length) {\n return '';\n }\n const title = chalk.bold.cyan('Nested dependencies links');\n const links = nestedDepsInNmLinks\n .map((nestedComponentLinks) =>\n NestedComponentLinks({\n nestedComponentLinks,\n verbose,\n })\n )\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n\ntype NestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n verbose: boolean;\n};\nfunction NestedComponentLinks({ nestedComponentLinks, verbose = false }: NestedComponentLinksProps) {\n if (!nestedComponentLinks.linksDetail || nestedComponentLinks.linksDetail.length < 1) return '';\n if (verbose) return VerboseNestedComponentLinks({ nestedComponentLinks });\n return '';\n}\n\ntype VerboseNestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n};\nfunction VerboseNestedComponentLinks({ nestedComponentLinks }: VerboseNestedComponentLinksProps) {\n const id = nestedComponentLinks.componentId.toString();\n const title = chalk.cyan.bold(id);\n const links = nestedComponentLinks.linksDetail\n .map((link) => VerboseLinkRow({ from: link.from, to: link.to }))\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA4C,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAOrC,SA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AAM,KAAII,KAAM,IAAG;AAC/B","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_linkRow","e","__esModule","default","NestedComponentLinksLinks","nestedDepsInNmLinks","verbose","length","title","chalk","bold","cyan","links","map","nestedComponentLinks","NestedComponentLinks","join","linksDetail","VerboseNestedComponentLinks","id","componentId","toString","link","VerboseLinkRow","from","to"],"sources":["nested-deps-in-nm-links.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { NestedNMDepsLinksResult } from '@teambit/dependency-resolver';\nimport { VerboseLinkRow } from './link-row';\n\ntype NestedComponentLinksLinksProps = {\n nestedDepsInNmLinks?: NestedNMDepsLinksResult[];\n verbose: boolean;\n};\n\nexport function NestedComponentLinksLinks({ nestedDepsInNmLinks, verbose = false }: NestedComponentLinksLinksProps) {\n if (!verbose) return '';\n if (!nestedDepsInNmLinks || !nestedDepsInNmLinks.length) {\n return '';\n }\n const title = chalk.bold.cyan('Nested dependencies links');\n const links = nestedDepsInNmLinks\n .map((nestedComponentLinks) =>\n NestedComponentLinks({\n nestedComponentLinks,\n verbose,\n })\n )\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n\ntype NestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n verbose: boolean;\n};\nfunction NestedComponentLinks({ nestedComponentLinks, verbose = false }: NestedComponentLinksProps) {\n if (!nestedComponentLinks.linksDetail || nestedComponentLinks.linksDetail.length < 1) return '';\n if (verbose) return VerboseNestedComponentLinks({ nestedComponentLinks });\n return '';\n}\n\ntype VerboseNestedComponentLinksProps = {\n nestedComponentLinks: NestedNMDepsLinksResult;\n};\nfunction VerboseNestedComponentLinks({ nestedComponentLinks }: VerboseNestedComponentLinksProps) {\n const id = nestedComponentLinks.componentId.toString();\n const title = chalk.cyan.bold(id);\n const links = nestedComponentLinks.linksDetail\n .map((link) => VerboseLinkRow({ from: link.from, to: link.to }))\n .join('\\n');\n return `${title}\\n${links}\\n`;\n}\n"],"mappings":";;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AC/F,MAAMK,EAAE,GAAGL,oBAAoB,CAACM,WAAW,CAACC,QAAQ,CAAC,CAAC;EACtD,MAAMb,KAAK,GAAGC,gBAAK,CAACE,IAAI,CAACD,IAAI,CAACS,EAAE,CAAC;EACjC,MAAMP,KAAK,GAAGE,oBAAoB,CAACG,WAAW,CAC3CJ,GAAG,CAAES,IAAI,IAAK,IAAAC,yBAAc,EAAC;IAAEC,IAAI,EAAEF,IAAI,CAACE,IAAI;IAAEC,EAAE,EAAEH,IAAI,CAACG;EAAG,CAAC,CAAC,CAAC,CAC/DT,IAAI,CAAC,IAAI,CAAC;EACb,OAAO,GAAGR,KAAK,KAAKI,KAAK,IAAI;AAC/B","ignoreList":[]}
@@ -11,7 +11,7 @@ function _chalk() {
11
11
  };
12
12
  return data;
13
13
  }
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  function RewireRow({
16
16
  legacyCodemodResults
17
17
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","RewireRow","legacyCodemodResults","length","totalComps","totalFiles","reduce","acc","curr","changedFiles","chalk","cyan","toString"],"sources":["rewire-row.ts"],"sourcesContent":["import { CodemodResult } from '@teambit/workspace.modules.node-modules-linker';\nimport chalk from 'chalk';\n\ntype RewireRowProps = {\n legacyCodemodResults?: CodemodResult[];\n};\nexport function RewireRow({ legacyCodemodResults }: RewireRowProps) {\n if (!legacyCodemodResults || legacyCodemodResults.length < 1) return '';\n const totalComps = legacyCodemodResults?.length;\n const totalFiles = legacyCodemodResults.reduce((acc, curr) => {\n return acc + curr.changedFiles.length || 0;\n }, 0);\n\n return `rewired ${chalk.cyan(totalComps.toString())} components and total of ${chalk.cyan(\n totalFiles.toString()\n )} files\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAKnB,SAASG,SAASA,CAAC;EAAEC;AAAqC,CAAC,EAAE;EAClE,IAAI,CAACA,oBAAoB,IAAIA,oBAAoB,CAACC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;EACvE,MAAMC,UAAU,GAAGF,oBAAoB,EAAEC,MAAM;EAC/C,MAAME,UAAU,GAAGH,oBAAoB,CAACI,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;IAC5D,OAAOD,GAAG,GAAGC,IAAI,CAACC,YAAY,CAACN,MAAM,IAAI,CAAC;EAC5C,CAAC,EAAE,CAAC,CAAC;EAEL,OAAQ,WAAUO,gBAAK,CAACC,IAAI,CAACP,UAAU,CAACQ,QAAQ,CAAC,CAAC,CAAE,4BAA2BF,gBAAK,CAACC,IAAI,CACvFN,UAAU,CAACO,QAAQ,CAAC,CACtB,CAAE,UAAS;AACb","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","e","__esModule","default","RewireRow","legacyCodemodResults","length","totalComps","totalFiles","reduce","acc","curr","changedFiles","chalk","cyan","toString"],"sources":["rewire-row.ts"],"sourcesContent":["import { CodemodResult } from '@teambit/workspace.modules.node-modules-linker';\nimport chalk from 'chalk';\n\ntype RewireRowProps = {\n legacyCodemodResults?: CodemodResult[];\n};\nexport function RewireRow({ legacyCodemodResults }: RewireRowProps) {\n if (!legacyCodemodResults || legacyCodemodResults.length < 1) return '';\n const totalComps = legacyCodemodResults?.length;\n const totalFiles = legacyCodemodResults.reduce((acc, curr) => {\n return acc + curr.changedFiles.length || 0;\n }, 0);\n\n return `rewired ${chalk.cyan(totalComps.toString())} components and total of ${chalk.cyan(\n totalFiles.toString()\n )} files\\n`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKnB,SAASG,SAASA,CAAC;EAAEC;AAAqC,CAAC,EAAE;EAClE,IAAI,CAACA,oBAAoB,IAAIA,oBAAoB,CAACC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE;EACvE,MAAMC,UAAU,GAAGF,oBAAoB,EAAEC,MAAM;EAC/C,MAAME,UAAU,GAAGH,oBAAoB,CAACI,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAK;IAC5D,OAAOD,GAAG,GAAGC,IAAI,CAACC,YAAY,CAACN,MAAM,IAAI,CAAC;EAC5C,CAAC,EAAE,CAAC,CAAC;EAEL,OAAO,WAAWO,gBAAK,CAACC,IAAI,CAACP,UAAU,CAACQ,QAAQ,CAAC,CAAC,CAAC,4BAA4BF,gBAAK,CAACC,IAAI,CACvFN,UAAU,CAACO,QAAQ,CAAC,CACtB,CAAC,UAAU;AACb","ignoreList":[]}
@@ -40,7 +40,7 @@ function _enquirer() {
40
40
  };
41
41
  return data;
42
42
  }
43
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
44
44
  /**
45
45
  * Lets the user pick the packages that should be updated.
46
46
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_colorizeSemverDiff","data","_interopRequireDefault","require","_semverDiff","_table","_chalk","_enquirer","obj","__esModule","default","pickOutdatedPkgs","outdatedPkgs","length","updateDependencies","prompt","choices","makeOutdatedPkgChoices","footer","indicator","state","choice","enabled","message","chalk","cyan","green","red","name","pointer","styles","dark","white","em","bgBlack","whiteBright","success","type","validate","value","j","down","k","up","result","names","map","cancel","Object","values","filter","updateDependency","DEP_TYPE_PRIORITY","dependencies","devDependencies","peerDependencies","sort","pkg1","pkg2","targetField","localeCompare","renderedTable","alignColumns","outdatedPkgsRows","groupedChoices","forEach","outdatedPkg","index","context","renderContext","push","entries","subChoices","variantPattern","componentId","TARGET_FIELD_TO_DEP_TYPE","change","diff","semverDiff","currentRange","latestRange","colorizeChange","latest","colorizeSemverDiff","grey","hasDifferentRanges","dependentComponents","renderDependents","rows","table","border","getBorderCharacters","columnDefault","paddingLeft","paddingRight","columns","alignment","drawHorizontalLine","split"],"sources":["pick-outdated-pkgs.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component';\nimport colorizeSemverDiff from '@pnpm/colorize-semver-diff';\nimport semverDiff from '@pnpm/semver-diff';\nimport { MergedOutdatedPkg } from '@teambit/dependency-resolver';\nimport { getBorderCharacters, table } from 'table';\nimport chalk from 'chalk';\nimport { prompt } from 'enquirer';\n\n/**\n * Lets the user pick the packages that should be updated.\n */\nexport async function pickOutdatedPkgs(outdatedPkgs: MergedOutdatedPkg[]): Promise<MergedOutdatedPkg[]> {\n if (outdatedPkgs.length === 0) return [];\n const { updateDependencies } = (await prompt({\n choices: makeOutdatedPkgChoices(outdatedPkgs),\n footer: '\\nEnter to start updating. Ctrl-c to cancel.',\n indicator: (state: any, choice: any) => ` ${choice.enabled ? '●' : '○'}`,\n message:\n 'Choose which packages to update ' +\n `(Press ${chalk.cyan('<space>')} to select, ` +\n `${chalk.cyan('<a>')} to toggle all, ` +\n `${chalk.cyan('<i>')} to invert selection)\n${chalk.green('Green')} - indicates a semantically safe update\n${chalk.red('Red')} - indicates a semantically breaking change`,\n name: 'updateDependencies',\n pointer: '❯',\n styles: {\n dark: chalk.white,\n em: chalk.bgBlack.whiteBright,\n success: chalk.white,\n },\n type: 'multiselect',\n validate(value: string[]) {\n if (value.length === 0) {\n return 'You must choose at least one package.';\n }\n return true;\n },\n j() {\n return this.down();\n },\n k() {\n return this.up();\n },\n result(names: string[]) {\n // This is needed in order to have the values of the choices in the answer object.\n // Otherwise, only the names of the selected choices would've been included.\n return this.map(names);\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n } as any)) as { updateDependencies: Record<string, string | MergedOutdatedPkg> };\n return Object.values(updateDependencies ?? {}).filter(\n (updateDependency) => typeof updateDependency !== 'string'\n ) as MergedOutdatedPkg[];\n}\n\nconst DEP_TYPE_PRIORITY = {\n dependencies: 0,\n devDependencies: 1,\n peerDependencies: 2,\n};\n\n/**\n * Groups the outdated packages and makes choices for enquirer's prompt.\n */\nexport function makeOutdatedPkgChoices(outdatedPkgs: MergedOutdatedPkg[]) {\n outdatedPkgs.sort((pkg1, pkg2) => {\n if (pkg1.targetField === pkg2.targetField) return pkg1.name.localeCompare(pkg2.name);\n return DEP_TYPE_PRIORITY[pkg1.targetField] - DEP_TYPE_PRIORITY[pkg2.targetField];\n });\n const renderedTable = alignColumns(outdatedPkgsRows(outdatedPkgs));\n const groupedChoices = {};\n outdatedPkgs.forEach((outdatedPkg, index) => {\n const context = renderContext(outdatedPkg);\n if (!groupedChoices[context]) {\n groupedChoices[context] = [];\n }\n groupedChoices[context].push({\n message: renderedTable[index],\n name: outdatedPkg.name,\n value: outdatedPkg,\n });\n });\n const choices = Object.entries(groupedChoices).map(([context, subChoices]) => ({\n message: chalk.cyan(context),\n choices: subChoices,\n }));\n return choices;\n}\n\nfunction renderContext(outdatedPkg: MergedOutdatedPkg) {\n if (outdatedPkg.variantPattern) {\n return `${outdatedPkg.variantPattern} (variant)`;\n }\n if (outdatedPkg.componentId) {\n return `${outdatedPkg.componentId} (component)`;\n }\n return 'Root policies';\n}\n\nconst TARGET_FIELD_TO_DEP_TYPE = {\n devDependencies: 'dev',\n dependencies: 'runtime',\n peerDependencies: 'peer',\n};\n\nfunction outdatedPkgsRows(outdatedPkgs: MergedOutdatedPkg[]) {\n return outdatedPkgs.map((outdatedPkg) => {\n const { change, diff } = semverDiff(outdatedPkg.currentRange, outdatedPkg.latestRange);\n let colorizeChange = change ?? 'breaking';\n if (change === 'feature') {\n colorizeChange = 'fix';\n }\n const latest = colorizeSemverDiff({\n change: colorizeChange,\n diff,\n });\n return [\n outdatedPkg.name,\n chalk.grey(`(${TARGET_FIELD_TO_DEP_TYPE[outdatedPkg.targetField]})`),\n outdatedPkg.hasDifferentRanges ? '*' : outdatedPkg.currentRange,\n '❯',\n latest,\n outdatedPkg.dependentComponents ? renderDependents(outdatedPkg.dependentComponents) : ' ',\n ];\n });\n}\n\nfunction renderDependents(dependentComponents: ComponentID[]): string {\n let result = `because of ${dependentComponents[0]}`;\n if (dependentComponents.length > 1) {\n result += ` and ${dependentComponents.length - 1} other components`;\n }\n return result;\n}\n\nfunction alignColumns(rows: string[][]) {\n return table(rows, {\n border: getBorderCharacters('void'),\n columnDefault: {\n paddingLeft: 0,\n paddingRight: 1,\n },\n columns: {\n // This is the current range column\n 2: { alignment: 'right' },\n },\n drawHorizontalLine: () => false,\n }).split('\\n');\n}\n"],"mappings":";;;;;;;AACA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,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emverDiff","data","_interopRequireDefault","require","_semverDiff","_table","_chalk","_enquirer","e","__esModule","default","pickOutdatedPkgs","outdatedPkgs","length","updateDependencies","prompt","choices","makeOutdatedPkgChoices","footer","indicator","state","choice","enabled","message","chalk","cyan","green","red","name","pointer","styles","dark","white","em","bgBlack","whiteBright","success","type","validate","value","j","down","k","up","result","names","map","cancel","Object","values","filter","updateDependency","DEP_TYPE_PRIORITY","dependencies","devDependencies","peerDependencies","sort","pkg1","pkg2","targetField","localeCompare","renderedTable","alignColumns","outdatedPkgsRows","groupedChoices","forEach","outdatedPkg","index","context","renderContext","push","entries","subChoices","variantPattern","componentId","TARGET_FIELD_TO_DEP_TYPE","change","diff","semverDiff","currentRange","latestRange","colorizeChange","latest","colorizeSemverDiff","grey","hasDifferentRanges","dependentComponents","renderDependents","rows","table","border","getBorderCharacters","columnDefault","paddingLeft","paddingRight","columns","alignment","drawHorizontalLine","split"],"sources":["pick-outdated-pkgs.ts"],"sourcesContent":["import { ComponentID } from '@teambit/component';\nimport colorizeSemverDiff from '@pnpm/colorize-semver-diff';\nimport semverDiff from '@pnpm/semver-diff';\nimport { MergedOutdatedPkg } from '@teambit/dependency-resolver';\nimport { getBorderCharacters, table } from 'table';\nimport chalk from 'chalk';\nimport { prompt } from 'enquirer';\n\n/**\n * Lets the user pick the packages that should be updated.\n */\nexport async function pickOutdatedPkgs(outdatedPkgs: MergedOutdatedPkg[]): Promise<MergedOutdatedPkg[]> {\n if (outdatedPkgs.length === 0) return [];\n const { updateDependencies } = (await prompt({\n choices: makeOutdatedPkgChoices(outdatedPkgs),\n footer: '\\nEnter to start updating. Ctrl-c to cancel.',\n indicator: (state: any, choice: any) => ` ${choice.enabled ? '●' : '○'}`,\n message:\n 'Choose which packages to update ' +\n `(Press ${chalk.cyan('<space>')} to select, ` +\n `${chalk.cyan('<a>')} to toggle all, ` +\n `${chalk.cyan('<i>')} to invert selection)\n${chalk.green('Green')} - indicates a semantically safe update\n${chalk.red('Red')} - indicates a semantically breaking change`,\n name: 'updateDependencies',\n pointer: '❯',\n styles: {\n dark: chalk.white,\n em: chalk.bgBlack.whiteBright,\n success: chalk.white,\n },\n type: 'multiselect',\n validate(value: string[]) {\n if (value.length === 0) {\n return 'You must choose at least one package.';\n }\n return true;\n },\n j() {\n return this.down();\n },\n k() {\n return this.up();\n },\n result(names: string[]) {\n // This is needed in order to have the values of the choices in the answer object.\n // Otherwise, only the names of the selected choices would've been included.\n return this.map(names);\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n } as any)) as { updateDependencies: Record<string, string | MergedOutdatedPkg> };\n return Object.values(updateDependencies ?? {}).filter(\n (updateDependency) => typeof updateDependency !== 'string'\n ) as MergedOutdatedPkg[];\n}\n\nconst DEP_TYPE_PRIORITY = {\n dependencies: 0,\n devDependencies: 1,\n peerDependencies: 2,\n};\n\n/**\n * Groups the outdated packages and makes choices for enquirer's prompt.\n */\nexport function makeOutdatedPkgChoices(outdatedPkgs: MergedOutdatedPkg[]) {\n outdatedPkgs.sort((pkg1, pkg2) => {\n if (pkg1.targetField === pkg2.targetField) return pkg1.name.localeCompare(pkg2.name);\n return DEP_TYPE_PRIORITY[pkg1.targetField] - DEP_TYPE_PRIORITY[pkg2.targetField];\n });\n const renderedTable = alignColumns(outdatedPkgsRows(outdatedPkgs));\n const groupedChoices = {};\n outdatedPkgs.forEach((outdatedPkg, index) => {\n const context = renderContext(outdatedPkg);\n if (!groupedChoices[context]) {\n groupedChoices[context] = [];\n }\n groupedChoices[context].push({\n message: renderedTable[index],\n name: outdatedPkg.name,\n value: outdatedPkg,\n });\n });\n const choices = Object.entries(groupedChoices).map(([context, subChoices]) => ({\n message: chalk.cyan(context),\n choices: subChoices,\n }));\n return choices;\n}\n\nfunction renderContext(outdatedPkg: MergedOutdatedPkg) {\n if (outdatedPkg.variantPattern) {\n return `${outdatedPkg.variantPattern} (variant)`;\n }\n if (outdatedPkg.componentId) {\n return `${outdatedPkg.componentId} (component)`;\n }\n return 'Root policies';\n}\n\nconst TARGET_FIELD_TO_DEP_TYPE = {\n devDependencies: 'dev',\n dependencies: 'runtime',\n peerDependencies: 'peer',\n};\n\nfunction outdatedPkgsRows(outdatedPkgs: MergedOutdatedPkg[]) {\n return outdatedPkgs.map((outdatedPkg) => {\n const { change, diff } = semverDiff(outdatedPkg.currentRange, outdatedPkg.latestRange);\n let colorizeChange = change ?? 'breaking';\n if (change === 'feature') {\n colorizeChange = 'fix';\n }\n const latest = colorizeSemverDiff({\n change: colorizeChange,\n diff,\n });\n return [\n outdatedPkg.name,\n chalk.grey(`(${TARGET_FIELD_TO_DEP_TYPE[outdatedPkg.targetField]})`),\n outdatedPkg.hasDifferentRanges ? '*' : outdatedPkg.currentRange,\n '❯',\n latest,\n outdatedPkg.dependentComponents ? renderDependents(outdatedPkg.dependentComponents) : ' ',\n ];\n });\n}\n\nfunction renderDependents(dependentComponents: ComponentID[]): string {\n let result = `because of ${dependentComponents[0]}`;\n if (dependentComponents.length > 1) {\n result += ` and ${dependentComponents.length - 1} other components`;\n }\n return result;\n}\n\nfunction alignColumns(rows: string[][]) {\n return table(rows, {\n border: getBorderCharacters('void'),\n columnDefault: {\n paddingLeft: 0,\n paddingRight: 1,\n },\n columns: {\n // This is the current range column\n 2: { alignment: 'right' },\n },\n drawHorizontalLine: () => false,\n }).split('\\n');\n}\n"],"mappings":";;;;;;;AACA,SAAAA,oBAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,mBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,YAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI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E;QAAEC,SAAS,EAAE;MAAQ;IAC1B,CAAC;IACDC,kBAAkB,EAAEA,CAAA,KAAM;EAC5B,CAAC,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC;AAChB","ignoreList":[]}
@@ -28,7 +28,7 @@ function _pickOutdatedPkgs() {
28
28
  };
29
29
  return data;
30
30
  }
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
32
32
  describe('makeOutdatedPkgChoices', () => {
33
33
  it('should render choices in correct order', () => {
34
34
  const choices = (0, _pickOutdatedPkgs().makeOutdatedPkgChoices)([{
@@ -1 +1 @@
1
- {"version":3,"names":["_chai","data","require","_stripAnsi","_interopRequireDefault","_component","_pickOutdatedPkgs","obj","__esModule","default","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","stripped","stripAnsiFromChoices","expect","to","deep","equal","orderedChoices","componentId","ComponentID","fromString","variantPattern","contextOrders","forEach","choice","message","stripAnsi","currChoice","value"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport stripAnsi from 'strip-ansi';\nimport { ComponentID } from '@teambit/component';\nimport { makeOutdatedPkgChoices } from './pick-outdated-pkgs';\n\ndescribe('makeOutdatedPkgChoices', () => {\n it('should render choices in correct order', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'zoo',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n {\n name: 'qar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n ]);\n // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).to.deep.equal(orderedChoices);\n });\n it('should render choices with context information', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'variants',\n variantPattern: '{comp2}',\n targetField: 'peerDependencies',\n },\n ]);\n // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).to.deep.equal(contextOrders);\n });\n});\n\nfunction stripAnsiFromChoices(choices) {\n choices.forEach((choice) => {\n choice.message = stripAnsi(choice.message);\n choice.choices.forEach((currChoice) => {\n currChoice.message = stripAnsi(currChoice.message);\n });\n });\n return choices;\n}\n\nconst orderedChoices = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'qar (runtime) 1.0.0 ❯ 1.1.0 ',\n name: 'qar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'qar',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'zoo (dev) 1.0.0 ❯ 1.1.0 ',\n name: 'zoo',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'zoo',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n },\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n },\n ],\n message: 'Root policies',\n },\n];\n\nconst contextOrders = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n componentId: ComponentID.fromString('scope/comp1'),\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'component',\n targetField: 'dependencies',\n },\n },\n ],\n message: 'scope/comp1 (component)',\n },\n {\n choices: [\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'variants',\n targetField: 'peerDependencies',\n variantPattern: '{comp2}',\n },\n },\n ],\n message: '{comp2} (variant)',\n },\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,WAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,kBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,iBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8D,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9DG,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,wCAAwC,EAAE,MAAM;IACjD,MAAMC,OAAO,GAAG,IAAAC,0CAAsB,E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B,IAAI,EAAE,KAAK;IACXsB,KAAK,EAAE;MACLrB,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,YAAY;MACpBC,WAAW,EAAE;IACf;EACF,CAAC,CACF;EACDe,OAAO,EAAE;AACX,CAAC,CACF;AAED,MAAMH,aAAa,GAAG,CACpB;EACElB,OAAO,EAAE,CACP;IACEqB,OAAO,EAAE,gCAAgC;IACzCnB,IAAI,EAAE,KAAK;IACXsB,KAAK,EAAE;MACLV,WAAW,EAAEC,wBAAW,CAACC,UAAU,CAAC,aAAa,CAAC;MAClDb,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,WAAW;MACnBC,WAAW,EAAE;IACf;EACF,CAAC,CACF;EACDe,OAAO,EAAE;AACX,CAAC,EACD;EACErB,OAAO,EAAE,CACP;IACEqB,OAAO,EAAE,gCAAgC;IACzCnB,IAAI,EAAE,KAAK;IACXsB,KAAK,EAAE;MACLrB,YAAY,EAAE,OAAO;MACrBC,WAAW,EAAE,OAAO;MACpBF,IAAI,EAAE,KAAK;MACXG,MAAM,EAAE,UAAU;MAClBC,WAAW,EAAE,kBAAkB;MAC/BW,cAAc,EAAE;IAClB;EACF,CAAC,CACF;EACDI,OAAO,EAAE;AACX,CAAC,CACF","ignoreList":[]}
1
+ {"version":3,"names":["_chai","data","require","_stripAnsi","_interopRequireDefault","_component","_pickOutdatedPkgs","e","__esModule","default","describe","it","choices","makeOutdatedPkgChoices","name","currentRange","latestRange","source","targetField","stripped","stripAnsiFromChoices","expect","to","deep","equal","orderedChoices","componentId","ComponentID","fromString","variantPattern","contextOrders","forEach","choice","message","stripAnsi","currChoice","value"],"sources":["pick-outdated-pkgs.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport stripAnsi from 'strip-ansi';\nimport { ComponentID } from '@teambit/component';\nimport { makeOutdatedPkgChoices } from './pick-outdated-pkgs';\n\ndescribe('makeOutdatedPkgChoices', () => {\n it('should render choices in correct order', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'zoo',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n {\n name: 'qar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n ]);\n // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).to.deep.equal(orderedChoices);\n });\n it('should render choices with context information', () => {\n const choices = makeOutdatedPkgChoices([\n {\n name: 'foo',\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n source: 'component',\n componentId: ComponentID.fromString('scope/comp1'),\n targetField: 'dependencies',\n },\n {\n name: 'bar',\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n source: 'variants',\n variantPattern: '{comp2}',\n targetField: 'peerDependencies',\n },\n ]);\n // Removing the ansi chars for better work on bit build on ci\n const stripped = stripAnsiFromChoices(choices);\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n expect(stripped).to.deep.equal(contextOrders);\n });\n});\n\nfunction stripAnsiFromChoices(choices) {\n choices.forEach((choice) => {\n choice.message = stripAnsi(choice.message);\n choice.choices.forEach((currChoice) => {\n currChoice.message = stripAnsi(currChoice.message);\n });\n });\n return choices;\n}\n\nconst orderedChoices = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'qar (runtime) 1.0.0 ❯ 1.1.0 ',\n name: 'qar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'qar',\n source: 'rootPolicy',\n targetField: 'dependencies',\n },\n },\n {\n message: 'zoo (dev) 1.0.0 ❯ 1.1.0 ',\n name: 'zoo',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'zoo',\n source: 'rootPolicy',\n targetField: 'devDependencies',\n },\n },\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'rootPolicy',\n targetField: 'peerDependencies',\n },\n },\n ],\n message: 'Root policies',\n },\n];\n\nconst contextOrders = [\n {\n choices: [\n {\n message: 'foo (runtime) 1.0.0 ❯ 2.0.0 ',\n name: 'foo',\n value: {\n componentId: ComponentID.fromString('scope/comp1'),\n currentRange: '1.0.0',\n latestRange: '2.0.0',\n name: 'foo',\n source: 'component',\n targetField: 'dependencies',\n },\n },\n ],\n message: 'scope/comp1 (component)',\n },\n {\n choices: [\n {\n message: 'bar (peer) 1.0.0 ❯ 1.1.0 ',\n name: 'bar',\n value: {\n currentRange: '1.0.0',\n latestRange: '1.1.0',\n name: 'bar',\n source: 'variants',\n targetField: 'peerDependencies',\n variantPattern: '{comp2}',\n },\n },\n ],\n message: '{comp2} (variant)',\n },\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,WAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,G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AAE,kBAAkB;MAC/BW,cAAc,EAAE;IAClB;EACF,CAAC,CACF;EACDI,OAAO,EAAE;AACX,CAAC,CACF","ignoreList":[]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class UninstallCmd {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
9
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  class UpdateCmd {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/install",
3
- "version": "1.0.281",
3
+ "version": "1.0.283",
4
4
  "homepage": "https://bit.cloud/teambit/workspace/install",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.workspace",
8
8
  "name": "install",
9
- "version": "1.0.281"
9
+ "version": "1.0.283"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -23,21 +23,21 @@
23
23
  "@teambit/bit-roots": "0.0.133",
24
24
  "@teambit/bit-error": "0.0.404",
25
25
  "@teambit/cli": "0.0.865",
26
- "@teambit/dependency-resolver": "1.0.281",
26
+ "@teambit/dependency-resolver": "1.0.283",
27
27
  "@teambit/logger": "0.0.958",
28
- "@teambit/workspace": "1.0.281",
29
- "@teambit/application": "1.0.281",
30
- "@teambit/compiler": "1.0.281",
28
+ "@teambit/workspace": "1.0.283",
29
+ "@teambit/application": "1.0.283",
30
+ "@teambit/compiler": "1.0.283",
31
31
  "@teambit/component-issues": "0.0.149",
32
32
  "@teambit/component-package-version": "0.0.433",
33
- "@teambit/component": "1.0.281",
33
+ "@teambit/component": "1.0.283",
34
34
  "@teambit/dependencies.fs.linked-dependencies": "0.0.9",
35
- "@teambit/envs": "1.0.281",
36
- "@teambit/generator": "1.0.282",
37
- "@teambit/ipc-events": "1.0.281",
38
- "@teambit/issues": "1.0.281",
39
- "@teambit/variants": "0.0.1125",
40
- "@teambit/workspace-config-files": "1.0.281",
35
+ "@teambit/envs": "1.0.283",
36
+ "@teambit/generator": "1.0.284",
37
+ "@teambit/ipc-events": "1.0.283",
38
+ "@teambit/issues": "1.0.283",
39
+ "@teambit/variants": "0.0.1127",
40
+ "@teambit/workspace-config-files": "1.0.283",
41
41
  "@teambit/workspace.modules.node-modules-linker": "0.0.173",
42
42
  "@teambit/toolbox.time.time-format": "0.0.496"
43
43
  },