sliftutils 1.7.70 → 1.7.72
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/treeSummary.ts.cache +2 -2
- package/index.d.ts +505 -257
- package/misc/dist/environment.ts.cache +2 -2
- package/misc/dist/getSecret.ts.cache +2 -2
- package/misc/dist/strings.ts.cache +2 -2
- package/misc/dist/zip.ts.cache +2 -2
- package/misc/https/dist/certs.ts.cache +2 -2
- package/misc/https/dist/hostServer.ts.cache +5 -2
- package/misc/https/dist/persistentLocalStorage.ts.cache +2 -2
- package/package.json +1 -1
- package/render-utils/dist/observer.tsx.cache +2 -2
- package/spec.txt +10 -0
- package/storage/ArchivesDisk.d.ts +4 -13
- package/storage/ArchivesDisk.ts +6 -4
- package/storage/BulkDatabase2/dist/BulkDatabaseBase.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/BulkDatabaseFormat.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/BulkDatabaseMerge.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/BulkDatabaseReader.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/LoadedIndex.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/WriteOverlay.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/blockCache.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/mergeLock.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/mergeMarkers.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/streamLog.ts.cache +2 -2
- package/storage/BulkDatabase2/dist/syncClient.ts.cache +2 -2
- package/storage/IArchives.d.ts +14 -10
- package/storage/IArchives.ts +16 -4
- package/storage/backblaze.d.ts +3 -9
- package/storage/backblaze.ts +22 -19
- package/storage/dist/ArchivesDisk.ts.cache +6 -3
- package/storage/dist/FileFolderAPI.tsx.cache +2 -2
- package/storage/dist/IArchives.ts.cache +18 -4
- package/storage/dist/IndexedDBFileFolderAPI.ts.cache +2 -2
- package/storage/dist/JSONStorage.ts.cache +2 -2
- package/storage/dist/PendingManager.tsx.cache +2 -2
- package/storage/dist/TransactionStorage.ts.cache +2 -2
- package/storage/dist/backblaze.ts.cache +36 -27
- package/storage/dist/fileSystemPointer.ts.cache +2 -2
- package/storage/dist/remoteFileStorage.ts.cache +2 -2
- package/storage/remoteStorage/ArchivesRemote.d.ts +5 -9
- package/storage/remoteStorage/ArchivesRemote.ts +25 -20
- package/storage/remoteStorage/ArchivesUrl.d.ts +3 -9
- package/storage/remoteStorage/ArchivesUrl.ts +7 -5
- package/storage/remoteStorage/accessPage.tsx +4 -4
- package/storage/remoteStorage/accessStats.d.ts +2 -0
- package/storage/remoteStorage/accessStats.ts +32 -0
- package/storage/remoteStorage/blobStore.d.ts +193 -88
- package/storage/remoteStorage/blobStore.ts +535 -400
- package/storage/remoteStorage/bucketDisk.d.ts +18 -0
- package/storage/remoteStorage/bucketDisk.ts +66 -0
- package/storage/remoteStorage/createArchives.d.ts +4 -10
- package/storage/remoteStorage/createArchives.ts +102 -63
- package/storage/remoteStorage/dist/ArchivesRemote.ts.cache +29 -20
- package/storage/remoteStorage/dist/ArchivesUrl.ts.cache +8 -5
- package/storage/remoteStorage/dist/accessPage.tsx.cache +6 -6
- package/storage/remoteStorage/dist/accessStats.ts.cache +39 -4
- package/storage/remoteStorage/dist/blobStore.ts.cache +517 -375
- package/storage/remoteStorage/dist/bucketDisk.ts.cache +72 -0
- package/storage/remoteStorage/dist/cliArgs.ts.cache +2 -2
- package/storage/remoteStorage/dist/createArchives.ts.cache +112 -58
- package/storage/remoteStorage/dist/deployTakeover.ts.cache +2 -2
- package/storage/remoteStorage/dist/intermediateSources.ts.cache +13 -13
- package/storage/remoteStorage/dist/remoteConfig.ts.cache +19 -3
- package/storage/remoteStorage/dist/serverConfig.ts.cache +116 -0
- package/storage/remoteStorage/dist/sourceWrapper.ts.cache +7 -6
- package/storage/remoteStorage/dist/sourcesList.ts.cache +6 -3
- package/storage/remoteStorage/dist/storageClientController.ts.cache +2 -2
- package/storage/remoteStorage/dist/storageController.ts.cache +224 -191
- package/storage/remoteStorage/dist/storageServer.ts.cache +9 -9
- package/storage/remoteStorage/dist/storageServerState.ts.cache +330 -567
- package/storage/remoteStorage/dist/storePlan.ts.cache +149 -0
- package/storage/remoteStorage/dist/validation.ts.cache +40 -0
- package/storage/remoteStorage/grantAccessCli.ts +1 -1
- package/storage/remoteStorage/intermediateSources.d.ts +3 -5
- package/storage/remoteStorage/intermediateSources.ts +14 -16
- package/storage/remoteStorage/remoteConfig.d.ts +2 -2
- package/storage/remoteStorage/remoteConfig.ts +19 -3
- package/storage/remoteStorage/serverConfig.d.ts +27 -0
- package/storage/remoteStorage/serverConfig.ts +109 -0
- package/storage/remoteStorage/sourceWrapper.d.ts +3 -3
- package/storage/remoteStorage/sourceWrapper.ts +7 -6
- package/storage/remoteStorage/sourcesList.ts +3 -0
- package/storage/remoteStorage/storageController.d.ts +118 -36
- package/storage/remoteStorage/storageController.ts +166 -168
- package/storage/remoteStorage/storageServer.ts +1 -1
- package/storage/remoteStorage/storageServerState.d.ts +52 -63
- package/storage/remoteStorage/storageServerState.ts +340 -584
- package/storage/remoteStorage/storePlan.d.ts +34 -0
- package/storage/remoteStorage/storePlan.ts +166 -0
- package/storage/remoteStorage/validation.d.ts +4 -0
- package/storage/remoteStorage/validation.ts +31 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
2
3
|
|
|
3
4
|
const RELOAD_THROTTLE = 5 * 1000;
|
|
4
5
|
|
|
@@ -54,6 +55,8 @@ export class SourcesList {
|
|
|
54
55
|
await this.load();
|
|
55
56
|
let existing = this.indexes.get(url);
|
|
56
57
|
if (existing !== undefined) return existing;
|
|
58
|
+
// appendFile creates the file but not its parent directories, and on a fresh bucket we run before anything else has created them
|
|
59
|
+
await fs.promises.mkdir(path.dirname(this.filePath), { recursive: true });
|
|
57
60
|
let prefix = this.endsClean && "" || "\n";
|
|
58
61
|
await fs.promises.appendFile(this.filePath, prefix + url + "\n");
|
|
59
62
|
this.endsClean = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus,
|
|
4
|
-
import {
|
|
3
|
+
import { ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus, FindConfig, SourceConfig } from "../IArchives";
|
|
4
|
+
import { ActiveBucketInfo, ServerBucketInfo } from "./storageServerState";
|
|
5
5
|
import { AccessTotals, AccessSummaryState } from "./accessStats";
|
|
6
6
|
import type { SummaryEntry } from "../../treeSummary";
|
|
7
7
|
export declare const REMOTE_STORAGE_CLASS_GUID = "RemoteStorageController-b7e42a91";
|
|
@@ -45,58 +45,124 @@ export declare const RemoteStorageController: import("socket-function/SocketFunc
|
|
|
45
45
|
machineId: string;
|
|
46
46
|
ip: string;
|
|
47
47
|
}>;
|
|
48
|
-
requestAccess: (
|
|
48
|
+
requestAccess: (config: {
|
|
49
|
+
account: string;
|
|
50
|
+
}) => Promise<{
|
|
49
51
|
machineId: string;
|
|
50
52
|
ip: string;
|
|
51
53
|
requestId: string;
|
|
52
54
|
grantAccessCommand: string;
|
|
53
55
|
}>;
|
|
54
|
-
getAccessState: (
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
getAccessState: (config: {
|
|
57
|
+
account: string;
|
|
58
|
+
}) => Promise<AccessState>;
|
|
59
|
+
listRequestsForIP: (config: {
|
|
60
|
+
account: string;
|
|
61
|
+
ip: string;
|
|
62
|
+
}) => Promise<AccessRequest[]>;
|
|
63
|
+
grantAccess: (config: {
|
|
64
|
+
requestId: string;
|
|
65
|
+
}) => Promise<TrustRecord>;
|
|
57
66
|
adminListActiveBuckets: () => Promise<{
|
|
58
67
|
account: string;
|
|
59
68
|
bucketName: string;
|
|
60
69
|
}[]>;
|
|
61
|
-
adminListRequests: (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}) => Promise<
|
|
67
|
-
get2: (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
adminListRequests: (config: {
|
|
71
|
+
ip: string;
|
|
72
|
+
}) => Promise<AccessRequest[]>;
|
|
73
|
+
adminGrantAccess: (config: {
|
|
74
|
+
requestId: string;
|
|
75
|
+
}) => Promise<TrustRecord>;
|
|
76
|
+
get2: (config: {
|
|
77
|
+
account: string;
|
|
78
|
+
bucketName: string;
|
|
79
|
+
path: string;
|
|
80
|
+
sourceConfig: SourceConfig;
|
|
81
|
+
range?: {
|
|
82
|
+
start: number;
|
|
83
|
+
end: number;
|
|
84
|
+
};
|
|
85
|
+
internal?: boolean;
|
|
86
|
+
includeTombstones?: boolean;
|
|
87
|
+
}) => Promise<{
|
|
71
88
|
data: Buffer;
|
|
72
89
|
writeTime: number;
|
|
73
90
|
size: number;
|
|
74
91
|
} | undefined>;
|
|
75
|
-
set: (
|
|
76
|
-
|
|
77
|
-
|
|
92
|
+
set: (config: {
|
|
93
|
+
account: string;
|
|
94
|
+
bucketName: string;
|
|
95
|
+
path: string;
|
|
96
|
+
data: Buffer;
|
|
97
|
+
sourceConfig: SourceConfig;
|
|
98
|
+
lastModified?: number;
|
|
99
|
+
forceSetImmutable?: boolean;
|
|
100
|
+
internal?: boolean;
|
|
101
|
+
}) => Promise<void>;
|
|
102
|
+
del: (config: {
|
|
103
|
+
account: string;
|
|
104
|
+
bucketName: string;
|
|
105
|
+
path: string;
|
|
106
|
+
sourceConfig: SourceConfig;
|
|
107
|
+
lastModified?: number;
|
|
108
|
+
internal?: boolean;
|
|
109
|
+
}) => Promise<void>;
|
|
110
|
+
getInfo: (config: {
|
|
111
|
+
account: string;
|
|
112
|
+
bucketName: string;
|
|
113
|
+
path: string;
|
|
114
|
+
sourceConfig: SourceConfig;
|
|
115
|
+
includeTombstones?: boolean;
|
|
116
|
+
}) => Promise<{
|
|
78
117
|
writeTime: number;
|
|
79
118
|
size: number;
|
|
80
119
|
} | undefined>;
|
|
81
|
-
findInfo: (
|
|
82
|
-
|
|
83
|
-
|
|
120
|
+
findInfo: (config: FindConfig & {
|
|
121
|
+
account: string;
|
|
122
|
+
bucketName: string;
|
|
123
|
+
prefix: string;
|
|
124
|
+
sourceConfig: SourceConfig;
|
|
125
|
+
}) => Promise<ArchiveFileInfo[]>;
|
|
126
|
+
getChangesAfter2: (config: {
|
|
127
|
+
account: string;
|
|
128
|
+
bucketName: string;
|
|
129
|
+
sourceConfig: SourceConfig;
|
|
130
|
+
time: number;
|
|
131
|
+
routes?: [number, number][];
|
|
84
132
|
}) => Promise<ArchiveFileInfo[]>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
133
|
+
getArchivesConfig: (config: {
|
|
134
|
+
account: string;
|
|
135
|
+
bucketName: string;
|
|
136
|
+
}) => Promise<ArchivesConfig>;
|
|
137
|
+
listBuckets: (config: {
|
|
138
|
+
account: string;
|
|
139
|
+
}) => Promise<ServerBucketInfo[]>;
|
|
140
|
+
getActiveBucket: (config: {
|
|
141
|
+
account: string;
|
|
142
|
+
bucketName: string;
|
|
143
|
+
}) => Promise<ActiveBucketInfo | string>;
|
|
144
|
+
activateBucket: (config: {
|
|
145
|
+
account: string;
|
|
146
|
+
bucketName: string;
|
|
147
|
+
}) => Promise<ActiveBucketInfo | string>;
|
|
148
|
+
clearWriteStats: (config: {
|
|
149
|
+
account: string;
|
|
150
|
+
}) => Promise<{
|
|
91
151
|
clearedBuckets: number;
|
|
92
152
|
}>;
|
|
93
|
-
getAccessStats: (
|
|
94
|
-
|
|
153
|
+
getAccessStats: (config: {
|
|
154
|
+
account: string;
|
|
155
|
+
}) => Promise<AccessTotals>;
|
|
156
|
+
getAccessSummaries: (config: {
|
|
157
|
+
account: string;
|
|
95
158
|
operation: string;
|
|
96
159
|
maxCount: number;
|
|
97
160
|
weightBySize?: boolean;
|
|
98
161
|
}) => Promise<SummaryEntry<AccessSummaryState>[]>;
|
|
99
|
-
getIndexInfo: (
|
|
162
|
+
getIndexInfo: (config: {
|
|
163
|
+
account: string;
|
|
164
|
+
bucketName: string;
|
|
165
|
+
}) => Promise<{
|
|
100
166
|
fileCount: number;
|
|
101
167
|
byteCount: number;
|
|
102
168
|
sources: {
|
|
@@ -105,11 +171,27 @@ export declare const RemoteStorageController: import("socket-function/SocketFunc
|
|
|
105
171
|
byteCount: number;
|
|
106
172
|
}[];
|
|
107
173
|
} | undefined>;
|
|
108
|
-
getSyncStatus: (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
174
|
+
getSyncStatus: (config: {
|
|
175
|
+
account: string;
|
|
176
|
+
bucketName: string;
|
|
177
|
+
}) => Promise<ArchivesSyncStatus>;
|
|
178
|
+
startLargeFile: (config: {
|
|
179
|
+
account: string;
|
|
180
|
+
bucketName: string;
|
|
181
|
+
path: string;
|
|
182
|
+
sourceConfig: SourceConfig;
|
|
183
|
+
lastModified?: number;
|
|
184
|
+
}) => Promise<string>;
|
|
185
|
+
uploadPart: (config: {
|
|
186
|
+
uploadId: string;
|
|
187
|
+
data: Buffer;
|
|
188
|
+
}) => Promise<void>;
|
|
189
|
+
finishLargeFile: (config: {
|
|
190
|
+
uploadId: string;
|
|
191
|
+
}) => Promise<void>;
|
|
192
|
+
cancelLargeFile: (config: {
|
|
193
|
+
uploadId: string;
|
|
194
|
+
}) => Promise<void>;
|
|
113
195
|
httpEntry: (config?: {
|
|
114
196
|
requireCalls?: string[];
|
|
115
197
|
cacheTime?: number;
|