@methiu/raigal 0.16.2
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/LICENSE +1 -0
- package/README.md +511 -0
- package/dist/AgentApp-DxfJZJXy.js +390 -0
- package/dist/adapters/astro.d.ts +22 -0
- package/dist/adapters/astro.js +20 -0
- package/dist/adapters/expo.d.ts +24 -0
- package/dist/adapters/expo.js +33 -0
- package/dist/adapters/nuxt.d.ts +33 -0
- package/dist/adapters/nuxt.js +41 -0
- package/dist/adapters/sveltekit.d.ts +15 -0
- package/dist/adapters/sveltekit.js +19 -0
- package/dist/adapters/vite.d.ts +26 -0
- package/dist/adapters/vite.js +33 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +29535 -0
- package/dist/core-BpOFk2i9.d.ts +34 -0
- package/dist/core-o3KNKhg2.js +100 -0
- package/dist/finding-assessment-M5fUTE-C.js +321 -0
- package/dist/index.d.ts +351 -0
- package/dist/index.js +20228 -0
- package/dist/json-DBN8fnd3.js +35 -0
- package/dist/json-DKuTrkDa.js +35 -0
- package/dist/mask-secrets-BXn-ZSEh.js +71 -0
- package/dist/mcp.js +15018 -0
- package/dist/mount-zBL9B_lE.js +18 -0
- package/dist/sarif-B-l1Fhzd.js +66 -0
- package/dist/sarif-B5s74n0Q.js +66 -0
- package/dist/version-CVfOxP_O.js +6 -0
- package/package.json +129 -0
- package/scripts/check-licenses.mjs +45 -0
- package/scripts/check-tarball-keys.mjs +106 -0
- package/scripts/gen-config-schema.mjs +35 -0
- package/scripts/install-tools.mjs +383 -0
- package/scripts/polyfill.cjs +10 -0
- package/scripts/release-guard.mjs +29 -0
- package/tools/jb/README.md +45 -0
- package/tools/jb/aislop.DotSettings +3 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Box, Text, useInput, useStdout } from "ink";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import SelectInput from "ink-select-input";
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
//#region src/ui/agent-tui/ActivityPane.tsx
|
|
7
|
+
const colorFor$1 = (kind) => {
|
|
8
|
+
if (kind === "tool") return "cyan";
|
|
9
|
+
if (kind === "exec") return "yellow";
|
|
10
|
+
if (kind === "event") return "gray";
|
|
11
|
+
return "white";
|
|
12
|
+
};
|
|
13
|
+
const prefixFor = (kind) => kind === "assistant" ? "" : `${kind} `;
|
|
14
|
+
const ActivityPane = ({ activity, rows }) => {
|
|
15
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
flexGrow: 1,
|
|
18
|
+
paddingX: 1,
|
|
19
|
+
children: activity.slice(-Math.max(1, rows)).map((line, index) => /* @__PURE__ */ jsxs(Text, {
|
|
20
|
+
color: colorFor$1(line.kind),
|
|
21
|
+
wrap: "truncate-end",
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
23
|
+
dimColor: true,
|
|
24
|
+
children: prefixFor(line.kind)
|
|
25
|
+
}), line.text]
|
|
26
|
+
}, `${line.at}-${index}`))
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/ui/agent-tui/DecisionBar.tsx
|
|
31
|
+
const DecisionBar = ({ decision }) => {
|
|
32
|
+
const items = decision.options.map((option) => ({
|
|
33
|
+
label: option.hint ? `${option.label} (${option.hint})` : option.label,
|
|
34
|
+
value: option.value
|
|
35
|
+
}));
|
|
36
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
paddingX: 1,
|
|
39
|
+
borderStyle: "round",
|
|
40
|
+
borderColor: "cyan",
|
|
41
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
42
|
+
bold: true,
|
|
43
|
+
children: decision.question
|
|
44
|
+
}), /* @__PURE__ */ jsx(SelectInput, {
|
|
45
|
+
items,
|
|
46
|
+
onSelect: (item) => decision.resolve(item.value)
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/ui/agent-tui/FilesPanel.tsx
|
|
52
|
+
const DiffStat = ({ file }) => {
|
|
53
|
+
if (file.binary) return /* @__PURE__ */ jsx(Text, {
|
|
54
|
+
dimColor: true,
|
|
55
|
+
children: "binary"
|
|
56
|
+
});
|
|
57
|
+
if (typeof file.additions === "number" || typeof file.deletions === "number") return /* @__PURE__ */ jsxs(Text, { children: [
|
|
58
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
59
|
+
color: "green",
|
|
60
|
+
children: ["+", file.additions ?? 0]
|
|
61
|
+
}),
|
|
62
|
+
" ",
|
|
63
|
+
/* @__PURE__ */ jsxs(Text, {
|
|
64
|
+
color: "red",
|
|
65
|
+
children: ["-", file.deletions ?? 0]
|
|
66
|
+
})
|
|
67
|
+
] });
|
|
68
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
69
|
+
dimColor: true,
|
|
70
|
+
children: "changed"
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
const FilesPanel = ({ files }) => {
|
|
74
|
+
if (files.length === 0) return null;
|
|
75
|
+
const shown = files.slice(-5);
|
|
76
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
77
|
+
flexDirection: "column",
|
|
78
|
+
paddingX: 1,
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx(Text, {
|
|
81
|
+
dimColor: true,
|
|
82
|
+
children: "Edited files"
|
|
83
|
+
}),
|
|
84
|
+
shown.map((file) => /* @__PURE__ */ jsxs(Text, {
|
|
85
|
+
wrap: "truncate-middle",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx(Text, {
|
|
88
|
+
color: "green",
|
|
89
|
+
children: "✓ "
|
|
90
|
+
}),
|
|
91
|
+
file.filePath,
|
|
92
|
+
" ",
|
|
93
|
+
/* @__PURE__ */ jsx(DiffStat, { file })
|
|
94
|
+
]
|
|
95
|
+
}, file.filePath)),
|
|
96
|
+
files.length > shown.length ? /* @__PURE__ */ jsxs(Text, {
|
|
97
|
+
dimColor: true,
|
|
98
|
+
children: [
|
|
99
|
+
"+",
|
|
100
|
+
files.length - shown.length,
|
|
101
|
+
" more"
|
|
102
|
+
]
|
|
103
|
+
}) : null
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/ui/agent-tui/FooterBar.tsx
|
|
109
|
+
const FooterBar = ({ repo, branch, worktree }) => /* @__PURE__ */ jsxs(Box, {
|
|
110
|
+
paddingX: 1,
|
|
111
|
+
justifyContent: "space-between",
|
|
112
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
113
|
+
dimColor: true,
|
|
114
|
+
wrap: "truncate-middle",
|
|
115
|
+
children: [
|
|
116
|
+
repo,
|
|
117
|
+
branch ? ` ${branch}` : "",
|
|
118
|
+
worktree ? ` ↳ ${worktree}` : ""
|
|
119
|
+
]
|
|
120
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
121
|
+
dimColor: true,
|
|
122
|
+
children: "ctrl+c to quit"
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/agents/pricing.ts
|
|
127
|
+
const MODELS = {
|
|
128
|
+
"gpt-5.4": {
|
|
129
|
+
model: "gpt-5.4",
|
|
130
|
+
inPerMTok: 1.25,
|
|
131
|
+
outPerMTok: 10,
|
|
132
|
+
contextWindow: 4e5
|
|
133
|
+
},
|
|
134
|
+
"claude-opus-4-8": {
|
|
135
|
+
model: "claude-opus-4-8",
|
|
136
|
+
inPerMTok: 5,
|
|
137
|
+
outPerMTok: 25,
|
|
138
|
+
contextWindow: 2e5
|
|
139
|
+
},
|
|
140
|
+
"claude-sonnet-4-6": {
|
|
141
|
+
model: "claude-sonnet-4-6",
|
|
142
|
+
inPerMTok: 3,
|
|
143
|
+
outPerMTok: 15,
|
|
144
|
+
contextWindow: 2e5
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const PROVIDER_DEFAULT = {
|
|
148
|
+
codex: "gpt-5.4",
|
|
149
|
+
claude: "claude-opus-4-8",
|
|
150
|
+
opencode: "claude-sonnet-4-6"
|
|
151
|
+
};
|
|
152
|
+
const resolvePricing = (provider, model) => {
|
|
153
|
+
if (model && MODELS[model]) return MODELS[model];
|
|
154
|
+
const fallback = PROVIDER_DEFAULT[provider.toLowerCase()];
|
|
155
|
+
return fallback ? MODELS[fallback] ?? null : null;
|
|
156
|
+
};
|
|
157
|
+
const computeCostUsd = (pricing, tokens) => {
|
|
158
|
+
if (!pricing) return null;
|
|
159
|
+
return tokens.in / 1e6 * pricing.inPerMTok + tokens.out / 1e6 * pricing.outPerMTok;
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/ui/agent-tui/format.ts
|
|
163
|
+
const fmtTokens = (n) => {
|
|
164
|
+
if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
|
|
165
|
+
if (n >= 1e3) return `${Math.round(n / 1e3)}k`;
|
|
166
|
+
return String(n);
|
|
167
|
+
};
|
|
168
|
+
const fmtElapsed = (ms) => {
|
|
169
|
+
const totalSeconds = Math.round(ms / 1e3);
|
|
170
|
+
if (totalSeconds < 60) return `${totalSeconds}s`;
|
|
171
|
+
return `${Math.floor(totalSeconds / 60)}m${String(totalSeconds % 60).padStart(2, "0")}s`;
|
|
172
|
+
};
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/ui/agent-tui/Sidebar.tsx
|
|
175
|
+
const Row = ({ label, value, color }) => /* @__PURE__ */ jsxs(Box, { children: [/* @__PURE__ */ jsx(Box, {
|
|
176
|
+
width: 9,
|
|
177
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
178
|
+
dimColor: true,
|
|
179
|
+
children: label
|
|
180
|
+
})
|
|
181
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
182
|
+
color,
|
|
183
|
+
children: value
|
|
184
|
+
})] });
|
|
185
|
+
const scoreColor = (score, target) => {
|
|
186
|
+
if (score == null) return "white";
|
|
187
|
+
if (score >= target) return "green";
|
|
188
|
+
if (score >= target * .7) return "yellow";
|
|
189
|
+
return "red";
|
|
190
|
+
};
|
|
191
|
+
const useElapsedSince = (startedAt) => {
|
|
192
|
+
const [now, setNow] = useState(startedAt);
|
|
193
|
+
useEffect(() => {
|
|
194
|
+
const tick = () => setNow(Date.now());
|
|
195
|
+
tick();
|
|
196
|
+
const timer = setInterval(tick, 1e3);
|
|
197
|
+
return () => clearInterval(timer);
|
|
198
|
+
}, []);
|
|
199
|
+
return Math.max(0, now - startedAt);
|
|
200
|
+
};
|
|
201
|
+
const Sidebar = ({ state }) => {
|
|
202
|
+
const elapsed = useElapsedSince(state.startedAt);
|
|
203
|
+
const pricing = resolvePricing(state.provider, state.model);
|
|
204
|
+
const cost = state.usage?.costUsd ?? computeCostUsd(pricing, state.tokens);
|
|
205
|
+
const ctx = pricing ? state.tokens.in / pricing.contextWindow * 100 : null;
|
|
206
|
+
const hasUsage = state.tokens.total > 0;
|
|
207
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
208
|
+
flexDirection: "column",
|
|
209
|
+
width: 30,
|
|
210
|
+
alignSelf: "flex-start",
|
|
211
|
+
paddingX: 1,
|
|
212
|
+
borderStyle: "round",
|
|
213
|
+
borderColor: "gray",
|
|
214
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
215
|
+
bold: true,
|
|
216
|
+
children: state.model ? `${state.provider} · ${state.model}` : state.provider
|
|
217
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
218
|
+
marginTop: 1,
|
|
219
|
+
flexDirection: "column",
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ jsx(Row, {
|
|
222
|
+
label: "Score",
|
|
223
|
+
value: state.score != null && state.score >= state.targetScore ? `${state.score} ✓` : `${state.score ?? "--"} → ${state.targetScore}`,
|
|
224
|
+
color: scoreColor(state.score, state.targetScore)
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ jsx(Row, {
|
|
227
|
+
label: "Left",
|
|
228
|
+
value: state.findingsRemaining == null ? "--" : String(state.findingsRemaining)
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ jsx(Row, {
|
|
231
|
+
label: "Files",
|
|
232
|
+
value: String(state.filesChanged.size)
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ jsx(Row, {
|
|
235
|
+
label: "Passes",
|
|
236
|
+
value: String(state.passes)
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ jsx(Row, {
|
|
239
|
+
label: "Tokens",
|
|
240
|
+
value: hasUsage ? fmtTokens(state.tokens.total) : state.estimatedTokens > 0 ? `~${fmtTokens(state.estimatedTokens)}` : "--"
|
|
241
|
+
}),
|
|
242
|
+
hasUsage && cost != null ? /* @__PURE__ */ jsx(Row, {
|
|
243
|
+
label: "Cost",
|
|
244
|
+
value: `$${cost.toFixed(2)}`
|
|
245
|
+
}) : null,
|
|
246
|
+
hasUsage && ctx != null ? /* @__PURE__ */ jsx(Row, {
|
|
247
|
+
label: "Context",
|
|
248
|
+
value: `${Math.round(ctx)}%`
|
|
249
|
+
}) : null,
|
|
250
|
+
/* @__PURE__ */ jsx(Row, {
|
|
251
|
+
label: "Elapsed",
|
|
252
|
+
value: fmtElapsed(elapsed)
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
})]
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/ui/agent-tui/Spinner.tsx
|
|
260
|
+
const FRAMES = [
|
|
261
|
+
"⠋",
|
|
262
|
+
"⠙",
|
|
263
|
+
"⠹",
|
|
264
|
+
"⠸",
|
|
265
|
+
"⠼",
|
|
266
|
+
"⠴",
|
|
267
|
+
"⠦",
|
|
268
|
+
"⠧",
|
|
269
|
+
"⠇",
|
|
270
|
+
"⠏"
|
|
271
|
+
];
|
|
272
|
+
const Spinner = ({ color }) => {
|
|
273
|
+
const [frame, setFrame] = useState(0);
|
|
274
|
+
useEffect(() => {
|
|
275
|
+
const timer = setInterval(() => setFrame((f) => (f + 1) % FRAMES.length), 80);
|
|
276
|
+
return () => clearInterval(timer);
|
|
277
|
+
}, []);
|
|
278
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
279
|
+
color,
|
|
280
|
+
children: FRAMES[frame]
|
|
281
|
+
});
|
|
282
|
+
};
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/ui/agent-tui/StepsPanel.tsx
|
|
285
|
+
const glyph = (status) => {
|
|
286
|
+
if (status === "done") return "✓";
|
|
287
|
+
if (status === "warn") return "!";
|
|
288
|
+
if (status === "failed") return "✗";
|
|
289
|
+
return "·";
|
|
290
|
+
};
|
|
291
|
+
const colorFor = (status) => {
|
|
292
|
+
if (status === "running" || status === "done") return "cyan";
|
|
293
|
+
if (status === "warn") return "yellow";
|
|
294
|
+
if (status === "failed") return "red";
|
|
295
|
+
return "gray";
|
|
296
|
+
};
|
|
297
|
+
const StepsPanel = ({ steps }) => {
|
|
298
|
+
if (steps.length === 0) return null;
|
|
299
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
300
|
+
flexDirection: "column",
|
|
301
|
+
paddingX: 1,
|
|
302
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
303
|
+
dimColor: true,
|
|
304
|
+
children: "Steps"
|
|
305
|
+
}), steps.slice(-6).map((step, index) => /* @__PURE__ */ jsxs(Text, {
|
|
306
|
+
color: colorFor(step.status),
|
|
307
|
+
wrap: "truncate-end",
|
|
308
|
+
children: [
|
|
309
|
+
step.status === "running" ? /* @__PURE__ */ jsx(Spinner, { color: "cyan" }) : glyph(step.status),
|
|
310
|
+
" ",
|
|
311
|
+
step.label
|
|
312
|
+
]
|
|
313
|
+
}, `${index}-${step.label}`))]
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/ui/agent-tui/useStore.ts
|
|
318
|
+
const useStore = (store) => {
|
|
319
|
+
const [, setTick] = useState(0);
|
|
320
|
+
useEffect(() => {
|
|
321
|
+
return store.subscribe(() => setTick((t) => t + 1));
|
|
322
|
+
}, [store]);
|
|
323
|
+
return store.getState();
|
|
324
|
+
};
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/ui/agent-tui/AgentApp.tsx
|
|
327
|
+
const AgentApp = ({ store }) => {
|
|
328
|
+
const state = useStore(store);
|
|
329
|
+
useInput((_input, key) => {
|
|
330
|
+
if (key.ctrl && _input === "c") {
|
|
331
|
+
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
332
|
+
process.exit(130);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
const { stdout } = useStdout();
|
|
336
|
+
const totalRows = stdout?.rows ?? 24;
|
|
337
|
+
const activityRows = Math.max(3, Math.floor((totalRows - 10) / 2));
|
|
338
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
339
|
+
flexDirection: "column",
|
|
340
|
+
height: totalRows,
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
343
|
+
paddingX: 1,
|
|
344
|
+
borderStyle: "single",
|
|
345
|
+
borderColor: "gray",
|
|
346
|
+
borderTop: false,
|
|
347
|
+
borderLeft: false,
|
|
348
|
+
borderRight: false,
|
|
349
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
350
|
+
bold: true,
|
|
351
|
+
color: "green",
|
|
352
|
+
children: "raigal agent"
|
|
353
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
354
|
+
dimColor: true,
|
|
355
|
+
children: [" · ", state.provider]
|
|
356
|
+
})]
|
|
357
|
+
}),
|
|
358
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
359
|
+
flexGrow: 1,
|
|
360
|
+
children: [/* @__PURE__ */ jsxs(Box, {
|
|
361
|
+
flexDirection: "column",
|
|
362
|
+
flexGrow: 1,
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ jsx(StepsPanel, { steps: state.steps }),
|
|
365
|
+
/* @__PURE__ */ jsx(Box, {
|
|
366
|
+
paddingX: 1,
|
|
367
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
368
|
+
dimColor: true,
|
|
369
|
+
children: "Live output"
|
|
370
|
+
})
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ jsx(ActivityPane, {
|
|
373
|
+
activity: state.activity,
|
|
374
|
+
rows: activityRows
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ jsx(FilesPanel, { files: state.files })
|
|
377
|
+
]
|
|
378
|
+
}), /* @__PURE__ */ jsx(Sidebar, { state })]
|
|
379
|
+
}),
|
|
380
|
+
state.pendingDecision ? /* @__PURE__ */ jsx(DecisionBar, { decision: state.pendingDecision }) : null,
|
|
381
|
+
/* @__PURE__ */ jsx(FooterBar, {
|
|
382
|
+
repo: state.targetRepo,
|
|
383
|
+
branch: state.branch,
|
|
384
|
+
worktree: state.worktree
|
|
385
|
+
})
|
|
386
|
+
]
|
|
387
|
+
});
|
|
388
|
+
};
|
|
389
|
+
//#endregion
|
|
390
|
+
export { AgentApp };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { r as RaigalRunResult, t as RaigalAdapterOptions } from "../core-BpOFk2i9.js";
|
|
2
|
+
//#region src/framework-adapters/astro.d.ts
|
|
3
|
+
interface AstroIntegration {
|
|
4
|
+
name: string;
|
|
5
|
+
hooks: {
|
|
6
|
+
"astro:build:start"?: () => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface RaigalAstroOptions extends RaigalAdapterOptions {
|
|
10
|
+
runOnBuild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type AislopAstroOptions = RaigalAstroOptions;
|
|
13
|
+
declare const createAstroRaigalScripts: () => Record<string, string>;
|
|
14
|
+
declare const createAstroAislopScripts: () => Record<string, string>;
|
|
15
|
+
declare const createAstroRaigalWorkflow: () => string;
|
|
16
|
+
declare const createAstroAislopWorkflow: () => string;
|
|
17
|
+
declare const runAstroRaigal: (options?: RaigalAstroOptions) => Promise<RaigalRunResult>;
|
|
18
|
+
declare const runAstroAislop: (options?: RaigalAstroOptions) => Promise<RaigalRunResult>;
|
|
19
|
+
declare const raigalAstro: (options?: RaigalAstroOptions) => AstroIntegration;
|
|
20
|
+
declare const aislopAstro: (options?: RaigalAstroOptions) => AstroIntegration;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { AislopAstroOptions, AstroIntegration, RaigalAstroOptions, aislopAstro, createAstroAislopScripts, createAstroAislopWorkflow, createAstroRaigalScripts, createAstroRaigalWorkflow, raigalAstro as default, runAstroAislop, runAstroRaigal };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { n as createRaigalPackageScripts, r as maybeRunRaigal, t as createRaigalCiWorkflow } from "../core-o3KNKhg2.js";
|
|
2
|
+
//#region src/framework-adapters/astro.ts
|
|
3
|
+
const createAstroRaigalScripts = () => createRaigalPackageScripts("astro");
|
|
4
|
+
const createAstroAislopScripts = createAstroRaigalScripts;
|
|
5
|
+
const createAstroRaigalWorkflow = () => createRaigalCiWorkflow();
|
|
6
|
+
const createAstroAislopWorkflow = createAstroRaigalWorkflow;
|
|
7
|
+
const runAstroRaigal = async (options = {}) => maybeRunRaigal("astro", {
|
|
8
|
+
...options,
|
|
9
|
+
enabled: options.enabled ?? options.runOnBuild ?? false
|
|
10
|
+
});
|
|
11
|
+
const runAstroAislop = runAstroRaigal;
|
|
12
|
+
const raigalAstro = (options = {}) => ({
|
|
13
|
+
name: "@raigal/astro",
|
|
14
|
+
hooks: { "astro:build:start": async () => {
|
|
15
|
+
await runAstroRaigal(options);
|
|
16
|
+
} }
|
|
17
|
+
});
|
|
18
|
+
const aislopAstro = raigalAstro;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { aislopAstro, createAstroAislopScripts, createAstroAislopWorkflow, createAstroRaigalScripts, createAstroRaigalWorkflow, raigalAstro as default, runAstroAislop, runAstroRaigal };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as RaigalRunResult, t as RaigalAdapterOptions } from "../core-BpOFk2i9.js";
|
|
2
|
+
//#region src/framework-adapters/expo.d.ts
|
|
3
|
+
interface ExpoConfigLike {
|
|
4
|
+
extra?: Record<string, unknown>;
|
|
5
|
+
[name: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface RaigalExpoOptions extends RaigalAdapterOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Expo config plugins run while resolving app config. Keep scan execution out
|
|
10
|
+
* of that path unless a host integration explicitly opts in.
|
|
11
|
+
*/
|
|
12
|
+
runDuringConfig?: boolean;
|
|
13
|
+
}
|
|
14
|
+
type AislopExpoOptions = RaigalExpoOptions;
|
|
15
|
+
declare const createExpoRaigalScripts: () => Record<string, string>;
|
|
16
|
+
declare const createExpoAislopScripts: () => Record<string, string>;
|
|
17
|
+
declare const createExpoRaigalWorkflow: () => string;
|
|
18
|
+
declare const createExpoAislopWorkflow: () => string;
|
|
19
|
+
declare const runExpoRaigal: (options?: RaigalExpoOptions) => Promise<RaigalRunResult>;
|
|
20
|
+
declare const runExpoAislop: (options?: RaigalExpoOptions) => Promise<RaigalRunResult>;
|
|
21
|
+
declare const withRaigalExpo: <TConfig extends ExpoConfigLike>(config: TConfig, _options?: RaigalExpoOptions) => TConfig;
|
|
22
|
+
declare const withAislopExpo: <TConfig extends ExpoConfigLike>(config: TConfig, _options?: RaigalExpoOptions) => TConfig;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { AislopExpoOptions, ExpoConfigLike, RaigalExpoOptions, createExpoAislopScripts, createExpoAislopWorkflow, createExpoRaigalScripts, createExpoRaigalWorkflow, withRaigalExpo as default, runExpoAislop, runExpoRaigal, withAislopExpo };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as createRaigalPackageScripts, r as maybeRunRaigal, t as createRaigalCiWorkflow } from "../core-o3KNKhg2.js";
|
|
2
|
+
//#region src/framework-adapters/expo.ts
|
|
3
|
+
const createExpoRaigalScripts = () => createRaigalPackageScripts("expo");
|
|
4
|
+
const createExpoAislopScripts = createExpoRaigalScripts;
|
|
5
|
+
const createExpoRaigalWorkflow = () => createRaigalCiWorkflow();
|
|
6
|
+
const createExpoAislopWorkflow = createExpoRaigalWorkflow;
|
|
7
|
+
const runExpoRaigal = async (options = {}) => maybeRunRaigal("expo", {
|
|
8
|
+
...options,
|
|
9
|
+
enabled: options.enabled ?? options.runDuringConfig ?? false
|
|
10
|
+
});
|
|
11
|
+
const runExpoAislop = runExpoRaigal;
|
|
12
|
+
const withRaigalExpo = (config, _options = {}) => {
|
|
13
|
+
const extra = {
|
|
14
|
+
...config.extra,
|
|
15
|
+
raigal: {
|
|
16
|
+
command: "npx --yes @methiu/raigal@latest ci",
|
|
17
|
+
hook: "raigal hook install",
|
|
18
|
+
enabled: true
|
|
19
|
+
},
|
|
20
|
+
aislop: {
|
|
21
|
+
command: "npx --yes @methiu/raigal@latest ci",
|
|
22
|
+
hook: "raigal hook install",
|
|
23
|
+
enabled: true
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
...config,
|
|
28
|
+
extra
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const withAislopExpo = withRaigalExpo;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { createExpoAislopScripts, createExpoAislopWorkflow, createExpoRaigalScripts, createExpoRaigalWorkflow, withRaigalExpo as default, runExpoAislop, runExpoRaigal, withAislopExpo };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { r as RaigalRunResult, t as RaigalAdapterOptions } from "../core-BpOFk2i9.js";
|
|
2
|
+
//#region src/framework-adapters/nuxt.d.ts
|
|
3
|
+
type NuxtHookName = "build:before" | "nitro:build:before";
|
|
4
|
+
interface NuxtLike {
|
|
5
|
+
hook?: (name: NuxtHookName, callback: () => Promise<void>) => void;
|
|
6
|
+
options?: {
|
|
7
|
+
runtimeConfig?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
interface RaigalNuxtOptions extends RaigalAdapterOptions {
|
|
11
|
+
runOnBuild?: boolean;
|
|
12
|
+
hook?: NuxtHookName;
|
|
13
|
+
}
|
|
14
|
+
type AislopNuxtOptions = RaigalNuxtOptions;
|
|
15
|
+
interface NuxtModuleLike {
|
|
16
|
+
meta: {
|
|
17
|
+
name: string;
|
|
18
|
+
configKey: string;
|
|
19
|
+
};
|
|
20
|
+
defaults: RaigalNuxtOptions;
|
|
21
|
+
setup: (options: RaigalNuxtOptions, nuxt: NuxtLike) => void | Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
declare const createNuxtRaigalScripts: () => Record<string, string>;
|
|
24
|
+
declare const createNuxtAislopScripts: () => Record<string, string>;
|
|
25
|
+
declare const createNuxtRaigalWorkflow: () => string;
|
|
26
|
+
declare const createNuxtAislopWorkflow: () => string;
|
|
27
|
+
declare const runNuxtRaigal: (options?: RaigalNuxtOptions) => Promise<RaigalRunResult>;
|
|
28
|
+
declare const runNuxtAislop: (options?: RaigalNuxtOptions) => Promise<RaigalRunResult>;
|
|
29
|
+
declare const createRaigalNuxtModule: (defaults?: RaigalNuxtOptions) => NuxtModuleLike;
|
|
30
|
+
declare const createAislopNuxtModule: (defaults?: RaigalNuxtOptions) => NuxtModuleLike;
|
|
31
|
+
declare const _default: NuxtModuleLike;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AislopNuxtOptions, NuxtLike, NuxtModuleLike, RaigalNuxtOptions, createAislopNuxtModule, createNuxtAislopScripts, createNuxtAislopWorkflow, createNuxtRaigalScripts, createNuxtRaigalWorkflow, createRaigalNuxtModule, _default as default, runNuxtAislop, runNuxtRaigal };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { n as createRaigalPackageScripts, r as maybeRunRaigal, t as createRaigalCiWorkflow } from "../core-o3KNKhg2.js";
|
|
2
|
+
//#region src/framework-adapters/nuxt.ts
|
|
3
|
+
const DEFAULTS = {
|
|
4
|
+
command: "ci",
|
|
5
|
+
enabled: false,
|
|
6
|
+
failOnError: true,
|
|
7
|
+
hook: "build:before"
|
|
8
|
+
};
|
|
9
|
+
const createNuxtRaigalScripts = () => createRaigalPackageScripts("nuxt");
|
|
10
|
+
const createNuxtAislopScripts = createNuxtRaigalScripts;
|
|
11
|
+
const createNuxtRaigalWorkflow = () => createRaigalCiWorkflow();
|
|
12
|
+
const createNuxtAislopWorkflow = createNuxtRaigalWorkflow;
|
|
13
|
+
const runNuxtRaigal = async (options = {}) => maybeRunRaigal("nuxt", {
|
|
14
|
+
...options,
|
|
15
|
+
enabled: options.enabled ?? options.runOnBuild ?? false
|
|
16
|
+
});
|
|
17
|
+
const runNuxtAislop = runNuxtRaigal;
|
|
18
|
+
const createRaigalNuxtModule = (defaults = {}) => ({
|
|
19
|
+
meta: {
|
|
20
|
+
name: "@raigal/nuxt",
|
|
21
|
+
configKey: "raigal"
|
|
22
|
+
},
|
|
23
|
+
defaults: {
|
|
24
|
+
...DEFAULTS,
|
|
25
|
+
...defaults
|
|
26
|
+
},
|
|
27
|
+
setup(options, nuxt) {
|
|
28
|
+
const merged = {
|
|
29
|
+
...DEFAULTS,
|
|
30
|
+
...defaults,
|
|
31
|
+
...options
|
|
32
|
+
};
|
|
33
|
+
nuxt.hook?.(merged.hook ?? "build:before", async () => {
|
|
34
|
+
await runNuxtRaigal(merged);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const createAislopNuxtModule = createRaigalNuxtModule;
|
|
39
|
+
var nuxt_default = createRaigalNuxtModule();
|
|
40
|
+
//#endregion
|
|
41
|
+
export { createAislopNuxtModule, createNuxtAislopScripts, createNuxtAislopWorkflow, createNuxtRaigalScripts, createNuxtRaigalWorkflow, createRaigalNuxtModule, nuxt_default as default, runNuxtAislop, runNuxtRaigal };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { r as RaigalRunResult } from "../core-BpOFk2i9.js";
|
|
2
|
+
import { RaigalViteOptions, VitePluginLike } from "./vite.js";
|
|
3
|
+
//#region src/framework-adapters/sveltekit.d.ts
|
|
4
|
+
type RaigalSvelteKitOptions = Omit<RaigalViteOptions, "framework">;
|
|
5
|
+
type AislopSvelteKitOptions = RaigalSvelteKitOptions;
|
|
6
|
+
declare const createSvelteKitRaigalScripts: () => Record<string, string>;
|
|
7
|
+
declare const createSvelteKitAislopScripts: () => Record<string, string>;
|
|
8
|
+
declare const createSvelteKitRaigalWorkflow: () => string;
|
|
9
|
+
declare const createSvelteKitAislopWorkflow: () => string;
|
|
10
|
+
declare const runSvelteKitRaigal: (options?: RaigalSvelteKitOptions) => Promise<RaigalRunResult>;
|
|
11
|
+
declare const runSvelteKitAislop: (options?: RaigalSvelteKitOptions) => Promise<RaigalRunResult>;
|
|
12
|
+
declare const raigalSvelteKit: (options?: RaigalSvelteKitOptions) => VitePluginLike;
|
|
13
|
+
declare const aislopSvelteKit: (options?: RaigalSvelteKitOptions) => VitePluginLike;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { AislopSvelteKitOptions, RaigalSvelteKitOptions, aislopSvelteKit, createSvelteKitAislopScripts, createSvelteKitAislopWorkflow, createSvelteKitRaigalScripts, createSvelteKitRaigalWorkflow, raigalSvelteKit as default, runSvelteKitAislop, runSvelteKitRaigal };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { n as createRaigalPackageScripts, t as createRaigalCiWorkflow } from "../core-o3KNKhg2.js";
|
|
2
|
+
import raigalVite, { runRaigalVite } from "./vite.js";
|
|
3
|
+
//#region src/framework-adapters/sveltekit.ts
|
|
4
|
+
const createSvelteKitRaigalScripts = () => createRaigalPackageScripts("sveltekit");
|
|
5
|
+
const createSvelteKitAislopScripts = createSvelteKitRaigalScripts;
|
|
6
|
+
const createSvelteKitRaigalWorkflow = () => createRaigalCiWorkflow();
|
|
7
|
+
const createSvelteKitAislopWorkflow = createSvelteKitRaigalWorkflow;
|
|
8
|
+
const runSvelteKitRaigal = async (options = {}) => runRaigalVite({
|
|
9
|
+
...options,
|
|
10
|
+
framework: "sveltekit"
|
|
11
|
+
});
|
|
12
|
+
const runSvelteKitAislop = runSvelteKitRaigal;
|
|
13
|
+
const raigalSvelteKit = (options = {}) => raigalVite({
|
|
14
|
+
...options,
|
|
15
|
+
framework: "sveltekit"
|
|
16
|
+
});
|
|
17
|
+
const aislopSvelteKit = raigalSvelteKit;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { aislopSvelteKit, createSvelteKitAislopScripts, createSvelteKitAislopWorkflow, createSvelteKitRaigalScripts, createSvelteKitRaigalWorkflow, raigalSvelteKit as default, runSvelteKitAislop, runSvelteKitRaigal };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { n as RaigalFramework, r as RaigalRunResult, t as RaigalAdapterOptions } from "../core-BpOFk2i9.js";
|
|
2
|
+
//#region src/framework-adapters/vite.d.ts
|
|
3
|
+
type ViteApply = "serve" | "build";
|
|
4
|
+
interface VitePluginLike {
|
|
5
|
+
name: string;
|
|
6
|
+
apply?: ViteApply;
|
|
7
|
+
buildStart?: () => Promise<void>;
|
|
8
|
+
closeBundle?: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
interface RaigalViteOptions extends RaigalAdapterOptions {
|
|
11
|
+
framework?: Extract<RaigalFramework, "vite" | "tanstack-start" | "redwoodsdk" | "t3" | "sveltekit">;
|
|
12
|
+
runOnBuild?: boolean;
|
|
13
|
+
hook?: "buildStart" | "closeBundle";
|
|
14
|
+
}
|
|
15
|
+
type AislopViteOptions = RaigalViteOptions;
|
|
16
|
+
declare const createViteRaigalScripts: (framework?: RaigalViteOptions["framework"]) => Record<string, string>;
|
|
17
|
+
declare const createViteAislopScripts: (framework?: RaigalViteOptions["framework"]) => Record<string, string>;
|
|
18
|
+
declare const createViteRaigalWorkflow: () => string;
|
|
19
|
+
declare const createViteAislopWorkflow: () => string;
|
|
20
|
+
declare const runViteRaigal: (options?: RaigalViteOptions) => Promise<RaigalRunResult>;
|
|
21
|
+
declare const runRaigalVite: (options?: RaigalViteOptions) => Promise<RaigalRunResult>;
|
|
22
|
+
declare const runViteAislop: (options?: RaigalViteOptions) => Promise<RaigalRunResult>;
|
|
23
|
+
declare const raigalVite: (options?: RaigalViteOptions) => VitePluginLike;
|
|
24
|
+
declare const aislopVite: (options?: RaigalViteOptions) => VitePluginLike;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { AislopViteOptions, RaigalViteOptions, VitePluginLike, aislopVite, createViteAislopScripts, createViteAislopWorkflow, createViteRaigalScripts, createViteRaigalWorkflow, raigalVite as default, runRaigalVite, runViteAislop, runViteRaigal };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { n as createRaigalPackageScripts, r as maybeRunRaigal, t as createRaigalCiWorkflow } from "../core-o3KNKhg2.js";
|
|
2
|
+
//#region src/framework-adapters/vite.ts
|
|
3
|
+
const createViteRaigalScripts = (framework = "vite") => {
|
|
4
|
+
const scripts = createRaigalPackageScripts(framework);
|
|
5
|
+
scripts["raigal:build-gate"] = "raigal ci --changes";
|
|
6
|
+
scripts["aislop:build-gate"] = "raigal ci --changes";
|
|
7
|
+
return scripts;
|
|
8
|
+
};
|
|
9
|
+
const createViteAislopScripts = createViteRaigalScripts;
|
|
10
|
+
const createViteRaigalWorkflow = () => createRaigalCiWorkflow();
|
|
11
|
+
const createViteAislopWorkflow = createViteRaigalWorkflow;
|
|
12
|
+
const runViteRaigal = async (options = {}) => {
|
|
13
|
+
return maybeRunRaigal(options.framework ?? "vite", {
|
|
14
|
+
...options,
|
|
15
|
+
enabled: options.enabled ?? options.runOnBuild ?? false
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const runRaigalVite = runViteRaigal;
|
|
19
|
+
const runViteAislop = runViteRaigal;
|
|
20
|
+
const raigalVite = (options = {}) => {
|
|
21
|
+
const hook = options.hook ?? "closeBundle";
|
|
22
|
+
const run = async () => {
|
|
23
|
+
await runViteRaigal(options);
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
name: "raigal:vite",
|
|
27
|
+
apply: "build",
|
|
28
|
+
...hook === "buildStart" ? { buildStart: run } : { closeBundle: run }
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const aislopVite = raigalVite;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { aislopVite, createViteAislopScripts, createViteAislopWorkflow, createViteRaigalScripts, createViteRaigalWorkflow, raigalVite as default, runRaigalVite, runViteAislop, runViteRaigal };
|
package/dist/cli.d.ts
ADDED