@edifice.io/cli
Advanced tools
Comparing version 1.6.0-develop.7 to 1.6.0-develop.8
#!/usr/bin/env node | ||
import { program } from 'commander'; | ||
import interpret from 'interpret'; | ||
import Liftoff from 'liftoff'; | ||
import minimist from 'minimist'; | ||
import { readFileSync } from 'node:fs'; | ||
import { createRequire } from 'node:module'; | ||
import { dirname, join } from 'node:path'; | ||
import { fileURLToPath, pathToFileURL } from 'node:url'; | ||
import v8flags from 'v8flags'; | ||
import { publish } from '../scripts/publish.js'; | ||
import { program } from "commander"; | ||
import interpret from "interpret"; | ||
import Liftoff from "liftoff"; | ||
import minimist from "minimist"; | ||
import { readFileSync } from "node:fs"; | ||
import { createRequire } from "node:module"; | ||
import { dirname, join } from "node:path"; | ||
import { fileURLToPath, pathToFileURL } from "node:url"; | ||
import v8flags from "v8flags"; | ||
import { publish } from "../src/publish/index.js"; | ||
@@ -19,3 +19,3 @@ const args = process.argv.slice(2); | ||
const pkg = JSON.parse( | ||
readFileSync(join(__dirname, '../package.json'), 'utf8') | ||
readFileSync(join(__dirname, "../package.json"), "utf8"), | ||
); | ||
@@ -34,3 +34,3 @@ | ||
// @ts-expect-error | ||
if (e.code === 'ERR_REQUIRE_ESM') { | ||
if (e.code === "ERR_REQUIRE_ESM") { | ||
// This is needed on Windows, because import() fails if providing a Windows file path. | ||
@@ -46,7 +46,7 @@ const url = pathToFileURL(path); | ||
const Config = new Liftoff({ | ||
name: 'edifice-config', | ||
configName: 'edifice.config', | ||
name: "edifice-config", | ||
configName: "edifice.config", | ||
// @ts-expect-error | ||
extensions: interpret.jsVariants, | ||
preload: 'esbuild-register/dist/node', | ||
preload: "esbuild-register/dist/node", | ||
v8flags, | ||
@@ -62,7 +62,7 @@ }); | ||
[ | ||
'No edifice.config.js file found!', | ||
"No edifice.config.js file found!", | ||
"This may be because you're not passing the --config or --cwd flags.", | ||
'If you are passing these flags, check that the path is correct.', | ||
'Otherwise, you can create a `edifice.config.js` file in your project root.', | ||
].join('\n') | ||
"If you are passing these flags, check that the path is correct.", | ||
"Otherwise, you can create a `edifice.config.js` file in your project root.", | ||
].join("\n"), | ||
); | ||
@@ -83,5 +83,5 @@ process.exit(1); | ||
program | ||
.name('@edifice.io/cli') | ||
.name("@edifice.io/cli") | ||
.description( | ||
'Configuration and tools for publishing and maintaining packages' | ||
"Configuration and tools for publishing and maintaining packages", | ||
) | ||
@@ -92,3 +92,3 @@ .version(pkg.version); | ||
for (const key of Object.keys(configOpts)) { | ||
program.setOptionValueWithSource(key, configOpts[key], 'config'); | ||
program.setOptionValueWithSource(key, configOpts[key], "config"); | ||
} | ||
@@ -98,13 +98,13 @@ } | ||
program | ||
.command('publish') | ||
.command("publish") | ||
.description( | ||
'Publish your package with the current working directory' | ||
"Publish your package with the current working directory", | ||
) | ||
.option( | ||
'--cwd <dir>', | ||
'Current working directory of the configuration file' | ||
"--cwd <dir>", | ||
"Current working directory of the configuration file", | ||
) | ||
.option('--config <config>', 'The path to the configuration file') | ||
.option('--tag <tag>', 'The tag to publish to') | ||
.option('--branch <branch>', 'The branch to publish from') | ||
.option("--config <config>", "The path to the configuration file") | ||
.option("--tag <tag>", "The tag to publish to") | ||
.option("--branch <branch>", "The branch to publish from") | ||
.action((_str, opts) => { | ||
@@ -131,3 +131,3 @@ return publish({ | ||
}); | ||
} | ||
}, | ||
); |
{ | ||
"name": "@edifice.io/cli", | ||
"version": "1.6.0-develop.7", | ||
"version": "1.6.0-develop.8", | ||
"description": "Edifice Frontend CLI", | ||
@@ -33,3 +33,4 @@ "keywords": [ | ||
"files": [ | ||
"bin" | ||
"bin", | ||
"src" | ||
], | ||
@@ -36,0 +37,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
54709
6
576
7
2