MCPcopy
hub / github.com/vercel/hyper / init

Method init

bin/yarn-standalone.js:6792–7011  ·  view source on GitHub ↗

* TODO description

()

Source from the content-addressed store, hash-verified

6790 */
6791
6792 init() {
6793 var _this6 = this;
6794
6795 return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
6796 _this6.checkUpdate();
6797
6798 // warn if we have a shrinkwrap
6799 if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) {
6800 _this6.reporter.warn(_this6.reporter.lang('shrinkwrapWarning'));
6801 }
6802
6803 // warn if we have an npm lockfile
6804 if (yield (_fs || _load_fs()).exists(path.join(_this6.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) {
6805 _this6.reporter.warn(_this6.reporter.lang('npmLockfileWarning'));
6806 }
6807
6808 if (_this6.config.plugnplayEnabled) {
6809 _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L1'));
6810 _this6.reporter.info(_this6.reporter.lang('plugnplaySuggestV2L2'));
6811 }
6812
6813 let flattenedTopLevelPatterns = [];
6814 const steps = [];
6815
6816 var _ref13 = yield _this6.fetchRequestFromCwd();
6817
6818 const depRequests = _ref13.requests,
6819 rawPatterns = _ref13.patterns,
6820 ignorePatterns = _ref13.ignorePatterns,
6821 workspaceLayout = _ref13.workspaceLayout,
6822 manifest = _ref13.manifest;
6823
6824 let topLevelPatterns = [];
6825
6826 const artifacts = yield _this6.integrityChecker.getArtifacts();
6827 if (artifacts) {
6828 _this6.linker.setArtifacts(artifacts);
6829 _this6.scripts.setArtifacts(artifacts);
6830 }
6831
6832 if ((_packageCompatibility || _load_packageCompatibility()).shouldCheck(manifest, _this6.flags)) {
6833 steps.push((() => {
6834 var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) {
6835 _this6.reporter.step(curr, total, _this6.reporter.lang('checkingManifest'), emoji.get('mag'));
6836 yield _this6.checkCompatibility();
6837 });
6838
6839 return function (_x, _x2) {
6840 return _ref14.apply(this, arguments);
6841 };
6842 })());
6843 }
6844
6845 const audit = new (_audit || _load_audit()).default(_this6.config, _this6.reporter, { groups: (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES });
6846 let auditFoundProblems = false;
6847
6848 steps.push(function (curr, total) {
6849 return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {

Callers

nothing calls this directly

Calls 15

_load_asyncToGeneratorFunction · 0.85
_load_fsFunction · 0.85
_load_constantsFunction · 0.85
_load_auditFunction · 0.85
_load_hooksFunction · 0.85
_load_packageFetcherFunction · 0.85
_load_generatePnpMapFunction · 0.85
_load_autocleanFunction · 0.85
stepFunction · 0.85
checkUpdateMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected