tencil 0.9.0 → 0.10.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/cli.mjs +1 -1
- package/dist/{cloud-dXtv3DCr.d.mts → cloud-DKtU6lcZ.d.mts} +1 -1
- package/dist/{index-CexSk5_J.d.mts → index-BSKV-nDI.d.mts} +92 -1
- package/dist/index.d.mts +17 -7
- package/dist/index.mjs +1 -1
- package/dist/next.d.mts +1 -1
- package/dist/overlay.global.js +208 -62
- package/dist/react.d.mts +1 -1
- package/dist/{server-4YposP38.mjs → server-C-Udis96.mjs} +277 -33
- package/dist/vite.d.mts +1 -1
- package/package.json +6 -6
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as withoutNpmEnv, D as createLocalPairingCode, E as DEFAULT_T3_URL, F as EnsembleClient, O as exchangePairingCredential, P as EnsembleCredentialStore, S as defaultDataDir, T as CredentialStore, _ as detectAgents, a as readPlan, b as savedProvider, c as runtimeDir, d as uninstallService, f as startInBackground, g as PROVIDERS, h as updateNotice, i as finishUpdate, j as loadAgentSdk, k as parsePairingInput, l as isServiceInstalled, m as isNewerThanThis, n as probeDaemon, o as enableAutostart, p as stopDaemon, r as startDaemon, s as ensureDaemon, t as DEFAULT_PORT, u as stopService, v as providerLabel, w as VERSION, y as saveProvider } from "./server-
|
|
2
|
+
import { A as withoutNpmEnv, D as createLocalPairingCode, E as DEFAULT_T3_URL, F as EnsembleClient, O as exchangePairingCredential, P as EnsembleCredentialStore, S as defaultDataDir, T as CredentialStore, _ as detectAgents, a as readPlan, b as savedProvider, c as runtimeDir, d as uninstallService, f as startInBackground, g as PROVIDERS, h as updateNotice, i as finishUpdate, j as loadAgentSdk, k as parsePairingInput, l as isServiceInstalled, m as isNewerThanThis, n as probeDaemon, o as enableAutostart, p as stopDaemon, r as startDaemon, s as ensureDaemon, t as DEFAULT_PORT, u as stopService, v as providerLabel, w as VERSION, y as saveProvider } from "./server-C-Udis96.mjs";
|
|
3
3
|
import { t as DEFAULT_CLOUD_URL } from "./cloud-CiwIrP1h.mjs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { existsSync, rmSync } from "node:fs";
|
|
@@ -334,6 +334,58 @@ interface UpdateStatus {
|
|
|
334
334
|
/** `failed`: what went wrong. */
|
|
335
335
|
error?: string;
|
|
336
336
|
}
|
|
337
|
+
/**
|
|
338
|
+
* The person's own overlay settings, the same in every project on the machine.
|
|
339
|
+
* Saved by the local daemon; unset ones fall back to the overlay's defaults.
|
|
340
|
+
*/
|
|
341
|
+
declare const Preferences: z.ZodObject<{
|
|
342
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
system: "system";
|
|
344
|
+
dark: "dark";
|
|
345
|
+
light: "light";
|
|
346
|
+
}>>;
|
|
347
|
+
shortcuts: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
comment: z.ZodNullable<z.ZodObject<{
|
|
349
|
+
code: z.ZodString;
|
|
350
|
+
key: z.ZodString;
|
|
351
|
+
alt: z.ZodBoolean;
|
|
352
|
+
ctrl: z.ZodBoolean;
|
|
353
|
+
meta: z.ZodBoolean;
|
|
354
|
+
shift: z.ZodBoolean;
|
|
355
|
+
}, z.core.$strip>>;
|
|
356
|
+
ruler: z.ZodNullable<z.ZodObject<{
|
|
357
|
+
code: z.ZodString;
|
|
358
|
+
key: z.ZodString;
|
|
359
|
+
alt: z.ZodBoolean;
|
|
360
|
+
ctrl: z.ZodBoolean;
|
|
361
|
+
meta: z.ZodBoolean;
|
|
362
|
+
shift: z.ZodBoolean;
|
|
363
|
+
}, z.core.$strip>>;
|
|
364
|
+
hidePins: z.ZodNullable<z.ZodObject<{
|
|
365
|
+
code: z.ZodString;
|
|
366
|
+
key: z.ZodString;
|
|
367
|
+
alt: z.ZodBoolean;
|
|
368
|
+
ctrl: z.ZodBoolean;
|
|
369
|
+
meta: z.ZodBoolean;
|
|
370
|
+
shift: z.ZodBoolean;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
hideDock: z.ZodObject<{
|
|
373
|
+
code: z.ZodString;
|
|
374
|
+
key: z.ZodString;
|
|
375
|
+
alt: z.ZodBoolean;
|
|
376
|
+
ctrl: z.ZodBoolean;
|
|
377
|
+
meta: z.ZodBoolean;
|
|
378
|
+
shift: z.ZodBoolean;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
measure: z.ZodNullable<z.ZodEnum<{
|
|
381
|
+
Alt: "Alt";
|
|
382
|
+
Control: "Control";
|
|
383
|
+
Meta: "Meta";
|
|
384
|
+
Shift: "Shift";
|
|
385
|
+
}>>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
type Preferences = z.infer<typeof Preferences>;
|
|
337
389
|
declare const ProviderInfo: z.ZodObject<{
|
|
338
390
|
id: z.ZodString;
|
|
339
391
|
label: z.ZodString;
|
|
@@ -366,6 +418,27 @@ declare const ProjectSettings: z.ZodObject<{
|
|
|
366
418
|
ruler: z.ZodBoolean;
|
|
367
419
|
}, z.core.$strip>;
|
|
368
420
|
type ProjectSettings = z.infer<typeof ProjectSettings>;
|
|
421
|
+
declare const ProjectSource: z.ZodObject<{
|
|
422
|
+
via: z.ZodEnum<{
|
|
423
|
+
port: "port";
|
|
424
|
+
ensemble: "ensemble";
|
|
425
|
+
plugin: "plugin";
|
|
426
|
+
docker: "docker";
|
|
427
|
+
picked: "picked";
|
|
428
|
+
}>;
|
|
429
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
detected: z.ZodOptional<z.ZodObject<{
|
|
431
|
+
root: z.ZodString;
|
|
432
|
+
via: z.ZodEnum<{
|
|
433
|
+
port: "port";
|
|
434
|
+
ensemble: "ensemble";
|
|
435
|
+
plugin: "plugin";
|
|
436
|
+
docker: "docker";
|
|
437
|
+
}>;
|
|
438
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
439
|
+
}, z.core.$strip>>;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
type ProjectSource = z.infer<typeof ProjectSource>;
|
|
369
442
|
type ServerMessage = {
|
|
370
443
|
type: 'ready';
|
|
371
444
|
protocol: typeof PROTOCOL_VERSION;
|
|
@@ -388,6 +461,24 @@ type ServerMessage = {
|
|
|
388
461
|
type: 'update';
|
|
389
462
|
update: UpdateStatus;
|
|
390
463
|
} |
|
|
464
|
+
/** Local daemon only: the answer to `project.choices`. */
|
|
465
|
+
{
|
|
466
|
+
type: 'project.choices';
|
|
467
|
+
choices: Array<{
|
|
468
|
+
root: string;
|
|
469
|
+
title: string;
|
|
470
|
+
}>;
|
|
471
|
+
} |
|
|
472
|
+
/** Local daemon only: how this page's project was found, after it attaches. */
|
|
473
|
+
{
|
|
474
|
+
type: 'project.source';
|
|
475
|
+
source: ProjectSource;
|
|
476
|
+
} |
|
|
477
|
+
/** Local daemon only: the saved preferences, on connect and whenever they change. */
|
|
478
|
+
{
|
|
479
|
+
type: 'preferences';
|
|
480
|
+
preferences: Preferences;
|
|
481
|
+
} |
|
|
391
482
|
/** Tencil Cloud: sign in first (no token, or one it no longer accepts). */
|
|
392
483
|
{
|
|
393
484
|
type: 'auth.required';
|
|
@@ -516,4 +607,4 @@ interface ThreadSink {
|
|
|
516
607
|
step?(step: ThreadStep): void;
|
|
517
608
|
}
|
|
518
609
|
//#endregion
|
|
519
|
-
export {
|
|
610
|
+
export { UpdateStatus as a, ElementContext as c, ServerMessage as i, ProjectSource as n, Viewer as o, ProviderOption as r, Thread as s, Provider as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as UpdateStatus, c as ElementContext, i as ServerMessage, n as ProjectSource, o as Viewer, r as ProviderOption, s as Thread, t as Provider } from "./index-BSKV-nDI.mjs";
|
|
2
2
|
//#region ../bridge/src/project-providers.d.ts
|
|
3
3
|
/** What a project picked in the overlay's settings. */
|
|
4
4
|
interface SavedProjectSettings {
|
|
@@ -143,6 +143,11 @@ type EnsembleForPort = (port: number) => Promise<string | undefined>;
|
|
|
143
143
|
* only stands in for what can't be detected. Returns undefined when nothing works;
|
|
144
144
|
* the overlay then asks.
|
|
145
145
|
*/
|
|
146
|
+
/** A page's project, and how it was found. */
|
|
147
|
+
interface Detected {
|
|
148
|
+
root: string;
|
|
149
|
+
source: ProjectSource;
|
|
150
|
+
}
|
|
146
151
|
export declare class ProjectResolver {
|
|
147
152
|
#private;
|
|
148
153
|
constructor(options: {
|
|
@@ -152,6 +157,17 @@ export declare class ProjectResolver {
|
|
|
152
157
|
ensembleForPort?: EnsembleForPort;
|
|
153
158
|
});
|
|
154
159
|
resolve(pageUrl: string, claimedRoot?: string): Promise<string | undefined>;
|
|
160
|
+
/**
|
|
161
|
+
* The page's project and how it was found. A pick made over a detected
|
|
162
|
+
* project only holds while that same project is detected on the address:
|
|
163
|
+
* when another app takes the port, detection wins again.
|
|
164
|
+
*/
|
|
165
|
+
detect(pageUrl: string, claimedRoot?: string): Promise<Detected | undefined>;
|
|
166
|
+
/**
|
|
167
|
+
* Use `root` for this address while `detected` is what Tencil finds there
|
|
168
|
+
* (the overlay's Change). Picking the detected project itself undoes it.
|
|
169
|
+
*/
|
|
170
|
+
pick(pageUrl: string, detected: string, root: string): Promise<void>;
|
|
155
171
|
/** Remember the user's choice for an address (from the overlay's project picker). */
|
|
156
172
|
remember(pageUrl: string, root: string): Promise<void>;
|
|
157
173
|
/**
|
|
@@ -329,12 +345,6 @@ interface Daemon {
|
|
|
329
345
|
checkForUpdates(): Promise<void>;
|
|
330
346
|
close(): Promise<void>;
|
|
331
347
|
}
|
|
332
|
-
/**
|
|
333
|
-
* One Tencil daemon per machine. Pages load `/tencil.js` from it; each
|
|
334
|
-
* page's WebSocket is attached to the project it belongs to (worked out from
|
|
335
|
-
* the dev server's port, or picked by the user), and every project gets its
|
|
336
|
-
* own bridge, provider connection and pin store, created on first use.
|
|
337
|
-
*/
|
|
338
348
|
export declare function startDaemon(options?: DaemonOptions): Promise<Daemon>;
|
|
339
349
|
/** Is a Tencil daemon answering on this port? Returns its health report. */
|
|
340
350
|
export declare function probeDaemon(port?: number, host?: string): Promise<{
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as projectStorePath, I as Bridge, L as renderPrompt, M as ProjectResolver, N as projectRoot, R as stripContext, S as defaultDataDir, n as probeDaemon, r as startDaemon, t as DEFAULT_PORT, x as FileThreadStore } from "./server-
|
|
1
|
+
import { C as projectStorePath, I as Bridge, L as renderPrompt, M as ProjectResolver, N as projectRoot, R as stripContext, S as defaultDataDir, n as probeDaemon, r as startDaemon, t as DEFAULT_PORT, x as FileThreadStore } from "./server-C-Udis96.mjs";
|
|
2
2
|
export { Bridge, DEFAULT_PORT, ProjectResolver, FileThreadStore as ThreadStore, defaultDataDir, probeDaemon, projectRoot, projectStorePath, renderPrompt, startDaemon, stripContext };
|
package/dist/next.d.mts
CHANGED