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

Method save

bin/yarn-standalone.js:48510–48522  ·  view source on GitHub ↗

* Write the integrity hash of the current install to disk.

(patterns, lockfile, flags, workspaceLayout, artifacts)

Source from the content-addressed store, hash-verified

48508 * Write the integrity hash of the current install to disk.
48509 */
48510 save(patterns, lockfile, flags, workspaceLayout, artifacts) {
48511 var _this6 = this;
48512
48513 return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
48514 const integrityFile = yield _this6._generateIntegrityFile(lockfile, patterns, flags, workspaceLayout, artifacts);
48515
48516 const loc = yield _this6._getIntegrityFileLocation();
48517 invariant(loc.locationPath, 'expected integrity hash location');
48518
48519 yield (_fs || _load_fs()).mkdirp(path.dirname(loc.locationPath));
48520 yield (_fs || _load_fs()).writeFile(loc.locationPath, JSON.stringify(integrityFile, null, 2));
48521 })();
48522 }
48523
48524 removeIntegrityFile() {
48525 var _this7 = this;

Callers 2

enableFunction · 0.80

Calls 5

_load_asyncToGeneratorFunction · 0.85
invariantFunction · 0.85
_load_fsFunction · 0.85

Tested by

no test coverage detected