@fnndsc/salsa 4.5.6 → 4.6.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/README.md +0 -2
- package/dist/compute/index.d.ts +0 -9
- package/dist/compute/index.js +0 -16
- package/dist/compute/index.js.map +1 -1
- package/dist/dag/feedData.js +166 -73
- package/dist/dag/feedData.js.map +1 -1
- package/dist/dag/feedLoad.d.ts +1 -1
- package/dist/dag/feedLoad.js +6 -4
- package/dist/dag/feedLoad.js.map +1 -1
- package/dist/dicom/pixels.js +95 -36
- package/dist/dicom/pixels.js.map +1 -1
- package/dist/dicom/series.d.ts +4 -1
- package/dist/dicom/series.js +80 -31
- package/dist/dicom/series.js.map +1 -1
- package/dist/dicom/tags.d.ts +28 -0
- package/dist/dicom/tags.js +30 -0
- package/dist/dicom/tags.js.map +1 -1
- package/dist/files/copy.d.ts +197 -0
- package/dist/files/copy.js +636 -0
- package/dist/files/copy.js.map +1 -0
- package/dist/files/copyFolder.d.ts +103 -0
- package/dist/files/copyFolder.js +199 -0
- package/dist/files/copyFolder.js.map +1 -0
- package/dist/files/create.d.ts +178 -0
- package/dist/files/create.js +444 -0
- package/dist/files/create.js.map +1 -0
- package/dist/files/download.d.ts +188 -0
- package/dist/files/download.js +541 -0
- package/dist/files/download.js.map +1 -0
- package/dist/files/index.d.ts +69 -141
- package/dist/files/index.js +184 -535
- package/dist/files/index.js.map +1 -1
- package/dist/files/listing.d.ts +132 -0
- package/dist/files/listing.js +179 -0
- package/dist/files/listing.js.map +1 -0
- package/dist/files/move.d.ts +125 -0
- package/dist/files/move.js +334 -0
- package/dist/files/move.js.map +1 -0
- package/dist/files/pathMapper.d.ts +24 -1
- package/dist/files/pathMapper.js +108 -47
- package/dist/files/pathMapper.js.map +1 -1
- package/dist/files/proof.d.ts +315 -0
- package/dist/files/proof.js +574 -0
- package/dist/files/proof.js.map +1 -0
- package/dist/files/removal.d.ts +223 -0
- package/dist/files/removal.js +318 -0
- package/dist/files/removal.js.map +1 -0
- package/dist/files/replace.d.ts +175 -0
- package/dist/files/replace.js +582 -0
- package/dist/files/replace.js.map +1 -0
- package/dist/files/upload.d.ts +205 -0
- package/dist/files/upload.js +478 -0
- package/dist/files/upload.js.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +45 -32
- package/dist/index.js.map +1 -1
- package/dist/jobs/index.d.ts +1 -1
- package/dist/jobs/index.js +2 -2
- package/dist/jobs/index.js.map +1 -1
- package/dist/jobs/jobOps.d.ts +20 -13
- package/dist/jobs/jobOps.js +41 -37
- package/dist/jobs/jobOps.js.map +1 -1
- package/dist/pacs/anonymise.d.ts +17 -36
- package/dist/pacs/anonymise.js +29 -67
- package/dist/pacs/anonymise.js.map +1 -1
- package/dist/pipelines/index.d.ts +1 -13
- package/dist/pipelines/index.js +0 -38
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/invocation.js +321 -167
- package/dist/pipelines/invocation.js.map +1 -1
- package/dist/pipelines/manifest.js.map +1 -1
- package/dist/pipelines/packages.d.ts +11 -8
- package/dist/pipelines/packages.js +253 -77
- package/dist/pipelines/packages.js.map +1 -1
- package/dist/plugins/adminToken.d.ts +67 -0
- package/dist/plugins/adminToken.js +77 -0
- package/dist/plugins/adminToken.js.map +1 -0
- package/dist/plugins/index.d.ts +0 -7
- package/dist/plugins/index.js +0 -16
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/peer_search.d.ts +0 -15
- package/dist/plugins/peer_search.js +0 -25
- package/dist/plugins/peer_search.js.map +1 -1
- package/dist/plugins/plugin_add.d.ts +14 -2
- package/dist/plugins/plugin_add.js +42 -13
- package/dist/plugins/plugin_add.js.map +1 -1
- package/dist/plugins/plugin_docker.d.ts +25 -0
- package/dist/plugins/plugin_docker.js +33 -0
- package/dist/plugins/plugin_docker.js.map +1 -1
- package/dist/plugins/plugin_register.d.ts +0 -10
- package/dist/plugins/plugin_register.js +3 -54
- package/dist/plugins/plugin_register.js.map +1 -1
- package/dist/plugins/plugin_sync.js +45 -22
- package/dist/plugins/plugin_sync.js.map +1 -1
- package/dist/plugins/plugin_validate.js +47 -13
- package/dist/plugins/plugin_validate.js.map +1 -1
- package/dist/plugins/store_import.d.ts +0 -9
- package/dist/plugins/store_import.js +3 -29
- package/dist/plugins/store_import.js.map +1 -1
- package/dist/retrieve/task.d.ts +137 -0
- package/dist/retrieve/task.js +41 -0
- package/dist/retrieve/task.js.map +1 -0
- package/dist/retrieve/watch.d.ts +2 -118
- package/dist/retrieve/watch.js +452 -321
- package/dist/retrieve/watch.js.map +1 -1
- package/dist/vfs/providers/etc.d.ts +6 -4
- package/dist/vfs/providers/etc.js +12 -4
- package/dist/vfs/providers/etc.js.map +1 -1
- package/dist/vfs/providers/native.d.ts +116 -39
- package/dist/vfs/providers/native.js +291 -347
- package/dist/vfs/providers/native.js.map +1 -1
- package/dist/vfs/providers/pacs.d.ts +29 -3
- package/dist/vfs/providers/pacs.js +303 -73
- package/dist/vfs/providers/pacs.js.map +1 -1
- package/dist/vfs/providers/pacs_content.js +22 -6
- package/dist/vfs/providers/pacs_content.js.map +1 -1
- package/dist/vfs/providers/proc/backfill.d.ts +46 -0
- package/dist/vfs/providers/proc/backfill.js +147 -0
- package/dist/vfs/providers/proc/backfill.js.map +1 -0
- package/dist/vfs/providers/proc/book.d.ts +176 -0
- package/dist/vfs/providers/proc/book.js +73 -0
- package/dist/vfs/providers/proc/book.js.map +1 -0
- package/dist/vfs/providers/proc/catchup.d.ts +69 -0
- package/dist/vfs/providers/proc/catchup.js +125 -0
- package/dist/vfs/providers/proc/catchup.js.map +1 -0
- package/dist/vfs/providers/proc/feedIndex.d.ts +146 -0
- package/dist/vfs/providers/proc/feedIndex.js +354 -0
- package/dist/vfs/providers/proc/feedIndex.js.map +1 -0
- package/dist/vfs/providers/proc/feedTopology.d.ts +85 -0
- package/dist/vfs/providers/proc/feedTopology.js +192 -0
- package/dist/vfs/providers/proc/feedTopology.js.map +1 -0
- package/dist/vfs/providers/proc/locate.d.ts +60 -0
- package/dist/vfs/providers/proc/locate.js +103 -0
- package/dist/vfs/providers/proc/locate.js.map +1 -0
- package/dist/vfs/providers/proc/path.d.ts +50 -0
- package/dist/vfs/providers/proc/path.js +106 -0
- package/dist/vfs/providers/proc/path.js.map +1 -0
- package/dist/vfs/providers/proc/roster.d.ts +95 -0
- package/dist/vfs/providers/proc/roster.js +425 -0
- package/dist/vfs/providers/proc/roster.js.map +1 -0
- package/dist/vfs/providers/proc/rows.d.ts +120 -0
- package/dist/vfs/providers/proc/rows.js +181 -0
- package/dist/vfs/providers/proc/rows.js.map +1 -0
- package/dist/vfs/providers/proc/subtree.d.ts +73 -0
- package/dist/vfs/providers/proc/subtree.js +125 -0
- package/dist/vfs/providers/proc/subtree.js.map +1 -0
- package/dist/vfs/providers/proc/sweep.d.ts +89 -0
- package/dist/vfs/providers/proc/sweep.js +297 -0
- package/dist/vfs/providers/proc/sweep.js.map +1 -0
- package/dist/vfs/providers/proc.d.ts +47 -346
- package/dist/vfs/providers/proc.js +349 -1806
- package/dist/vfs/providers/proc.js.map +1 -1
- package/dist/vfs/providers/share.js +4 -1
- package/dist/vfs/providers/share.js.map +1 -1
- package/package.json +3 -3
- package/dist/pacs/resultDecode.d.ts +0 -13
- package/dist/pacs/resultDecode.js +0 -19
- package/dist/pacs/resultDecode.js.map +0 -1
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file Replacing a file's content without losing the old content on the way.
|
|
4
|
+
*
|
|
5
|
+
* CUBE's upload does not replace: uploaded over a held path, the bytes land
|
|
6
|
+
* under another name, or the old content stays. So a rewrite used to remove
|
|
7
|
+
* the old file and then create the new one, two requests, and a failure of
|
|
8
|
+
* the second left nothing at the name. Here the old content stays
|
|
9
|
+
* recoverable until the new content is verified at the name:
|
|
10
|
+
*
|
|
11
|
+
* 1. The new content is uploaded beside the old, under a staging name.
|
|
12
|
+
* 2. The old file is moved aside, not deleted.
|
|
13
|
+
* 3. The new file is moved onto the name.
|
|
14
|
+
* 4. The old file is deleted.
|
|
15
|
+
*
|
|
16
|
+
* Every step acts on a file by its id, never on "whatever is at this path",
|
|
17
|
+
* and only after CUBE has said the id is at the path it is taken to be at.
|
|
18
|
+
* A move's reply can be lost though the move happened, so after an error
|
|
19
|
+
* the store is asked where the file is before anything is undone; a move
|
|
20
|
+
* or a look that throws is read the same way, never as a failure that
|
|
21
|
+
* skips the words naming where each copy is. And one
|
|
22
|
+
* rule covers every branch: nothing is moved or deleted unless both its id
|
|
23
|
+
* and its place are known. When either is uncertain, the copies stay and
|
|
24
|
+
* the error names their paths.
|
|
25
|
+
*
|
|
26
|
+
* A write is bound to one client, the session's when it began: every
|
|
27
|
+
* proof, the upload, each move, each lookup and each cleanup go to it, and
|
|
28
|
+
* before each request that changes anything it is asked to be still the
|
|
29
|
+
* session's. A connection that changed stops the write where it is: what
|
|
30
|
+
* was not yet done is not asked, nothing is undone on the new connection,
|
|
31
|
+
* and the error names where each copy is.
|
|
32
|
+
*
|
|
33
|
+
* Key components:
|
|
34
|
+
* - file_write: write content to a path on proof of what holds it.
|
|
35
|
+
* - fileWrite_bind: the client a write is bound to when what it saves is read.
|
|
36
|
+
* - file_store: the same on a bound client, a file already there replaced, kept or refused.
|
|
37
|
+
* - file_createProved: store content at a path proved free, create-only.
|
|
38
|
+
* - file_replace: put new content at a path that holds a file.
|
|
39
|
+
*
|
|
40
|
+
* Typical usage:
|
|
41
|
+
* ```ts
|
|
42
|
+
* const written: boolean = await file_write('/home/ada/notes.txt', new Blob(['new']));
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* Dependencies: cumin's `chrisIO` (the session's client, bound as a
|
|
46
|
+
* `HolderClient`: an upload that answers what was stored, a move and a
|
|
47
|
+
* delete by id, a lookup of a file's place by id, the parent of a proof
|
|
48
|
+
* found fresh) and the strict lookup of `./proof.js`. CUBE has no move that refuses a held destination,
|
|
49
|
+
* so the check and the move are two requests and a file can arrive between
|
|
50
|
+
* them (docs/CUBE-gaps.adoc). Paths are absolute CUBE paths.
|
|
51
|
+
*
|
|
52
|
+
* @module
|
|
53
|
+
*/
|
|
54
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
55
|
+
if (k2 === undefined) k2 = k;
|
|
56
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
57
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
58
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
59
|
+
}
|
|
60
|
+
Object.defineProperty(o, k2, desc);
|
|
61
|
+
}) : (function(o, m, k, k2) {
|
|
62
|
+
if (k2 === undefined) k2 = k;
|
|
63
|
+
o[k2] = m[k];
|
|
64
|
+
}));
|
|
65
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
66
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
67
|
+
}) : function(o, v) {
|
|
68
|
+
o["default"] = v;
|
|
69
|
+
});
|
|
70
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
71
|
+
var ownKeys = function(o) {
|
|
72
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
73
|
+
var ar = [];
|
|
74
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
75
|
+
return ar;
|
|
76
|
+
};
|
|
77
|
+
return ownKeys(o);
|
|
78
|
+
};
|
|
79
|
+
return function (mod) {
|
|
80
|
+
if (mod && mod.__esModule) return mod;
|
|
81
|
+
var result = {};
|
|
82
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
83
|
+
__setModuleDefault(result, mod);
|
|
84
|
+
return result;
|
|
85
|
+
};
|
|
86
|
+
})();
|
|
87
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
88
|
+
exports.file_createProved = file_createProved;
|
|
89
|
+
exports.file_store = file_store;
|
|
90
|
+
exports.fileWrite_bind = fileWrite_bind;
|
|
91
|
+
exports.file_write = file_write;
|
|
92
|
+
exports.file_replace = file_replace;
|
|
93
|
+
const crypto_1 = require("crypto");
|
|
94
|
+
const path = __importStar(require("path"));
|
|
95
|
+
const cumin_1 = require("@fnndsc/cumin");
|
|
96
|
+
const fond_1 = require("@fnndsc/fond");
|
|
97
|
+
const proof_js_1 = require("./proof.js");
|
|
98
|
+
/** Random bytes in a staging name: enough that two saves of one file do not meet. */
|
|
99
|
+
const STAGING_BYTES = 4;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a path is proved to hold nothing, on the write's client. A proof
|
|
102
|
+
* that throws proves nothing (its reason stacked), never a failure that
|
|
103
|
+
* skips the words naming where each copy is.
|
|
104
|
+
*
|
|
105
|
+
* @param acts - The client the write is bound to.
|
|
106
|
+
* @param target - The absolute CUBE path.
|
|
107
|
+
* @returns True only on proof of absence; false when something holds it or
|
|
108
|
+
* the proof failed (its reason is then on the error stack).
|
|
109
|
+
*/
|
|
110
|
+
async function path_proveIsFree(acts, target) {
|
|
111
|
+
try {
|
|
112
|
+
const proof = await (0, proof_js_1.pathHolders_prove)(target, acts);
|
|
113
|
+
return proof.ok && proof.value.kind === 'absent';
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
cumin_1.errorStack.stack_push('error', `Whether ${target} is free could not be asked: ${error instanceof Error ? error.message : String(error)}`);
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Whether CUBE says a file is at a path, asked by the file's id.
|
|
122
|
+
*
|
|
123
|
+
* @param acts - The client the write is bound to.
|
|
124
|
+
* @param fileId - The file.
|
|
125
|
+
* @param expected - The path it is taken to be at.
|
|
126
|
+
* @returns True only when CUBE answered and named that path.
|
|
127
|
+
*/
|
|
128
|
+
async function file_isAt(acts, fileId, expected) {
|
|
129
|
+
const where = await filePlace_ask(acts, fileId);
|
|
130
|
+
return where.ok && where.value === expected;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Where CUBE says a file is, asked by its id. A lookup that throws is an
|
|
134
|
+
* answer not had (its reason stacked), never a failure that skips the words
|
|
135
|
+
* naming where each copy is.
|
|
136
|
+
*
|
|
137
|
+
* @param acts - The client the write is bound to.
|
|
138
|
+
* @param fileId - The file.
|
|
139
|
+
* @returns Its path, null when CUBE has no such file; Err when CUBE did not say.
|
|
140
|
+
*/
|
|
141
|
+
async function filePlace_ask(acts, fileId) {
|
|
142
|
+
try {
|
|
143
|
+
return await acts.file_locate(fileId);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
cumin_1.errorStack.stack_push('error', `Where file ID ${String(fileId)} is could not be asked: ${error instanceof Error ? error.message : String(error)}`);
|
|
147
|
+
return (0, cumin_1.Err)();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/** What a write says when its connection to CUBE changed under it. */
|
|
151
|
+
const CONNECTION_CHANGED = 'the connection to CUBE changed after the write began';
|
|
152
|
+
/**
|
|
153
|
+
* Moves a file by id onto a path proved free, and says what became of it.
|
|
154
|
+
*
|
|
155
|
+
* Before anything is asked of CUBE the file is located: an id is only
|
|
156
|
+
* moved from the path it is taken to be at, since another writer may have
|
|
157
|
+
* moved it since. Then the destination is proved absent; held, or not
|
|
158
|
+
* provable, no move is asked for. A move that errors is not taken for a
|
|
159
|
+
* move that did not happen: the file is located again, and so is one that
|
|
160
|
+
* reported success, since "moved" is only true once the file is seen at the
|
|
161
|
+
* path.
|
|
162
|
+
*
|
|
163
|
+
* @param acts - The client the write is bound to.
|
|
164
|
+
* @param fileId - The file to move.
|
|
165
|
+
* @param origin - Where it is taken to be now.
|
|
166
|
+
* @param destination - Where it is to go.
|
|
167
|
+
* @returns What became of it; see {@link Place}.
|
|
168
|
+
*/
|
|
169
|
+
async function file_moveProved(acts, fileId, origin, destination) {
|
|
170
|
+
if (!await file_isAt(acts, fileId, origin))
|
|
171
|
+
return 'unknown';
|
|
172
|
+
if (!await path_proveIsFree(acts, destination)) {
|
|
173
|
+
cumin_1.errorStack.stack_push('error', `${destination} is held, or could not be checked: nothing was moved onto it`);
|
|
174
|
+
return 'blocked';
|
|
175
|
+
}
|
|
176
|
+
if (!await acts.current_is())
|
|
177
|
+
return 'stopped';
|
|
178
|
+
// cumin may ask again before a second request (an older CUBE's field).
|
|
179
|
+
// What that second look found is kept: a stop there is this move's
|
|
180
|
+
// answer, and is not to be read afterwards as "asked for, did not happen".
|
|
181
|
+
let stopped = null;
|
|
182
|
+
const recheck = async () => {
|
|
183
|
+
if (!await file_isAt(acts, fileId, origin))
|
|
184
|
+
stopped = 'unknown';
|
|
185
|
+
else if (!await path_proveIsFree(acts, destination))
|
|
186
|
+
stopped = 'blocked';
|
|
187
|
+
return stopped === null;
|
|
188
|
+
};
|
|
189
|
+
try {
|
|
190
|
+
await acts.file_moveById(fileId, destination, recheck);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
// A move that threw may still have happened: where the file is decides.
|
|
194
|
+
cumin_1.errorStack.stack_push('error', `The move of ${origin} to ${destination} failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
195
|
+
}
|
|
196
|
+
if (stopped !== null) {
|
|
197
|
+
cumin_1.errorStack.stack_push('error', `${destination} could not be shown free a second time, or the file was no longer at ${origin}: the move was not asked for again`);
|
|
198
|
+
return stopped;
|
|
199
|
+
}
|
|
200
|
+
const where = await filePlace_ask(acts, fileId);
|
|
201
|
+
if (!where.ok)
|
|
202
|
+
return 'unknown';
|
|
203
|
+
if (where.value === destination)
|
|
204
|
+
return 'destination';
|
|
205
|
+
if (where.value === origin)
|
|
206
|
+
return 'origin';
|
|
207
|
+
return 'unknown';
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Removes a staged or set-aside file, once CUBE says it is where it was put.
|
|
211
|
+
*
|
|
212
|
+
* An id is only deleted at the path it is taken to be at. A file that
|
|
213
|
+
* another writer has moved since is theirs now, and one CUBE will not
|
|
214
|
+
* locate is not known to be ours to remove. Nothing is removed once the
|
|
215
|
+
* connection to CUBE has changed. A removal that throws is one not
|
|
216
|
+
* confirmed: what came before it stands, and the warning names the path.
|
|
217
|
+
*
|
|
218
|
+
* @param acts - The client the write is bound to.
|
|
219
|
+
* @param fileId - The file.
|
|
220
|
+
* @param where - The path it was put at.
|
|
221
|
+
* @param what - What it is, in the warning's words.
|
|
222
|
+
* @returns Nothing: a file that is not removed leaves a warning naming the
|
|
223
|
+
* path, and whatever error came before it stays on the stack.
|
|
224
|
+
*/
|
|
225
|
+
async function leftover_remove(acts, fileId, where, what) {
|
|
226
|
+
if (!await file_isAt(acts, fileId, where)) {
|
|
227
|
+
cumin_1.errorStack.stack_push('warning', `${what} was not removed: it could not be seen at ${where}, where it was put`);
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (!await acts.current_is()) {
|
|
231
|
+
cumin_1.errorStack.stack_push('warning', `${what} was left at ${where}: ${CONNECTION_CHANGED}`);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
let removed;
|
|
235
|
+
try {
|
|
236
|
+
removed = await acts.file_deleteById(fileId);
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
cumin_1.errorStack.stack_push('warning', `${what} may be left at ${where}: its removal was not confirmed (${error instanceof Error ? error.message : String(error)})`);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (!removed.ok)
|
|
243
|
+
cumin_1.errorStack.stack_push('warning', `${what} was left at ${where}`);
|
|
244
|
+
else if (removed.value !== 'accepted')
|
|
245
|
+
cumin_1.errorStack.stack_push('warning', `${what} may be left at ${where}: CUBE gave no reply to its removal`);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Stores content at a path proved to hold nothing, and makes sure it is
|
|
249
|
+
* there.
|
|
250
|
+
*
|
|
251
|
+
* CUBE may store an upload under another name than the one asked for. Then
|
|
252
|
+
* the file is moved onto the name by its id, through the same proved move
|
|
253
|
+
* as any other, and the write is a success only when the file is seen
|
|
254
|
+
* there.
|
|
255
|
+
*
|
|
256
|
+
* @param acts - The client the write is bound to.
|
|
257
|
+
* @param target - The absolute CUBE path, proved absent by the caller.
|
|
258
|
+
* @param content - The content.
|
|
259
|
+
* @returns True when the path holds the content; false otherwise, with the
|
|
260
|
+
* reason on the error stack.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```ts
|
|
264
|
+
* const created: boolean = await file_createProved(acts, '/home/ada/copy/scan.dcm', new Blob([bytes]));
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
async function file_createProved(acts, target, content) {
|
|
268
|
+
return await fileCreate_attempt(acts, target, content) === 'created';
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Stores content at a path proved to hold nothing, and says what it came
|
|
272
|
+
* to: `unconfirmed` when the content landed and its move onto the name was
|
|
273
|
+
* not seen to finish, which is neither a write nor its absence.
|
|
274
|
+
*
|
|
275
|
+
* @param acts - The client the write is bound to.
|
|
276
|
+
* @param target - The absolute CUBE path, proved absent by the caller.
|
|
277
|
+
* @param content - The content.
|
|
278
|
+
* @returns What it came to; the reason on the error stack when not `created`.
|
|
279
|
+
*/
|
|
280
|
+
async function fileCreate_attempt(acts, target, content) {
|
|
281
|
+
if (!await acts.current_is()) {
|
|
282
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: ${CONNECTION_CHANGED}. Nothing was written.`);
|
|
283
|
+
return 'failed';
|
|
284
|
+
}
|
|
285
|
+
const receipt = await acts.file_uploadReceipted(content, path.posix.dirname(target), path.posix.basename(target));
|
|
286
|
+
if (!receipt.ok) {
|
|
287
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: the content could not be stored.`);
|
|
288
|
+
return 'failed';
|
|
289
|
+
}
|
|
290
|
+
const landed = receipt.value.path;
|
|
291
|
+
if (landed === target)
|
|
292
|
+
return 'created';
|
|
293
|
+
const place = await file_moveProved(acts, receipt.value.id, landed, target);
|
|
294
|
+
if (place === 'destination')
|
|
295
|
+
return 'created';
|
|
296
|
+
if (place === 'stopped') {
|
|
297
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: ${CONNECTION_CHANGED}. The content is at ${landed}. Nothing was removed.`);
|
|
298
|
+
return 'failed';
|
|
299
|
+
}
|
|
300
|
+
if (place === 'unknown') {
|
|
301
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: the content landed at ${landed}, and it is not known whether it was then moved. Look at ${landed} and ${target}. Nothing was removed.`);
|
|
302
|
+
return 'unconfirmed';
|
|
303
|
+
}
|
|
304
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: the content landed at ${landed} and could not be moved onto the name.`);
|
|
305
|
+
await leftover_remove(acts, receipt.value.id, landed, 'The content');
|
|
306
|
+
return 'failed';
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* A create's end as a store's outcome: an unconfirmed move is `EINPROGRESS`,
|
|
310
|
+
* the store having accepted what it has not been seen to finish.
|
|
311
|
+
*
|
|
312
|
+
* @param done - What the create came to.
|
|
313
|
+
* @returns The outcome.
|
|
314
|
+
*/
|
|
315
|
+
function createDone_convertToOutcome(done) {
|
|
316
|
+
if (done === 'created')
|
|
317
|
+
return (0, fond_1.vfs_ok)('created');
|
|
318
|
+
return (0, fond_1.vfs_fail)(done === 'unconfirmed' ? 'EINPROGRESS' : 'EIO');
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A write's refusal, said on the error stack in the write's words.
|
|
322
|
+
*
|
|
323
|
+
* @param errno - Why, as an errno.
|
|
324
|
+
* @param words - What is said.
|
|
325
|
+
* @returns The outcome.
|
|
326
|
+
*/
|
|
327
|
+
function store_refuse(errno, words) {
|
|
328
|
+
cumin_1.errorStack.stack_push('error', words);
|
|
329
|
+
return (0, fond_1.vfs_fail)(errno);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Writes content to a path on proof of what holds it, on the client the
|
|
333
|
+
* write is bound to.
|
|
334
|
+
*
|
|
335
|
+
* Nothing there: the content is stored and seen at the path. One file
|
|
336
|
+
* there: replaced, kept, or refused, as asked. Anything else (a folder, a
|
|
337
|
+
* link, more than one holder, or a lookup that could not be completed) and
|
|
338
|
+
* nothing is written: a listing that failed or was cut short is not taken
|
|
339
|
+
* for an empty one.
|
|
340
|
+
*
|
|
341
|
+
* @param acts - The client the write is bound to.
|
|
342
|
+
* @param target - The absolute CUBE path, from the root.
|
|
343
|
+
* @param content - The content.
|
|
344
|
+
* @param existing - What becomes of a file already there.
|
|
345
|
+
* @param folderRequired - True when the folder the path is in must already
|
|
346
|
+
* be there (a copy into a folder): one proved absent refuses the write,
|
|
347
|
+
* where otherwise storing would make it.
|
|
348
|
+
* @returns What was done; or why not (`EEXIST` a file refused, `EISDIR` a
|
|
349
|
+
* folder, `EPERM` several holders or a link, `ENOTDIR` a file on the
|
|
350
|
+
* way, `ENOENT` a required folder gone, `EIO` otherwise), its words on
|
|
351
|
+
* the error stack.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```ts
|
|
355
|
+
* const stored: VfsOutcome<StoreDone> = await file_store(acts, '/home/ada/notes.txt', new Blob(['draft']), 'refuse');
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
358
|
+
async function file_store(acts, target, content, existing, folderRequired = false) {
|
|
359
|
+
const answer = await (0, proof_js_1.pathHolders_answer)(target, acts);
|
|
360
|
+
if (answer.kind === 'error')
|
|
361
|
+
return store_refuse(answer.notDirectory ? 'ENOTDIR' : 'EIO', `Could not write ${target}: what holds that path could not be learned. Nothing was written.`);
|
|
362
|
+
if (answer.kind === 'absent' && folderRequired && answer.folderAbsent === true)
|
|
363
|
+
return store_refuse('ENOENT', `Could not write ${target}: ${path.posix.dirname(target)}, the folder it goes into, is gone. Nothing was written.`);
|
|
364
|
+
if (answer.kind === 'absent')
|
|
365
|
+
return createDone_convertToOutcome(await fileCreate_attempt(acts, target, content));
|
|
366
|
+
if (answer.kind === 'ambiguous')
|
|
367
|
+
return store_refuse('EPERM', `Could not write ${target}: ${(0, proof_js_1.holders_describe)(answer.holders)} hold that path. Nothing was written.`);
|
|
368
|
+
const sole = answer.holder;
|
|
369
|
+
if (sole.kind !== 'file')
|
|
370
|
+
return store_refuse(sole.kind === 'dir' ? 'EISDIR' : 'EPERM', `Could not write ${target}: a ${sole.kind} holds that path. Nothing was written.`);
|
|
371
|
+
if (existing === 'keep')
|
|
372
|
+
return (0, fond_1.vfs_ok)('kept');
|
|
373
|
+
if (existing === 'refuse')
|
|
374
|
+
return store_refuse('EEXIST', `Could not write ${target}: a file already holds that path. Nothing was written.`);
|
|
375
|
+
return await file_replace(target, content, sole.id, acts) ? (0, fond_1.vfs_ok)('replaced') : (0, fond_1.vfs_fail)('EIO');
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The client a write goes to: the one it was bound to when what it writes
|
|
379
|
+
* was read, while that is still the session's; none when that bind failed;
|
|
380
|
+
* the session's now when no binding was given.
|
|
381
|
+
*
|
|
382
|
+
* @param target - The path, for the words.
|
|
383
|
+
* @param bound - The client bound when the content was read; null when that bind failed; undefined when none was asked for.
|
|
384
|
+
* @returns The client, or null (the reason stacked; nothing was asked).
|
|
385
|
+
*/
|
|
386
|
+
async function writeClient_take(target, bound) {
|
|
387
|
+
if (bound === null) {
|
|
388
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: there was no connection to CUBE when the file was read. Nothing was written.`);
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
if (bound === undefined) {
|
|
392
|
+
const made = await cumin_1.chrisIO.holderClient_bind();
|
|
393
|
+
if (made.ok)
|
|
394
|
+
return made.value;
|
|
395
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: there is no connection to CUBE. Nothing was written.`);
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
if (await bound.current_is())
|
|
399
|
+
return bound;
|
|
400
|
+
cumin_1.errorStack.stack_push('error', `Could not write ${target}: ${CONNECTION_CHANGED_READ}. Nothing was written.`);
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* The session's client, bound when what a write will save is read (an
|
|
405
|
+
* edit's read), for {@link file_write} to be given: the save then goes to
|
|
406
|
+
* that client, or, once the connection has changed, nowhere.
|
|
407
|
+
*
|
|
408
|
+
* @returns The binding; null when there is no connection now (a write
|
|
409
|
+
* given null is refused, and says so, when it is asked: it is never
|
|
410
|
+
* bound later, to whatever connection there is then).
|
|
411
|
+
*
|
|
412
|
+
* @example
|
|
413
|
+
* ```ts
|
|
414
|
+
* const bound: HolderClient | null = await fileWrite_bind();
|
|
415
|
+
* const saved: boolean = await file_write('/home/ada/notes.txt', new Blob(['edited']), bound);
|
|
416
|
+
* ```
|
|
417
|
+
*/
|
|
418
|
+
async function fileWrite_bind() {
|
|
419
|
+
const mark = cumin_1.errorStack.checkpoint_mark();
|
|
420
|
+
const bound = await cumin_1.chrisIO.holderClient_bind();
|
|
421
|
+
if (bound.ok)
|
|
422
|
+
return bound.value;
|
|
423
|
+
cumin_1.errorStack.checkpoint_drain(mark);
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
/** What a write says when the connection changed between reading what it writes and writing it. */
|
|
427
|
+
const CONNECTION_CHANGED_READ = 'the connection to CUBE changed after the file was read';
|
|
428
|
+
/**
|
|
429
|
+
* Writes content to a path, whatever holds it now, on proof of what does.
|
|
430
|
+
*
|
|
431
|
+
* Nothing there: the content is stored and seen at the path. One file
|
|
432
|
+
* there: its content is replaced by {@link file_replace}. Anything else (a
|
|
433
|
+
* folder, a link, more than one holder, or a lookup that could not be
|
|
434
|
+
* completed) and nothing is written: a listing that failed or was cut short
|
|
435
|
+
* is not taken for an empty one. The proof and every step after it go to
|
|
436
|
+
* one client: the one bound when the content was read, when the caller
|
|
437
|
+
* bound one (a connection changed since refuses the write, unasked; a bind
|
|
438
|
+
* that failed then, given as null, refuses it too), else the session's,
|
|
439
|
+
* bound here.
|
|
440
|
+
*
|
|
441
|
+
* @param written - The CUBE path; one written without its leading slash
|
|
442
|
+
* is read from the root.
|
|
443
|
+
* @param content - The content.
|
|
444
|
+
* @param bound - The client bound when what is written was read (an
|
|
445
|
+
* edit's read); null when that bind failed; omitted when none was asked for.
|
|
446
|
+
* @returns True when the path holds the content; false otherwise, with the
|
|
447
|
+
* reason on the error stack.
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* ```ts
|
|
451
|
+
* const written: boolean = await file_write('/home/ada/notes.txt', new Blob(['draft']));
|
|
452
|
+
* ```
|
|
453
|
+
*/
|
|
454
|
+
async function file_write(written, content, bound) {
|
|
455
|
+
// One name for the proof, the upload and the comparison with what CUBE
|
|
456
|
+
// says it stored: CUBE answers with the path from the root.
|
|
457
|
+
const target = path.posix.resolve('/', written);
|
|
458
|
+
const acts = await writeClient_take(target, bound);
|
|
459
|
+
if (acts === null)
|
|
460
|
+
return false;
|
|
461
|
+
return (await file_store(acts, target, content, 'replace')).ok;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Puts new content at a path that holds a file, keeping the old content
|
|
465
|
+
* recoverable until the new is verified in place.
|
|
466
|
+
*
|
|
467
|
+
* @param rewritten - The CUBE path of the file to rewrite; one written
|
|
468
|
+
* without its leading slash is read from the root.
|
|
469
|
+
* @param content - The new content.
|
|
470
|
+
* @param oldId - The id of the file now at the path.
|
|
471
|
+
* @param bound - The client the write is bound to; the session's, bound
|
|
472
|
+
* here, when not given.
|
|
473
|
+
* @returns True when the path holds the new content. False otherwise, with
|
|
474
|
+
* the reason on the error stack; the old content is then still at the
|
|
475
|
+
* path, or, where that could not be restored or made sure of, at a path
|
|
476
|
+
* the error names.
|
|
477
|
+
*
|
|
478
|
+
* @example
|
|
479
|
+
* ```ts
|
|
480
|
+
* const replaced: boolean = await file_replace('/home/ada/notes.txt', new Blob(['second draft']), 41);
|
|
481
|
+
* ```
|
|
482
|
+
*/
|
|
483
|
+
async function file_replace(rewritten, content, oldId, bound) {
|
|
484
|
+
const target = path.posix.resolve('/', rewritten);
|
|
485
|
+
const acts = bound ?? await replaceClient_bind(target);
|
|
486
|
+
if (acts === null)
|
|
487
|
+
return false;
|
|
488
|
+
const dir = path.posix.dirname(target);
|
|
489
|
+
const name = path.posix.basename(target);
|
|
490
|
+
const mark = (0, crypto_1.randomBytes)(STAGING_BYTES).toString('hex');
|
|
491
|
+
const staged = path.posix.join(dir, `.${name}.mise-new-${mark}`);
|
|
492
|
+
const aside = path.posix.join(dir, `.${name}.mise-old-${mark}`);
|
|
493
|
+
// 1. The new content, beside the old. Nothing has changed if this fails.
|
|
494
|
+
const newId = await newContent_stage(acts, target, content, staged);
|
|
495
|
+
if (newId === null)
|
|
496
|
+
return false;
|
|
497
|
+
// 2. The old file, aside. Not deleted: it is the way back.
|
|
498
|
+
const oldPlace = await file_moveProved(acts, oldId, target, aside);
|
|
499
|
+
if (oldPlace === 'stopped') {
|
|
500
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: ${CONNECTION_CHANGED}. The file there is as it was; the new content is at ${staged}. Nothing was removed.`);
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
if (oldPlace === 'origin' || oldPlace === 'blocked') {
|
|
504
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: the file there could not be set aside. It is as it was.`);
|
|
505
|
+
await leftover_remove(acts, newId, staged, 'The new content');
|
|
506
|
+
return false;
|
|
507
|
+
}
|
|
508
|
+
if (oldPlace === 'unknown') {
|
|
509
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: the file there is not where it was seen, or it is not known whether it was set aside. Look at ${target} and ${aside} for the old content; the new content is at ${staged}. Nothing was removed.`);
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
// 3. The new file, onto the name.
|
|
513
|
+
const newPlace = await file_moveProved(acts, newId, staged, target);
|
|
514
|
+
if (newPlace === 'unknown') {
|
|
515
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: it is not known whether the new content reached it. The old content is at ${aside}; look at ${target} and ${staged} for the new. Nothing was removed.`);
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
if (newPlace === 'blocked' || newPlace === 'stopped') {
|
|
519
|
+
// Something holds the name now, or CUBE would not say. Whatever it is,
|
|
520
|
+
// it is not ours to move onto, in either direction: both copies stay.
|
|
521
|
+
const why = newPlace === 'stopped' ? CONNECTION_CHANGED : 'the name was held or could not be checked';
|
|
522
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: once the file there was set aside, ${why}. The old content is at ${aside} and the new at ${staged}. Nothing was removed.`);
|
|
523
|
+
return false;
|
|
524
|
+
}
|
|
525
|
+
if (newPlace === 'origin') {
|
|
526
|
+
// A move was asked for and did not happen. The way back: the old file
|
|
527
|
+
// returns to its name, by the same proved move.
|
|
528
|
+
const restored = await file_moveProved(acts, oldId, aside, target);
|
|
529
|
+
if (restored !== 'destination') {
|
|
530
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}, and the old content could not be put back: look for it at ${aside}, or at ${target} if the move back happened unseen. The new content is at ${staged}. Nothing was removed.`);
|
|
531
|
+
return false;
|
|
532
|
+
}
|
|
533
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: the new content could not be moved onto it. The file is as it was.`);
|
|
534
|
+
await leftover_remove(acts, newId, staged, 'The new content');
|
|
535
|
+
return false;
|
|
536
|
+
}
|
|
537
|
+
// 4. The new content is seen at the name, under its own id: the old goes.
|
|
538
|
+
await leftover_remove(acts, oldId, aside, `${target} was rewritten; the old content`);
|
|
539
|
+
return true;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Stores a rewrite's new content beside the old, under its staging name.
|
|
543
|
+
*
|
|
544
|
+
* @param acts - The client the write is bound to.
|
|
545
|
+
* @param target - The path rewritten, for the words.
|
|
546
|
+
* @param content - The new content.
|
|
547
|
+
* @param staged - The staging name.
|
|
548
|
+
* @returns The staged file's id; null when nothing was staged (the reason
|
|
549
|
+
* stacked; the file at the target is as it was).
|
|
550
|
+
*/
|
|
551
|
+
async function newContent_stage(acts, target, content, staged) {
|
|
552
|
+
if (!await acts.current_is()) {
|
|
553
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: ${CONNECTION_CHANGED}. The file is as it was.`);
|
|
554
|
+
return null;
|
|
555
|
+
}
|
|
556
|
+
const receipt = await acts.file_uploadReceipted(content, path.posix.dirname(staged), path.posix.basename(staged));
|
|
557
|
+
if (!receipt.ok) {
|
|
558
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: the new content could not be stored. The file is as it was.`);
|
|
559
|
+
return null;
|
|
560
|
+
}
|
|
561
|
+
if (receipt.value.path === staged)
|
|
562
|
+
return receipt.value.id;
|
|
563
|
+
// It landed under another name: the staging name was taken. What is at
|
|
564
|
+
// the staging name is somebody else's and is left alone.
|
|
565
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: the new content landed at ${receipt.value.path}, not at ${staged}. The file is as it was.`);
|
|
566
|
+
await leftover_remove(acts, receipt.value.id, receipt.value.path, 'The new content');
|
|
567
|
+
return null;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* The session's client, bound for a rewrite asked without one.
|
|
571
|
+
*
|
|
572
|
+
* @param target - The path, for the words.
|
|
573
|
+
* @returns The binding, or null when there is no connection (the reason stacked).
|
|
574
|
+
*/
|
|
575
|
+
async function replaceClient_bind(target) {
|
|
576
|
+
const bound = await cumin_1.chrisIO.holderClient_bind();
|
|
577
|
+
if (bound.ok)
|
|
578
|
+
return bound.value;
|
|
579
|
+
cumin_1.errorStack.stack_push('error', `Could not rewrite ${target}: there is no connection to CUBE. The file is as it was.`);
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
582
|
+
//# sourceMappingURL=replace.js.map
|
|
@@ -0,0 +1 @@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