@gjsify/cli 0.7.4 → 0.7.5
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/dist/cli.gjs.mjs +92 -92
- package/lib/utils/prompt.js +5 -9
- package/package.json +17 -17
package/lib/utils/prompt.js
CHANGED
|
@@ -29,16 +29,12 @@ export async function promptHidden(question) {
|
|
|
29
29
|
let buf = '';
|
|
30
30
|
stdin.setRawMode(true);
|
|
31
31
|
stdin.resume();
|
|
32
|
+
// setEncoding makes 'data' emit decoded STRINGS — including under GJS,
|
|
33
|
+
// where @gjsify/process honours it via StringDecoder (was a no-op stub;
|
|
34
|
+
// bytes broke `ch === '\r'` so Enter never submitted). So we can iterate
|
|
35
|
+
// characters directly here; do NOT reintroduce a byte-normalising shim.
|
|
32
36
|
stdin.setEncoding('utf-8');
|
|
33
|
-
|
|
34
|
-
// not honour `setEncoding('utf-8')` in raw mode, so each chunk arrives
|
|
35
|
-
// as bytes (a Buffer). Iterating bytes makes `ch === '\r'` always false
|
|
36
|
-
// and Enter (byte 13) coerce past `ch >= ' '` (→ `13 >= 0`) so it was
|
|
37
|
-
// masked as another `*` and the prompt never submitted. Normalise to a
|
|
38
|
-
// string first (same shape as readLine's handler), so this works on
|
|
39
|
-
// both Node (string) and GJS (bytes) — aligning with `npm login`.
|
|
40
|
-
const onData = (raw) => {
|
|
41
|
-
const chunk = typeof raw === 'string' ? raw : raw.toString('utf-8');
|
|
37
|
+
const onData = (chunk) => {
|
|
42
38
|
for (const ch of chunk) {
|
|
43
39
|
if (ch === '\r' || ch === '\n') {
|
|
44
40
|
cleanup();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "CLI for Gjsify",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -120,19 +120,19 @@
|
|
|
120
120
|
"cli"
|
|
121
121
|
],
|
|
122
122
|
"dependencies": {
|
|
123
|
-
"@gjsify/buffer": "^0.7.
|
|
124
|
-
"@gjsify/create-app": "^0.7.
|
|
125
|
-
"@gjsify/node-globals": "^0.7.
|
|
126
|
-
"@gjsify/node-polyfills": "^0.7.
|
|
127
|
-
"@gjsify/npm-registry": "^0.7.
|
|
128
|
-
"@gjsify/resolve-npm": "^0.7.
|
|
129
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.7.
|
|
130
|
-
"@gjsify/rolldown-plugin-pnp": "^0.7.
|
|
131
|
-
"@gjsify/semver": "^0.7.
|
|
132
|
-
"@gjsify/tar": "^0.7.
|
|
133
|
-
"@gjsify/tsc": "^0.7.
|
|
134
|
-
"@gjsify/web-polyfills": "^0.7.
|
|
135
|
-
"@gjsify/workspace": "^0.7.
|
|
123
|
+
"@gjsify/buffer": "^0.7.5",
|
|
124
|
+
"@gjsify/create-app": "^0.7.5",
|
|
125
|
+
"@gjsify/node-globals": "^0.7.5",
|
|
126
|
+
"@gjsify/node-polyfills": "^0.7.5",
|
|
127
|
+
"@gjsify/npm-registry": "^0.7.5",
|
|
128
|
+
"@gjsify/resolve-npm": "^0.7.5",
|
|
129
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.7.5",
|
|
130
|
+
"@gjsify/rolldown-plugin-pnp": "^0.7.5",
|
|
131
|
+
"@gjsify/semver": "^0.7.5",
|
|
132
|
+
"@gjsify/tar": "^0.7.5",
|
|
133
|
+
"@gjsify/tsc": "^0.7.5",
|
|
134
|
+
"@gjsify/web-polyfills": "^0.7.5",
|
|
135
|
+
"@gjsify/workspace": "^0.7.5",
|
|
136
136
|
"cosmiconfig": "^9.0.2",
|
|
137
137
|
"get-tsconfig": "^4.14.0",
|
|
138
138
|
"pkg-types": "^2.3.1",
|
|
@@ -140,13 +140,13 @@
|
|
|
140
140
|
"yargs": "^18.0.0"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
|
-
"@gjsify/unit": "^0.7.
|
|
143
|
+
"@gjsify/unit": "^0.7.5",
|
|
144
144
|
"@types/yargs": "^17.0.35",
|
|
145
145
|
"typescript": "^6.0.3"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
|
-
"@gjsify/oxfmt-native": "^0.7.
|
|
149
|
-
"@gjsify/rolldown-native": "^0.7.
|
|
148
|
+
"@gjsify/oxfmt-native": "^0.7.5",
|
|
149
|
+
"@gjsify/rolldown-native": "^0.7.5"
|
|
150
150
|
},
|
|
151
151
|
"peerDependenciesMeta": {
|
|
152
152
|
"@gjsify/oxfmt-native": {
|