@mushi-mushi/cli 0.12.0 → 0.14.0
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/README.md +62 -0
- package/dist/chunk-4W6VOIQT.js +6 -0
- package/dist/index.js +934 -47
- package/dist/init.js +8 -5
- package/dist/version.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-F43X732E.js +0 -6
package/dist/init.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-NYPX5KXR.js";
|
|
9
9
|
import {
|
|
10
10
|
MUSHI_CLI_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4W6VOIQT.js";
|
|
12
12
|
|
|
13
13
|
// src/init.ts
|
|
14
14
|
import * as p from "@clack/prompts";
|
|
@@ -49,10 +49,11 @@ function loadConfig(path = CONFIG_PATH) {
|
|
|
49
49
|
} else if (path === CONFIG_PATH && existsSync(LEGACY_CONFIG_PATH)) {
|
|
50
50
|
file = migrateLegacyConfig() ?? {};
|
|
51
51
|
}
|
|
52
|
+
const endpointFromEnv = process.env["MUSHI_API_ENDPOINT"] ?? process.env["MUSHI_ENDPOINT"] ?? void 0;
|
|
52
53
|
const fromEnv = {
|
|
53
54
|
...process.env["MUSHI_API_KEY"] ? { apiKey: process.env["MUSHI_API_KEY"] } : {},
|
|
54
55
|
...process.env["MUSHI_PROJECT_ID"] ? { projectId: process.env["MUSHI_PROJECT_ID"] } : {},
|
|
55
|
-
...
|
|
56
|
+
...endpointFromEnv ? { endpoint: endpointFromEnv } : {}
|
|
56
57
|
};
|
|
57
58
|
return { ...file, ...fromEnv };
|
|
58
59
|
}
|
|
@@ -126,7 +127,7 @@ function normalizeEndpoint(url) {
|
|
|
126
127
|
var REGISTRY = "https://registry.npmjs.org";
|
|
127
128
|
var DEFAULT_TIMEOUT_MS = 2e3;
|
|
128
129
|
async function checkFreshness(packageName, currentVersion, opts = {}) {
|
|
129
|
-
if (process.env.MUSHI_NO_UPDATE_CHECK === "1") return null;
|
|
130
|
+
if (!opts.ignoreOptOut && process.env.MUSHI_NO_UPDATE_CHECK === "1") return null;
|
|
130
131
|
const registry = opts.registry ?? REGISTRY;
|
|
131
132
|
const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
132
133
|
const controller = new AbortController();
|
|
@@ -164,11 +165,13 @@ function isNewerStableVersion(latest, current) {
|
|
|
164
165
|
return lc > cc;
|
|
165
166
|
}
|
|
166
167
|
function stripPreRelease(version) {
|
|
167
|
-
const idx = version.
|
|
168
|
+
const idx = version.search(/[-+]/);
|
|
168
169
|
return idx === -1 ? version : version.slice(0, idx);
|
|
169
170
|
}
|
|
170
171
|
function hasPreReleaseTag(version) {
|
|
171
|
-
|
|
172
|
+
const plus = version.indexOf("+");
|
|
173
|
+
const hyphen = version.indexOf("-");
|
|
174
|
+
return hyphen !== -1 && (plus === -1 || hyphen < plus);
|
|
172
175
|
}
|
|
173
176
|
function parse(version) {
|
|
174
177
|
const parts = version.split(".").map((part) => Number(part));
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "CLI for Mushi Mushi — `mushi init` wizard installs the right SDK for your framework, plus report triage and pipeline health commands",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mushi": "./dist/index.js"
|
|
8
8
|
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsup",
|
|
11
|
-
"lint": "eslint src/",
|
|
12
|
-
"test": "vitest run",
|
|
13
|
-
"typecheck": "tsc --noEmit"
|
|
14
|
-
},
|
|
15
9
|
"dependencies": {
|
|
16
10
|
"@clack/prompts": "^1.3.0",
|
|
17
11
|
"commander": "^14.0.3"
|
|
18
12
|
},
|
|
19
13
|
"devDependencies": {
|
|
20
|
-
"@mushi-mushi/eslint-config": "workspace:*",
|
|
21
14
|
"@types/node": "^22.19.17",
|
|
22
15
|
"eslint": "^10.3.0",
|
|
23
16
|
"tsup": "^8.5.1",
|
|
24
17
|
"typescript": "^6.0.3",
|
|
25
|
-
"vitest": "^4.1.5"
|
|
18
|
+
"vitest": "^4.1.5",
|
|
19
|
+
"@mushi-mushi/eslint-config": "0.0.0"
|
|
26
20
|
},
|
|
27
21
|
"author": "Kenji Sakuramoto",
|
|
28
22
|
"repository": {
|
|
@@ -109,5 +103,11 @@
|
|
|
109
103
|
"type": "module",
|
|
110
104
|
"engines": {
|
|
111
105
|
"node": ">=20"
|
|
106
|
+
},
|
|
107
|
+
"scripts": {
|
|
108
|
+
"build": "tsup",
|
|
109
|
+
"lint": "eslint src/",
|
|
110
|
+
"test": "vitest run",
|
|
111
|
+
"typecheck": "tsc --noEmit"
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
}
|