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

Function syncPackageJSON

app/plugins.ts:201–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199})();
200
201function syncPackageJSON() {
202 const dependencies = toDependencies(plugins);
203 const pkg = {
204 name: 'hyper-plugins',
205 description: 'Auto-generated from `~/.hyper.js`!',
206 private: true,
207 version: '0.0.1',
208 repository: 'vercel/hyper',
209 license: 'MIT',
210 homepage: 'https://hyper.is',
211 dependencies
212 };
213
214 const file = resolve(path, 'package.json');
215 try {
216 writeFileSync(file, JSON.stringify(pkg, null, 2));
217 } catch (err) {
218 alert(`An error occurred writing to ${file}`);
219 }
220}
221
222function alert(message: string) {
223 void dialog.showMessageBox({

Callers 1

updatePluginsFunction · 0.85

Calls 3

toDependenciesFunction · 0.85
resolveFunction · 0.85
alertFunction · 0.85

Tested by

no test coverage detected