@aayambansal/squint 0.1.3 → 0.2.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/{cdp-R7Y2XSZQ.js → cdp-RTWPFIX5.js} +1 -1
- package/dist/{chrome-4WNYZZ42.js → chrome-K4BKFOYS.js} +2 -2
- package/dist/{chunk-MOYLED4S.js → chunk-4MMIJXYD.js} +2 -2
- package/dist/{chunk-UHVE42IQ.js → chunk-7XUORM3K.js} +1 -1
- package/dist/{chunk-43VZK47W.js → chunk-DLCRYRWQ.js} +4 -0
- package/dist/{chunk-MGHJSERZ.js → chunk-FPTBBHOH.js} +1 -1
- package/dist/{chunk-YIVPCWSG.js → chunk-MCYQXOE7.js} +9 -5
- package/dist/{chunk-ABF4QAMZ.js → chunk-VJGE7HSP.js} +8 -5
- package/dist/{chunk-MURKQ7SI.js → chunk-Z46MXU64.js} +3 -3
- package/dist/{chunk-FQDSJRTY.js → chunk-ZJOU46X4.js} +1 -1
- package/dist/cli.js +985 -457
- package/dist/{gates-G5DABJWQ.js → gates-I2GGQGMA.js} +3 -1
- package/dist/{preview-AA6YIE5W.js → preview-LTWJK3LF.js} +4 -4
- package/dist/{shots-ADBOBALL.js → shots-VJBLDMF3.js} +5 -5
- package/dist/{variants-VVIYT7WI.js → variants-4NCQXTP7.js} +3 -3
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
cdpCapture,
|
|
4
4
|
hasWebSocket
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VJGE7HSP.js";
|
|
6
6
|
import {
|
|
7
7
|
findChrome,
|
|
8
8
|
screenshot
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Z46MXU64.js";
|
|
10
10
|
|
|
11
11
|
// src/preview/preview.ts
|
|
12
12
|
import fs2 from "fs";
|
|
@@ -48,6 +48,9 @@ function detectGates(cwd) {
|
|
|
48
48
|
}
|
|
49
49
|
return gates;
|
|
50
50
|
}
|
|
51
|
+
function detectFastGates(cwd) {
|
|
52
|
+
return detectGates(cwd).filter((gate) => gate.id === "typecheck" || gate.id === "lint");
|
|
53
|
+
}
|
|
51
54
|
var TAIL_LINES = 40;
|
|
52
55
|
var GATE_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
53
56
|
function runGate(cwd, gate) {
|
|
@@ -112,6 +115,7 @@ After fixing, the failing commands above must pass.`;
|
|
|
112
115
|
|
|
113
116
|
export {
|
|
114
117
|
detectGates,
|
|
118
|
+
detectFastGates,
|
|
115
119
|
runGate,
|
|
116
120
|
runGates,
|
|
117
121
|
buildGatePrompt
|
|
@@ -139,6 +139,7 @@ var claude = {
|
|
|
139
139
|
install: "npm install -g @anthropic-ai/claude-code",
|
|
140
140
|
supportsResume: true,
|
|
141
141
|
buildArgs(opts) {
|
|
142
|
+
const permissionMode = opts.mode === "plan" ? "plan" : opts.mode === "yolo" ? "bypassPermissions" : "acceptEdits";
|
|
142
143
|
const args = [
|
|
143
144
|
"-p",
|
|
144
145
|
opts.prompt,
|
|
@@ -147,7 +148,7 @@ var claude = {
|
|
|
147
148
|
"--verbose",
|
|
148
149
|
"--include-partial-messages",
|
|
149
150
|
"--permission-mode",
|
|
150
|
-
|
|
151
|
+
permissionMode
|
|
151
152
|
];
|
|
152
153
|
if (opts.model) args.push("--model", opts.model);
|
|
153
154
|
if (opts.sessionId) args.push("--resume", opts.sessionId);
|
|
@@ -164,9 +165,10 @@ var codex = {
|
|
|
164
165
|
install: "npm install -g @openai/codex",
|
|
165
166
|
supportsResume: true,
|
|
166
167
|
buildArgs(opts) {
|
|
168
|
+
const sandbox = opts.mode === "plan" ? "read-only" : opts.mode === "yolo" ? "danger-full-access" : "workspace-write";
|
|
167
169
|
const args = ["exec"];
|
|
168
170
|
if (opts.sessionId) args.push("resume", opts.sessionId);
|
|
169
|
-
args.push("--json", "--sandbox",
|
|
171
|
+
args.push("--json", "--sandbox", sandbox, "--skip-git-repo-check");
|
|
170
172
|
if (opts.model) args.push("--model", opts.model);
|
|
171
173
|
args.push(opts.prompt);
|
|
172
174
|
return args;
|
|
@@ -278,7 +280,9 @@ var cursor = {
|
|
|
278
280
|
install: "curl https://cursor.com/install -fsS | bash",
|
|
279
281
|
supportsResume: true,
|
|
280
282
|
buildArgs(opts) {
|
|
281
|
-
const args = ["-p", opts.prompt, "--output-format", "stream-json"
|
|
283
|
+
const args = ["-p", opts.prompt, "--output-format", "stream-json"];
|
|
284
|
+
if (opts.mode === "plan") args.push("--mode", "plan");
|
|
285
|
+
else args.push("--force");
|
|
282
286
|
if (opts.model) args.push("--model", opts.model);
|
|
283
287
|
if (opts.sessionId) args.push(`--resume=${opts.sessionId}`);
|
|
284
288
|
return args;
|
|
@@ -294,7 +298,8 @@ var gemini = {
|
|
|
294
298
|
install: "npm install -g @google/gemini-cli",
|
|
295
299
|
supportsResume: false,
|
|
296
300
|
buildArgs(opts) {
|
|
297
|
-
const
|
|
301
|
+
const approval = opts.mode === "plan" ? "plan" : opts.mode === "yolo" ? "yolo" : "auto_edit";
|
|
302
|
+
const args = ["-p", opts.prompt, "--approval-mode", approval];
|
|
298
303
|
if (opts.model) args.push("-m", opts.model);
|
|
299
304
|
return args;
|
|
300
305
|
}
|
|
@@ -394,7 +399,6 @@ function detectEngines() {
|
|
|
394
399
|
export {
|
|
395
400
|
lineSplitter,
|
|
396
401
|
truncate,
|
|
397
|
-
engines,
|
|
398
402
|
getEngine,
|
|
399
403
|
findBinary,
|
|
400
404
|
findEngineBinary,
|
|
@@ -113,7 +113,7 @@ function launchChrome(chromePath) {
|
|
|
113
113
|
[
|
|
114
114
|
"--headless=new",
|
|
115
115
|
"--disable-gpu",
|
|
116
|
-
...process.env.CI ? ["--no-sandbox"] : [],
|
|
116
|
+
...process.env.CI ? ["--no-sandbox", "--disable-dev-shm-usage"] : [],
|
|
117
117
|
"--no-first-run",
|
|
118
118
|
"--remote-debugging-port=0",
|
|
119
119
|
`--user-data-dir=${profileDir}`,
|
|
@@ -122,10 +122,13 @@ function launchChrome(chromePath) {
|
|
|
122
122
|
{ stdio: ["ignore", "ignore", "pipe"] }
|
|
123
123
|
);
|
|
124
124
|
let stderr = "";
|
|
125
|
-
const timer = setTimeout(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
const timer = setTimeout(
|
|
126
|
+
() => {
|
|
127
|
+
child.kill("SIGKILL");
|
|
128
|
+
reject(new Error("Chrome did not announce DevTools endpoint"));
|
|
129
|
+
},
|
|
130
|
+
process.env.CI ? 45e3 : 15e3
|
|
131
|
+
);
|
|
129
132
|
child.stderr.setEncoding("utf8");
|
|
130
133
|
child.stderr.on("data", (chunk) => {
|
|
131
134
|
stderr += chunk;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
findBinary
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MCYQXOE7.js";
|
|
5
5
|
|
|
6
6
|
// src/preview/chrome.ts
|
|
7
7
|
import { spawn } from "child_process";
|
|
@@ -34,8 +34,8 @@ function screenshot(chromePath, url, outPath, opts) {
|
|
|
34
34
|
const args = [
|
|
35
35
|
"--headless=new",
|
|
36
36
|
"--disable-gpu",
|
|
37
|
-
// CI
|
|
38
|
-
...process.env.CI ? ["--no-sandbox"] : [],
|
|
37
|
+
// CI containers need these; local runs keep the sandbox and shm.
|
|
38
|
+
...process.env.CI ? ["--no-sandbox", "--disable-dev-shm-usage"] : [],
|
|
39
39
|
"--hide-scrollbars",
|
|
40
40
|
"--force-device-scale-factor=1",
|
|
41
41
|
`--window-size=${opts.width},${opts.height}`,
|