@atlaspack/cli
Advanced tools
Comparing version 2.12.1-dev.3401 to 2.12.1-dev.3443
@@ -228,2 +228,36 @@ "use strict"; | ||
applyOptions(build, commonOptions); | ||
function makeDebugCommand() { | ||
const debug = new (_commander().default.Command)('debug').description('Debug commands for atlaspack'); | ||
const invalidate = debug.command('invalidate [input...]').description('Run cache invalidation, then exit').action(async (entries, opts, command) => { | ||
try { | ||
if (entries.length === 0) { | ||
entries = ['.']; | ||
} | ||
entries = entries.map(entry => _path().default.resolve(entry)); | ||
Object.assign(command, opts); | ||
const Atlaspack = require('@atlaspack/core').default; | ||
const fs = new (_fs().NodeFS)(); | ||
const options = await normalizeOptions(command, fs); | ||
console.log(command.featureFlag); | ||
const atlaspack = new Atlaspack({ | ||
entries, | ||
defaultConfig: require.resolve('@atlaspack/config-default', { | ||
paths: [fs.cwd(), __dirname] | ||
}), | ||
shouldPatchConsole: false, | ||
...options, | ||
shouldBuildLazily: true, | ||
watchBackend: 'watchman' | ||
}); | ||
console.log('Created atlaspack instance'); | ||
await atlaspack.unstable_invalidate(); | ||
console.log('Done invalidating cache'); | ||
} catch (err) { | ||
handleUncaughtException(err); | ||
} | ||
}); | ||
applyOptions(invalidate, commonOptions); | ||
return debug; | ||
} | ||
program.addCommand(makeDebugCommand()); | ||
program.command('help [command]').description('display help information for a command').action(function (command) { | ||
@@ -230,0 +264,0 @@ let cmd = program.commands.find(c => c.name() === command) || program; |
{ | ||
"name": "@atlaspack/cli", | ||
"version": "2.12.1-dev.3401+b483af77f", | ||
"version": "2.12.1-dev.3443+d1170cfc7", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
"license": "MIT", | ||
"license": "(MIT OR Apache-2.0)", | ||
"publishConfig": { | ||
@@ -26,14 +26,14 @@ "access": "public" | ||
"dependencies": { | ||
"@atlaspack/config-default": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/core": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/diagnostic": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/events": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/feature-flags": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/fs": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/logger": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/package-manager": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/reporter-cli": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/reporter-dev-server": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/reporter-tracer": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/utils": "2.12.1-dev.3401+b483af77f", | ||
"@atlaspack/config-default": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/core": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/diagnostic": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/events": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/feature-flags": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/fs": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/logger": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/package-manager": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/reporter-cli": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/reporter-dev-server": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/reporter-tracer": "2.12.1-dev.3443+d1170cfc7", | ||
"@atlaspack/utils": "2.12.1-dev.3443+d1170cfc7", | ||
"chalk": "^4.1.0", | ||
@@ -48,3 +48,3 @@ "commander": "^7.0.0", | ||
}, | ||
"gitHead": "b483af77f02d1258c8dad156e097b94f83671d8e" | ||
"gitHead": "d1170cfc79beb290b2a066f472f68f71f7d7cb23" | ||
} |
@@ -233,2 +233,49 @@ // @flow | ||
function makeDebugCommand() { | ||
const debug = new commander.Command('debug').description( | ||
'Debug commands for atlaspack', | ||
); | ||
const invalidate = debug | ||
.command('invalidate [input...]') | ||
.description('Run cache invalidation, then exit') | ||
.action(async (entries, opts, command: any) => { | ||
try { | ||
if (entries.length === 0) { | ||
entries = ['.']; | ||
} | ||
entries = entries.map(entry => path.resolve(entry)); | ||
Object.assign(command, opts); | ||
const Atlaspack = require('@atlaspack/core').default; | ||
const fs = new NodeFS(); | ||
const options = await normalizeOptions(command, fs); | ||
console.log(command.featureFlag); | ||
const atlaspack = new Atlaspack({ | ||
entries, | ||
defaultConfig: require.resolve('@atlaspack/config-default', { | ||
paths: [fs.cwd(), __dirname], | ||
}), | ||
shouldPatchConsole: false, | ||
...options, | ||
shouldBuildLazily: true, | ||
watchBackend: 'watchman', | ||
}); | ||
console.log('Created atlaspack instance'); | ||
await atlaspack.unstable_invalidate(); | ||
console.log('Done invalidating cache'); | ||
} catch (err) { | ||
handleUncaughtException(err); | ||
} | ||
}); | ||
applyOptions(invalidate, commonOptions); | ||
return debug; | ||
} | ||
program.addCommand(makeDebugCommand()); | ||
program | ||
@@ -235,0 +282,0 @@ .command('help [command]') |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
54126
1111
302
302
32
56
5