实现账号绑定、持久登录与跨设备对局恢复
CI / test (ubuntu-latest, node 22) (push) Failing after 33m10s
CI / test (ubuntu-latest, node 24) (push) Failing after 34m41s
CI / tooling (lint, imports, typecheck) (push) Failing after 36m11s
CI / test (windows-latest, node 22) (push) Canceled after 0s
CI / test (windows-latest, node 24) (push) Canceled after 0s

This commit is contained in:
herryyun committed 2026-10-14 23:22:50 +08:00
1 parent 488db49f11
commit 7c25c89992
62 files changed
+6855 -1005

No files matched your search

+14 -1
View File
@@ -1,6 +1,7 @@
// .gitignore keeps per-machine state out of the repository (and so out of the release packages, which ship tracked
// files only: tools/package.mjs). GitHub #258: a local npm cache (`npm_config_cache=./.npm-cache`, `npm ci --cache
// .npm-cache`) must never be committed by any contributor.
// .npm-cache`) must never be committed by any contributor. The opt-in Skland credential database (docs/skland.md) is
// the other per-machine secret: `data/skland.db` and the Docker volume path `skland-data/`.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
@@ -29,3 +30,15 @@ test('GitHub #258: the local npm cache (.npm-cache/) is ignored, like node_modul
}
assert.notEqual(ignored('package.json'), true, 'a tracked file is not');
});
test('the Skland credential database (docs/skland.md): the file, its WAL side files and the Docker volume path', () => {
for (const entry of ['data/skland.db', 'data/skland.db-wal', 'data/skland.db-shm', 'skland-data/']) {
assert.ok(lines.includes(entry), `.gitignore lists ${entry}`);
}
// the store's default path, the two side files node:sqlite/WAL writes next to it, and the bind-mount form a
// deployment may use instead of docker-compose.yml's named volume (docker.test.js pins the volume itself)
for (const rel of ['data/skland.db', 'data/skland.db-wal', 'data/skland.db-shm', 'skland-data/skland.db', 'skland-data/skland.db-wal']) {
const v = ignored(rel);
if (v !== null) assert.equal(v, true, `${rel} is ignored`);
}
});