@stacklift/sdk-electron 0.0.0-stage → 0.1.3
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 +110 -0
- package/README.md +24 -2
- package/dist/index.d.ts +67 -0
- package/dist/index.js +123 -0
- package/package.json +54 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Stacklift
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @stacklift/sdk-electron
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Stacklift updater for Electron apps. It checks for a newer desktop installer, streams it to disk and verifies its signature and checksum before you install it.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @stacklift/sdk-electron
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { app, shell } from 'electron';
|
|
11
|
+
import { StackliftElectronUpdater } from '@stacklift/sdk-electron';
|
|
12
|
+
|
|
13
|
+
const updater = new StackliftElectronUpdater({ app, shell, baseUrl, apiKey, channel: 'stable', pinnedPublicKey: PINNED_PEM });
|
|
14
|
+
const update = await updater.check(); // null if there is nothing to install
|
|
15
|
+
if (update) {
|
|
16
|
+
const file = await updater.download(update); // written as .part, renamed only after verification
|
|
17
|
+
await updater.installAndQuit(file);
|
|
18
|
+
}
|
|
19
|
+
// on the next launch of the new version:
|
|
20
|
+
await updater.reportInstalled(previousVersion, releaseId);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The installer's file name comes from the server unsigned, so it is reduced to a base name and must carry an extension allowed for the current OS. Built on [`@stacklift/sdk-js`](https://www.npmjs.com/package/@stacklift/sdk-js).
|
|
24
|
+
|
|
25
|
+
Full guide: https://github.com/Joynul-Abedin/stacklift/blob/main/docs/sdk.md · License: MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type ArtifactSink, type KeyValueStorage, type Platform, type UpdateManifest } from '@stacklift/sdk-js';
|
|
2
|
+
/** The slice of Electron we use. Pass the real `app` and `shell`; tests pass fakes. */
|
|
3
|
+
export interface ElectronLike {
|
|
4
|
+
app: {
|
|
5
|
+
getVersion(): string;
|
|
6
|
+
getPath(name: 'userData' | 'temp'): string;
|
|
7
|
+
quit(): void;
|
|
8
|
+
};
|
|
9
|
+
shell: {
|
|
10
|
+
openPath(path: string): Promise<string>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ElectronUpdaterOptions extends ElectronLike {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
apiKey: string;
|
|
16
|
+
channel: string;
|
|
17
|
+
/** Ed25519 public key (PEM) shipped inside your app. Strongly recommended — see ClientOptions.pinnedPublicKey. */
|
|
18
|
+
pinnedPublicKey?: string;
|
|
19
|
+
/** Compatibility line of this build. Defaults to the app version's major.0.0 — set it explicitly if you use another scheme. */
|
|
20
|
+
runtimeVersion?: string;
|
|
21
|
+
environment?: string;
|
|
22
|
+
/** Persists the random install id (electron-store, a JSON file, ...). Defaults to an in-memory store (a new id every launch). */
|
|
23
|
+
storage?: KeyValueStorage;
|
|
24
|
+
/** Override `process.platform` (tests). */
|
|
25
|
+
nodePlatform?: NodeJS.Platform;
|
|
26
|
+
fetch?: typeof fetch;
|
|
27
|
+
}
|
|
28
|
+
export interface AvailableUpdate {
|
|
29
|
+
manifest: UpdateManifest;
|
|
30
|
+
version: string;
|
|
31
|
+
releaseId: string;
|
|
32
|
+
platform: Platform;
|
|
33
|
+
/** Server-provided file name, sanitised. Informational: it is not covered by the signature. */
|
|
34
|
+
fileName: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function safeFileName(raw: string | undefined, platform: string, version: string): string;
|
|
37
|
+
/** Streams to `<dest>.part`, renames to `dest` only after verification succeeded, deletes the partial file on any failure. */
|
|
38
|
+
export declare class FileSink implements ArtifactSink {
|
|
39
|
+
readonly dest: string;
|
|
40
|
+
private ws?;
|
|
41
|
+
constructor(dest: string);
|
|
42
|
+
private open;
|
|
43
|
+
write(chunk: Uint8Array): Promise<void>;
|
|
44
|
+
close(): Promise<void>;
|
|
45
|
+
abort(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare class StackliftElectronUpdater {
|
|
48
|
+
private readonly o;
|
|
49
|
+
private readonly client;
|
|
50
|
+
private readonly platform;
|
|
51
|
+
private readonly mem;
|
|
52
|
+
private readonly storage;
|
|
53
|
+
constructor(o: ElectronUpdaterOptions);
|
|
54
|
+
private runtimeVersion;
|
|
55
|
+
/** Ask the delivery plane. Resolves to null when this install is current, not targeted, or nothing is deployed. */
|
|
56
|
+
check(): Promise<AvailableUpdate | null>;
|
|
57
|
+
/** Download into userData/updates/<version>/ and verify. Returns the path of the verified installer. */
|
|
58
|
+
download(update: AvailableUpdate, onProgress?: (received: number, total: number) => void): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Open the verified installer with the OS and quit so it can replace the running app.
|
|
61
|
+
* Reports INSTALL_SUCCESS only to say "handed off": the installer itself is outside our control — report the real outcome from the new version if you need it.
|
|
62
|
+
*/
|
|
63
|
+
installAndQuit(installerPath: string): Promise<void>;
|
|
64
|
+
/** Report the outcome from the app's first launch after updating — this is the real success signal. */
|
|
65
|
+
reportInstalled(previousVersion: string, releaseId: string): Promise<void>;
|
|
66
|
+
private report;
|
|
67
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StackliftElectronUpdater = exports.FileSink = void 0;
|
|
4
|
+
exports.safeFileName = safeFileName;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
6
|
+
const promises_1 = require("node:fs/promises");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const node_events_1 = require("node:events");
|
|
9
|
+
const sdk_js_1 = require("@stacklift/sdk-js");
|
|
10
|
+
const PLATFORM = { win32: 'windows', darwin: 'macos', linux: 'linux' };
|
|
11
|
+
/** The server's file name is unsigned, so only these extensions may be written/opened, per OS. */
|
|
12
|
+
const ALLOWED_EXT = {
|
|
13
|
+
windows: ['.exe', '.msi', '.msix', '.zip'],
|
|
14
|
+
macos: ['.dmg', '.pkg', '.zip'],
|
|
15
|
+
linux: ['.appimage', '.deb', '.rpm', '.zip', '.tgz', '.tar.gz'],
|
|
16
|
+
};
|
|
17
|
+
function safeFileName(raw, platform, version) {
|
|
18
|
+
const base = (0, node_path_1.basename)((raw ?? '').replace(/\\/g, '/')).replace(/[^\w.+-]/g, '_');
|
|
19
|
+
const lower = base.toLowerCase();
|
|
20
|
+
const ext = [...(ALLOWED_EXT[platform] ?? [])].sort((a, b) => b.length - a.length).find((e) => lower.endsWith(e));
|
|
21
|
+
if (!ext)
|
|
22
|
+
throw new sdk_js_1.StackliftError('bad_response', `Refusing installer "${raw ?? ''}": not an installer type allowed for ${platform} (${(ALLOWED_EXT[platform] ?? []).join(', ')})`);
|
|
23
|
+
const stem = base.slice(0, base.length - ext.length).replace(/^\.+/, '') || 'update';
|
|
24
|
+
return `${stem}${ext}`.slice(-120) || `stacklift-${version}${ext}`;
|
|
25
|
+
}
|
|
26
|
+
/** Streams to `<dest>.part`, renames to `dest` only after verification succeeded, deletes the partial file on any failure. */
|
|
27
|
+
class FileSink {
|
|
28
|
+
dest;
|
|
29
|
+
ws;
|
|
30
|
+
constructor(dest) {
|
|
31
|
+
this.dest = dest;
|
|
32
|
+
}
|
|
33
|
+
async open() {
|
|
34
|
+
if (this.ws)
|
|
35
|
+
return this.ws;
|
|
36
|
+
await (0, promises_1.mkdir)((0, node_path_1.join)(this.dest, '..'), { recursive: true });
|
|
37
|
+
this.ws = (0, node_fs_1.createWriteStream)(`${this.dest}.part`, { flags: 'w' });
|
|
38
|
+
return this.ws;
|
|
39
|
+
}
|
|
40
|
+
async write(chunk) {
|
|
41
|
+
const ws = await this.open();
|
|
42
|
+
if (!ws.write(chunk))
|
|
43
|
+
await (0, node_events_1.once)(ws, 'drain');
|
|
44
|
+
}
|
|
45
|
+
async close() {
|
|
46
|
+
const ws = await this.open();
|
|
47
|
+
ws.end();
|
|
48
|
+
await (0, node_events_1.once)(ws, 'finish');
|
|
49
|
+
await (0, promises_1.rename)(`${this.dest}.part`, this.dest);
|
|
50
|
+
}
|
|
51
|
+
async abort() {
|
|
52
|
+
this.ws?.destroy();
|
|
53
|
+
await (0, promises_1.rm)(`${this.dest}.part`, { force: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.FileSink = FileSink;
|
|
57
|
+
class StackliftElectronUpdater {
|
|
58
|
+
o;
|
|
59
|
+
client;
|
|
60
|
+
platform;
|
|
61
|
+
mem = new Map();
|
|
62
|
+
storage;
|
|
63
|
+
constructor(o) {
|
|
64
|
+
this.o = o;
|
|
65
|
+
const p = PLATFORM[o.nodePlatform ?? process.platform];
|
|
66
|
+
if (!p)
|
|
67
|
+
throw new sdk_js_1.StackliftError('unsupported', `Unsupported desktop platform "${o.nodePlatform ?? process.platform}"`);
|
|
68
|
+
this.platform = p;
|
|
69
|
+
this.storage = o.storage ?? { getItem: (k) => this.mem.get(k), setItem: (k, v) => void this.mem.set(k, v) };
|
|
70
|
+
this.client = new sdk_js_1.StackliftClient({ baseUrl: o.baseUrl, apiKey: o.apiKey, pinnedPublicKey: o.pinnedPublicKey, fetch: o.fetch });
|
|
71
|
+
}
|
|
72
|
+
runtimeVersion() {
|
|
73
|
+
return this.o.runtimeVersion ?? `${this.o.app.getVersion().split('.')[0]}.0.0`;
|
|
74
|
+
}
|
|
75
|
+
/** Ask the delivery plane. Resolves to null when this install is current, not targeted, or nothing is deployed. */
|
|
76
|
+
async check() {
|
|
77
|
+
const deviceId = await (0, sdk_js_1.getOrCreateDeviceId)(this.storage);
|
|
78
|
+
const manifest = await this.client.check({ channel: this.o.channel, platform: this.platform, runtimeVersion: this.runtimeVersion(), currentVersion: this.o.app.getVersion(), deviceId, environment: this.o.environment });
|
|
79
|
+
if (!manifest.updateAvailable || !manifest.release)
|
|
80
|
+
return null;
|
|
81
|
+
const rel = this.client.verifyManifest(manifest); // signature first: nothing below trusts the metadata until this passes
|
|
82
|
+
return { manifest, version: rel.version, releaseId: rel.id, platform: this.platform, fileName: safeFileName(rel.artifact.filename, this.platform, rel.version) };
|
|
83
|
+
}
|
|
84
|
+
/** Download into userData/updates/<version>/ and verify. Returns the path of the verified installer. */
|
|
85
|
+
async download(update, onProgress) {
|
|
86
|
+
const dest = (0, node_path_1.join)(this.o.app.getPath('userData'), 'updates', update.version.replace(/[^\w.+-]/g, '_'), update.fileName);
|
|
87
|
+
const deviceId = await (0, sdk_js_1.getOrCreateDeviceId)(this.storage);
|
|
88
|
+
try {
|
|
89
|
+
await this.client.download(update.manifest, new FileSink(dest), { onProgress });
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
await this.report('INSTALL_FAILURE', update, deviceId, e);
|
|
93
|
+
throw e;
|
|
94
|
+
}
|
|
95
|
+
await this.report('DOWNLOAD', update, deviceId);
|
|
96
|
+
return dest;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Open the verified installer with the OS and quit so it can replace the running app.
|
|
100
|
+
* Reports INSTALL_SUCCESS only to say "handed off": the installer itself is outside our control — report the real outcome from the new version if you need it.
|
|
101
|
+
*/
|
|
102
|
+
async installAndQuit(installerPath) {
|
|
103
|
+
if (!ALLOWED_EXT[this.platform].some((e) => installerPath.toLowerCase().endsWith(e)))
|
|
104
|
+
throw new sdk_js_1.StackliftError('bad_response', `Refusing to open "${(0, node_path_1.extname)(installerPath)}" file`);
|
|
105
|
+
const err = await this.o.shell.openPath(installerPath);
|
|
106
|
+
if (err)
|
|
107
|
+
throw new sdk_js_1.StackliftError('unsupported', `The OS could not open the installer: ${err}`);
|
|
108
|
+
this.o.app.quit();
|
|
109
|
+
}
|
|
110
|
+
/** Report the outcome from the app's first launch after updating — this is the real success signal. */
|
|
111
|
+
async reportInstalled(previousVersion, releaseId) {
|
|
112
|
+
const deviceId = await (0, sdk_js_1.getOrCreateDeviceId)(this.storage);
|
|
113
|
+
await this.client
|
|
114
|
+
.report({ type: 'INSTALL_SUCCESS', releaseId, channel: this.o.channel, platform: this.platform, deviceId, fromVersion: previousVersion })
|
|
115
|
+
.catch(() => undefined);
|
|
116
|
+
}
|
|
117
|
+
async report(type, u, deviceId, e) {
|
|
118
|
+
await this.client
|
|
119
|
+
.report({ type, releaseId: u.releaseId, channel: this.o.channel, platform: this.platform, deviceId, fromVersion: this.o.app.getVersion(), ...(e ? { errorCode: e.code ?? 'unknown', errorMessage: String(e.message).slice(0, 400) } : {}) })
|
|
120
|
+
.catch(() => undefined); // telemetry must never break an update
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.StackliftElectronUpdater = StackliftElectronUpdater;
|
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacklift/sdk-electron",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Stacklift updater for Electron apps: check, download and verify signed desktop installers.",
|
|
5
|
+
"license": "FSL-1.1-MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"stacklift",
|
|
8
|
+
"electron",
|
|
9
|
+
"auto-update",
|
|
10
|
+
"updater",
|
|
11
|
+
"sdk"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/Joynul-Abedin/stacklift.git",
|
|
16
|
+
"directory": "packages/sdk-electron"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/Joynul-Abedin/stacklift/issues"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"files": [
|
|
35
|
+
"dist/**/*.js",
|
|
36
|
+
"dist/**/*.d.ts",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@stacklift/sdk-js": "0.1.3"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"typescript": "~5.9.3",
|
|
48
|
+
"vitest": "^3.2.0",
|
|
49
|
+
"@types/node": "^22.10.0"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsc -p tsconfig.json",
|
|
53
|
+
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
|
|
54
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
55
|
+
"test": "vitest run"
|
|
56
|
+
}
|
|
6
57
|
}
|