aipeek 0.1.3 → 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/dist/{chunk-FI6MF54L.js → chunk-AFSKSPDG.js} +15 -6
- package/dist/{chunk-KW232XW7.cjs → chunk-HNRFA6MN.cjs} +15 -6
- package/dist/cli.cjs +3 -3
- package/dist/cli.js +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/plugin.cjs +2 -2
- package/dist/plugin.js +1 -1
- package/package.json +1 -1
|
@@ -516,19 +516,28 @@ curl ${base}/state # registered store snapshots
|
|
|
516
516
|
Append \`?full\` for untruncated output. Append \`/{index}\` for a specific item's detail.
|
|
517
517
|
`;
|
|
518
518
|
}
|
|
519
|
+
var AIPEEK_HEADING = "# aipeek \u2014 Runtime Browser Inspector";
|
|
519
520
|
function injectClaudeMd(root, port) {
|
|
520
521
|
const path = resolve(root, "CLAUDE.md");
|
|
521
522
|
const snippet = aipeekSnippet(port);
|
|
522
523
|
try {
|
|
523
|
-
if (existsSync(path)) {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
if (!existsSync(path)) {
|
|
525
|
+
writeFileSync(path, snippet.trimStart());
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
const content = readFileSync(path, "utf-8");
|
|
529
|
+
const start = content.indexOf(AIPEEK_HEADING);
|
|
530
|
+
if (start === -1) {
|
|
527
531
|
writeFileSync(path, `${content.trimEnd()}
|
|
528
532
|
${snippet}`);
|
|
529
|
-
|
|
530
|
-
writeFileSync(path, snippet.trimStart());
|
|
533
|
+
return;
|
|
531
534
|
}
|
|
535
|
+
const afterHeading = content.indexOf("\n", start);
|
|
536
|
+
const nextHeading = content.indexOf("\n# ", afterHeading);
|
|
537
|
+
const end = nextHeading === -1 ? content.length : nextHeading;
|
|
538
|
+
const before = content.slice(0, start).trimEnd();
|
|
539
|
+
const after = content.slice(end);
|
|
540
|
+
writeFileSync(path, before + (before ? "\n" : "") + snippet + after);
|
|
532
541
|
} catch {
|
|
533
542
|
}
|
|
534
543
|
}
|
|
@@ -516,19 +516,28 @@ curl ${base}/state # registered store snapshots
|
|
|
516
516
|
Append \`?full\` for untruncated output. Append \`/{index}\` for a specific item's detail.
|
|
517
517
|
`;
|
|
518
518
|
}
|
|
519
|
+
var AIPEEK_HEADING = "# aipeek \u2014 Runtime Browser Inspector";
|
|
519
520
|
function injectClaudeMd(root, port) {
|
|
520
521
|
const path = _path.resolve.call(void 0, root, "CLAUDE.md");
|
|
521
522
|
const snippet = aipeekSnippet(port);
|
|
522
523
|
try {
|
|
523
|
-
if (_fs.existsSync.call(void 0, path)) {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
if (!_fs.existsSync.call(void 0, path)) {
|
|
525
|
+
_fs.writeFileSync.call(void 0, path, snippet.trimStart());
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
const content = _fs.readFileSync.call(void 0, path, "utf-8");
|
|
529
|
+
const start = content.indexOf(AIPEEK_HEADING);
|
|
530
|
+
if (start === -1) {
|
|
527
531
|
_fs.writeFileSync.call(void 0, path, `${content.trimEnd()}
|
|
528
532
|
${snippet}`);
|
|
529
|
-
|
|
530
|
-
_fs.writeFileSync.call(void 0, path, snippet.trimStart());
|
|
533
|
+
return;
|
|
531
534
|
}
|
|
535
|
+
const afterHeading = content.indexOf("\n", start);
|
|
536
|
+
const nextHeading = content.indexOf("\n# ", afterHeading);
|
|
537
|
+
const end = nextHeading === -1 ? content.length : nextHeading;
|
|
538
|
+
const before = content.slice(0, start).trimEnd();
|
|
539
|
+
const after = content.slice(end);
|
|
540
|
+
_fs.writeFileSync.call(void 0, path, before + (before ? "\n" : "") + snippet + after);
|
|
532
541
|
} catch (e6) {
|
|
533
542
|
}
|
|
534
543
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -13,11 +13,11 @@ async function main() {
|
|
|
13
13
|
${_picocolors2.default.bold("aipeek")} \u2014 runtime snapshot from Vite dev server
|
|
14
14
|
|
|
15
15
|
${_picocolors2.default.dim("Usage:")}
|
|
16
|
-
aipeek Fetch from localhost:
|
|
16
|
+
aipeek Fetch from localhost:5173
|
|
17
17
|
aipeek --port=3000 Fetch from localhost:3000
|
|
18
18
|
|
|
19
19
|
${_picocolors2.default.dim("Options:")}
|
|
20
|
-
--port=<port> Dev server port (default:
|
|
20
|
+
--port=<port> Dev server port (default: 5173)
|
|
21
21
|
--help Show this help
|
|
22
22
|
|
|
23
23
|
${_picocolors2.default.dim("Setup:")}
|
|
@@ -25,7 +25,7 @@ ${_picocolors2.default.dim("Setup:")}
|
|
|
25
25
|
`);
|
|
26
26
|
process.exit(0);
|
|
27
27
|
}
|
|
28
|
-
const port = flags.port || "
|
|
28
|
+
const port = flags.port || "5173";
|
|
29
29
|
const endpoint = `http://localhost:${port}/__aipeek`;
|
|
30
30
|
const resp = await fetch(endpoint);
|
|
31
31
|
if (!resp.ok) {
|
package/dist/cli.js
CHANGED
|
@@ -13,11 +13,11 @@ async function main() {
|
|
|
13
13
|
${pc.bold("aipeek")} \u2014 runtime snapshot from Vite dev server
|
|
14
14
|
|
|
15
15
|
${pc.dim("Usage:")}
|
|
16
|
-
aipeek Fetch from localhost:
|
|
16
|
+
aipeek Fetch from localhost:5173
|
|
17
17
|
aipeek --port=3000 Fetch from localhost:3000
|
|
18
18
|
|
|
19
19
|
${pc.dim("Options:")}
|
|
20
|
-
--port=<port> Dev server port (default:
|
|
20
|
+
--port=<port> Dev server port (default: 5173)
|
|
21
21
|
--help Show this help
|
|
22
22
|
|
|
23
23
|
${pc.dim("Setup:")}
|
|
@@ -25,7 +25,7 @@ ${pc.dim("Setup:")}
|
|
|
25
25
|
`);
|
|
26
26
|
process.exit(0);
|
|
27
27
|
}
|
|
28
|
-
const port = flags.port || "
|
|
28
|
+
const port = flags.port || "5173";
|
|
29
29
|
const endpoint = `http://localhost:${port}/__aipeek`;
|
|
30
30
|
const resp = await fetch(endpoint);
|
|
31
31
|
if (!resp.ok) {
|
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHNRFA6MNcjs = require('./chunk-HNRFA6MN.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,4 +19,4 @@ var _chunkKW232XW7cjs = require('./chunk-KW232XW7.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.aipeekPlugin =
|
|
22
|
+
exports.aipeekPlugin = _chunkHNRFA6MNcjs.aipeekPlugin; exports.compact = _chunkHNRFA6MNcjs.compact; exports.compactConsole = _chunkHNRFA6MNcjs.compactConsole; exports.compactErrors = _chunkHNRFA6MNcjs.compactErrors; exports.compactNetwork = _chunkHNRFA6MNcjs.compactNetwork; exports.compactState = _chunkHNRFA6MNcjs.compactState; exports.compactUI = _chunkHNRFA6MNcjs.compactUI; exports.detail = _chunkHNRFA6MNcjs.detail; exports.emit = _chunkHNRFA6MNcjs.emit;
|
package/dist/index.js
CHANGED
package/dist/plugin.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHNRFA6MNcjs = require('./chunk-HNRFA6MN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.aipeekPlugin =
|
|
6
|
+
exports.aipeekPlugin = _chunkHNRFA6MNcjs.aipeekPlugin;
|
package/dist/plugin.js
CHANGED