@algolia/wizard 0.114.0 → 0.115.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/dist/main.js +15 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -62,7 +62,15 @@ import { z } from "zod";
|
|
|
62
62
|
function npxArgs(args) {
|
|
63
63
|
return ["--yes", "@algolia/cli@latest", ...args];
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
function quoteForWinShell(arg) {
|
|
66
|
+
if (arg.length === 0) return '""';
|
|
67
|
+
if (!/[\s"&|<>^()]/.test(arg)) return arg;
|
|
68
|
+
return `"${arg.replace(/"/g, '""')}"`;
|
|
69
|
+
}
|
|
70
|
+
function spawnArgv(args, shell) {
|
|
71
|
+
const argv = npxArgs(args);
|
|
72
|
+
return shell ? argv.map(quoteForWinShell) : argv;
|
|
73
|
+
}
|
|
66
74
|
function mask(text, secret) {
|
|
67
75
|
return secret ? text.replaceAll(secret, "***") : text;
|
|
68
76
|
}
|
|
@@ -93,8 +101,9 @@ function runAlgoliaCli(args, { onOutput, redact } = {}) {
|
|
|
93
101
|
const store = useWizard.getState();
|
|
94
102
|
const command = mask(args.join(" "), redact);
|
|
95
103
|
const logId = store.logStart("tool", `algolia ${command}`);
|
|
104
|
+
const shell = process.platform === "win32";
|
|
96
105
|
return new Promise((resolve6, reject) => {
|
|
97
|
-
const child = spawn("npx",
|
|
106
|
+
const child = spawn("npx", spawnArgv(args, shell), { shell });
|
|
98
107
|
let stdout = "";
|
|
99
108
|
let stderr = "";
|
|
100
109
|
const splitters = {
|
|
@@ -2495,7 +2504,7 @@ async function ensureApplication(resumeAppId) {
|
|
|
2495
2504
|
// package.json
|
|
2496
2505
|
var package_default = {
|
|
2497
2506
|
name: "@algolia/wizard",
|
|
2498
|
-
version: "0.
|
|
2507
|
+
version: "0.115.0",
|
|
2499
2508
|
description: "Magically implement Algolia functionality in your codebase",
|
|
2500
2509
|
type: "module",
|
|
2501
2510
|
engines: {
|
|
@@ -3177,13 +3186,13 @@ function createShellContext(overrides = {}) {
|
|
|
3177
3186
|
...overrides
|
|
3178
3187
|
};
|
|
3179
3188
|
}
|
|
3180
|
-
function createToolContext(limits = DEFAULT_TOOL_LIMITS, cwd = process.cwd(),
|
|
3189
|
+
function createToolContext(limits = DEFAULT_TOOL_LIMITS, cwd = process.cwd(), shell = createShellContext()) {
|
|
3181
3190
|
return {
|
|
3182
3191
|
root: cwd,
|
|
3183
3192
|
cwd,
|
|
3184
3193
|
limits: { ...limits },
|
|
3185
3194
|
counts: { ...EMPTY_TOOL_COUNTS },
|
|
3186
|
-
shell
|
|
3195
|
+
shell,
|
|
3187
3196
|
reviewed: []
|
|
3188
3197
|
};
|
|
3189
3198
|
}
|
|
@@ -10944,7 +10953,7 @@ async function promptResumeOrStartNew(session, next) {
|
|
|
10944
10953
|
// package.json with { type: 'json' }
|
|
10945
10954
|
var package_default2 = {
|
|
10946
10955
|
name: "@algolia/wizard",
|
|
10947
|
-
version: "0.
|
|
10956
|
+
version: "0.115.0",
|
|
10948
10957
|
description: "Magically implement Algolia functionality in your codebase",
|
|
10949
10958
|
type: "module",
|
|
10950
10959
|
engines: {
|