@reticlehq/vite-plugin 3.6.0 → 3.7.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/disabled-browser-stub.d.ts +1 -1
- package/dist/disabled-browser-stub.js +4 -1
- package/dist/index.cjs +14 -8
- package/dist/index.js +7 -7
- package/package.json +4 -4
|
@@ -12,4 +12,4 @@ export declare const RETICLE_DISABLED_STUB = "\0reticle-disabled-stub";
|
|
|
12
12
|
* production, because the cost of guessing wrong the other way is an instrumented release.
|
|
13
13
|
*/
|
|
14
14
|
export declare const isReticleDisabledBuild: (desktop: boolean, command: string | undefined, mode: string | undefined) => boolean;
|
|
15
|
-
export declare const RETICLE_DISABLED_STUB_CODE = "\nexport class Reticle {\n connect() {}\n signal() {}\n state() {}\n renderCommit() {}\n describe() {}\n endSession() {}\n observeHotUpdates() {}\n disconnect() {}\n\n get connected() {\n return false;\n }\n}\n\nexport const reticle = new Reticle();\n\nexport const SESSION_AUTO = 'auto';\n\nexport function setIgnoreSelectors() {}\n\nexport function registerAdapter() {}\nexport function identifyComponent() {\n return null;\n}\nexport function readComponentState() {\n return undefined;\n}\nexport function elementHasHoverHandlers() {\n return false;\n}\nexport function adapterNames() {\n return [];\n}\n\nexport function registerStore() {}\nexport function unregisterStore() {}\nexport function storeNames() {\n return [];\n}\nexport function readStores() {\n return {};\n}\nexport function readStoresWithTruncation() {\n return { stores: {} };\n}\nexport function sourceOwner() {\n return undefined;\n}\nexport function markAdapterSource() {}\n\nexport function tanstackQueryStore() {\n return undefined;\n}\nexport function jotaiStore() {\n return undefined;\n}\nexport function xstateStore() {\n return undefined;\n}\nexport function valtioStore() {\n return undefined;\n}\nexport function mobxStore() {\n return undefined;\n}\nexport function recoilStore() {\n return undefined;\n}\nexport function svelteStore() {\n return undefined;\n}\nexport function piniaStore() {\n return undefined;\n}\nexport function pushStore() {\n return undefined;\n}\n\nexport function registerCapabilities() {}\nexport function getCapabilities() {\n return {};\n}\nexport function hasCapabilities() {\n return false;\n}\nexport function setCapabilitiesListener() {}\n\nexport function createReticleEmitter() {\n return {\n signal() {},\n state() {},\n };\n}\n\nexport function commitAndSignal() {}\nexport function registerReticleDomain() {}\n\nexport function buildSnapshot() {\n return {};\n}\n\nexport function inspectChart() {\n return {};\n}\nexport function canvasChartData() {\n return {};\n}\n\nexport function matchQuery() {\n return false;\n}\nexport function runQuery() {\n return undefined;\n}\n\nexport function executeAction() {\n return undefined;\n}\nexport function executeSequence() {\n return undefined;\n}\n\nexport function describe() {\n return undefined;\n}\nexport function getRole() {\n return undefined;\n}\nexport function getAccessibleName() {\n return undefined;\n}\nexport function getStates() {\n return {};\n}\nexport function isVisible() {\n return false;\n}\n\nexport class RefRegistry {\n get size() {\n return 0;\n }\n\n markEdited() {}\n\n mintedBeforeLastEdit() {\n return false;\n }\n\n refFor() {\n return undefined;\n }\n\n resolve() {\n return null;\n }\n}\n\nexport const refs = new RefRegistry();\n\nexport class Annotator {\n constructor() {}\n\n get active() {\n return false;\n }\n\n get markCount() {\n return 0;\n }\n\n mount() {}\n unmount() {}\n}\n\nexport function installAnnotator() {}\n\nexport function resolveMarkAnchor() {\n return undefined;\n}\n";
|
|
15
|
+
export declare const RETICLE_DISABLED_STUB_CODE = "\nexport class Reticle {\n connect() {}\n signal() {}\n state() {}\n renderCommit() {}\n describe() {}\n endSession() {}\n observeHotUpdates() {}\n disconnect() {}\n\n get connected() {\n return false;\n }\n}\n\nexport const reticle = new Reticle();\n\nexport const SESSION_AUTO = 'auto';\n\nexport function setIgnoreSelectors() {}\n\nexport function registerAdapter() {}\nexport function identifyComponent() {\n return null;\n}\nexport function readComponentState() {\n return undefined;\n}\nexport function elementHasHoverHandlers() {\n return false;\n}\nexport function adapterNames() {\n return [];\n}\n\nexport function registerStore() {}\nexport function unregisterStore() {}\nexport function storeNames() {\n return [];\n}\nexport function readStores() {\n return {};\n}\nexport function readStoresWithTruncation() {\n return { stores: {} };\n}\nexport function sourceOwner() {\n return undefined;\n}\nexport function markAdapterSource() {}\n\nexport function tanstackQueryStore() {\n return undefined;\n}\nexport function jotaiStore() {\n return undefined;\n}\nexport function xstateStore() {\n return undefined;\n}\nexport function valtioStore() {\n return undefined;\n}\nexport function mobxStore() {\n return undefined;\n}\nexport function recoilStore() {\n return undefined;\n}\nexport function svelteStore() {\n return undefined;\n}\nexport function piniaStore() {\n return undefined;\n}\nexport function pushStore() {\n return undefined;\n}\n\nexport function registerCapabilities() {}\nexport function getCapabilities() {\n return {};\n}\nexport function hasCapabilities() {\n return false;\n}\nexport function setCapabilitiesListener() {}\n\nexport function createReticleEmitter() {\n return {\n signal() {},\n state() {},\n };\n}\n\n// It wraps the APP's write, so the write still runs: Reticle does nothing in production, the app does.\nexport function commitAndSignal(_emitter, mutate) {\n return mutate();\n}\nexport function registerReticleDomain() {}\n\nexport function buildSnapshot() {\n return {};\n}\n\nexport function inspectChart() {\n return {};\n}\nexport function canvasChartData() {\n return {};\n}\n\nexport function matchQuery() {\n return false;\n}\nexport function runQuery() {\n return undefined;\n}\n\nexport function executeAction() {\n return undefined;\n}\nexport function executeSequence() {\n return undefined;\n}\n\nexport function describe() {\n return undefined;\n}\nexport function getRole() {\n return undefined;\n}\nexport function getAccessibleName() {\n return undefined;\n}\nexport function getStates() {\n return {};\n}\nexport function isVisible() {\n return false;\n}\n\nexport class RefRegistry {\n get size() {\n return 0;\n }\n\n markEdited() {}\n\n mintedBeforeLastEdit() {\n return false;\n }\n\n refFor() {\n return undefined;\n }\n\n resolve() {\n return null;\n }\n}\n\nexport const refs = new RefRegistry();\n\nexport class Annotator {\n constructor() {}\n\n get active() {\n return false;\n }\n\n get markCount() {\n return 0;\n }\n\n mount() {}\n unmount() {}\n}\n\nexport function installAnnotator() {}\n\nexport function resolveMarkAnchor() {\n return undefined;\n}\n";
|
|
@@ -111,7 +111,10 @@ export function createReticleEmitter() {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
// It wraps the APP's write, so the write still runs: Reticle does nothing in production, the app does.
|
|
115
|
+
export function commitAndSignal(_emitter, mutate) {
|
|
116
|
+
return mutate();
|
|
117
|
+
}
|
|
115
118
|
export function registerReticleDomain() {}
|
|
116
119
|
|
|
117
120
|
export function buildSnapshot() {
|
package/dist/index.cjs
CHANGED
|
@@ -4330,6 +4330,8 @@ var ReticleEnv = {
|
|
|
4330
4330
|
HARNESS_BASE_URL: "RETICLE_HARNESS_BASE_URL",
|
|
4331
4331
|
/** Hard ceiling on harness model turns in one drive. Bounds cost, not value. */
|
|
4332
4332
|
HARNESS_MAX_STEPS: "RETICLE_HARNESS_MAX_STEPS",
|
|
4333
|
+
/** The free drive `reticle try` was granted, sent on every Harness call it bills. */
|
|
4334
|
+
DRIVE_ID: "RETICLE_DRIVE_ID",
|
|
4333
4335
|
/**
|
|
4334
4336
|
* Which model backs the harness driver: `anthropic` (the default) or `jev`.
|
|
4335
4337
|
*
|
|
@@ -4492,8 +4494,8 @@ var ReticleDir = {
|
|
|
4492
4494
|
JOURNAL_EVENTS_CLOSED_FILE: "events.closed.json",
|
|
4493
4495
|
/** learned expected-envelopes per route, accumulated across runs (the deviation-report baseline). */
|
|
4494
4496
|
ENVELOPES_FILE: "envelopes.json",
|
|
4495
|
-
/** learned ambient (action-less churn) region map — excluded from settle/summaries/envelopes. */
|
|
4496
4497
|
AMBIENT_FILE: "ambient.json",
|
|
4498
|
+
// learned action-less churn regions, excluded from settle/summaries
|
|
4497
4499
|
/** per-flow flake ledger — replay outcomes that decide intermittent-failure quarantine. */
|
|
4498
4500
|
FLAKE_FILE: "flake.json",
|
|
4499
4501
|
/** The app-wide coverage ledger — see server features/exhaust/ledger.ts. */
|
|
@@ -4502,10 +4504,12 @@ var ReticleDir = {
|
|
|
4502
4504
|
NOTES_FILE: "notes.json",
|
|
4503
4505
|
/** The user's latest request, as the agent relayed it. Local: it is the user's own words. */
|
|
4504
4506
|
REQUEST_FILE: "request.json",
|
|
4507
|
+
APP_NOTES_FILE: "app-notes.json",
|
|
4508
|
+
// confirmed targeting hints for the next session; never evidence
|
|
4505
4509
|
PLATFORM_MOMENTS_FILE: "platform-moments.json",
|
|
4506
4510
|
// moments already said, so each is said once
|
|
4507
4511
|
/**
|
|
4508
|
-
* the project's cloud binding — .reticle/cloud.json, written by `reticle
|
|
4512
|
+
* the project's cloud binding — .reticle/cloud.json, written by `reticle connect`. Git-checked and
|
|
4509
4513
|
* non-secret: the project id, the API origin, and where its dashboard lives. The KEY lives in
|
|
4510
4514
|
* ~/.reticle/credentials.json instead, because that one must never reach a repository.
|
|
4511
4515
|
*/
|
|
@@ -5160,7 +5164,10 @@ export function createReticleEmitter() {
|
|
|
5160
5164
|
};
|
|
5161
5165
|
}
|
|
5162
5166
|
|
|
5163
|
-
|
|
5167
|
+
// It wraps the APP's write, so the write still runs: Reticle does nothing in production, the app does.
|
|
5168
|
+
export function commitAndSignal(_emitter, mutate) {
|
|
5169
|
+
return mutate();
|
|
5170
|
+
}
|
|
5164
5171
|
export function registerReticleDomain() {}
|
|
5165
5172
|
|
|
5166
5173
|
export function buildSnapshot() {
|
|
@@ -5441,10 +5448,7 @@ function reticle(options = {}) {
|
|
|
5441
5448
|
const sourceMapping = options.sourceMapping !== false;
|
|
5442
5449
|
const inject = options.inject !== false;
|
|
5443
5450
|
const desktop = true === options.desktop;
|
|
5444
|
-
const
|
|
5445
|
-
...options,
|
|
5446
|
-
projectId: resolveProjectId(options.projectId, process.cwd())
|
|
5447
|
-
};
|
|
5451
|
+
const projectIdIn = (dir) => resolveProjectId(options.projectId, dir);
|
|
5448
5452
|
let htmlEntrySpecifier;
|
|
5449
5453
|
let root;
|
|
5450
5454
|
let command;
|
|
@@ -5459,7 +5463,9 @@ function reticle(options = {}) {
|
|
|
5459
5463
|
let connectDelivered = false;
|
|
5460
5464
|
let lastPortWarning;
|
|
5461
5465
|
const resolveLazy = () => {
|
|
5462
|
-
const
|
|
5466
|
+
const appDir = root ?? process.cwd();
|
|
5467
|
+
const resolved = { ...options, projectId: projectIdIn(appDir) };
|
|
5468
|
+
const { port, warning } = resolveDaemonPort(resolved.port, resolved.projectId, appDir);
|
|
5463
5469
|
if (warning !== void 0 && warning !== lastPortWarning) {
|
|
5464
5470
|
lastPortWarning = warning;
|
|
5465
5471
|
warn(warning);
|
package/dist/index.js
CHANGED
|
@@ -259,12 +259,10 @@ export function reticle(options = {}) {
|
|
|
259
259
|
const sourceMapping = options.sourceMapping !== false;
|
|
260
260
|
const inject = options.inject !== false;
|
|
261
261
|
const desktop = true === options.desktop;
|
|
262
|
-
//
|
|
263
|
-
// app is identifiable across port changes with zero config.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
projectId: resolveProjectId(options.projectId, process.cwd()),
|
|
267
|
-
};
|
|
262
|
+
// The stable projectId (explicit option, else `.reticle.json` / package.json in VITE'S root), so the
|
|
263
|
+
// app is identifiable across port changes with zero config. Read from the root, never the cwd:
|
|
264
|
+
// `vite apps/admin` from a monorepo root announced the root's app and saved flows under it.
|
|
265
|
+
const projectIdIn = (dir) => resolveProjectId(options.projectId, dir);
|
|
268
266
|
/**
|
|
269
267
|
* The specifier the HTML points at, e.g. `/src/main.tsx`.
|
|
270
268
|
*
|
|
@@ -315,7 +313,9 @@ export function reticle(options = {}) {
|
|
|
315
313
|
*/
|
|
316
314
|
const resolveLazy = () => {
|
|
317
315
|
// Wherever the daemon for this project actually is; the order is argued in discover-port.ts.
|
|
318
|
-
const
|
|
316
|
+
const appDir = root ?? process.cwd();
|
|
317
|
+
const resolved = { ...options, projectId: projectIdIn(appDir) };
|
|
318
|
+
const { port, warning } = resolveDaemonPort(resolved.port, resolved.projectId, appDir);
|
|
319
319
|
if (warning !== undefined && warning !== lastPortWarning) {
|
|
320
320
|
lastPortWarning = warning;
|
|
321
321
|
warn(warning);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reticlehq/vite-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Vite plugin for Reticle: dev-only source-map stamping plus auto-injected reticle.connect(). apply:'serve' guarantees it never ships to production.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@babel/core": "^7.26.0",
|
|
44
|
-
"@reticlehq/babel-plugin": "3.
|
|
45
|
-
"@reticlehq/core": "3.
|
|
44
|
+
"@reticlehq/babel-plugin": "3.7.0",
|
|
45
|
+
"@reticlehq/core": "3.7.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/babel__core": "^7.20.5",
|
|
49
49
|
"esbuild": "^0.28.2",
|
|
50
50
|
"svelte": "^5.57.1",
|
|
51
51
|
"vite": "^8",
|
|
52
|
-
"@reticlehq/react": "3.
|
|
52
|
+
"@reticlehq/react": "3.7.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"vite": ">=4"
|