@vention/vention-cli 0.38.18 → 0.38.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.esm.js +18 -20
- package/package.json +1 -1
- package/src/package-json.d.ts +1 -0
package/main.esm.js
CHANGED
|
@@ -205,26 +205,26 @@ var process$4 = globalThis$P.process;
|
|
|
205
205
|
var Deno$1 = globalThis$P.Deno;
|
|
206
206
|
var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
|
|
207
207
|
var v8 = versions && versions.v8;
|
|
208
|
-
var match, version
|
|
208
|
+
var match, version;
|
|
209
209
|
|
|
210
210
|
if (v8) {
|
|
211
211
|
match = v8.split('.');
|
|
212
212
|
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
213
213
|
// but their correct versions are not interesting for us
|
|
214
|
-
version
|
|
214
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
218
218
|
// so check `userAgent` even if `.v8` exists, but 0
|
|
219
|
-
if (!version
|
|
219
|
+
if (!version && userAgent$8) {
|
|
220
220
|
match = userAgent$8.match(/Edge\/(\d+)/);
|
|
221
221
|
if (!match || match[1] >= 74) {
|
|
222
222
|
match = userAgent$8.match(/Chrome\/(\d+)/);
|
|
223
|
-
if (match) version
|
|
223
|
+
if (match) version = +match[1];
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
var environmentV8Version = version
|
|
227
|
+
var environmentV8Version = version;
|
|
228
228
|
|
|
229
229
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
230
230
|
var V8_VERSION$1 = environmentV8Version;
|
|
@@ -4150,10 +4150,6 @@ $$y({ global: true, forced: globalThis$r.globalThis !== globalThis$r }, {
|
|
|
4150
4150
|
globalThis: globalThis$r
|
|
4151
4151
|
});
|
|
4152
4152
|
|
|
4153
|
-
var version = "0.38.18";
|
|
4154
|
-
var packageJson$1 = {
|
|
4155
|
-
version: version};
|
|
4156
|
-
|
|
4157
4153
|
var $$x = _export;
|
|
4158
4154
|
var call$k = functionCall;
|
|
4159
4155
|
var iterate$4 = iterate$8;
|
|
@@ -4533,7 +4529,18 @@ const handleCommandError = (error, context) => {
|
|
|
4533
4529
|
process.exit(1);
|
|
4534
4530
|
};
|
|
4535
4531
|
|
|
4536
|
-
const
|
|
4532
|
+
const require$1 = createRequire(import.meta.url);
|
|
4533
|
+
const UNRELEASED_VERSION = "0.0.0";
|
|
4534
|
+
function readVersion() {
|
|
4535
|
+
try {
|
|
4536
|
+
const packageVersion = require$1("./package.json").version;
|
|
4537
|
+
return packageVersion === UNRELEASED_VERSION ? "dev" : packageVersion;
|
|
4538
|
+
} catch (_a) {
|
|
4539
|
+
return "dev";
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
|
|
4543
|
+
const userAgent$3 = `vention-cli/${readVersion()} node/${process.versions.node} (${process.platform})`;
|
|
4537
4544
|
const fetchWithUserAgent = (input, init) => {
|
|
4538
4545
|
const request = new Request(input, init);
|
|
4539
4546
|
request.headers.set("User-Agent", userAgent$3);
|
|
@@ -13115,17 +13122,8 @@ const ventionLogo = `
|
|
|
13115
13122
|
╚════════════════════════════════════════════════════════════════════════════════════════════════════════╝
|
|
13116
13123
|
`;
|
|
13117
13124
|
|
|
13118
|
-
const require$1 = createRequire(import.meta.url);
|
|
13119
|
-
function loadPackageJson() {
|
|
13120
|
-
try {
|
|
13121
|
-
return require$1("./package.json");
|
|
13122
|
-
} catch (_a) {
|
|
13123
|
-
return require$1("../package.json");
|
|
13124
|
-
}
|
|
13125
|
-
}
|
|
13126
|
-
const packageJson = loadPackageJson();
|
|
13127
13125
|
const program = new Command();
|
|
13128
|
-
program.name("vention").description("CLI tool for Vention").version(
|
|
13126
|
+
program.name("vention").description("CLI tool for Vention").version(readVersion()).option("--verbose", "Enable verbose output for debugging").hook("preAction", async (thisCommand, actionCommand) => {
|
|
13129
13127
|
const opts = thisCommand.opts();
|
|
13130
13128
|
setVerbose(opts.verbose === true);
|
|
13131
13129
|
if (actionCommand.name() !== "login") await refreshFeatureFlags();
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function readVersion(): string;
|