@mrpatronz/nexusflow 0.2.8 → 0.2.12
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/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +9 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +9 -2
- package/dist/commands/open.js.map +1 -1
- package/dist/generators/antigravity.d.ts +15 -0
- package/dist/generators/antigravity.d.ts.map +1 -0
- package/dist/generators/antigravity.js +27 -0
- package/dist/generators/antigravity.js.map +1 -0
- package/dist/generators/index.d.ts +1 -0
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +3 -1
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/skills-generator.d.ts.map +1 -1
- package/dist/generators/skills-generator.js +6 -1
- package/dist/generators/skills-generator.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +6 -2
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +83 -0
- package/dist/server.test.js.map +1 -1
- package/dist/utils/detect-ai.d.ts.map +1 -1
- package/dist/utils/detect-ai.js +4 -1
- package/dist/utils/detect-ai.js.map +1 -1
- package/dist/utils/detect-editors.d.ts.map +1 -1
- package/dist/utils/detect-editors.js +4 -1
- package/dist/utils/detect-editors.js.map +1 -1
- package/dist/utils/detect-editors.test.js +5 -4
- package/dist/utils/detect-editors.test.js.map +1 -1
- package/dist/utils/update-check.d.ts.map +1 -1
- package/dist/utils/update-check.js +16 -4
- package/dist/utils/update-check.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/create.ts +9 -2
- package/src/commands/open.ts +9 -2
- package/src/generators/antigravity.ts +32 -0
- package/src/generators/index.ts +3 -1
- package/src/generators/skills-generator.ts +5 -1
- package/src/server.test.ts +97 -0
- package/src/server.ts +6 -2
- package/src/utils/detect-ai.ts +4 -1
- package/src/utils/detect-editors.test.ts +5 -4
- package/src/utils/detect-editors.ts +4 -1
- package/src/utils/update-check.ts +16 -4
package/src/server.ts
CHANGED
|
@@ -247,7 +247,8 @@ function updateJobStep(
|
|
|
247
247
|
step.message = message;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
const isLastStep = job.steps[job.steps.length - 1]?.id === stepId;
|
|
251
|
+
if (isLastStep && status === 'completed') {
|
|
251
252
|
job.status = 'completed';
|
|
252
253
|
job.progress = 100;
|
|
253
254
|
} else if (status === 'failed') {
|
|
@@ -977,7 +978,10 @@ app.post('/api/updates/install', async (c) => {
|
|
|
977
978
|
return c.json({ error: 'Tool not found' }, 404);
|
|
978
979
|
}
|
|
979
980
|
|
|
980
|
-
const result = await execa(target.cmd, target.args, {
|
|
981
|
+
const result = await execa(target.cmd, target.args, {
|
|
982
|
+
reject: false,
|
|
983
|
+
shell: process.platform === 'win32',
|
|
984
|
+
});
|
|
981
985
|
if (result.exitCode === 0) {
|
|
982
986
|
return c.json({ success: true, output: result.stdout });
|
|
983
987
|
} else {
|
package/src/utils/detect-ai.ts
CHANGED
|
@@ -13,7 +13,10 @@ import type { AIAssistant, DetectedAI } from '../types.js';
|
|
|
13
13
|
*/
|
|
14
14
|
async function commandExists(command: string): Promise<boolean> {
|
|
15
15
|
try {
|
|
16
|
-
const result = await execa(command, ['--version'], {
|
|
16
|
+
const result = await execa(command, ['--version'], {
|
|
17
|
+
reject: false,
|
|
18
|
+
shell: process.platform === 'win32',
|
|
19
|
+
});
|
|
17
20
|
return result.exitCode === 0;
|
|
18
21
|
} catch {
|
|
19
22
|
// The command could not be spawned at all (not in PATH).
|
|
@@ -26,10 +26,11 @@ describe('detectEditors', () => {
|
|
|
26
26
|
{ name: 'Antigravity', command: 'agy', detected: false },
|
|
27
27
|
]);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
expect(execa).toHaveBeenCalledWith('code
|
|
31
|
-
expect(execa).toHaveBeenCalledWith('
|
|
32
|
-
expect(execa).toHaveBeenCalledWith('
|
|
29
|
+
const isWin = process.platform === 'win32';
|
|
30
|
+
expect(execa).toHaveBeenCalledWith('code', ['--version'], { reject: false, shell: isWin });
|
|
31
|
+
expect(execa).toHaveBeenCalledWith('code-insiders', ['--version'], { reject: false, shell: isWin });
|
|
32
|
+
expect(execa).toHaveBeenCalledWith('cursor', ['--version'], { reject: false, shell: isWin });
|
|
33
|
+
expect(execa).toHaveBeenCalledWith('agy', ['--version'], { reject: false, shell: isWin });
|
|
33
34
|
});
|
|
34
35
|
|
|
35
36
|
it('should return detected = false for all editors if execa throws an error', async () => {
|
|
@@ -21,7 +21,10 @@ const EDITOR_CANDIDATES: ReadonlyArray<{ name: string; command: string }> = [
|
|
|
21
21
|
*/
|
|
22
22
|
async function commandExists(command: string): Promise<boolean> {
|
|
23
23
|
try {
|
|
24
|
-
const result = await execa(command, ['--version'], {
|
|
24
|
+
const result = await execa(command, ['--version'], {
|
|
25
|
+
reject: false,
|
|
26
|
+
shell: process.platform === 'win32',
|
|
27
|
+
});
|
|
25
28
|
return result.exitCode === 0;
|
|
26
29
|
} catch {
|
|
27
30
|
return false;
|
|
@@ -178,11 +178,17 @@ export async function getToolsStatus(force = false): Promise<ToolUpdateStatus[]>
|
|
|
178
178
|
updateCmd: 'npm install -g repomix',
|
|
179
179
|
getCurrent: async () => {
|
|
180
180
|
try {
|
|
181
|
-
const res = await execa('repomix', ['--version'], {
|
|
181
|
+
const res = await execa('repomix', ['--version'], {
|
|
182
|
+
reject: false,
|
|
183
|
+
shell: process.platform === 'win32',
|
|
184
|
+
});
|
|
182
185
|
if (res.exitCode === 0) return res.stdout.trim();
|
|
183
186
|
} catch {}
|
|
184
187
|
try {
|
|
185
|
-
const res = await execa('npx', ['repomix', '--version'], {
|
|
188
|
+
const res = await execa('npx', ['repomix', '--version'], {
|
|
189
|
+
reject: false,
|
|
190
|
+
shell: process.platform === 'win32',
|
|
191
|
+
});
|
|
186
192
|
if (res.exitCode === 0) return res.stdout.trim();
|
|
187
193
|
} catch {}
|
|
188
194
|
return '';
|
|
@@ -196,7 +202,10 @@ export async function getToolsStatus(force = false): Promise<ToolUpdateStatus[]>
|
|
|
196
202
|
updateCmd: 'agy update',
|
|
197
203
|
getCurrent: async () => {
|
|
198
204
|
try {
|
|
199
|
-
const res = await execa('agy', ['--version'], {
|
|
205
|
+
const res = await execa('agy', ['--version'], {
|
|
206
|
+
reject: false,
|
|
207
|
+
shell: process.platform === 'win32',
|
|
208
|
+
});
|
|
200
209
|
if (res.exitCode === 0) return res.stdout.trim();
|
|
201
210
|
} catch {}
|
|
202
211
|
return '';
|
|
@@ -210,7 +219,10 @@ export async function getToolsStatus(force = false): Promise<ToolUpdateStatus[]>
|
|
|
210
219
|
updateCmd: 'npm install -g @anthropic-ai/claude-code',
|
|
211
220
|
getCurrent: async () => {
|
|
212
221
|
try {
|
|
213
|
-
const res = await execa('claude', ['--version'], {
|
|
222
|
+
const res = await execa('claude', ['--version'], {
|
|
223
|
+
reject: false,
|
|
224
|
+
shell: process.platform === 'win32',
|
|
225
|
+
});
|
|
214
226
|
if (res.exitCode === 0) return res.stdout.trim();
|
|
215
227
|
} catch {}
|
|
216
228
|
return '';
|