lensmcp 1.0.0 → 1.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/bundled/bridge.js +4122 -0
- package/bundled/capture-runner.js +9 -9
- package/bundled/cluster-app.js +2 -2
- package/bundled/dashboard.js +53 -53
- package/bundled/flow-app.js +3 -3
- package/bundled/main.js +70 -70
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +67 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRequire as
|
|
1
|
+
import { createRequire as __lensmcpCreateRequire } from 'module'; const require = __lensmcpCreateRequire(import.meta.url);
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -33676,7 +33676,7 @@ var EMPTY = {
|
|
|
33676
33676
|
breakpoints: {}
|
|
33677
33677
|
};
|
|
33678
33678
|
async function loadDesignTokens(pathOrDir = process.cwd()) {
|
|
33679
|
-
const explicit = pathOrDir.endsWith(".json") ? pathOrDir : resolve(pathOrDir, "
|
|
33679
|
+
const explicit = pathOrDir.endsWith(".json") ? pathOrDir : resolve(pathOrDir, "lensmcp.tokens.json");
|
|
33680
33680
|
try {
|
|
33681
33681
|
const text = await readFile(explicit, "utf8");
|
|
33682
33682
|
const parsed = JSON.parse(text);
|
|
@@ -34710,10 +34710,10 @@ function safe(fn) {
|
|
|
34710
34710
|
|
|
34711
34711
|
// libs/browser-capture/src/capture-runner.ts
|
|
34712
34712
|
async function main() {
|
|
34713
|
-
const url = process.env["
|
|
34714
|
-
const eventFile = process.env["
|
|
34713
|
+
const url = process.env["LENSMCP_DEV_URL"];
|
|
34714
|
+
const eventFile = process.env["LENSMCP_EVENT_FILE"];
|
|
34715
34715
|
if (!url) {
|
|
34716
|
-
console.error("[browser-capture]
|
|
34716
|
+
console.error("[browser-capture] LENSMCP_DEV_URL not set \u2014 nothing to attach to");
|
|
34717
34717
|
return;
|
|
34718
34718
|
}
|
|
34719
34719
|
const sink = eventFile ? (e) => {
|
|
@@ -34727,16 +34727,16 @@ async function main() {
|
|
|
34727
34727
|
}
|
|
34728
34728
|
};
|
|
34729
34729
|
const tokens = await loadDesignTokens(
|
|
34730
|
-
process.env["
|
|
34730
|
+
process.env["LENSMCP_TOKENS_FILE"] ?? process.cwd()
|
|
34731
34731
|
);
|
|
34732
|
-
const rules = loadRules(process.env["
|
|
34732
|
+
const rules = loadRules(process.env["LENSMCP_RULES_FILE"]);
|
|
34733
34733
|
const capture = await startBrowserCapture({
|
|
34734
34734
|
url,
|
|
34735
34735
|
sink,
|
|
34736
34736
|
tokens,
|
|
34737
34737
|
rules,
|
|
34738
|
-
sessionId: process.env["
|
|
34739
|
-
headless: process.env["
|
|
34738
|
+
sessionId: process.env["LENSMCP_SESSION_ID"],
|
|
34739
|
+
headless: process.env["LENSMCP_HEADLESS"] !== "false",
|
|
34740
34740
|
log: (m) => console.error(m)
|
|
34741
34741
|
});
|
|
34742
34742
|
if (!capture) return;
|