* TODO description
()
| 6706 | */ |
| 6707 | |
| 6708 | init() { |
| 6709 | var _this6 = this; |
| 6710 | |
| 6711 | return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { |
| 6712 | _this6.checkUpdate(); |
| 6713 | |
| 6714 | // warn if we have a shrinkwrap |
| 6715 | if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) { |
| 6716 | _this6.reporter.warn(_this6.reporter.lang('shrinkwrapWarning')); |
| 6717 | } |
| 6718 | |
| 6719 | // warn if we have an npm lockfile |
| 6720 | if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) { |
| 6721 | _this6.reporter.warn(_this6.reporter.lang('npmLockfileWarning')); |
| 6722 | } |
| 6723 | |
| 6724 | let flattenedTopLevelPatterns = []; |
| 6725 | const steps = []; |
| 6726 | |
| 6727 | var _ref13 = yield _this6.fetchRequestFromCwd(); |
| 6728 | |
| 6729 | const depRequests = _ref13.requests, |
| 6730 | rawPatterns = _ref13.patterns, |
| 6731 | ignorePatterns = _ref13.ignorePatterns, |
| 6732 | workspaceLayout = _ref13.workspaceLayout, |
| 6733 | manifest = _ref13.manifest; |
| 6734 | |
| 6735 | let topLevelPatterns = []; |
| 6736 | |
| 6737 | const artifacts = yield _this6.integrityChecker.getArtifacts(); |
| 6738 | if (artifacts) { |
| 6739 | _this6.linker.setArtifacts(artifacts); |
| 6740 | _this6.scripts.setArtifacts(artifacts); |
| 6741 | } |
| 6742 | |
| 6743 | if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, _this6.flags)) { |
| 6744 | steps.push((() => { |
| 6745 | var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { |
| 6746 | _this6.reporter.step(curr, total, _this6.reporter.lang('checkingManifest'), emoji.get('mag')); |
| 6747 | yield _this6.checkCompatibility(); |
| 6748 | }); |
| 6749 | |
| 6750 | return function (_x, _x2) { |
| 6751 | return _ref14.apply(this, arguments); |
| 6752 | }; |
| 6753 | })()); |
| 6754 | } |
| 6755 | |
| 6756 | const audit = new (_audit || _load_audit()).default(_this6.config, _this6.reporter); |
| 6757 | let auditFoundProblems = false; |
| 6758 | |
| 6759 | steps.push(function (curr, total) { |
| 6760 | return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { |
| 6761 | _this6.reporter.step(curr, total, _this6.reporter.lang('resolvingPackages'), emoji.get('mag')); |
| 6762 | yield _this6.resolver.init(_this6.prepareRequests(depRequests), { |
| 6763 | isFlat: _this6.flags.flat, |
| 6764 | isFrozen: _this6.flags.frozenLockfile, |
| 6765 | workspaceLayout |
nothing calls this directly
no test coverage detected