pinokiod 8.0.39 → 8.0.41
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/kernel/api/hf/index.js +2 -2
- package/kernel/api/index.js +12 -3
- package/kernel/connect/index.js +2 -2
- package/kernel/connect/providers/huggingface/index.js +14 -5
- package/kernel/index.js +14 -2
- package/kernel/shell.js +3 -2
- package/kernel/shells.js +6 -0
- package/kernel/vault/constants.js +13 -0
- package/kernel/vault/hash_worker.js +9 -2
- package/kernel/vault/index.js +1856 -316
- package/kernel/vault/registry.js +526 -52
- package/kernel/vault/snapshot.js +29 -0
- package/kernel/vault/sweeper.js +480 -210
- package/kernel/vault/walker.js +142 -0
- package/package.json +1 -1
- package/server/index.js +79 -90
- package/server/lib/privacy_filter_cache.js +4 -1
- package/server/public/storage-size.js +12 -0
- package/server/public/style.css +13 -0
- package/server/public/tab-link-popover.js +3 -0
- package/server/public/vault-nav.js +96 -0
- package/server/public/vault.css +1079 -0
- package/server/public/vault.js +1835 -0
- package/server/views/app.ejs +93 -16
- package/server/views/connect/huggingface.ejs +7 -9
- package/server/views/partials/main_sidebar.ejs +6 -1
- package/server/views/partials/vault_workspace.ejs +55 -0
- package/server/views/vault.ejs +5 -1532
- package/server/views/vault_app.ejs +22 -0
- package/test/hf-api.test.js +4 -2
- package/test/huggingface-connect.test.js +7 -11
- package/test/huggingface-token-validity.test.js +135 -0
- package/test/plugin-action-functions.test.js +19 -0
- package/test/privacy-filter-cache.test.js +1 -0
- package/test/vault-engine.test.js +1276 -26
- package/test/vault-sweep.test.js +1043 -35
- package/test/vault-ui.test.js +2184 -65
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const fileSnapshot = (st) => ({
|
|
2
|
+
dev: st.dev,
|
|
3
|
+
ino: st.ino,
|
|
4
|
+
size: st.size,
|
|
5
|
+
mtime: st.mtimeMs,
|
|
6
|
+
ctime: st.ctimeMs
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
const sameSnapshot = (snapshot, st) => !!(
|
|
10
|
+
snapshot && st &&
|
|
11
|
+
snapshot.dev === st.dev &&
|
|
12
|
+
snapshot.ino === st.ino &&
|
|
13
|
+
snapshot.size === st.size &&
|
|
14
|
+
snapshot.mtime === st.mtimeMs &&
|
|
15
|
+
snapshot.ctime === st.ctimeMs
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
// Adding or removing a hardlink legitimately changes ctime without changing
|
|
19
|
+
// the file identity or bytes. Use this only across Vault's own link updates;
|
|
20
|
+
// hashing and externally visible mutations still require sameSnapshot().
|
|
21
|
+
const sameContentState = (snapshot, st) => !!(
|
|
22
|
+
snapshot && st &&
|
|
23
|
+
snapshot.dev === st.dev &&
|
|
24
|
+
snapshot.ino === st.ino &&
|
|
25
|
+
snapshot.size === st.size &&
|
|
26
|
+
snapshot.mtime === st.mtimeMs
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
module.exports = { fileSnapshot, sameSnapshot, sameContentState }
|