@springtree/buildinfo
Advanced tools
Comparing version 0.0.5 to 0.0.6
21
index.js
@@ -5,3 +5,4 @@ #!/usr/bin/env node | ||
const fs = require('fs'); | ||
const { generate } = require('./buildinfo'); | ||
const buildinfo = require('./buildinfo'); | ||
const netlify = require('./netlify'); | ||
@@ -21,3 +22,3 @@ const pkg = JSON.parse(fs.readFileSync(__dirname + '/package.json').toString()); | ||
try { | ||
generate(cmdObj.outputDir, cmdObj.packageLocation); | ||
buildinfo.generate(cmdObj.outputDir, cmdObj.packageLocation); | ||
} catch (e) { | ||
@@ -28,5 +29,17 @@ console.error('Problem while generating build info:', e); | ||
}) | ||
; | ||
program.parse(process.argv); | ||
program | ||
.command('netlify') | ||
.requiredOption('-o, --output-dir <dir>', 'The directory where netlify.json will be written') | ||
.action((cmdObj) => { | ||
try { | ||
netlify.generate(cmdObj.outputDir); | ||
} catch (e) { | ||
console.error('Problem while generating netlify info:', e); | ||
process.exit(1); | ||
} | ||
}) | ||
; | ||
program.parse(process.argv); |
{ | ||
"name": "@springtree/buildinfo", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Script for generating build.json file containing build time info", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ # Buildinfo | ||
https://www.npmjs.com/package/@springtree/buildinfo | ||
Example output: | ||
@@ -31,2 +33,12 @@ | ||
npx @springtree/buildinfo generate -o www/ | ||
``` | ||
## Development | ||
### Publish | ||
Publish with: | ||
```bash | ||
npm publish --access public | ||
``` |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 5 instances in 1 package
4951
6
112
42
23