@fairfox/polly 0.1.2 → 0.1.4
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/{cli/polly.ts → dist/cli/polly.js} +100 -206
- package/dist/cli/polly.js.map +10 -0
- package/dist/scripts/build-extension.js +137 -0
- package/dist/scripts/build-extension.js.map +10 -0
- package/dist/vendor/verify/src/cli.js +2089 -0
- package/dist/vendor/verify/src/cli.js.map +16 -0
- package/dist/vendor/visualize/src/cli.js +2204 -0
- package/dist/vendor/visualize/src/cli.js.map +19 -0
- package/package.json +12 -12
- package/vendor/analysis/src/extract/adr.ts +0 -212
- package/vendor/analysis/src/extract/architecture.ts +0 -160
- package/vendor/analysis/src/extract/contexts.ts +0 -298
- package/vendor/analysis/src/extract/flows.ts +0 -309
- package/vendor/analysis/src/extract/handlers.ts +0 -321
- package/vendor/analysis/src/extract/index.ts +0 -9
- package/vendor/analysis/src/extract/integrations.ts +0 -329
- package/vendor/analysis/src/extract/manifest.ts +0 -298
- package/vendor/analysis/src/extract/types.ts +0 -389
- package/vendor/analysis/src/index.ts +0 -7
- package/vendor/analysis/src/types/adr.ts +0 -53
- package/vendor/analysis/src/types/architecture.ts +0 -245
- package/vendor/analysis/src/types/core.ts +0 -210
- package/vendor/analysis/src/types/index.ts +0 -18
- package/vendor/verify/src/adapters/base.ts +0 -164
- package/vendor/verify/src/adapters/detection.ts +0 -281
- package/vendor/verify/src/adapters/event-bus/index.ts +0 -480
- package/vendor/verify/src/adapters/web-extension/index.ts +0 -508
- package/vendor/verify/src/adapters/websocket/index.ts +0 -486
- package/vendor/verify/src/cli.ts +0 -430
- package/vendor/verify/src/codegen/config.ts +0 -354
- package/vendor/verify/src/codegen/tla.ts +0 -719
- package/vendor/verify/src/config/parser.ts +0 -303
- package/vendor/verify/src/config/types.ts +0 -113
- package/vendor/verify/src/core/model.ts +0 -267
- package/vendor/verify/src/core/primitives.ts +0 -106
- package/vendor/verify/src/extract/handlers.ts +0 -2
- package/vendor/verify/src/extract/types.ts +0 -2
- package/vendor/verify/src/index.ts +0 -150
- package/vendor/verify/src/primitives/index.ts +0 -102
- package/vendor/verify/src/runner/docker.ts +0 -283
- package/vendor/verify/src/types.ts +0 -51
- package/vendor/visualize/src/cli.ts +0 -365
- package/vendor/visualize/src/codegen/structurizr.ts +0 -770
- package/vendor/visualize/src/index.ts +0 -13
- package/vendor/visualize/src/runner/export.ts +0 -235
- package/vendor/visualize/src/viewer/server.ts +0 -485
- /package/dist/{background → src/background}/index.js +0 -0
- /package/dist/{background → src/background}/index.js.map +0 -0
- /package/dist/{background → src/background}/message-router.js +0 -0
- /package/dist/{background → src/background}/message-router.js.map +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{index.js.map → src/index.js.map} +0 -0
- /package/dist/{shared → src/shared}/adapters/index.js +0 -0
- /package/dist/{shared → src/shared}/adapters/index.js.map +0 -0
- /package/dist/{shared → src/shared}/lib/context-helpers.js +0 -0
- /package/dist/{shared → src/shared}/lib/context-helpers.js.map +0 -0
- /package/dist/{shared → src/shared}/lib/errors.js +0 -0
- /package/dist/{shared → src/shared}/lib/errors.js.map +0 -0
- /package/dist/{shared → src/shared}/lib/message-bus.js +0 -0
- /package/dist/{shared → src/shared}/lib/message-bus.js.map +0 -0
- /package/dist/{shared → src/shared}/lib/state.js +0 -0
- /package/dist/{shared → src/shared}/lib/state.js.map +0 -0
- /package/dist/{shared → src/shared}/lib/test-helpers.js +0 -0
- /package/dist/{shared → src/shared}/lib/test-helpers.js.map +0 -0
- /package/dist/{shared → src/shared}/state/app-state.js +0 -0
- /package/dist/{shared → src/shared}/state/app-state.js.map +0 -0
- /package/dist/{shared → src/shared}/types/messages.js +0 -0
- /package/dist/{shared → src/shared}/types/messages.js.map +0 -0
|
@@ -1,65 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
2
|
+
// @bun
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
10
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
11
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
12
|
+
for (let key of __getOwnPropNames(mod))
|
|
13
|
+
if (!__hasOwnProp.call(to, key))
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: () => mod[key],
|
|
16
|
+
enumerable: true
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, {
|
|
23
|
+
get: all[name],
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
set: (newValue) => all[name] = () => newValue
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
30
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
|
+
|
|
32
|
+
// cli/polly.ts
|
|
33
|
+
var __dirname2 = import.meta.dir;
|
|
34
|
+
var command = process.argv[2];
|
|
35
|
+
var commandArgs = process.argv.slice(3);
|
|
36
|
+
var cwd = process.cwd();
|
|
37
|
+
var args = {
|
|
38
38
|
prod: process.argv.includes("--prod"),
|
|
39
|
-
config: process.argv.includes("--config")
|
|
40
|
-
? process.argv[process.argv.indexOf("--config") + 1]
|
|
41
|
-
: undefined,
|
|
39
|
+
config: process.argv.includes("--config") ? process.argv[process.argv.indexOf("--config") + 1] : undefined
|
|
42
40
|
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Load user's configuration
|
|
46
|
-
*/
|
|
47
41
|
async function loadConfig() {
|
|
48
42
|
const configPaths = [
|
|
49
43
|
args.config,
|
|
50
44
|
`${cwd}/polly.config.ts`,
|
|
51
45
|
`${cwd}/polly.config.js`,
|
|
52
|
-
`${cwd}/polly.config.mjs
|
|
53
|
-
].filter(Boolean)
|
|
54
|
-
|
|
46
|
+
`${cwd}/polly.config.mjs`
|
|
47
|
+
].filter(Boolean);
|
|
55
48
|
for (const configPath of configPaths) {
|
|
56
|
-
// Use Bun.file().exists() instead of existsSync
|
|
57
49
|
if (await Bun.file(configPath).exists()) {
|
|
58
50
|
try {
|
|
59
51
|
const config = await import(configPath);
|
|
60
52
|
return config.default || config;
|
|
61
53
|
} catch (error) {
|
|
62
|
-
console.error(
|
|
54
|
+
console.error(`\u274C Failed to load config: ${configPath}`);
|
|
63
55
|
throw error;
|
|
64
56
|
}
|
|
65
57
|
}
|
|
@@ -67,174 +59,118 @@ async function loadConfig() {
|
|
|
67
59
|
return {
|
|
68
60
|
srcDir: "src",
|
|
69
61
|
distDir: "dist",
|
|
70
|
-
manifest: "manifest.json"
|
|
62
|
+
manifest: "manifest.json"
|
|
71
63
|
};
|
|
72
64
|
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Build command - build the extension
|
|
76
|
-
*/
|
|
77
65
|
async function build() {
|
|
78
66
|
const config = await loadConfig();
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const buildScriptPath =
|
|
82
|
-
|
|
83
|
-
// Pass config via environment
|
|
67
|
+
const bundledScript = `${__dirname2}/../scripts/build-extension.js`;
|
|
68
|
+
const monorepoScript = `${__dirname2}/../scripts/build-extension.ts`;
|
|
69
|
+
const buildScriptPath = await Bun.file(bundledScript).exists() ? bundledScript : monorepoScript;
|
|
84
70
|
process.env["WEB_EXT_SRC"] = `${cwd}/${config.srcDir || "src"}`;
|
|
85
71
|
process.env["WEB_EXT_DIST"] = `${cwd}/${config.distDir || "dist"}`;
|
|
86
72
|
process.env["WEB_EXT_MANIFEST"] = `${cwd}/${config.manifest || "manifest.json"}`;
|
|
87
73
|
process.env["WEB_EXT_CWD"] = cwd;
|
|
88
74
|
process.env["WEB_EXT_PROD"] = args.prod ? "true" : "false";
|
|
89
|
-
|
|
90
|
-
// Run build
|
|
91
75
|
const proc = Bun.spawn(["bun", buildScriptPath], {
|
|
92
76
|
cwd,
|
|
93
77
|
stdout: "inherit",
|
|
94
|
-
stderr: "inherit"
|
|
78
|
+
stderr: "inherit"
|
|
95
79
|
});
|
|
96
|
-
|
|
97
80
|
const exitCode = await proc.exited;
|
|
98
81
|
if (exitCode !== 0) {
|
|
99
82
|
process.exit(exitCode);
|
|
100
83
|
}
|
|
101
84
|
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Dev command - build with watch mode
|
|
105
|
-
*/
|
|
106
85
|
async function dev() {
|
|
107
86
|
await build();
|
|
108
87
|
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Verify command - delegate to @fairfox/web-ext-verify
|
|
112
|
-
*/
|
|
113
88
|
async function verify() {
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
const verifyCli = (await Bun.file(vendorCli).exists()) ? vendorCli : monorepoCli;
|
|
118
|
-
|
|
89
|
+
const bundledCli = `${__dirname2}/../vendor/verify/src/cli.js`;
|
|
90
|
+
const monorepoCli = `${__dirname2}/../../verify/src/cli.ts`;
|
|
91
|
+
const verifyCli = await Bun.file(bundledCli).exists() ? bundledCli : monorepoCli;
|
|
119
92
|
const proc = Bun.spawn(["bun", verifyCli, ...commandArgs], {
|
|
120
93
|
cwd,
|
|
121
94
|
stdout: "inherit",
|
|
122
95
|
stderr: "inherit",
|
|
123
|
-
stdin: "inherit"
|
|
96
|
+
stdin: "inherit"
|
|
124
97
|
});
|
|
125
|
-
|
|
126
98
|
const exitCode = await proc.exited;
|
|
127
99
|
if (exitCode !== 0) {
|
|
128
100
|
throw new Error(`Verification failed with exit code ${exitCode}`);
|
|
129
101
|
}
|
|
130
102
|
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Visualize command - delegate to @fairfox/polly-visualize
|
|
134
|
-
*/
|
|
135
103
|
async function visualize() {
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
const visualizeCli = (await Bun.file(vendorCli).exists()) ? vendorCli : monorepoCli;
|
|
140
|
-
|
|
104
|
+
const bundledCli = `${__dirname2}/../vendor/visualize/src/cli.js`;
|
|
105
|
+
const monorepoCli = `${__dirname2}/../../visualize/src/cli.ts`;
|
|
106
|
+
const visualizeCli = await Bun.file(bundledCli).exists() ? bundledCli : monorepoCli;
|
|
141
107
|
const proc = Bun.spawn(["bun", visualizeCli, ...commandArgs], {
|
|
142
108
|
cwd,
|
|
143
109
|
stdout: "inherit",
|
|
144
110
|
stderr: "inherit",
|
|
145
|
-
stdin: "inherit"
|
|
111
|
+
stdin: "inherit"
|
|
146
112
|
});
|
|
147
|
-
|
|
148
113
|
const exitCode = await proc.exited;
|
|
149
114
|
if (exitCode !== 0) {
|
|
150
115
|
throw new Error(`Visualization failed with exit code ${exitCode}`);
|
|
151
116
|
}
|
|
152
117
|
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Typecheck command - run TypeScript type checking
|
|
156
|
-
*/
|
|
157
118
|
async function typecheck() {
|
|
158
119
|
const proc = Bun.spawn(["bunx", "tsc", "--noEmit"], {
|
|
159
120
|
cwd,
|
|
160
121
|
stdout: "inherit",
|
|
161
|
-
stderr: "inherit"
|
|
122
|
+
stderr: "inherit"
|
|
162
123
|
});
|
|
163
|
-
|
|
164
124
|
const exitCode = await proc.exited;
|
|
165
125
|
if (exitCode !== 0) {
|
|
166
126
|
throw new Error(`Type checking failed with exit code ${exitCode}`);
|
|
167
127
|
}
|
|
168
128
|
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Lint command - run Biome linter
|
|
172
|
-
*/
|
|
173
129
|
async function lint() {
|
|
174
130
|
const fix = commandArgs.includes("--fix");
|
|
175
131
|
const lintArgs = fix ? ["check", "--write", "."] : ["check", "."];
|
|
176
|
-
|
|
177
132
|
const proc = Bun.spawn(["bunx", "@biomejs/biome", ...lintArgs], {
|
|
178
133
|
cwd,
|
|
179
134
|
stdout: "inherit",
|
|
180
|
-
stderr: "inherit"
|
|
135
|
+
stderr: "inherit"
|
|
181
136
|
});
|
|
182
|
-
|
|
183
137
|
const exitCode = await proc.exited;
|
|
184
138
|
if (exitCode !== 0) {
|
|
185
139
|
throw new Error(`Linting failed with exit code ${exitCode}`);
|
|
186
140
|
}
|
|
187
141
|
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Format command - run Biome formatter
|
|
191
|
-
*/
|
|
192
142
|
async function format() {
|
|
193
143
|
const proc = Bun.spawn(["bunx", "@biomejs/biome", "format", "--write", "."], {
|
|
194
144
|
cwd,
|
|
195
145
|
stdout: "inherit",
|
|
196
|
-
stderr: "inherit"
|
|
146
|
+
stderr: "inherit"
|
|
197
147
|
});
|
|
198
|
-
|
|
199
148
|
const exitCode = await proc.exited;
|
|
200
149
|
if (exitCode !== 0) {
|
|
201
150
|
throw new Error(`Formatting failed with exit code ${exitCode}`);
|
|
202
151
|
}
|
|
203
152
|
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Test command - run Bun tests
|
|
207
|
-
*/
|
|
208
153
|
async function test() {
|
|
209
154
|
const proc = Bun.spawn(["bun", "test", ...commandArgs], {
|
|
210
155
|
cwd,
|
|
211
156
|
stdout: "pipe",
|
|
212
157
|
stderr: "pipe",
|
|
213
|
-
stdin: "inherit"
|
|
158
|
+
stdin: "inherit"
|
|
214
159
|
});
|
|
215
|
-
|
|
216
160
|
const stdout = await new Response(proc.stdout).text();
|
|
217
161
|
const stderr = await new Response(proc.stderr).text();
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (
|
|
221
|
-
|
|
222
|
-
|
|
162
|
+
if (stdout)
|
|
163
|
+
process.stdout.write(stdout);
|
|
164
|
+
if (stderr)
|
|
165
|
+
process.stderr.write(stderr);
|
|
223
166
|
const exitCode = await proc.exited;
|
|
224
|
-
|
|
225
|
-
// Check if no tests were found (not a failure)
|
|
226
167
|
if (stderr.includes("0 test files matching")) {
|
|
227
168
|
return;
|
|
228
169
|
}
|
|
229
|
-
|
|
230
170
|
if (exitCode !== 0) {
|
|
231
171
|
throw new Error(`Tests failed with exit code ${exitCode}`);
|
|
232
172
|
}
|
|
233
173
|
}
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Check command - run all quality checks in sequence
|
|
237
|
-
*/
|
|
238
174
|
async function check() {
|
|
239
175
|
const checks = [
|
|
240
176
|
{ name: "Type checking", fn: typecheck },
|
|
@@ -242,9 +178,8 @@ async function check() {
|
|
|
242
178
|
{ name: "Testing", fn: test },
|
|
243
179
|
{ name: "Building", fn: build },
|
|
244
180
|
{ name: "Verification", fn: verify, optional: true },
|
|
245
|
-
{ name: "Visualization", fn: visualize, optional: true }
|
|
181
|
+
{ name: "Visualization", fn: visualize, optional: true }
|
|
246
182
|
];
|
|
247
|
-
|
|
248
183
|
for (const { name, fn, optional } of checks) {
|
|
249
184
|
try {
|
|
250
185
|
await fn();
|
|
@@ -252,40 +187,31 @@ async function check() {
|
|
|
252
187
|
if (optional) {
|
|
253
188
|
continue;
|
|
254
189
|
}
|
|
255
|
-
console.error(
|
|
190
|
+
console.error(`
|
|
191
|
+
\x1B[31m\u2717 ${name} failed\x1B[0m
|
|
192
|
+
`);
|
|
256
193
|
process.exit(1);
|
|
257
194
|
}
|
|
258
195
|
}
|
|
259
196
|
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Init command - scaffold a new extension
|
|
263
|
-
*/
|
|
264
197
|
async function init() {
|
|
265
198
|
const projectName = commandArgs[0] || "my-extension";
|
|
266
199
|
const projectPath = `${cwd}/${projectName}`;
|
|
267
|
-
|
|
268
|
-
// Check if directory already exists
|
|
269
|
-
const { existsSync, mkdirSync, writeFileSync } = await import("node:fs");
|
|
270
|
-
|
|
200
|
+
const { existsSync, mkdirSync, writeFileSync } = await import("fs");
|
|
271
201
|
if (existsSync(projectPath)) {
|
|
272
|
-
console.error(`\
|
|
202
|
+
console.error(`\x1B[31m\u2717 Directory '${projectName}' already exists\x1B[0m
|
|
203
|
+
`);
|
|
273
204
|
process.exit(1);
|
|
274
205
|
}
|
|
275
|
-
|
|
276
|
-
// Create project structure
|
|
277
206
|
const dirs = [
|
|
278
207
|
projectPath,
|
|
279
208
|
`${projectPath}/src`,
|
|
280
209
|
`${projectPath}/src/background`,
|
|
281
|
-
`${projectPath}/src/popup
|
|
210
|
+
`${projectPath}/src/popup`
|
|
282
211
|
];
|
|
283
|
-
|
|
284
212
|
for (const dir of dirs) {
|
|
285
213
|
mkdirSync(dir, { recursive: true });
|
|
286
214
|
}
|
|
287
|
-
|
|
288
|
-
// Create package.json
|
|
289
215
|
const packageJson = {
|
|
290
216
|
name: projectName,
|
|
291
217
|
version: "0.1.0",
|
|
@@ -303,16 +229,13 @@ async function init() {
|
|
|
303
229
|
"verify:setup": "web-ext verify --setup",
|
|
304
230
|
visualize: "web-ext visualize",
|
|
305
231
|
"visualize:export": "web-ext visualize --export",
|
|
306
|
-
"visualize:serve": "web-ext visualize --serve"
|
|
232
|
+
"visualize:serve": "web-ext visualize --serve"
|
|
307
233
|
},
|
|
308
234
|
dependencies: {
|
|
309
|
-
"@fairfox/web-ext": "*"
|
|
310
|
-
}
|
|
235
|
+
"@fairfox/web-ext": "*"
|
|
236
|
+
}
|
|
311
237
|
};
|
|
312
|
-
|
|
313
238
|
writeFileSync(`${projectPath}/package.json`, JSON.stringify(packageJson, null, 2));
|
|
314
|
-
|
|
315
|
-
// Create manifest.json at root
|
|
316
239
|
const manifest = {
|
|
317
240
|
manifest_version: 3,
|
|
318
241
|
name: projectName,
|
|
@@ -320,17 +243,14 @@ async function init() {
|
|
|
320
243
|
description: "A Chrome extension built with @fairfox/web-ext",
|
|
321
244
|
background: {
|
|
322
245
|
service_worker: "background/index.js",
|
|
323
|
-
type: "module"
|
|
246
|
+
type: "module"
|
|
324
247
|
},
|
|
325
248
|
action: {
|
|
326
|
-
default_popup: "popup/popup.html"
|
|
249
|
+
default_popup: "popup/popup.html"
|
|
327
250
|
},
|
|
328
|
-
permissions: ["storage"]
|
|
251
|
+
permissions: ["storage"]
|
|
329
252
|
};
|
|
330
|
-
|
|
331
253
|
writeFileSync(`${projectPath}/manifest.json`, JSON.stringify(manifest, null, 2));
|
|
332
|
-
|
|
333
|
-
// Create background script
|
|
334
254
|
const backgroundScript = `/**
|
|
335
255
|
* Background Service Worker
|
|
336
256
|
*/
|
|
@@ -348,10 +268,7 @@ bus.on("PING", async () => {
|
|
|
348
268
|
|
|
349
269
|
console.log("Background service worker initialized");
|
|
350
270
|
`;
|
|
351
|
-
|
|
352
271
|
writeFileSync(`${projectPath}/src/background/index.ts`, backgroundScript);
|
|
353
|
-
|
|
354
|
-
// Create popup HTML in src/popup
|
|
355
272
|
const popupHtml = `<!DOCTYPE html>
|
|
356
273
|
<html>
|
|
357
274
|
<head>
|
|
@@ -364,10 +281,7 @@ console.log("Background service worker initialized");
|
|
|
364
281
|
</body>
|
|
365
282
|
</html>
|
|
366
283
|
`;
|
|
367
|
-
|
|
368
284
|
writeFileSync(`${projectPath}/src/popup/popup.html`, popupHtml);
|
|
369
|
-
|
|
370
|
-
// Create popup script
|
|
371
285
|
const popupScript = `/**
|
|
372
286
|
* Popup UI
|
|
373
287
|
*/
|
|
@@ -399,10 +313,7 @@ if (root) {
|
|
|
399
313
|
});
|
|
400
314
|
}
|
|
401
315
|
`;
|
|
402
|
-
|
|
403
316
|
writeFileSync(`${projectPath}/src/popup/index.ts`, popupScript);
|
|
404
|
-
|
|
405
|
-
// Create tsconfig.json
|
|
406
317
|
const tsconfig = {
|
|
407
318
|
compilerOptions: {
|
|
408
319
|
target: "ES2022",
|
|
@@ -416,35 +327,29 @@ if (root) {
|
|
|
416
327
|
resolveJsonModule: true,
|
|
417
328
|
allowSyntheticDefaultImports: true,
|
|
418
329
|
jsx: "react-jsx",
|
|
419
|
-
jsxImportSource: "preact"
|
|
330
|
+
jsxImportSource: "preact"
|
|
420
331
|
},
|
|
421
|
-
include: ["src/**/*"]
|
|
332
|
+
include: ["src/**/*"]
|
|
422
333
|
};
|
|
423
|
-
|
|
424
334
|
writeFileSync(`${projectPath}/tsconfig.json`, JSON.stringify(tsconfig, null, 2));
|
|
425
|
-
|
|
426
|
-
// Create biome.json
|
|
427
335
|
const biomeConfig = {
|
|
428
336
|
files: {
|
|
429
337
|
includes: ["src/**/*.ts", "src/**/*.tsx"],
|
|
430
|
-
ignoreUnknown: true
|
|
338
|
+
ignoreUnknown: true
|
|
431
339
|
},
|
|
432
340
|
linter: {
|
|
433
341
|
enabled: true,
|
|
434
342
|
rules: {
|
|
435
|
-
recommended: true
|
|
436
|
-
}
|
|
343
|
+
recommended: true
|
|
344
|
+
}
|
|
437
345
|
},
|
|
438
346
|
formatter: {
|
|
439
347
|
enabled: true,
|
|
440
348
|
indentStyle: "space",
|
|
441
|
-
indentWidth: 2
|
|
442
|
-
}
|
|
349
|
+
indentWidth: 2
|
|
350
|
+
}
|
|
443
351
|
};
|
|
444
|
-
|
|
445
352
|
writeFileSync(`${projectPath}/biome.json`, JSON.stringify(biomeConfig, null, 2));
|
|
446
|
-
|
|
447
|
-
// Create README
|
|
448
353
|
const readme = `# ${projectName}
|
|
449
354
|
|
|
450
355
|
A Chrome extension built with [@fairfox/web-ext](https://github.com/fairfox/web-ext).
|
|
@@ -481,42 +386,28 @@ A Chrome extension built with [@fairfox/web-ext](https://github.com/fairfox/web-
|
|
|
481
386
|
|
|
482
387
|
\`\`\`
|
|
483
388
|
${projectName}/
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
389
|
+
\u251C\u2500\u2500 src/
|
|
390
|
+
\u2502 \u251C\u2500\u2500 background/
|
|
391
|
+
\u2502 \u2502 \u2514\u2500\u2500 index.ts # Background service worker
|
|
392
|
+
\u2502 \u2514\u2500\u2500 popup/
|
|
393
|
+
\u2502 \u251C\u2500\u2500 popup.html # Popup HTML
|
|
394
|
+
\u2502 \u2514\u2500\u2500 index.ts # Popup script
|
|
395
|
+
\u251C\u2500\u2500 manifest.json # Extension manifest
|
|
396
|
+
\u251C\u2500\u2500 dist/ # Build output (load this in Chrome)
|
|
397
|
+
\u251C\u2500\u2500 package.json
|
|
398
|
+
\u251C\u2500\u2500 tsconfig.json
|
|
399
|
+
\u2514\u2500\u2500 biome.json
|
|
495
400
|
\`\`\`
|
|
496
401
|
`;
|
|
497
|
-
|
|
498
402
|
writeFileSync(`${projectPath}/README.md`, readme);
|
|
499
|
-
|
|
500
|
-
// Create .gitignore
|
|
501
403
|
const gitignore = `node_modules
|
|
502
404
|
dist
|
|
503
405
|
docs
|
|
504
406
|
.DS_Store
|
|
505
407
|
`;
|
|
506
|
-
|
|
507
408
|
writeFileSync(`${projectPath}/.gitignore`, gitignore);
|
|
508
409
|
}
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Help command
|
|
512
|
-
*/
|
|
513
|
-
function help() {
|
|
514
|
-
// Help is shown automatically via commander
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Main entry point
|
|
519
|
-
*/
|
|
410
|
+
function help() {}
|
|
520
411
|
async function main() {
|
|
521
412
|
try {
|
|
522
413
|
switch (command) {
|
|
@@ -557,14 +448,17 @@ async function main() {
|
|
|
557
448
|
help();
|
|
558
449
|
break;
|
|
559
450
|
default:
|
|
560
|
-
console.error(
|
|
451
|
+
console.error(`\u274C Unknown command: ${command}
|
|
452
|
+
`);
|
|
561
453
|
help();
|
|
562
454
|
process.exit(1);
|
|
563
455
|
}
|
|
564
456
|
} catch (error) {
|
|
565
|
-
console.error(
|
|
457
|
+
console.error(`
|
|
458
|
+
\u274C Command failed:`, error);
|
|
566
459
|
process.exit(1);
|
|
567
460
|
}
|
|
568
461
|
}
|
|
569
|
-
|
|
570
462
|
main();
|
|
463
|
+
|
|
464
|
+
//# debugId=BB7E0889114F14F064756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../cli/polly.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"#!/usr/bin/env bun\n/**\n * Polly CLI\n *\n * Command-line tool for building multi-execution-context applications\n * with reactive state and cross-context messaging.\n *\n * Supports: Chrome extensions, PWAs, Node/Bun/Deno apps with workers\n *\n * Usage:\n * polly init [name] Create a new project\n * polly check Run all checks (typecheck, lint, test, build)\n * polly build [options] Build the project\n * polly dev Build with watch mode\n * polly typecheck Type check your code\n * polly lint [--fix] Lint your code\n * polly format Format your code\n * polly test [args] Run tests (requires bun test)\n * polly verify [args] Run formal verification\n * polly visualize [args] Generate architecture diagrams\n * polly help Show help\n *\n * Options:\n * --prod Build for production (minified)\n * --config <path> Path to config file (default: polly.config.ts)\n * --fix Auto-fix lint/format issues\n */\n\n// Use Bun built-ins instead of Node.js APIs\nconst __dirname = import.meta.dir;\n\nconst command = process.argv[2];\nconst commandArgs = process.argv.slice(3);\nconst cwd = process.cwd();\n\n// Parse arguments\nconst args = {\n prod: process.argv.includes(\"--prod\"),\n config: process.argv.includes(\"--config\")\n ? process.argv[process.argv.indexOf(\"--config\") + 1]\n : undefined,\n};\n\n/**\n * Load user's configuration\n */\nasync function loadConfig() {\n const configPaths = [\n args.config,\n `${cwd}/polly.config.ts`,\n `${cwd}/polly.config.js`,\n `${cwd}/polly.config.mjs`,\n ].filter(Boolean) as string[];\n\n for (const configPath of configPaths) {\n // Use Bun.file().exists() instead of existsSync\n if (await Bun.file(configPath).exists()) {\n try {\n const config = await import(configPath);\n return config.default || config;\n } catch (error) {\n console.error(`❌ Failed to load config: ${configPath}`);\n throw error;\n }\n }\n }\n return {\n srcDir: \"src\",\n distDir: \"dist\",\n manifest: \"manifest.json\",\n };\n}\n\n/**\n * Build command - build the extension\n */\nasync function build() {\n const config = await loadConfig();\n\n // Check if bundled (published) or in monorepo\n const bundledScript = `${__dirname}/../scripts/build-extension.js`;\n const monorepoScript = `${__dirname}/../scripts/build-extension.ts`;\n const buildScriptPath = (await Bun.file(bundledScript).exists()) ? bundledScript : monorepoScript;\n\n // Pass config via environment\n process.env[\"WEB_EXT_SRC\"] = `${cwd}/${config.srcDir || \"src\"}`;\n process.env[\"WEB_EXT_DIST\"] = `${cwd}/${config.distDir || \"dist\"}`;\n process.env[\"WEB_EXT_MANIFEST\"] = `${cwd}/${config.manifest || \"manifest.json\"}`;\n process.env[\"WEB_EXT_CWD\"] = cwd;\n process.env[\"WEB_EXT_PROD\"] = args.prod ? \"true\" : \"false\";\n\n // Run build\n const proc = Bun.spawn([\"bun\", buildScriptPath], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n process.exit(exitCode);\n }\n}\n\n/**\n * Dev command - build with watch mode\n */\nasync function dev() {\n await build();\n}\n\n/**\n * Verify command - delegate to @fairfox/web-ext-verify\n */\nasync function verify() {\n // Check if bundled (published) or in monorepo\n const bundledCli = `${__dirname}/../vendor/verify/src/cli.js`;\n const monorepoCli = `${__dirname}/../../verify/src/cli.ts`;\n const verifyCli = (await Bun.file(bundledCli).exists()) ? bundledCli : monorepoCli;\n\n const proc = Bun.spawn([\"bun\", verifyCli, ...commandArgs], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n stdin: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n throw new Error(`Verification failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Visualize command - delegate to @fairfox/polly-visualize\n */\nasync function visualize() {\n // Check if bundled (published) or in monorepo\n const bundledCli = `${__dirname}/../vendor/visualize/src/cli.js`;\n const monorepoCli = `${__dirname}/../../visualize/src/cli.ts`;\n const visualizeCli = (await Bun.file(bundledCli).exists()) ? bundledCli : monorepoCli;\n\n const proc = Bun.spawn([\"bun\", visualizeCli, ...commandArgs], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n stdin: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n throw new Error(`Visualization failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Typecheck command - run TypeScript type checking\n */\nasync function typecheck() {\n const proc = Bun.spawn([\"bunx\", \"tsc\", \"--noEmit\"], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n throw new Error(`Type checking failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Lint command - run Biome linter\n */\nasync function lint() {\n const fix = commandArgs.includes(\"--fix\");\n const lintArgs = fix ? [\"check\", \"--write\", \".\"] : [\"check\", \".\"];\n\n const proc = Bun.spawn([\"bunx\", \"@biomejs/biome\", ...lintArgs], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n throw new Error(`Linting failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Format command - run Biome formatter\n */\nasync function format() {\n const proc = Bun.spawn([\"bunx\", \"@biomejs/biome\", \"format\", \"--write\", \".\"], {\n cwd,\n stdout: \"inherit\",\n stderr: \"inherit\",\n });\n\n const exitCode = await proc.exited;\n if (exitCode !== 0) {\n throw new Error(`Formatting failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Test command - run Bun tests\n */\nasync function test() {\n const proc = Bun.spawn([\"bun\", \"test\", ...commandArgs], {\n cwd,\n stdout: \"pipe\",\n stderr: \"pipe\",\n stdin: \"inherit\",\n });\n\n const stdout = await new Response(proc.stdout).text();\n const stderr = await new Response(proc.stderr).text();\n\n // Output the results\n if (stdout) process.stdout.write(stdout);\n if (stderr) process.stderr.write(stderr);\n\n const exitCode = await proc.exited;\n\n // Check if no tests were found (not a failure)\n if (stderr.includes(\"0 test files matching\")) {\n return;\n }\n\n if (exitCode !== 0) {\n throw new Error(`Tests failed with exit code ${exitCode}`);\n }\n}\n\n/**\n * Check command - run all quality checks in sequence\n */\nasync function check() {\n const checks = [\n { name: \"Type checking\", fn: typecheck },\n { name: \"Linting\", fn: lint },\n { name: \"Testing\", fn: test },\n { name: \"Building\", fn: build },\n { name: \"Verification\", fn: verify, optional: true },\n { name: \"Visualization\", fn: visualize, optional: true },\n ];\n\n for (const { name, fn, optional } of checks) {\n try {\n await fn();\n } catch (_error) {\n if (optional) {\n continue;\n }\n console.error(`\\n\\x1b[31m✗ ${name} failed\\x1b[0m\\n`);\n process.exit(1);\n }\n }\n}\n\n/**\n * Init command - scaffold a new extension\n */\nasync function init() {\n const projectName = commandArgs[0] || \"my-extension\";\n const projectPath = `${cwd}/${projectName}`;\n\n // Check if directory already exists\n const { existsSync, mkdirSync, writeFileSync } = await import(\"node:fs\");\n\n if (existsSync(projectPath)) {\n console.error(`\\x1b[31m✗ Directory '${projectName}' already exists\\x1b[0m\\n`);\n process.exit(1);\n }\n\n // Create project structure\n const dirs = [\n projectPath,\n `${projectPath}/src`,\n `${projectPath}/src/background`,\n `${projectPath}/src/popup`,\n ];\n\n for (const dir of dirs) {\n mkdirSync(dir, { recursive: true });\n }\n\n // Create package.json\n const packageJson = {\n name: projectName,\n version: \"0.1.0\",\n type: \"module\",\n scripts: {\n check: \"web-ext check\",\n build: \"web-ext build\",\n \"build:prod\": \"web-ext build --prod\",\n typecheck: \"web-ext typecheck\",\n lint: \"web-ext lint\",\n \"lint:fix\": \"web-ext lint --fix\",\n format: \"web-ext format\",\n test: \"web-ext test\",\n verify: \"web-ext verify\",\n \"verify:setup\": \"web-ext verify --setup\",\n visualize: \"web-ext visualize\",\n \"visualize:export\": \"web-ext visualize --export\",\n \"visualize:serve\": \"web-ext visualize --serve\",\n },\n dependencies: {\n \"@fairfox/web-ext\": \"*\",\n },\n };\n\n writeFileSync(`${projectPath}/package.json`, JSON.stringify(packageJson, null, 2));\n\n // Create manifest.json at root\n const manifest = {\n manifest_version: 3,\n name: projectName,\n version: \"0.1.0\",\n description: \"A Chrome extension built with @fairfox/web-ext\",\n background: {\n service_worker: \"background/index.js\",\n type: \"module\",\n },\n action: {\n default_popup: \"popup/popup.html\",\n },\n permissions: [\"storage\"],\n };\n\n writeFileSync(`${projectPath}/manifest.json`, JSON.stringify(manifest, null, 2));\n\n // Create background script\n const backgroundScript = `/**\n * Background Service Worker\n */\n\nimport { getMessageBus } from \"@fairfox/web-ext/message-bus\";\nimport { MessageRouter } from \"@fairfox/web-ext/message-router\";\n\nconst bus = getMessageBus(\"background\");\nnew MessageRouter(bus);\n\n// Add your message handlers here\nbus.on(\"PING\", async () => {\n return { success: true, message: \"pong\" };\n});\n\nconsole.log(\"Background service worker initialized\");\n`;\n\n writeFileSync(`${projectPath}/src/background/index.ts`, backgroundScript);\n\n // Create popup HTML in src/popup\n const popupHtml = `<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <title>${projectName}</title>\n </head>\n <body>\n <div id=\"root\"></div>\n <script type=\"module\" src=\"./index.js\"></script>\n </body>\n</html>\n`;\n\n writeFileSync(`${projectPath}/src/popup/popup.html`, popupHtml);\n\n // Create popup script\n const popupScript = `/**\n * Popup UI\n */\n\nimport { getMessageBus } from \"@fairfox/web-ext/message-bus\";\n\nconst bus = getMessageBus(\"popup\");\n\n// Simple example without UI framework\nconst root = document.getElementById(\"root\");\n\nif (root) {\n root.innerHTML = \\`\n <div style=\"padding: 16px; min-width: 200px;\">\n <h1 style=\"margin: 0 0 8px 0; font-size: 18px;\">${projectName}</h1>\n <button id=\"ping-btn\" style=\"padding: 8px 16px;\">Ping Background</button>\n <p id=\"response\" style=\"margin-top: 8px; font-size: 14px;\"></p>\n </div>\n \\`;\n\n const btn = document.getElementById(\"ping-btn\");\n const response = document.getElementById(\"response\");\n\n btn?.addEventListener(\"click\", async () => {\n const result = await bus.send({ type: \"PING\" });\n if (response) {\n response.textContent = JSON.stringify(result);\n }\n });\n}\n`;\n\n writeFileSync(`${projectPath}/src/popup/index.ts`, popupScript);\n\n // Create tsconfig.json\n const tsconfig = {\n compilerOptions: {\n target: \"ES2022\",\n module: \"ESNext\",\n lib: [\"ES2022\", \"DOM\"],\n moduleResolution: \"bundler\",\n strict: true,\n esModuleInterop: true,\n skipLibCheck: true,\n forceConsistentCasingInFileNames: true,\n resolveJsonModule: true,\n allowSyntheticDefaultImports: true,\n jsx: \"react-jsx\",\n jsxImportSource: \"preact\",\n },\n include: [\"src/**/*\"],\n };\n\n writeFileSync(`${projectPath}/tsconfig.json`, JSON.stringify(tsconfig, null, 2));\n\n // Create biome.json\n const biomeConfig = {\n files: {\n includes: [\"src/**/*.ts\", \"src/**/*.tsx\"],\n ignoreUnknown: true,\n },\n linter: {\n enabled: true,\n rules: {\n recommended: true,\n },\n },\n formatter: {\n enabled: true,\n indentStyle: \"space\",\n indentWidth: 2,\n },\n };\n\n writeFileSync(`${projectPath}/biome.json`, JSON.stringify(biomeConfig, null, 2));\n\n // Create README\n const readme = `# ${projectName}\n\nA Chrome extension built with [@fairfox/web-ext](https://github.com/fairfox/web-ext).\n\n## Getting Started\n\n1. Install dependencies:\n \\`\\`\\`bash\n bun install\n \\`\\`\\`\n\n2. Build the extension:\n \\`\\`\\`bash\n bun run build\n \\`\\`\\`\n\n3. Load the extension in Chrome:\n - Open \\`chrome://extensions\\`\n - Enable \"Developer mode\"\n - Click \"Load unpacked\"\n - Select the \\`dist/\\` folder\n\n## Development\n\n- \\`bun run build\\` - Build the extension\n- \\`bun run check\\` - Run all checks (typecheck, lint, test, build)\n- \\`bun run typecheck\\` - Type check your code\n- \\`bun run lint\\` - Lint your code\n- \\`bun run format\\` - Format your code\n- \\`bun run verify\\` - Run formal verification\n- \\`bun run visualize\\` - Generate architecture diagrams\n\n## Project Structure\n\n\\`\\`\\`\n${projectName}/\n├── src/\n│ ├── background/\n│ │ └── index.ts # Background service worker\n│ └── popup/\n│ ├── popup.html # Popup HTML\n│ └── index.ts # Popup script\n├── manifest.json # Extension manifest\n├── dist/ # Build output (load this in Chrome)\n├── package.json\n├── tsconfig.json\n└── biome.json\n\\`\\`\\`\n`;\n\n writeFileSync(`${projectPath}/README.md`, readme);\n\n // Create .gitignore\n const gitignore = `node_modules\ndist\ndocs\n.DS_Store\n`;\n\n writeFileSync(`${projectPath}/.gitignore`, gitignore);\n}\n\n/**\n * Help command\n */\nfunction help() {\n // Help is shown automatically via commander\n}\n\n/**\n * Main entry point\n */\nasync function main() {\n try {\n switch (command) {\n case \"init\":\n await init();\n break;\n case \"check\":\n await check();\n break;\n case \"build\":\n await build();\n break;\n case \"dev\":\n await dev();\n break;\n case \"typecheck\":\n await typecheck();\n break;\n case \"lint\":\n await lint();\n break;\n case \"format\":\n await format();\n break;\n case \"test\":\n await test();\n break;\n case \"verify\":\n await verify();\n break;\n case \"visualize\":\n await visualize();\n break;\n case \"help\":\n case \"--help\":\n case \"-h\":\n case undefined:\n help();\n break;\n default:\n console.error(`❌ Unknown command: ${command}\\n`);\n help();\n process.exit(1);\n }\n } catch (error) {\n console.error(\"\\n❌ Command failed:\", error);\n process.exit(1);\n }\n}\n\nmain();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