dsh-typst-plugin 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.en.md +121 -0
- package/README.md +120 -2
- package/cordis.patch.yml +6 -0
- package/docs/images/icon.png +0 -0
- package/docs/plugin-detail.en.md +2 -0
- package/docs/plugin-detail.md +2 -0
- package/lib/client.js +41996 -0
- package/lib/client.js.map +7 -0
- package/lib/config.d.ts +107 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +167 -0
- package/lib/config.js.map +1 -0
- package/lib/constants.d.ts +77 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/constants.js +85 -0
- package/lib/constants.js.map +1 -0
- package/lib/contract.d.ts +263 -0
- package/lib/contract.d.ts.map +1 -0
- package/lib/contract.js +9 -0
- package/lib/contract.js.map +1 -0
- package/lib/diagnostic-text.d.ts +13 -0
- package/lib/diagnostic-text.d.ts.map +1 -0
- package/lib/diagnostic-text.js +28 -0
- package/lib/diagnostic-text.js.map +1 -0
- package/lib/errors.d.ts +119 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +161 -0
- package/lib/errors.js.map +1 -0
- package/lib/host/facts.d.ts +31 -0
- package/lib/host/facts.d.ts.map +1 -0
- package/lib/host/facts.js +145 -0
- package/lib/host/facts.js.map +1 -0
- package/lib/host/which.d.ts +20 -0
- package/lib/host/which.d.ts.map +1 -0
- package/lib/host/which.js +50 -0
- package/lib/host/which.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/remote.d.ts +70 -0
- package/lib/remote.d.ts.map +1 -0
- package/lib/remote.js +156 -0
- package/lib/remote.js.map +1 -0
- package/lib/service.d.ts +71 -0
- package/lib/service.d.ts.map +1 -0
- package/lib/service.js +213 -0
- package/lib/service.js.map +1 -0
- package/lib/skills/typst.d.ts +13 -0
- package/lib/skills/typst.d.ts.map +1 -0
- package/lib/skills/typst.js +78 -0
- package/lib/skills/typst.js.map +1 -0
- package/lib/status-codec.d.ts +11 -0
- package/lib/status-codec.d.ts.map +1 -0
- package/lib/status-codec.js +11 -0
- package/lib/status-codec.js.map +1 -0
- package/lib/tools/registration.d.ts +23 -0
- package/lib/tools/registration.d.ts.map +1 -0
- package/lib/tools/registration.js +758 -0
- package/lib/tools/registration.js.map +1 -0
- package/lib/tools/shared.d.ts +30 -0
- package/lib/tools/shared.d.ts.map +1 -0
- package/lib/tools/shared.js +79 -0
- package/lib/tools/shared.js.map +1 -0
- package/lib/typert.d.ts +25 -0
- package/lib/typert.d.ts.map +1 -0
- package/lib/typert.js +116 -0
- package/lib/typert.js.map +1 -0
- package/lib/typst/diagnostics.d.ts +58 -0
- package/lib/typst/diagnostics.d.ts.map +1 -0
- package/lib/typst/diagnostics.js +237 -0
- package/lib/typst/diagnostics.js.map +1 -0
- package/lib/typst/flags.d.ts +8 -0
- package/lib/typst/flags.d.ts.map +1 -0
- package/lib/typst/flags.js +8 -0
- package/lib/typst/flags.js.map +1 -0
- package/lib/typst/locate.d.ts +61 -0
- package/lib/typst/locate.d.ts.map +1 -0
- package/lib/typst/locate.js +152 -0
- package/lib/typst/locate.js.map +1 -0
- package/lib/typst/mainfile.d.ts +40 -0
- package/lib/typst/mainfile.d.ts.map +1 -0
- package/lib/typst/mainfile.js +136 -0
- package/lib/typst/mainfile.js.map +1 -0
- package/lib/typst/match.d.ts +67 -0
- package/lib/typst/match.d.ts.map +1 -0
- package/lib/typst/match.js +227 -0
- package/lib/typst/match.js.map +1 -0
- package/lib/typst/oneshot.d.ts +48 -0
- package/lib/typst/oneshot.d.ts.map +1 -0
- package/lib/typst/oneshot.js +86 -0
- package/lib/typst/oneshot.js.map +1 -0
- package/lib/typst/owners.d.ts +28 -0
- package/lib/typst/owners.d.ts.map +1 -0
- package/lib/typst/owners.js +98 -0
- package/lib/typst/owners.js.map +1 -0
- package/lib/typst/pdf-extract.d.ts +28 -0
- package/lib/typst/pdf-extract.d.ts.map +1 -0
- package/lib/typst/pdf-extract.js +111 -0
- package/lib/typst/pdf-extract.js.map +1 -0
- package/lib/typst/process.d.ts +73 -0
- package/lib/typst/process.d.ts.map +1 -0
- package/lib/typst/process.js +147 -0
- package/lib/typst/process.js.map +1 -0
- package/lib/typst/text.d.ts +62 -0
- package/lib/typst/text.d.ts.map +1 -0
- package/lib/typst/text.js +282 -0
- package/lib/typst/text.js.map +1 -0
- package/lib/typst/watcher.d.ts +76 -0
- package/lib/typst/watcher.d.ts.map +1 -0
- package/lib/typst/watcher.js +210 -0
- package/lib/typst/watcher.js.map +1 -0
- package/lib/wire-schemas.d.ts +433 -0
- package/lib/wire-schemas.d.ts.map +1 -0
- package/lib/wire-schemas.js +428 -0
- package/lib/wire-schemas.js.map +1 -0
- package/lib/workspace/containment.d.ts +25 -0
- package/lib/workspace/containment.d.ts.map +1 -0
- package/lib/workspace/containment.js +54 -0
- package/lib/workspace/containment.js.map +1 -0
- package/lib/workspace/session.d.ts +268 -0
- package/lib/workspace/session.d.ts.map +1 -0
- package/lib/workspace/session.js +1576 -0
- package/lib/workspace/session.js.map +1 -0
- package/locale/en.json +15 -0
- package/locale/zh.json +15 -0
- package/package.json +113 -4
- package/release-provenance.json +137 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host facts for the setup page: OS name, architecture, and the package
|
|
3
|
+
* managers that could install Typst. Probed once per session (and refreshed
|
|
4
|
+
* when the setup page re-checks with the shell). Ported from the ZCode
|
|
5
|
+
* typst-workbench server (0.2.0) `src/host/facts.ts`. Host half only.
|
|
6
|
+
* @module dsh-typst/host/facts
|
|
7
|
+
*/
|
|
8
|
+
import type { HostFactsView } from "../contract.js";
|
|
9
|
+
interface PmSpec {
|
|
10
|
+
name: string;
|
|
11
|
+
bin: string;
|
|
12
|
+
dirs: string[];
|
|
13
|
+
version?: {
|
|
14
|
+
args: string[];
|
|
15
|
+
pattern: RegExp;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Extra specs to probe alongside the platform defaults (cargo, for typst). */
|
|
19
|
+
export declare function cargoSpec(env: NodeJS.ProcessEnv): PmSpec;
|
|
20
|
+
/**
|
|
21
|
+
* Detect the host facts the setup page shows: OS, architecture, and every
|
|
22
|
+
* package manager that could install Typst.
|
|
23
|
+
*/
|
|
24
|
+
export declare function detectFacts(extra?: PmSpec[], options?: {
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
platform?: string;
|
|
27
|
+
home?: string;
|
|
28
|
+
arch?: string;
|
|
29
|
+
}): Promise<HostFactsView>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facts.d.ts","sourceRoot":"","sources":["../../src/host/facts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AAmDxE,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AA8CD,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAGxD;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,KAAK,GAAE,MAAM,EAAO,EACpB,OAAO,GAAE;IACP,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACV,GACL,OAAO,CAAC,aAAa,CAAC,CAwCxB"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host facts for the setup page: OS name, architecture, and the package
|
|
3
|
+
* managers that could install Typst. Probed once per session (and refreshed
|
|
4
|
+
* when the setup page re-checks with the shell). Ported from the ZCode
|
|
5
|
+
* typst-workbench server (0.2.0) `src/host/facts.ts`. Host half only.
|
|
6
|
+
* @module dsh-typst/host/facts
|
|
7
|
+
*/
|
|
8
|
+
import { readFile } from "node:fs/promises";
|
|
9
|
+
import { homedir, release } from "node:os";
|
|
10
|
+
import { join, sep } from "node:path";
|
|
11
|
+
import { deadline } from "@deepseek-ai/dsh-timeout";
|
|
12
|
+
import { runNativeCommand } from "@deepseek-ai/dsh-native-command";
|
|
13
|
+
import { findExecutable } from "./which.js";
|
|
14
|
+
function output(command, args) {
|
|
15
|
+
const fuse = deadline(undefined, 5_000, "TYPST_HOST_PROBE_TIMEOUT");
|
|
16
|
+
return runNativeCommand(command, args, fuse.signal, "hidden")
|
|
17
|
+
.then(({ stdout }) => stdout)
|
|
18
|
+
.catch(() => null)
|
|
19
|
+
.finally(() => fuse[Symbol.dispose]());
|
|
20
|
+
}
|
|
21
|
+
function tilde(path, home) {
|
|
22
|
+
if (!home)
|
|
23
|
+
return path;
|
|
24
|
+
if (path === home)
|
|
25
|
+
return "~";
|
|
26
|
+
return path.startsWith(home + sep) ? `~${path.slice(home.length)}` : path;
|
|
27
|
+
}
|
|
28
|
+
async function osName(platform) {
|
|
29
|
+
if (platform === "darwin") {
|
|
30
|
+
const version = (await output("/usr/bin/sw_vers", ["-productVersion"]))?.trim();
|
|
31
|
+
return version ? `macOS ${version}` : "macOS";
|
|
32
|
+
}
|
|
33
|
+
if (platform === "win32") {
|
|
34
|
+
const [major, , build] = release().split(".").map(Number);
|
|
35
|
+
return major === 10
|
|
36
|
+
? build >= 22_000
|
|
37
|
+
? "Windows 11"
|
|
38
|
+
: "Windows 10"
|
|
39
|
+
: `Windows ${release()}`;
|
|
40
|
+
}
|
|
41
|
+
if (platform === "linux") {
|
|
42
|
+
const text = await readFile("/etc/os-release", "utf8").catch(() => "");
|
|
43
|
+
const pretty = /^PRETTY_NAME="?([^"\n]+)"?/m.exec(text)?.[1];
|
|
44
|
+
return pretty ?? "Linux";
|
|
45
|
+
}
|
|
46
|
+
return platform;
|
|
47
|
+
}
|
|
48
|
+
async function archName(platform, arch) {
|
|
49
|
+
if (platform === "darwin") {
|
|
50
|
+
if (arch === "arm64")
|
|
51
|
+
return "Apple silicon";
|
|
52
|
+
const arm = (await output("/usr/sbin/sysctl", ["-n", "hw.optional.arm64"]))?.trim();
|
|
53
|
+
return arm === "1" ? "Apple silicon" : "Intel";
|
|
54
|
+
}
|
|
55
|
+
return arch;
|
|
56
|
+
}
|
|
57
|
+
function packageManagers(platform, env, home) {
|
|
58
|
+
if (platform === "win32") {
|
|
59
|
+
const local = env.LOCALAPPDATA ?? join(home, "AppData", "Local");
|
|
60
|
+
return [
|
|
61
|
+
{
|
|
62
|
+
name: "winget",
|
|
63
|
+
bin: "winget",
|
|
64
|
+
dirs: [join(local, "Microsoft", "WindowsApps")],
|
|
65
|
+
},
|
|
66
|
+
{ name: "Scoop", bin: "scoop", dirs: [join(home, "scoop", "shims")] },
|
|
67
|
+
{
|
|
68
|
+
name: "Chocolatey",
|
|
69
|
+
bin: "choco",
|
|
70
|
+
dirs: [join(env.ProgramData ?? "C:\\ProgramData", "chocolatey", "bin")],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
const brew = {
|
|
75
|
+
name: "Homebrew",
|
|
76
|
+
bin: "brew",
|
|
77
|
+
dirs: [
|
|
78
|
+
"/opt/homebrew/bin",
|
|
79
|
+
"/usr/local/bin",
|
|
80
|
+
"/home/linuxbrew/.linuxbrew/bin",
|
|
81
|
+
join(home, ".linuxbrew", "bin"),
|
|
82
|
+
],
|
|
83
|
+
version: { args: ["--version"], pattern: /Homebrew\s+(\d+\.\d+\.\d+)/ },
|
|
84
|
+
};
|
|
85
|
+
if (platform !== "linux")
|
|
86
|
+
return [brew];
|
|
87
|
+
return [
|
|
88
|
+
brew,
|
|
89
|
+
{ name: "apt", bin: "apt-get", dirs: ["/usr/bin"] },
|
|
90
|
+
{ name: "dnf", bin: "dnf", dirs: ["/usr/bin"] },
|
|
91
|
+
{ name: "pacman", bin: "pacman", dirs: ["/usr/bin"] },
|
|
92
|
+
{ name: "zypper", bin: "zypper", dirs: ["/usr/bin"] },
|
|
93
|
+
{ name: "snap", bin: "snap", dirs: ["/usr/bin", "/snap/bin"] },
|
|
94
|
+
{ name: "Flatpak", bin: "flatpak", dirs: ["/usr/bin"] },
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
/** Extra specs to probe alongside the platform defaults (cargo, for typst). */
|
|
98
|
+
export function cargoSpec(env) {
|
|
99
|
+
const home = env.HOME ?? env.USERPROFILE ?? "";
|
|
100
|
+
return { name: "cargo", bin: "cargo", dirs: [join(home, ".cargo", "bin")] };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Detect the host facts the setup page shows: OS, architecture, and every
|
|
104
|
+
* package manager that could install Typst.
|
|
105
|
+
*/
|
|
106
|
+
export async function detectFacts(extra = [], options = {}) {
|
|
107
|
+
const env = options.env ?? process.env;
|
|
108
|
+
const platform = options.platform ?? process.platform;
|
|
109
|
+
const home = options.home ?? env.HOME ?? env.USERPROFILE ?? homedir();
|
|
110
|
+
const specs = [...packageManagers(platform, env, home), ...extra];
|
|
111
|
+
const [name, arch, tools] = await Promise.all([
|
|
112
|
+
osName(platform),
|
|
113
|
+
archName(platform, options.arch ?? process.arch),
|
|
114
|
+
Promise.all(specs.map(async (spec) => {
|
|
115
|
+
const path = await findExecutable(spec.bin, spec.dirs, {
|
|
116
|
+
env,
|
|
117
|
+
platform,
|
|
118
|
+
});
|
|
119
|
+
if (!path)
|
|
120
|
+
return null;
|
|
121
|
+
const probe = spec.version;
|
|
122
|
+
const text = probe ? await output(path, probe.args) : null;
|
|
123
|
+
const version = text ? probe?.pattern.exec(text)?.[1] : undefined;
|
|
124
|
+
return {
|
|
125
|
+
name: spec.name,
|
|
126
|
+
...(version ? { version } : {}),
|
|
127
|
+
path: tilde(path, home),
|
|
128
|
+
};
|
|
129
|
+
})),
|
|
130
|
+
]);
|
|
131
|
+
const os = platform === "darwin"
|
|
132
|
+
? "macos"
|
|
133
|
+
: platform === "win32"
|
|
134
|
+
? "windows"
|
|
135
|
+
: platform === "linux"
|
|
136
|
+
? "linux"
|
|
137
|
+
: "other";
|
|
138
|
+
return {
|
|
139
|
+
os,
|
|
140
|
+
osName: name,
|
|
141
|
+
arch,
|
|
142
|
+
tools: tools.filter((tool) => tool !== null),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facts.js","sourceRoot":"","sources":["../../src/host/facts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,MAAM,CAAC,OAAe,EAAE,IAAc;IAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,0BAA0B,CAAC,CAAC;IACpE,OAAO,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC;SAC1D,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CA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I,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/B,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;aACxB,CAAC;QACJ,CAAC,CAAC,CACH;KACF,CAAC,CAAC;IACH,MAAM,EAAE,GACN,QAAQ,KAAK,QAAQ;QACnB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,QAAQ,KAAK,OAAO;YACpB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,KAAK,OAAO;gBACpB,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,OAAO,CAAC;IAClB,OAAO;QACL,EAAE;QACF,MAAM,EAAE,IAAI;QACZ,IAAI;QACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a path is an executable regular file on this host.
|
|
3
|
+
* @param path - candidate path.
|
|
4
|
+
* @param platform - platform spelling, defaulting to the running host.
|
|
5
|
+
* @returns true when the file exists and is executable (or F_OK on Windows).
|
|
6
|
+
*/
|
|
7
|
+
export declare function isExecutable(path: string, platform?: string): Promise<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* Find one executable by name, searching PATH before explicit directories.
|
|
10
|
+
* @param bin - base name without a platform suffix.
|
|
11
|
+
* @param dirs - extra directories after PATH.
|
|
12
|
+
* @param options - environment, platform and optional name override.
|
|
13
|
+
* @returns the first executable path, or null.
|
|
14
|
+
*/
|
|
15
|
+
export declare function findExecutable(bin: string, dirs: readonly string[], options?: {
|
|
16
|
+
env?: NodeJS.ProcessEnv;
|
|
17
|
+
platform?: string;
|
|
18
|
+
names?: readonly string[];
|
|
19
|
+
}): Promise<string | null>;
|
|
20
|
+
//# sourceMappingURL=which.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"which.d.ts","sourceRoot":"","sources":["../../src/host/which.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAyB,GAClC,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,GAAE;IACP,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtB,GACL,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAexB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host executable lookup shared by toolchain detection and host facts.
|
|
3
|
+
* One PATH + common-directory search keeps the two discovery paths from
|
|
4
|
+
* disagreeing about the same binary.
|
|
5
|
+
* @module dsh-typst/host/which
|
|
6
|
+
*/
|
|
7
|
+
import { access, constants, stat } from "node:fs/promises";
|
|
8
|
+
import { delimiter, join } from "node:path";
|
|
9
|
+
/**
|
|
10
|
+
* Whether a path is an executable regular file on this host.
|
|
11
|
+
* @param path - candidate path.
|
|
12
|
+
* @param platform - platform spelling, defaulting to the running host.
|
|
13
|
+
* @returns true when the file exists and is executable (or F_OK on Windows).
|
|
14
|
+
*/
|
|
15
|
+
export async function isExecutable(path, platform = process.platform) {
|
|
16
|
+
try {
|
|
17
|
+
if (!(await stat(path)).isFile())
|
|
18
|
+
return false;
|
|
19
|
+
await access(path, platform === "win32" ? constants.F_OK : constants.X_OK);
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Find one executable by name, searching PATH before explicit directories.
|
|
28
|
+
* @param bin - base name without a platform suffix.
|
|
29
|
+
* @param dirs - extra directories after PATH.
|
|
30
|
+
* @param options - environment, platform and optional name override.
|
|
31
|
+
* @returns the first executable path, or null.
|
|
32
|
+
*/
|
|
33
|
+
export async function findExecutable(bin, dirs, options = {}) {
|
|
34
|
+
const env = options.env ?? process.env;
|
|
35
|
+
const platform = options.platform ?? process.platform;
|
|
36
|
+
const names = options.names ??
|
|
37
|
+
(platform === "win32" ? [`${bin}.exe`, `${bin}.cmd`, bin] : [bin]);
|
|
38
|
+
const path = (env.PATH ?? env.Path ?? "").split(delimiter).filter(Boolean);
|
|
39
|
+
for (const dir of [...path, ...dirs]) {
|
|
40
|
+
if (!dir)
|
|
41
|
+
continue;
|
|
42
|
+
for (const name of names) {
|
|
43
|
+
const candidate = join(dir, name);
|
|
44
|
+
if (await isExecutable(candidate, platform))
|
|
45
|
+
return candidate;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=which.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"which.js","sourceRoot":"","sources":["../../src/host/which.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,Y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,CAAC,CAAC;YAClC,IAAI,MAAM,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC;gBAAE,OAAO,SAAS,CAAC;QAChE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/lib/remote.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host Typert Remote runtime for the `typst` namespace: state frames,
|
|
3
|
+
* the live watch stream, preview bytes, file discovery, and source
|
|
4
|
+
* matching, all scoped to the calling Session's workspace through the
|
|
5
|
+
* `typstScope` lookup, adapted from the `workspaceFileScope` lookup shape in
|
|
6
|
+
* `@deepseek-ai/dsh-api-workspace-files` (that package is a reference, not a
|
|
7
|
+
* dependency of this plugin). Host half only.
|
|
8
|
+
* @module dsh-typst/remote
|
|
9
|
+
*/
|
|
10
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
11
|
+
import type { SessionId } from "@deepseek-ai/dsh-session/types";
|
|
12
|
+
import { TypertRemoteService, type TypertLookup } from "@deepseek-ai/dsh-typert-protocol";
|
|
13
|
+
import type { DiscoveryView, PreviewIdentity, PreviewBytes, TypstStateFrame } from "./contract.js";
|
|
14
|
+
import type { SourceMatch } from "./typst/match.js";
|
|
15
|
+
/**
|
|
16
|
+
* The session identity every endpoint is scoped by: received on the wire as
|
|
17
|
+
* the calling Session's id, resolved to its workspace root before the method
|
|
18
|
+
* body runs.
|
|
19
|
+
*/
|
|
20
|
+
export interface TypstScope {
|
|
21
|
+
readonly sessionId: SessionId;
|
|
22
|
+
readonly workspaceRoot: string;
|
|
23
|
+
}
|
|
24
|
+
declare module "@deepseek-ai/dsh-typert-protocol" {
|
|
25
|
+
interface TypertLookupMap {
|
|
26
|
+
/** Resolve a Session id to its workspace root without loading its event body or activating an Agent. */
|
|
27
|
+
typstScope: TypertLookup<TypstScope, SessionId>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The `typst` namespace's host service. Every method resolves the calling
|
|
32
|
+
* session's workspace through the service's session registry, so two
|
|
33
|
+
* sessions on two workspaces preview independently.
|
|
34
|
+
*/
|
|
35
|
+
export declare class TypstRuntime extends TypertRemoteService {
|
|
36
|
+
/**
|
|
37
|
+
* Register the service under the shared cordis key bound to the `typst`
|
|
38
|
+
* wire namespace.
|
|
39
|
+
* @param ctx - owning cordis context.
|
|
40
|
+
*/
|
|
41
|
+
constructor(ctx: Context);
|
|
42
|
+
/** The composed workbench service, or a stable not-composed failure. */
|
|
43
|
+
private workbench;
|
|
44
|
+
/** Live state frame for the calling session's workspace; activates the session. */
|
|
45
|
+
status(typstScope: TypstScope, signal: AbortSignal): Promise<TypstStateFrame>;
|
|
46
|
+
/** Choose the main `.typ` file; state updates follow on the watch stream. */
|
|
47
|
+
setMain(typstScope: TypstScope, path: string, signal: AbortSignal): Promise<{
|
|
48
|
+
main: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* The live state stream: the current frame first, then one frame per
|
|
52
|
+
* relevant change. Opening the stream counts as a panel subscription, so
|
|
53
|
+
* the setup re-lookup runs while Typst is unusable and stops when the
|
|
54
|
+
* stream closes.
|
|
55
|
+
*/
|
|
56
|
+
watch(typstScope: TypstScope, signal: AbortSignal): AsyncIterable<TypstStateFrame>;
|
|
57
|
+
/** The current preview PDF's bytes, or the telling no-preview failure. */
|
|
58
|
+
readPreview(typstScope: TypstScope, identity: PreviewIdentity, signal: AbortSignal): Promise<PreviewBytes>;
|
|
59
|
+
/** Match rendered text against the workspace's sources (the panel's selection toolbar). */
|
|
60
|
+
locateSource(typstScope: TypstScope, text: string, focus: string | null, signal: AbortSignal): Promise<{
|
|
61
|
+
matches: SourceMatch[];
|
|
62
|
+
}>;
|
|
63
|
+
/** Look Typst up again (the setup page's refresh); answers with the new frame. */
|
|
64
|
+
recheck(typstScope: TypstScope, signal: AbortSignal): Promise<TypstStateFrame>;
|
|
65
|
+
/** Stop the watch, relocate typst, rescan, restart; answers with the new frame. */
|
|
66
|
+
restart(typstScope: TypstScope, signal: AbortSignal): Promise<TypstStateFrame>;
|
|
67
|
+
/** Refresh the cancellable workspace index, optionally including excluded directories. */
|
|
68
|
+
discover(typstScope: TypstScope, includeExcluded: boolean, signal: AbortSignal): Promise<DiscoveryView>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,KAAK,YAAY,EAClB,MAAM,kCAAkC,CAAC;AAK1C,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,EAChB,MAAM,eAAe,CAAC;AASvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,eAAe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AClB,OAAO,CAAC,aAAa,CAAC;CAgB1B"}
|
package/lib/remote.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host Typert Remote runtime for the `typst` namespace: state frames,
|
|
3
|
+
* the live watch stream, preview bytes, file discovery, and source
|
|
4
|
+
* matching, all scoped to the calling Session's workspace through the
|
|
5
|
+
* `typstScope` lookup, adapted from the `workspaceFileScope` lookup shape in
|
|
6
|
+
* `@deepseek-ai/dsh-api-workspace-files` (that package is a reference, not a
|
|
7
|
+
* dependency of this plugin). Host half only.
|
|
8
|
+
* @module dsh-typst/remote
|
|
9
|
+
*/
|
|
10
|
+
import { TypertRemoteService, } from "@deepseek-ai/dsh-typert-protocol";
|
|
11
|
+
import { TYPST_STATUS_SERVICE_KEY, TYPST_SETTINGS_NAMESPACE, } from "./constants.js";
|
|
12
|
+
import { domainCall, rethrowRemote, TYPST_NOT_COMPOSED_MESSAGE, TypstError, TYPST_NOT_COMPOSED, } from "./errors.js";
|
|
13
|
+
/**
|
|
14
|
+
* The `typst` namespace's host service. Every method resolves the calling
|
|
15
|
+
* session's workspace through the service's session registry, so two
|
|
16
|
+
* sessions on two workspaces preview independently.
|
|
17
|
+
*/
|
|
18
|
+
export class TypstRuntime extends TypertRemoteService {
|
|
19
|
+
/**
|
|
20
|
+
* Register the service under the shared cordis key bound to the `typst`
|
|
21
|
+
* wire namespace.
|
|
22
|
+
* @param ctx - owning cordis context.
|
|
23
|
+
*/
|
|
24
|
+
constructor(ctx) {
|
|
25
|
+
super(ctx, TYPST_STATUS_SERVICE_KEY, {
|
|
26
|
+
namespace: TYPST_SETTINGS_NAMESPACE,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** The composed workbench service, or a stable not-composed failure. */
|
|
30
|
+
workbench() {
|
|
31
|
+
const service = this.ctx.get("typstWorkbench");
|
|
32
|
+
if (service === undefined) {
|
|
33
|
+
throw new TypstError(TYPST_NOT_COMPOSED_MESSAGE, TYPST_NOT_COMPOSED);
|
|
34
|
+
}
|
|
35
|
+
return service;
|
|
36
|
+
}
|
|
37
|
+
/** Live state frame for the calling session's workspace; activates the session. */
|
|
38
|
+
async status(typstScope, signal) {
|
|
39
|
+
signal.throwIfAborted();
|
|
40
|
+
return domainCall(async () => {
|
|
41
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
42
|
+
await session.activate();
|
|
43
|
+
return session.state();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Choose the main `.typ` file; state updates follow on the watch stream. */
|
|
47
|
+
async setMain(typstScope, path, signal) {
|
|
48
|
+
signal.throwIfAborted();
|
|
49
|
+
return domainCall(async () => {
|
|
50
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
51
|
+
signal.throwIfAborted();
|
|
52
|
+
const main = await session.setMain(path);
|
|
53
|
+
return { main };
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The live state stream: the current frame first, then one frame per
|
|
58
|
+
* relevant change. Opening the stream counts as a panel subscription, so
|
|
59
|
+
* the setup re-lookup runs while Typst is unusable and stops when the
|
|
60
|
+
* stream closes.
|
|
61
|
+
*/
|
|
62
|
+
async *watch(typstScope, signal) {
|
|
63
|
+
signal.throwIfAborted();
|
|
64
|
+
const session = await domainCall(async () => {
|
|
65
|
+
const workbench = this.workbench();
|
|
66
|
+
const workspaceSession = await workbench.sessionFor(typstScope.workspaceRoot);
|
|
67
|
+
await workspaceSession.activate();
|
|
68
|
+
return workspaceSession;
|
|
69
|
+
});
|
|
70
|
+
session.watchSetup(true);
|
|
71
|
+
signal.throwIfAborted();
|
|
72
|
+
// Subscribe before the first snapshot: the generator registers its
|
|
73
|
+
// listener on the first next(), and a change that lands while the first
|
|
74
|
+
// frame is being written must not be lost.
|
|
75
|
+
const changes = session.onChangeWaiter(signal);
|
|
76
|
+
const wake = changes.next();
|
|
77
|
+
try {
|
|
78
|
+
yield session.state();
|
|
79
|
+
let next = await wake;
|
|
80
|
+
while (!next.done) {
|
|
81
|
+
yield session.state();
|
|
82
|
+
next = await changes.next();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
// Preserve the stream failure's own `typst/<reason>` code on the wire.
|
|
87
|
+
rethrowRemote(error);
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
await changes.return(undefined);
|
|
91
|
+
session.watchSetup(false);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** The current preview PDF's bytes, or the telling no-preview failure. */
|
|
95
|
+
async readPreview(typstScope, identity, signal) {
|
|
96
|
+
signal.throwIfAborted();
|
|
97
|
+
return domainCall(async () => {
|
|
98
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
99
|
+
const { info, bytes } = session.previewBytes(identity);
|
|
100
|
+
return {
|
|
101
|
+
generation: info.generation,
|
|
102
|
+
seq: info.seq,
|
|
103
|
+
sha256: info.sha256,
|
|
104
|
+
// The gateway's writeBytes records this view for the RPC attachment;
|
|
105
|
+
// it never transfers or detaches it, so the retained snapshot stays
|
|
106
|
+
// readable for later page extraction and highlight relocation.
|
|
107
|
+
data: bytes,
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/** Match rendered text against the workspace's sources (the panel's selection toolbar). */
|
|
112
|
+
async locateSource(typstScope, text, focus, signal) {
|
|
113
|
+
signal.throwIfAborted();
|
|
114
|
+
return domainCall(async () => {
|
|
115
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
116
|
+
const matches = await session.locateSource(text, focus ?? undefined, signal);
|
|
117
|
+
return { matches };
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/** Look Typst up again (the setup page's refresh); answers with the new frame. */
|
|
121
|
+
async recheck(typstScope, signal) {
|
|
122
|
+
signal.throwIfAborted();
|
|
123
|
+
return domainCall(async () => {
|
|
124
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
125
|
+
signal.throwIfAborted();
|
|
126
|
+
await session.recheck(true);
|
|
127
|
+
return session.state();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/** Stop the watch, relocate typst, rescan, restart; answers with the new frame. */
|
|
131
|
+
async restart(typstScope, signal) {
|
|
132
|
+
signal.throwIfAborted();
|
|
133
|
+
return domainCall(async () => {
|
|
134
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
135
|
+
signal.throwIfAborted();
|
|
136
|
+
await session.restart();
|
|
137
|
+
return session.state();
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** Refresh the cancellable workspace index, optionally including excluded directories. */
|
|
141
|
+
async discover(typstScope, includeExcluded, signal) {
|
|
142
|
+
signal.throwIfAborted();
|
|
143
|
+
return domainCall(async () => {
|
|
144
|
+
const session = await this.workbench().sessionFor(typstScope.workspaceRoot);
|
|
145
|
+
signal.throwIfAborted();
|
|
146
|
+
await session.discover(includeExcluded, signal);
|
|
147
|
+
const frame = session.state();
|
|
148
|
+
return {
|
|
149
|
+
candidates: frame.candidates.length,
|
|
150
|
+
includeExcluded,
|
|
151
|
+
errors: frame.discovery.errors,
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote.js","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,mBAAmB,GAEpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EACL,UAAU,EACV,aAAa,EACb,0BAA0B,EAC1B,UAAU,EACV,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAqBrB;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,mBAAmB;IACnD;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
+
* workspace `WorkspaceSession` registry (one `typst watch` per workspace
|
|
4
|
+
* root, stopped on dispose), the plugin configuration lifecycle, the Typert
|
|
5
|
+
* manifest and scope lookup, and the agent tools. Host half only.
|
|
6
|
+
*
|
|
7
|
+
* Request-driven like the dsh-zotero core: loading the plugin never spawns
|
|
8
|
+
* typst and touches nothing on disk. The first tool call, or the first
|
|
9
|
+
* panel subscription on a workspace, starts that workspace's session.
|
|
10
|
+
* @module dsh-typst/service
|
|
11
|
+
*/
|
|
12
|
+
import { Service, type Context } from "@deepseek-ai/cordis";
|
|
13
|
+
import { Config } from "./config.js";
|
|
14
|
+
import { WorkspaceSession } from "./workspace/session.js";
|
|
15
|
+
declare module "@deepseek-ai/cordis" {
|
|
16
|
+
interface Context {
|
|
17
|
+
typstWorkbench: TypstWorkbenchService;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export declare class TypstWorkbenchService extends Service {
|
|
21
|
+
static inject: string[];
|
|
22
|
+
static Config: import("@deepseek-ai/schemastery").default<Schemastery.ObjectS<NoInfer<{
|
|
23
|
+
typstPath: import("@deepseek-ai/schemastery").default<string, string, "volatile-defined">;
|
|
24
|
+
fontPaths: import("@deepseek-ai/schemastery").default<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
25
|
+
packagePath: import("@deepseek-ai/schemastery").default<string, string, "volatile-defined">;
|
|
26
|
+
excludeDirs: import("@deepseek-ai/schemastery").default<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
27
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
28
|
+
typstPath: import("@deepseek-ai/schemastery").default<string, string, "volatile-defined">;
|
|
29
|
+
fontPaths: import("@deepseek-ai/schemastery").default<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
30
|
+
packagePath: import("@deepseek-ai/schemastery").default<string, string, "volatile-defined">;
|
|
31
|
+
excludeDirs: import("@deepseek-ai/schemastery").default<NoInfer<string[]>, NoInfer<string[]>, "volatile-defined">;
|
|
32
|
+
}>>, "plain">;
|
|
33
|
+
/** Live entry config: volatile references re-read per request. */
|
|
34
|
+
private readonly entry;
|
|
35
|
+
/** The last settings snapshot applied to live sessions, for change detection. */
|
|
36
|
+
private appliedSettings;
|
|
37
|
+
/** Settings commits are serialized: two overlapping commits never race a watch. */
|
|
38
|
+
private settingsQueue;
|
|
39
|
+
/** Workspace sessions keyed by resolved workspace root. */
|
|
40
|
+
private readonly sessions;
|
|
41
|
+
/** Workspace roots whose lazy session is being closed; new callers wait. */
|
|
42
|
+
private readonly closing;
|
|
43
|
+
constructor(ctx: Context, config: Config);
|
|
44
|
+
/** The live entry's current values, read per request. */
|
|
45
|
+
private get resolved();
|
|
46
|
+
protected [Service.init](): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* The workspace's session, creating it on first use. Keyed by the
|
|
49
|
+
* realpath of the workspace root so symlinked paths of the same workspace
|
|
50
|
+
* share one watcher.
|
|
51
|
+
* @param workspaceRoot - the session workspace's absolute root.
|
|
52
|
+
*/
|
|
53
|
+
sessionFor(workspaceRoot: string): Promise<WorkspaceSession>;
|
|
54
|
+
/** Realpath when it exists; the original spelling otherwise. */
|
|
55
|
+
private canonical;
|
|
56
|
+
/**
|
|
57
|
+
* Close a workspace's session once its last live session is gone. The
|
|
58
|
+
* disposed session is excluded from the live set because the store removes
|
|
59
|
+
* it before announcing disposal.
|
|
60
|
+
*/
|
|
61
|
+
private releaseIfUnused;
|
|
62
|
+
/**
|
|
63
|
+
* Diff the committed settings against the ones already applied. A toolchain
|
|
64
|
+
* change (binary, fonts, packages) restarts the watch; an exclusion change
|
|
65
|
+
* only re-runs discovery, because discovery is exactly what it feeds.
|
|
66
|
+
*/
|
|
67
|
+
private scheduleSettingsApply;
|
|
68
|
+
/** Apply one settings change to every active session, in order; inactive ones read it when they start. */
|
|
69
|
+
private applySettings;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAO5D,OAAO,EACL,MAAM,EAMP,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,cAAc,EAAE,qBAAqB,CAAC;KACvC;CACF;AAED,qBAAa,qBAAsB,SAAQ,OAAO;IAChD,MAAM,CAAC,MAAM,WAA2B;IAExC,MAAM,CAAC,MAAM;;;;;;;;;;kBAAU;IAEvB,kEAAkE;IAClE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;IAElC,iFAAiF;IACjF,OAAO,CAAC,eAAe,CAAiB;IAExC,mFAAmF;IACnF,OAAO,CAAC,aAAa,CAAoC;IAEzD,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAEhE,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;gBAEhD,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;IAMxC,yDAAyD;IACzD,OAAO,KAAK,QAAQ,GAEnB;cAEe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAsF/C;;;;;OAKG;IACG,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiBlE,gEAAgE;YAClD,SAAS;IAIvB;;;;OAIG;YACW,eAAe;IAkC7B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAiB7B,0GAA0G;YAC5F,aAAa;CAa5B"}
|