- Extract 4756 source files from cli.js.map (57MB) - Set up Bun build system with bun:bundle feature flag shim - Configure 90+ compile-time feature flags matching production defaults - Inject MACRO constants (VERSION, BUILD_TIME, etc.) - Create stubs for private packages (color-diff-napi, modifiers-napi, etc.) - Install all public dependencies via pnpm - Patch commander v14 to allow multi-char short flags (-d2e) - Build output: dist/cli.js (22MB), verified working
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
'use strict';
|
|
|
|
const lockfile = require('./lib/lockfile');
|
|
const { toPromise, toSync, toSyncOptions } = require('./lib/adapter');
|
|
|
|
async function lock(file, options) {
|
|
const release = await toPromise(lockfile.lock)(file, options);
|
|
|
|
return toPromise(release);
|
|
}
|
|
|
|
function lockSync(file, options) {
|
|
const release = toSync(lockfile.lock)(file, toSyncOptions(options));
|
|
|
|
return toSync(release);
|
|
}
|
|
|
|
function unlock(file, options) {
|
|
return toPromise(lockfile.unlock)(file, options);
|
|
}
|
|
|
|
function unlockSync(file, options) {
|
|
return toSync(lockfile.unlock)(file, toSyncOptions(options));
|
|
}
|
|
|
|
function check(file, options) {
|
|
return toPromise(lockfile.check)(file, options);
|
|
}
|
|
|
|
function checkSync(file, options) {
|
|
return toSync(lockfile.check)(file, toSyncOptions(options));
|
|
}
|
|
|
|
module.exports = lock;
|
|
module.exports.lock = lock;
|
|
module.exports.unlock = unlock;
|
|
module.exports.lockSync = lockSync;
|
|
module.exports.unlockSync = unlockSync;
|
|
module.exports.check = check;
|
|
module.exports.checkSync = checkSync;
|