@hachej/boring-files 0.4.26 → 0.4.28
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/workspace-catalog.js +2 -1
- package/dist/workspace.js +2 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ignore from 'ignore';
|
|
2
|
+
import { BACKGROUND_CONTEXT, withAbortSignal } from '@earendil-works/chord/context';
|
|
2
3
|
import { identifier, locator } from './publication-input.js';
|
|
3
4
|
import { HIDDEN_NAMES, isTemporary } from './file-types.js';
|
|
4
5
|
import { RevisionError } from './revision-contracts.js';
|
|
@@ -22,7 +23,7 @@ export function createWorkspaceCatalog(options) {
|
|
|
22
23
|
const absolute = (path) => `${root === '/' ? '' : root}/${path}`;
|
|
23
24
|
const check = (access) => { if (access.signal?.aborted)
|
|
24
25
|
throw new RevisionError('aborted', 'File browsing was cancelled'); };
|
|
25
|
-
const context = (access) =>
|
|
26
|
+
const context = (access) => access.signal ? withAbortSignal(access.signal, BACKGROUND_CONTEXT) : BACKGROUND_CONTEXT;
|
|
26
27
|
async function contained(path, access) {
|
|
27
28
|
check(access);
|
|
28
29
|
const base = await fs.canonicalPath(root, context(access));
|
package/dist/workspace.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BACKGROUND_CONTEXT, withAbortSignal } from '@earendil-works/chord/context';
|
|
1
2
|
import { createWorkspaceCatalog } from './workspace-catalog.js';
|
|
2
3
|
import { committedChanges } from './journal.js';
|
|
3
4
|
import { randomUUID, sha1 } from './platform.js';
|
|
@@ -60,7 +61,7 @@ export function createWorkspaceProvider(options) {
|
|
|
60
61
|
const listeners = new Set();
|
|
61
62
|
const known = new Map();
|
|
62
63
|
const startedAt = Date.now();
|
|
63
|
-
const fsContext = (signal) =>
|
|
64
|
+
const fsContext = (signal) => signal ? withAbortSignal(signal, BACKGROUND_CONTEXT) : BACKGROUND_CONTEXT;
|
|
64
65
|
const absolute = (path) => root.endsWith('/') ? root + path : `${root}/${path}`;
|
|
65
66
|
const ref = (path, revision) => ({ resource: { providerId, path }, view: { kind: 'published' }, revision });
|
|
66
67
|
const supported = (value) => value.resource.providerId === providerId && value.view.kind === 'published';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-files",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.28",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"isomorphic-git": "^1.42.6",
|
|
96
|
-
"@earendil-works/pi-durable": "~1.
|
|
97
|
-
"@earendil-works/chord": "~1.
|
|
96
|
+
"@earendil-works/pi-durable": "~1.4.0",
|
|
97
|
+
"@earendil-works/chord": "~1.4.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependenciesMeta": {
|
|
100
100
|
"isomorphic-git": {
|