sliftutils 1.7.32 → 1.7.34
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/builders/extensionBuild.ts +1 -1
- package/bundler/bundleEntry.ts +1 -3
- package/bundler/bundler.ts +2 -4
- package/bundler/sourceMaps.ts +1 -2
- package/examplestorage/browser.tsx +1 -2
- package/examplestorage/exampleserver.ts +1 -2
- package/index.d.ts +134 -102
- 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/dns.ts.cache +7 -16
- package/misc/https/dist/persistentLocalStorage.ts.cache +2 -2
- package/misc/https/dns.d.ts +1 -4
- package/misc/https/dns.ts +5 -14
- package/misc/https/hostServer.d.ts +2 -0
- package/misc/https/hostServer.ts +6 -7
- package/misc/https/httpsCerts.ts +4 -10
- package/misc/openrouter.ts +1 -2
- package/package.json +1 -1
- package/render-utils/FullscreenModal.tsx +1 -4
- package/render-utils/GenericFormat.tsx +2 -8
- package/render-utils/Input.tsx +5 -13
- package/render-utils/InputLabel.tsx +4 -6
- package/render-utils/InputPicker.tsx +1 -2
- package/render-utils/URLParam.ts +2 -3
- package/render-utils/dist/observer.tsx.cache +2 -2
- package/render-utils/mobxTyped.ts +2 -3
- package/render-utils/niceStringify.ts +2 -4
- package/storage/ArchivesDisk.ts +4 -14
- package/storage/BulkDatabase2/BulkDatabase2.d.ts +1 -2
- package/storage/BulkDatabase2/BulkDatabase2.ts +4 -11
- package/storage/BulkDatabase2/BulkDatabaseBase.ts +42 -114
- package/storage/BulkDatabase2/BulkDatabaseFormat.ts +31 -91
- package/storage/BulkDatabase2/BulkDatabaseMerge.ts +19 -57
- package/storage/BulkDatabase2/BulkDatabaseReader.ts +4 -12
- package/storage/BulkDatabase2/LoadedIndex.ts +6 -18
- package/storage/BulkDatabase2/WriteOverlay.ts +3 -8
- package/storage/BulkDatabase2/blockCache.ts +12 -28
- package/storage/BulkDatabase2/dist/BulkDatabaseBase.ts.cache +40 -103
- package/storage/BulkDatabase2/dist/BulkDatabaseFormat.ts.cache +19 -50
- package/storage/BulkDatabase2/dist/BulkDatabaseMerge.ts.cache +18 -50
- package/storage/BulkDatabase2/dist/BulkDatabaseReader.ts.cache +7 -15
- package/storage/BulkDatabase2/dist/LoadedIndex.ts.cache +9 -21
- package/storage/BulkDatabase2/dist/WriteOverlay.ts.cache +6 -11
- package/storage/BulkDatabase2/dist/blockCache.ts.cache +15 -31
- package/storage/BulkDatabase2/dist/mergeLock.ts.cache +10 -29
- package/storage/BulkDatabase2/dist/mergeMarkers.ts.cache +10 -18
- package/storage/BulkDatabase2/dist/streamLog.ts.cache +17 -43
- package/storage/BulkDatabase2/dist/syncClient.ts.cache +11 -27
- package/storage/BulkDatabase2/mergeLock.ts +7 -26
- package/storage/BulkDatabase2/mergeMarkers.ts +7 -15
- package/storage/BulkDatabase2/streamLog.ts +14 -40
- package/storage/BulkDatabase2/syncClient.ts +8 -24
- package/storage/FileFolderAPI.tsx +28 -75
- package/storage/IArchives.d.ts +3 -3
- package/storage/IArchives.ts +21 -50
- package/storage/IStorage.ts +2 -4
- package/storage/PendingManager.tsx +2 -3
- package/storage/TransactionStorage.ts +11 -24
- package/storage/backblaze.ts +12 -43
- package/storage/dist/ArchivesDisk.ts.cache +7 -17
- package/storage/dist/FileFolderAPI.tsx.cache +25 -63
- package/storage/dist/IArchives.ts.cache +10 -20
- package/storage/dist/IndexedDBFileFolderAPI.ts.cache +2 -2
- package/storage/dist/JSONStorage.ts.cache +2 -2
- package/storage/dist/PendingManager.tsx.cache +5 -6
- package/storage/dist/TransactionStorage.ts.cache +14 -27
- package/storage/dist/backblaze.ts.cache +15 -46
- package/storage/dist/embeddingFormats.ts.cache +11 -24
- package/storage/dist/fileSystemPointer.ts.cache +4 -7
- package/storage/dist/remoteFileStorage.ts.cache +17 -36
- package/storage/embeddingFormats.ts +11 -27
- package/storage/fileSystemPointer.ts +2 -7
- package/storage/proxydatabase/dist/ivfEmbeddingDatabase.ts.cache +8 -18
- package/storage/proxydatabase/dist/transactionSet.ts.cache +4 -7
- package/storage/proxydatabase/inMemoryDatabase.ts +1 -3
- package/storage/proxydatabase/ivfEmbeddingDatabase.ts +8 -23
- package/storage/proxydatabase/transactionSet.ts +2 -5
- package/storage/remoteFileServer.ts +20 -48
- package/storage/remoteFileStorage.ts +14 -33
- package/storage/remoteStorage/ArchivesRemote.d.ts +1 -4
- package/storage/remoteStorage/ArchivesRemote.ts +11 -26
- package/storage/remoteStorage/ArchivesUrl.ts +2 -4
- package/storage/remoteStorage/accessPage.tsx +1 -5
- package/storage/remoteStorage/blobStore.d.ts +5 -13
- package/storage/remoteStorage/blobStore.ts +52 -130
- package/storage/remoteStorage/createArchives.d.ts +22 -14
- package/storage/remoteStorage/createArchives.ts +54 -188
- package/storage/remoteStorage/deployTakeover.d.ts +18 -32
- package/storage/remoteStorage/deployTakeover.ts +70 -384
- package/storage/remoteStorage/dist/ArchivesRemote.ts.cache +12 -24
- package/storage/remoteStorage/dist/ArchivesUrl.ts.cache +5 -7
- package/storage/remoteStorage/dist/blobStore.ts.cache +47 -117
- package/storage/remoteStorage/dist/cliArgs.ts.cache +2 -2
- package/storage/remoteStorage/dist/createArchives.ts.cache +58 -189
- package/storage/remoteStorage/dist/deployTakeover.ts.cache +81 -387
- package/storage/remoteStorage/dist/intermediateSources.ts.cache +119 -0
- package/storage/remoteStorage/dist/remoteConfig.ts.cache +36 -24
- package/storage/remoteStorage/dist/sourceWrapper.ts.cache +20 -40
- package/storage/remoteStorage/dist/storageClientController.ts.cache +4 -6
- package/storage/remoteStorage/dist/storageController.ts.cache +37 -74
- package/storage/remoteStorage/dist/storageServerState.ts.cache +345 -188
- package/storage/remoteStorage/grantAccessCli.ts +1 -3
- package/storage/remoteStorage/intermediateSources.d.ts +21 -0
- package/storage/remoteStorage/intermediateSources.ts +117 -0
- package/storage/remoteStorage/remoteConfig.ts +33 -20
- package/storage/remoteStorage/sourceWrapper.d.ts +8 -19
- package/storage/remoteStorage/sourceWrapper.ts +19 -41
- package/storage/remoteStorage/storageClientController.ts +1 -3
- package/storage/remoteStorage/storageController.d.ts +7 -6
- package/storage/remoteStorage/storageController.ts +36 -82
- package/storage/remoteStorage/storageServer.ts +20 -34
- package/storage/remoteStorage/storageServerState.d.ts +41 -5
- package/storage/remoteStorage/storageServerState.ts +355 -216
|
@@ -8,7 +8,7 @@ import { getAllFiles } from "../misc/fs";
|
|
|
8
8
|
|
|
9
9
|
async function main() {
|
|
10
10
|
let time = Date.now();
|
|
11
|
-
//todonext
|
|
11
|
+
// todonext
|
|
12
12
|
// We need to build both the extBackground.ts and extContentScript.ts
|
|
13
13
|
// And copy the manifest.json
|
|
14
14
|
// AND copy everything in ./assets which has updated
|
package/bundler/bundleEntry.ts
CHANGED
|
@@ -41,9 +41,7 @@ async function main() {
|
|
|
41
41
|
entryPoints: [entryPoint],
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
// Two artifacts: `name.js` without the sourcemap (the sourcemap is usually bigger than the code
|
|
45
|
-
// itself, so this is what production serves) and `name.debug.js` with the inline sourcemap
|
|
46
|
-
// appended (serve it behind something like a ?debug query param).
|
|
44
|
+
// Two artifacts: `name.js` without the sourcemap (the sourcemap is usually bigger than the code itself, so this is what production serves) and `name.debug.js` with the inline sourcemap appended (serve it behind something like a ?debug query param).
|
|
47
45
|
async function write(finalPath: string, contents: string) {
|
|
48
46
|
let tempPath = `${finalPath}.tmp`;
|
|
49
47
|
try {
|
package/bundler/bundler.ts
CHANGED
|
@@ -9,11 +9,9 @@ export async function bundle(config: {
|
|
|
9
9
|
rootPath: string;
|
|
10
10
|
entryPoints: string[];
|
|
11
11
|
}): Promise<{
|
|
12
|
-
// The runnable bundle, WITHOUT the sourcemap comment (the sourcemap is usually bigger than the
|
|
13
|
-
// code itself, so the default artifact ships without it).
|
|
12
|
+
// The runnable bundle, WITHOUT the sourcemap comment (the sourcemap is usually bigger than the code itself, so the default artifact ships without it).
|
|
14
13
|
bundle: string;
|
|
15
|
-
// The trailing inline-sourcemap line comment. Append to `bundle` (with a newline) for the debug
|
|
16
|
-
// variant of the bundle.
|
|
14
|
+
// The trailing inline-sourcemap line comment. Append to `bundle` (with a newline) for the debug variant of the bundle.
|
|
17
15
|
sourceMapComment: string;
|
|
18
16
|
}> {
|
|
19
17
|
const { modules, rootPath, entryPoints } = config;
|
package/bundler/sourceMaps.ts
CHANGED
|
@@ -38,8 +38,7 @@ export function removeSourceMap(content: string): {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
let sourceMapJson = Buffer.from(match[1], "base64").toString();
|
|
41
|
-
// HACK: If the sourcemap is invalid, try to remove trailing characters. For some reason we sometimes have
|
|
42
|
-
// extra characters at the end? Also try to add some characters too?
|
|
41
|
+
// HACK: If the sourcemap is invalid, try to remove trailing characters. For some reason we sometimes have extra characters at the end? Also try to add some characters too?
|
|
43
42
|
function isJSON(str: string): boolean {
|
|
44
43
|
try {
|
|
45
44
|
JSON.parse(str);
|
|
@@ -12,8 +12,7 @@ import { redButton, greenButton, errorMessage } from "../render-utils/colors";
|
|
|
12
12
|
import { createArchives } from "../storage/remoteStorage/createArchives";
|
|
13
13
|
import { ArchiveFileInfo } from "../storage/IArchives";
|
|
14
14
|
|
|
15
|
-
// The bucket's routing URL: server, account ("example"), and bucket ("examplefiles") in one.
|
|
16
|
-
// Nothing else is needed - the first call creates the bucket if it doesn't exist yet.
|
|
15
|
+
// The bucket's routing URL: server, account ("example"), and bucket ("examplefiles") in one. Nothing else is needed - the first call creates the bucket if it doesn't exist yet.
|
|
17
16
|
const STORAGE_URL = "https://storage.vidgridweb.com:4444/file/example/examplefiles/storage/storagerouting.json";
|
|
18
17
|
const ACCESS_CHECK_INTERVAL = 1000 * 15;
|
|
19
18
|
|
|
@@ -6,8 +6,7 @@ import { hostServer } from "../misc/https/hostServer";
|
|
|
6
6
|
// Import browser code, so it is allowed to be required by the client
|
|
7
7
|
import "./browser";
|
|
8
8
|
|
|
9
|
-
// Static example site for the remote storage system (storage/remoteStorage). The browser talks to
|
|
10
|
-
// the storage server directly, so this server only serves the page.
|
|
9
|
+
// Static example site for the remote storage system (storage/remoteStorage). The browser talks to the storage server directly, so this server only serves the page.
|
|
11
10
|
|
|
12
11
|
const DOMAIN = "storageexample.vidgridweb.com";
|
|
13
12
|
const PORT = 4445;
|
package/index.d.ts
CHANGED
|
@@ -184,10 +184,7 @@ declare module "sliftutils/misc/https/dns" {
|
|
|
184
184
|
modified_on: string;
|
|
185
185
|
comment?: string | undefined;
|
|
186
186
|
}[]>;
|
|
187
|
-
/** Cloudflare's batch endpoint applies deletes, then patches, then posts in a single database
|
|
188
|
-
* transaction. We route edits (patches) through here because the standalone PATCH/PUT verbs
|
|
189
|
-
* aren't usable in our setup, and because it lets "remove others + assert target" happen
|
|
190
|
-
* without a window where the name resolves to nothing. */
|
|
187
|
+
/** Cloudflare's batch endpoint applies deletes, then patches, then posts in a single database transaction. We route edits (patches) through here because the standalone PATCH/PUT verbs aren't usable in our setup, and because it lets "remove others + assert target" happen without a window where the name resolves to nothing. */
|
|
191
188
|
export declare function batchRecords(zoneId: string, batch: {
|
|
192
189
|
deletes?: {
|
|
193
190
|
id: string;
|
|
@@ -227,6 +224,8 @@ declare module "sliftutils/misc/https/hostServer" {
|
|
|
227
224
|
portFallback?: {
|
|
228
225
|
/** Delay until the next main-port acquisition attempt (tightened around the predecessor's scheduled death) */
|
|
229
226
|
getAcquireDelay: () => number;
|
|
227
|
+
/** Called when the main port turned out to be busy, before we act as its successor in any way. Throwing aborts startup - a busy port with no deploy in progress means something else holds it, which is not a state to keep running in. */
|
|
228
|
+
onPortInUse?: () => Promise<void>;
|
|
230
229
|
/** Reports every port we become reachable on (the alternate at mount, the main port once relayed) */
|
|
231
230
|
onListening: (port: number, isMainPort: boolean) => void;
|
|
232
231
|
};
|
|
@@ -1075,8 +1074,7 @@ declare module "sliftutils/storage/BulkDatabase2/BulkDatabase2" {
|
|
|
1075
1074
|
* "someone else is already merging".
|
|
1076
1075
|
*/
|
|
1077
1076
|
tryMergeNow(): Promise<MergeAttemptResult>;
|
|
1078
|
-
/** Rewrite everything written in [timeLo, timeHi] into fresh key-sorted bulk file(s). Low-level;
|
|
1079
|
-
* most callers want compact() or tryMergeNow(). */
|
|
1077
|
+
/** Rewrite everything written in [timeLo, timeHi] into fresh key-sorted bulk file(s). Low-level; most callers want compact() or tryMergeNow(). */
|
|
1080
1078
|
merge(timeLo: number, timeHi: number): Promise<void>;
|
|
1081
1079
|
}
|
|
1082
1080
|
export declare class MobxReactiveDeps implements ReactiveDeps {
|
|
@@ -2131,11 +2129,12 @@ declare module "sliftutils/storage/IArchives" {
|
|
|
2131
2129
|
validWindow: [number, number];
|
|
2132
2130
|
/** Sharding: the fraction of the key space this source handles, as [start, end) over [0, 1) (keys are routed by getRoute in remoteConfig.ts). Defaults to FULL_ROUTE (unsharded). At every point in time the sources' routes must fully cover [0, 1), or some keys could never be read. */
|
|
2133
2131
|
route?: [number, number];
|
|
2132
|
+
/** Set on entries injected into the in-memory config by an overlay (a deploy switchover's alternate-port window). Never written to disk: resolveIntermediateSources strips these and rejoins the windows around them, which is also how a client tells whether an update is a real configuration change or just an overlay. */
|
|
2133
|
+
intermediate?: boolean;
|
|
2134
2134
|
};
|
|
2135
2135
|
export type HostedConfig = CommonConfig & {
|
|
2136
2136
|
type: "remote";
|
|
2137
2137
|
url: string;
|
|
2138
|
-
accountName?: string;
|
|
2139
2138
|
public?: boolean;
|
|
2140
2139
|
fast?: boolean;
|
|
2141
2140
|
writeDelay?: number;
|
|
@@ -2207,8 +2206,7 @@ declare module "sliftutils/storage/IArchives" {
|
|
|
2207
2206
|
};
|
|
2208
2207
|
export interface IArchives {
|
|
2209
2208
|
getDebugName(): string;
|
|
2210
|
-
/** Whether writes would be accepted (credentials exist, the account trusts this machine, etc).
|
|
2211
|
-
* Checked without writing anything. */
|
|
2209
|
+
/** Whether writes would be accepted (credentials exist, the account trusts this machine, etc). Checked without writing anything. */
|
|
2212
2210
|
hasWriteAccess(): Promise<boolean>;
|
|
2213
2211
|
get(fileName: string, config?: {
|
|
2214
2212
|
range?: {
|
|
@@ -2846,7 +2844,6 @@ declare module "sliftutils/storage/remoteStorage/ArchivesRemote" {
|
|
|
2846
2844
|
import { IArchives, ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus } from "../IArchives";
|
|
2847
2845
|
export type ArchivesRemoteConfig = {
|
|
2848
2846
|
url: string;
|
|
2849
|
-
accountName?: string;
|
|
2850
2847
|
waitForAccess?: boolean;
|
|
2851
2848
|
};
|
|
2852
2849
|
export declare function parseStorageUrl(url: string): {
|
|
@@ -2872,9 +2869,7 @@ declare module "sliftutils/storage/remoteStorage/ArchivesRemote" {
|
|
|
2872
2869
|
private lastDeniedLog;
|
|
2873
2870
|
getDebugName(): string;
|
|
2874
2871
|
isConnected(): boolean;
|
|
2875
|
-
ping(): Promise<{
|
|
2876
|
-
takeover?: string;
|
|
2877
|
-
}>;
|
|
2872
|
+
ping(): Promise<{}>;
|
|
2878
2873
|
private authenticate;
|
|
2879
2874
|
private callAuthed;
|
|
2880
2875
|
waitingForAccess(): Promise<{
|
|
@@ -3067,6 +3062,7 @@ declare module "sliftutils/storage/remoteStorage/blobStore" {
|
|
|
3067
3062
|
constructor(folder: string, sources: ArchivesSource[], config?: {
|
|
3068
3063
|
onIndexChanged?: ((key: string) => void) | undefined;
|
|
3069
3064
|
readerDiskLimit?: number | undefined;
|
|
3065
|
+
onWriteCounted?: ((kind: "original" | "flushed", bytes: number) => void) | undefined;
|
|
3070
3066
|
} | undefined);
|
|
3071
3067
|
private stopped;
|
|
3072
3068
|
private index;
|
|
@@ -3091,20 +3087,12 @@ declare module "sliftutils/storage/remoteStorage/blobStore" {
|
|
|
3091
3087
|
private countEntry;
|
|
3092
3088
|
private setIndexEntry;
|
|
3093
3089
|
private deleteIndexEntry;
|
|
3094
|
-
/** Applies a config change to the RUNNING store: windows/routes update in place, new sources
|
|
3095
|
-
* are added (their sync starts immediately), and removed sources' slots go dead (their scans
|
|
3096
|
-
* stop, their index entries drop). The store survives every routine config evolution - it is
|
|
3097
|
-
* never destroyed for a source-list change, only for structural flips it cannot express
|
|
3098
|
-
* (rawDisk). Pending fast writes are re-capped to the new flush deadline (flushing
|
|
3099
|
-
* immediately when it has already passed). */
|
|
3090
|
+
/** Applies a config change to the RUNNING store: windows/routes update in place, new sources are added (their sync starts immediately), and removed sources' slots go dead (their scans stop, their index entries drop). The store survives every routine config evolution - it is never destroyed for a source-list change, only for structural flips it cannot express (rawDisk). Pending fast writes are re-capped to the new flush deadline (flushing immediately when it has already passed). */
|
|
3100
3091
|
updateSources(specs: BlobSourceSpec[]): void;
|
|
3101
3092
|
private removeSource;
|
|
3102
|
-
/** Rescans our own disk's metadata into the index - used around valid window handoffs, where
|
|
3103
|
-
* another process wrote files to the shared folder that our index hasn't seen. */
|
|
3093
|
+
/** Rescans our own disk's metadata into the index - used around valid window handoffs, where another process wrote files to the shared folder that our index hasn't seen. */
|
|
3104
3094
|
rescanBase(): Promise<void>;
|
|
3105
|
-
/** A boundary scan of the node that owned (part of) our route in the valid window before ours,
|
|
3106
|
-
* when that node is different storage (a disk rescan can't see its writes): just its changes
|
|
3107
|
-
* since the boundary neighborhood, with matching values pulled onto our own disk. */
|
|
3095
|
+
/** A boundary scan of the node that owned (part of) our route in the valid window before ours, when that node is different storage (a disk rescan can't see its writes): just its changes since the boundary neighborhood, with matching values pulled onto our own disk. */
|
|
3108
3096
|
boundaryScanRemote(source: IArchives, config: {
|
|
3109
3097
|
since: number;
|
|
3110
3098
|
route?: [number, number];
|
|
@@ -3123,8 +3111,7 @@ declare module "sliftutils/storage/remoteStorage/blobStore" {
|
|
|
3123
3111
|
readerDiskLimit?: number;
|
|
3124
3112
|
syncing: SyncActivity[];
|
|
3125
3113
|
};
|
|
3126
|
-
/** Walks the whole index for exact totals - more expensive than getSyncProgress, but immune to
|
|
3127
|
-
* any drift in the maintained counters (and loads the index first, so it's never cold zeros). */
|
|
3114
|
+
/** Walks the whole index for exact totals - more expensive than getSyncProgress, but immune to any drift in the maintained counters (and loads the index first, so it's never cold zeros). */
|
|
3128
3115
|
computeIndexTotals(): Promise<{
|
|
3129
3116
|
fileCount: number;
|
|
3130
3117
|
byteCount: number;
|
|
@@ -3197,7 +3184,9 @@ declare module "sliftutils/storage/remoteStorage/createArchives" {
|
|
|
3197
3184
|
/// <reference types="node" />
|
|
3198
3185
|
/// <reference types="node" />
|
|
3199
3186
|
import { IArchives, RemoteConfig, RemoteConfigBase, HostedConfig, BackblazeConfig, ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus } from "../IArchives";
|
|
3200
|
-
import { ServerBucketInfo } from "./storageServerState";
|
|
3187
|
+
import { ServerBucketInfo, ActiveBucketInfo } from "./storageServerState";
|
|
3188
|
+
/** The address, port, account, and bucket name a bucket routing URL addresses. Throws when the URL isn't a hosted bucket routing URL (https://host:port/file/<account>/<bucketName>/storage/storagerouting.json). */
|
|
3189
|
+
export { parseHostedUrl, parseBackblazeUrl, getBucketBaseUrl } from "./remoteConfig";
|
|
3201
3190
|
export declare function createApiArchives(source: HostedConfig | BackblazeConfig): IArchives;
|
|
3202
3191
|
export declare class ArchivesChain implements IArchives {
|
|
3203
3192
|
private configured;
|
|
@@ -3267,12 +3256,7 @@ declare module "sliftutils/storage/remoteStorage/createArchives" {
|
|
|
3267
3256
|
getChangesAfter(time: number): Promise<ArchiveFileInfo[]>;
|
|
3268
3257
|
getSyncStatus(): Promise<ArchivesSyncStatus>;
|
|
3269
3258
|
getConfig(): Promise<ArchivesConfig>;
|
|
3270
|
-
/** True only when EVERY write-receiving source would accept our writes (partial write access
|
|
3271
|
-
* desynchronizes sources, so it counts as no access). */
|
|
3272
3259
|
hasWriteAccess(): Promise<boolean>;
|
|
3273
|
-
/** Returns the full key written. Plain keys come back unchanged; keys containing VARIABLE_SHARD
|
|
3274
|
-
* are automatically materialized (a shard value is picked and embedded, see setVariableShard)
|
|
3275
|
-
* and the caller needs the returned key to ever read the value back. */
|
|
3276
3260
|
set(fileName: string, data: Buffer, config?: {
|
|
3277
3261
|
lastModified?: number;
|
|
3278
3262
|
}): Promise<string>;
|
|
@@ -3287,58 +3271,55 @@ declare module "sliftutils/storage/remoteStorage/createArchives" {
|
|
|
3287
3271
|
dispose(): void;
|
|
3288
3272
|
}
|
|
3289
3273
|
export declare function createArchives(config: RemoteConfig | RemoteConfigBase): ArchivesChain;
|
|
3290
|
-
/** Every bucket an account has on one storage server - active and inactive - with each bucket's
|
|
3291
|
-
* configuration. One authenticated call (the normal trust system applies): no ArchivesChain, no
|
|
3292
|
-
* synchronization, and inactive buckets on the server stay inactive. Any URL addressing the
|
|
3293
|
-
* server works (a bucket routing URL, or just https://host:port). */
|
|
3294
3274
|
export declare function listServerBuckets(config: {
|
|
3295
3275
|
url: string;
|
|
3296
3276
|
account: string;
|
|
3297
3277
|
}): Promise<ServerBucketInfo[]>;
|
|
3298
|
-
/**
|
|
3299
|
-
|
|
3300
|
-
|
|
3278
|
+
/** The live, in-memory state of one bucket on a server (routing config included), or a string saying why it is unavailable. Cheap - it never touches the server's disk - but only works while that bucket is loaded there. */
|
|
3279
|
+
export declare function getServerActiveBucket(config: {
|
|
3280
|
+
url: string;
|
|
3281
|
+
account: string;
|
|
3282
|
+
bucketName: string;
|
|
3283
|
+
}): Promise<ActiveBucketInfo | string>;
|
|
3284
|
+
/** Tells a server to load one of its buckets into memory (starting its synchronization) and returns its live state, or a string saying why it could not be loaded. Only touches that server - nothing is written and no other source is contacted. */
|
|
3285
|
+
export declare function activateServerBucket(config: {
|
|
3286
|
+
url: string;
|
|
3287
|
+
account: string;
|
|
3288
|
+
bucketName: string;
|
|
3289
|
+
}): Promise<ActiveBucketInfo | string>;
|
|
3290
|
+
/** Zeroes the write statistics listServerBuckets reports, for every bucket in the account. */
|
|
3291
|
+
export declare function clearServerWriteStats(config: {
|
|
3292
|
+
url: string;
|
|
3293
|
+
account: string;
|
|
3294
|
+
}): Promise<{
|
|
3295
|
+
clearedBuckets: number;
|
|
3296
|
+
}>;
|
|
3301
3297
|
export declare function getBucketInfo(config: {
|
|
3302
3298
|
url: string;
|
|
3303
|
-
accountName?: string;
|
|
3304
3299
|
}): Promise<ArchivesConfig>;
|
|
3305
3300
|
|
|
3306
3301
|
}
|
|
3307
3302
|
|
|
3308
3303
|
declare module "sliftutils/storage/remoteStorage/deployTakeover" {
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
/**
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
export declare function applyDeployRemap(routing: RemoteConfig): RemoteConfig;
|
|
3327
|
-
/** A stamp of the current remap interpretation, advertised in ping responses - so every connected
|
|
3328
|
-
* client learns of a takeover within one ping interval, instead of waiting for its config poll
|
|
3329
|
-
* or a write rejection. */
|
|
3330
|
-
export declare function getTakeoverStamp(): string | undefined;
|
|
3331
|
-
/** The middle-window alternate port of an active remap. The OTHER process of the takeover lives on
|
|
3332
|
-
* this port on OUR machine (same disk!), so sources pointing at it are self, never sync targets. */
|
|
3333
|
-
export declare function getTakeoverAltPort(): number | undefined;
|
|
3334
|
-
/** For the dying process of a takeover: our own process's data ends at the write handoff - fast
|
|
3335
|
-
* writes must be on disk by then. Undefined for the successor and in normal operation. Both
|
|
3336
|
-
* processes share the config identity (all self windows look like "ours" to both), so this is
|
|
3337
|
-
* the only way the dying side knows the post-handoff windows belong to the other process. */
|
|
3338
|
-
export declare function getOwnWindowEndClip(): number | undefined;
|
|
3339
|
-
/** How long to wait between main-port acquisition attempts: tight around the predecessor's
|
|
3340
|
-
* scheduled death (when the port actually frees), relaxed otherwise. */
|
|
3304
|
+
type DeployTakeover = {
|
|
3305
|
+
releaseTime: number;
|
|
3306
|
+
overlapTime: number;
|
|
3307
|
+
altPort?: number;
|
|
3308
|
+
};
|
|
3309
|
+
/** Called when the main port is already in use, which on a healthy machine only happens while our predecessor is still running a deploy overlap. Confirms that against the deploy timeline; if no deploy is in progress we are in a bad state (someone else holds our port) and the process must not keep running. */
|
|
3310
|
+
export declare function detectDeployTakeover(): Promise<DeployTakeover>;
|
|
3311
|
+
export declare function setAltPort(port: number): void;
|
|
3312
|
+
/** The window in which writes belong to our alternate port: from the release until our predecessor is killed and we take the main port. */
|
|
3313
|
+
export declare function getTakeoverIntermediate(): {
|
|
3314
|
+
start: number;
|
|
3315
|
+
end: number;
|
|
3316
|
+
altPort: number;
|
|
3317
|
+
} | undefined;
|
|
3318
|
+
/** We never stop listening on the alternate port while its window is still valid, and hold it well past that for clients that have not caught up yet. */
|
|
3319
|
+
export declare function getAltPortListenEnd(): number;
|
|
3320
|
+
/** How long to wait between main-port acquisition attempts: tight around our predecessor's scheduled death (when the port actually frees), relaxed otherwise. */
|
|
3341
3321
|
export declare function getMainPortAcquireDelay(): number;
|
|
3322
|
+
export {};
|
|
3342
3323
|
|
|
3343
3324
|
}
|
|
3344
3325
|
|
|
@@ -3347,6 +3328,31 @@ declare module "sliftutils/storage/remoteStorage/grantAccessCli" {
|
|
|
3347
3328
|
|
|
3348
3329
|
}
|
|
3349
3330
|
|
|
3331
|
+
declare module "sliftutils/storage/remoteStorage/intermediateSources" {
|
|
3332
|
+
import { RemoteConfig, HostedConfig, BackblazeConfig } from "../IArchives";
|
|
3333
|
+
export declare const INTERMEDIATE_EXPIRE_GRACE: number;
|
|
3334
|
+
/** Adding or removing intermediates is a real config update, so it takes a real version increment - but a proportional one, so it stays far below whatever the author's next version would be (whether they count 1, 2, 3 or use timestamps), and a million of them still fit under it. */
|
|
3335
|
+
export declare function nextIntermediateVersion(version: number): number;
|
|
3336
|
+
type ObjectSource = HostedConfig | BackblazeConfig;
|
|
3337
|
+
export declare function getIntermediateSources(config: RemoteConfig): ObjectSource[];
|
|
3338
|
+
export declare function hasIntermediateSources(config: RemoteConfig): boolean;
|
|
3339
|
+
/** Removes every intermediate entry and rejoins the windows it split, giving back the underlying configuration. Two configs that resolve equal differ only by intermediates. */
|
|
3340
|
+
export declare function resolveIntermediateSources(config: RemoteConfig): RemoteConfig;
|
|
3341
|
+
/** Splits every source at splitUrl covering [start, end) so that middle window points at intermediateUrl instead, flagged as intermediate. Idempotent: a config that already contains the exact intermediate comes back unchanged. */
|
|
3342
|
+
export declare function injectIntermediateSource(config: RemoteConfig, inject: {
|
|
3343
|
+
splitUrl: string;
|
|
3344
|
+
intermediateUrl: string;
|
|
3345
|
+
start: number;
|
|
3346
|
+
end: number;
|
|
3347
|
+
}): RemoteConfig;
|
|
3348
|
+
/** Intermediates whose window ended more than INTERMEDIATE_EXPIRE_GRACE ago are removed, and the windows they split are rejoined. */
|
|
3349
|
+
export declare function expireIntermediateSources(config: RemoteConfig, now: number): RemoteConfig;
|
|
3350
|
+
/** The url of the entry an intermediate was split out of - the neighbour it touches. */
|
|
3351
|
+
export declare function findSplitUrl(config: RemoteConfig, intermediate: ObjectSource): string | undefined;
|
|
3352
|
+
export {};
|
|
3353
|
+
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3350
3356
|
declare module "sliftutils/storage/remoteStorage/remoteConfig" {
|
|
3351
3357
|
/// <reference types="node" />
|
|
3352
3358
|
/// <reference types="node" />
|
|
@@ -3382,7 +3388,7 @@ declare module "sliftutils/storage/remoteStorage/remoteConfig" {
|
|
|
3382
3388
|
}
|
|
3383
3389
|
|
|
3384
3390
|
declare module "sliftutils/storage/remoteStorage/sourceWrapper" {
|
|
3385
|
-
import { IArchives, HostedConfig, BackblazeConfig } from "../IArchives";
|
|
3391
|
+
import { IArchives, HostedConfig, BackblazeConfig, RemoteConfig } from "../IArchives";
|
|
3386
3392
|
import { ArchivesUrl } from "./ArchivesUrl";
|
|
3387
3393
|
export declare const RETRY_START_DELAY: number;
|
|
3388
3394
|
export declare const RETRY_MAX_DELAY: number;
|
|
@@ -3398,41 +3404,30 @@ declare module "sliftutils/storage/remoteStorage/sourceWrapper" {
|
|
|
3398
3404
|
private reconnectRunning;
|
|
3399
3405
|
private accessCache?;
|
|
3400
3406
|
private constructor();
|
|
3401
|
-
/** Config updates routinely just move a source's valid window (the last window extends
|
|
3402
|
-
* forever, then gets reduced when a new entry is appended). The wrapper survives that: only
|
|
3403
|
-
* the window changes, keeping the connection, pings, and latency history. */
|
|
3407
|
+
/** Config updates routinely just move a source's valid window (the last window extends forever, then gets reduced when a new entry is appended). The wrapper survives that: only the window changes, keeping the connection, pings, and latency history. */
|
|
3404
3408
|
updateValidWindow(validWindow: [number, number]): void;
|
|
3405
3409
|
static create(config: HostedConfig | BackblazeConfig, options?: {
|
|
3406
3410
|
background?: boolean;
|
|
3407
3411
|
}): Promise<SourceWrapper>;
|
|
3408
3412
|
getDebugName(): string;
|
|
3409
3413
|
isConnected(): boolean;
|
|
3410
|
-
/** Call after a request failed while isConnected() was false: starts (if not already running)
|
|
3411
|
-
* the background reconnect loop. Never blocks - the failed request still throws. */
|
|
3414
|
+
/** Call after a request failed while isConnected() was false: starts (if not already running) the background reconnect loop. Never blocks - the failed request still throws. */
|
|
3412
3415
|
noteFailure(): void;
|
|
3413
3416
|
private reconnectLoop;
|
|
3414
3417
|
private checkAccess;
|
|
3415
3418
|
read<T>(run: (archives: IArchives) => Promise<T>): Promise<T>;
|
|
3419
|
+
readRoutingConfig(): Promise<RemoteConfig | undefined>;
|
|
3416
3420
|
hasWriteAccess(): Promise<boolean>;
|
|
3417
3421
|
private pings;
|
|
3418
3422
|
private pingTimer;
|
|
3419
3423
|
private loggedConnected;
|
|
3420
|
-
|
|
3421
|
-
/** Fired when the source's advertised takeover stamp changes (a deploy takeover started or
|
|
3422
|
-
* ended) - the chain refreshes its config, so connected clients learn within one ping. */
|
|
3423
|
-
onServedConfigChanged: (() => void) | undefined;
|
|
3424
|
-
/** Starts measuring this source's latency (for variable-shard target preference). Only hosted
|
|
3425
|
-
* remotes are pinged; our own local server counts as 0, everything else as Infinity. */
|
|
3424
|
+
/** Starts measuring this source's latency (for variable-shard target preference). Only hosted remotes are pinged; our own local server counts as 0, everything else as Infinity. */
|
|
3426
3425
|
startPinging(): void;
|
|
3427
|
-
/** Seeds the latency estimate before the first ping lands (e.g. from the initial routing
|
|
3428
|
-
* fetch), so variable-shard picking has something immediately. Real pings take over from the
|
|
3429
|
-
* first measurement on. */
|
|
3426
|
+
/** Seeds the latency estimate before the first ping lands (e.g. from the initial routing fetch), so variable-shard picking has something immediately. Real pings take over from the first measurement on. */
|
|
3430
3427
|
seedLatency(ms: number): void;
|
|
3431
|
-
/** Median of the recent pings. Sources that can't be pinged sort last (Infinity), except our
|
|
3432
|
-
* own in-process server, which is the best possible target (0). */
|
|
3428
|
+
/** Median of the recent pings. Sources that can't be pinged sort last (Infinity), except our own in-process server, which is the best possible target (0). */
|
|
3433
3429
|
getLatency(): number;
|
|
3434
|
-
/** Writes always go through the API, so a permission error throws to the caller on every write
|
|
3435
|
-
* (and access granted in the meantime is picked up automatically). */
|
|
3430
|
+
/** Writes always go through the API, so a permission error throws to the caller on every write (and access granted in the meantime is picked up automatically). */
|
|
3436
3431
|
write<T>(run: (archives: IArchives) => Promise<T>): Promise<T>;
|
|
3437
3432
|
dispose(): void;
|
|
3438
3433
|
}
|
|
@@ -3452,7 +3447,7 @@ declare module "sliftutils/storage/remoteStorage/storageController" {
|
|
|
3452
3447
|
/// <reference types="node" />
|
|
3453
3448
|
/// <reference types="node" />
|
|
3454
3449
|
import { ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus } from "../IArchives";
|
|
3455
|
-
import { ServerBucketInfo } from "./storageServerState";
|
|
3450
|
+
import { ServerBucketInfo, ActiveBucketInfo } from "./storageServerState";
|
|
3456
3451
|
export declare const REMOTE_STORAGE_CLASS_GUID = "RemoteStorageController-b7e42a91";
|
|
3457
3452
|
export declare const STORAGE_AUTH_PURPOSE = "remoteStorage-auth-1";
|
|
3458
3453
|
export declare const STORAGE_NOT_AUTHENTICATED = "REMOTE_STORAGE_NOT_AUTHENTICATED_cf2f7b1e";
|
|
@@ -3487,13 +3482,9 @@ declare module "sliftutils/storage/remoteStorage/storageController" {
|
|
|
3487
3482
|
grantAccessCommand?: string;
|
|
3488
3483
|
trustedMachines?: TrustRecord[];
|
|
3489
3484
|
};
|
|
3490
|
-
/** Called by storageServerState the moment any routing config is applied - clients must never
|
|
3491
|
-
* have to wait for a poll to learn the topology changed. */
|
|
3492
3485
|
export declare function broadcastRoutingChanged(): void;
|
|
3493
3486
|
export declare const RemoteStorageController: import("socket-function/SocketFunctionTypes").SocketRegistered<{
|
|
3494
|
-
ping: () => Promise<{
|
|
3495
|
-
takeover?: string;
|
|
3496
|
-
}>;
|
|
3487
|
+
ping: () => Promise<{}>;
|
|
3497
3488
|
authenticate: (token: AuthToken) => Promise<{
|
|
3498
3489
|
machineId: string;
|
|
3499
3490
|
ip: string;
|
|
@@ -3534,6 +3525,11 @@ declare module "sliftutils/storage/remoteStorage/storageController" {
|
|
|
3534
3525
|
getChangesAfter: (account: string, bucketName: string, time: number) => Promise<ArchiveFileInfo[]>;
|
|
3535
3526
|
getArchivesConfig: (account: string, bucketName: string) => Promise<ArchivesConfig>;
|
|
3536
3527
|
listBuckets: (account: string) => Promise<ServerBucketInfo[]>;
|
|
3528
|
+
getActiveBucket: (account: string, bucketName: string) => Promise<ActiveBucketInfo | string>;
|
|
3529
|
+
activateBucket: (account: string, bucketName: string) => Promise<ActiveBucketInfo | string>;
|
|
3530
|
+
clearWriteStats: (account: string) => Promise<{
|
|
3531
|
+
clearedBuckets: number;
|
|
3532
|
+
}>;
|
|
3537
3533
|
getIndexInfo: (account: string, bucketName: string) => Promise<{
|
|
3538
3534
|
fileCount: number;
|
|
3539
3535
|
byteCount: number;
|
|
@@ -3595,7 +3591,16 @@ declare module "sliftutils/storage/remoteStorage/storageServerState" {
|
|
|
3595
3591
|
export declare function assertWritesAllowed(): void;
|
|
3596
3592
|
export declare function getTrust(): Promise<IStorage<TrustRecord>>;
|
|
3597
3593
|
export declare function getRequests(): Promise<IStorage<AccessRequest[]>>;
|
|
3598
|
-
|
|
3594
|
+
export type BucketWriteStats = {
|
|
3595
|
+
/** Every set call the bucket accepted */
|
|
3596
|
+
originalWrites: number;
|
|
3597
|
+
originalBytes: number;
|
|
3598
|
+
/** What actually reached the sources. Fast writes coalesce repeated writes to the same key, so this is lower than the original counts (and is what the disk actually did). */
|
|
3599
|
+
flushedWrites: number;
|
|
3600
|
+
flushedBytes: number;
|
|
3601
|
+
};
|
|
3602
|
+
/** Zeroes the write statistics of every bucket in the account, including counts not yet flushed. */
|
|
3603
|
+
export declare function clearAccountWriteStats(account: string): Promise<number>;
|
|
3599
3604
|
export declare function setTrustedMachines(config: {
|
|
3600
3605
|
account: string;
|
|
3601
3606
|
machineIds: string[];
|
|
@@ -3611,6 +3616,7 @@ declare module "sliftutils/storage/remoteStorage/storageServerState" {
|
|
|
3611
3616
|
structureKey: string;
|
|
3612
3617
|
};
|
|
3613
3618
|
export declare function addExtraListenPort(port: number): void;
|
|
3619
|
+
export declare function removeExtraListenPort(port: number): void;
|
|
3614
3620
|
export declare function getLoadedBucket(account: string, bucketName: string): Promise<LoadedBucket | undefined>;
|
|
3615
3621
|
export declare function assertMutable(bucket: LoadedBucket, filePath: string, writeTime: number): Promise<void>;
|
|
3616
3622
|
export declare function writeBucketFile(account: string, bucketName: string, filePath: string, data: Buffer, config?: {
|
|
@@ -3618,16 +3624,42 @@ declare module "sliftutils/storage/remoteStorage/storageServerState" {
|
|
|
3618
3624
|
}): Promise<void>;
|
|
3619
3625
|
export declare function getBucketConfig(bucket: LoadedBucket): ArchivesConfig;
|
|
3620
3626
|
export declare function rebuildAllLoadedBuckets(): Promise<void>;
|
|
3627
|
+
/** Started by deployTakeover once we are actually a deploy successor listening on an alternate port. Until then there are no switchover windows to write or expire, so nothing polls. */
|
|
3628
|
+
export declare const startIntermediateMaintenance: {
|
|
3629
|
+
(): void;
|
|
3630
|
+
reset(): void;
|
|
3631
|
+
set(newValue: void): void;
|
|
3632
|
+
};
|
|
3633
|
+
export type BucketDiskInfo = {
|
|
3634
|
+
totalBytes: number;
|
|
3635
|
+
freeBytes: number;
|
|
3636
|
+
usedBytes: number;
|
|
3637
|
+
};
|
|
3621
3638
|
export type ServerBucketInfo = {
|
|
3622
3639
|
bucketName: string;
|
|
3623
3640
|
active: boolean;
|
|
3641
|
+
/** Where the bucket's data lives on this server */
|
|
3642
|
+
folder: string;
|
|
3643
|
+
/** The drive that folder is on. Buckets sharing a drive report the same numbers. */
|
|
3644
|
+
disk?: BucketDiskInfo;
|
|
3645
|
+
diskError?: string;
|
|
3646
|
+
writeStats?: BucketWriteStats;
|
|
3624
3647
|
config?: ArchivesConfig;
|
|
3625
3648
|
error?: string;
|
|
3626
3649
|
};
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3650
|
+
export type ActiveBucketInfo = {
|
|
3651
|
+
folder: string;
|
|
3652
|
+
/** The routing config the bucket is RUNNING on, straight from memory - including switchover windows written since it loaded */
|
|
3653
|
+
routing: RemoteConfig;
|
|
3654
|
+
/** Our own entries in that config, and the one currently valid */
|
|
3655
|
+
selfEntries: HostedConfig[];
|
|
3656
|
+
self?: HostedConfig;
|
|
3657
|
+
config: ArchivesConfig;
|
|
3658
|
+
};
|
|
3659
|
+
/** The live in-memory state of ONE bucket, answered without touching the disk (no routing file read, no statfs, no stored write stats). Returns an error string when the bucket is not loaded here, which is the normal state for a bucket nothing has accessed since startup. */
|
|
3660
|
+
export declare function getActiveBucket(account: string, bucketName: string): Promise<ActiveBucketInfo | string>;
|
|
3661
|
+
/** Loads a bucket that exists on this server's disk into memory, which starts its synchronization and window timers, and returns its live state. Nothing is written and no other server is contacted - unlike building an ArchivesChain for it, which would probe every source and could write the routing config. Already-loaded buckets just return their state. */
|
|
3662
|
+
export declare function activateBucket(account: string, bucketName: string): Promise<ActiveBucketInfo | string>;
|
|
3631
3663
|
export declare function listAccountBuckets(account: string): Promise<ServerBucketInfo[]>;
|
|
3632
3664
|
export declare function deleteBucketFile(account: string, bucketName: string, filePath: string): Promise<void>;
|
|
3633
3665
|
export declare function getLocalArchives(account: string, bucketName: string): IArchives;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict"; var console = (function shimConsole() { let baseConsole = globalThis.console; if (typeof window !== "undefined") return baseConsole; let name = __filename.replaceAll("\\", "/").split("/").pop(); let dirName = __dirname.replaceAll("\\", "/").split("/").pop(); let context = { __FILE__: __filename, __DIR__: __dirname, __NAME__: name, __DIRNAME__: dirName }; let newConsole = { ...baseConsole }; for (let shim of ["log", "info", "warn", "error"]) { newConsole[shim] = (...args) => { args.push(context); baseConsole[shim](...args); }; } newConsole.__context = context; return newConsole; })(); "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true , configurable: true});
|
|
3
3
|
//exports.isInBrowser = exports.isInBuild = exports.triggerIsInBuild = exports.isInElectron = exports.isInChromeExtensionContentScript = exports.isInChromeExtensionBackground = exports.isInChromeExtension = void 0;
|
|
4
4
|
/// <reference types="@types/chrome/index.d.ts" />
|
|
@@ -47,4 +47,4 @@ function isInBrowser() {
|
|
|
47
47
|
}
|
|
48
48
|
exports.isInBrowser = isInBrowser;
|
|
49
49
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrREFBa0Q7QUFDbEQsU0FBZ0IsbUJBQW1CO0lBQy9CLE9BQU8sT0FBTyxNQUFNLEtBQUssV0FBVyxJQUFJLE1BQU0sQ0FBQyxPQUFPLElBQUksT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= "de8507c9fce2fb9b79361d996ea125431343dc38988e6c870ee82c7049032ba0"; */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict"; var console = (function shimConsole() { let baseConsole = globalThis.console; if (typeof window !== "undefined") return baseConsole; let name = __filename.replaceAll("\\", "/").split("/").pop(); let dirName = __dirname.replaceAll("\\", "/").split("/").pop(); let context = { __FILE__: __filename, __DIR__: __dirname, __NAME__: name, __DIRNAME__: dirName }; let newConsole = { ...baseConsole }; for (let shim of ["log", "info", "warn", "error"]) { newConsole[shim] = (...args) => { args.push(context); baseConsole[shim](...args); }; } newConsole.__context = context; return newConsole; })(); "use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -136,4 +136,4 @@ function setSecret(key, value) {
|
|
|
136
136
|
}
|
|
137
137
|
exports.setSecret = setSecret;
|
|
138
138
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0U2VjcmV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZ2V0U2VjcmV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EseURBQW9EO0FBQ3BELDZDQUFxQztBQUVyQyxNQUFNLG1CQUFtQixHQUFHLFNBQVMsQ0FBQztBQUV0QyxTQUFTLGFBQWEsQ0FBQyxHQUFXO0lBQzlCLE9BQU8sbUJBQW1CLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDL0QsQ0FBQztBQUVELFNBQWdCLFdBQVcsQ0FBQyxHQUFXO0lBQ25DLElBQUksSUFBQSxvQkFBTSxHQUFFLEVB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XCIvXCIgKyBrZXk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZzLnJlYWRGaWxlU3luYyhmaWxlUGF0aCwgXCJ1dGYtOFwiKS50cmltKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IHBhdGhQYXJ0ID0ga2V5LnNsaWNlKDAsIGpzb25JbmRleCArIFwiLmpzb25cIi5sZW5ndGgpO1xuICAgICAgICAgICAgZmlsZVBhdGggPSBvcy5ob21lZGlyKCkgKyBcIi9cIiArIHBhdGhQYXJ0O1xuICAgICAgICAgICAgY29uc3QgY29udGVudHMgPSBmcy5yZWFkRmlsZVN5bmMoZmlsZVBhdGgsIFwidXRmLThcIik7XG4gICAgICAgICAgICBjb25zdCBqc29uID0gSlNPTi5wYXJzZShjb250ZW50cyk7XG5cbiAgICAgICAgICAgIGNvbnN0IGtleVBhcnQgPSBrZXkuc2xpY2UoanNvbkluZGV4ICsgXCIuanNvbi5cIi5sZW5ndGgpO1xuICAgICAgICAgICAgaWYgKCFrZXlQYXJ0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGpzb24pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGpzb25ba2V5UGFydF07XG4gICAgICAgICAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRXhwZWN0ZWQga2V5IFwiJHtrZXlQYXJ0fVwiIGluICR7ZmlsZVBhdGh9LCB3YXMgdW5kZWZpbmVkYCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gU3RyaW5nKHZhbHVlKTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb3VsZCBub3QgZmluZCBzZWNyZXQgXCIke2tleX1cIi4gRXhwZWN0ZWQgaXQgZWl0aGVyIGZyb20g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lIH0gPSBzaG93TW9kYWwoe1xuICAgICAgICAgICAgY29udGVudHM6IHByZWFjdC5jcmVhdGVFbGVtZW50KEZ1bGxzY3JlZW5Nb2RhbCwge1xuICAgICAgICAgICAgICAgIG9uQ2FuY2VsOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIC8vIERvbid0IGFsbG93IGNhbmNlbCB3aXRob3V0IGEgdmFsdWVcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBwcmVhY3QuY3JlYXRlRWxlbWVudChcImRpdlwiLCB7IHN0eWxlOiB7IGRpc3BsYXk6IFwiZmxleFwiLCBmbGV4RGlyZWN0aW9uOiBcImNvbHVtblwiLCBnYXA6IDEwIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgcHJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIiwgeyBzdHlsZTogeyBmb250V2VpZ2h0OiBcImJvbGRcIiB9IH0sIGBFbnRlciBzZWNyZXQgZm9yOiAke2tleX1gKSxcbiAgICAgICAgICAgICAgICAgICAgcHJlYWN0LmNyZWF0ZUVsZW1lbnQoXCJpbnB1dFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZTogeyBwYWRkaW5nOiAxMCwgZm9udFNpemU6IDE2IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBvbklucHV0OiAoZTogRXZlbnQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS52YWx1ZSA9IChlLnRhcmdldCBhcyBIVE1MSW5wdXRFbGVtZW50KS52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBvbktleURvd246IChlOiBLZXlib2FyZEV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUuY29kZSA9PT0gXCJFbnRlclwiICYmIHN0YXRlLnZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2FsU3RvcmFnZS5zZXRJdGVtKHN0b3JhZ2VLZXksIHN0YXRlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShzdGF0ZS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIHByZWFjdC5jcmVhdGVFbGVtZW50KFwiYnV0dG9uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlOiB7IHBhZGRpbmc6IDEwLCBmb250U2l6ZTogMTYsIGN1cnNvcjogXCJwb2ludGVyXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s6ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUudmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWxTdG9yYWdlLnNldEl0ZW0oc3RvcmFnZUtleSwgc3RhdGUudmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHN0YXRlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB9LCBcIlNhdmVcIiksXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICksXG4gICAgICAgIH0pO1xuICAgIH0pO1xufSk7XG5cbmV4cG9ydCBmdW5jdGlvbiBzZXRTZWNyZXQoa2V5OiBzdHJpbmcsIHZhbHVlOiBzdHJpbmcpIHtcbiAgICBpZiAoaXNOb2RlKCkpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwic2V0U2VjcmV0IGlzIG9ubHkgc3VwcG9ydGVkIGluIHRoZSBicm93c2VyLiBXZSBkb24ndCB3YW50IHRvIGJyZWFrIHRoZSB1c2VyJ3MgZmlsZSBzeXN0ZW0gd2l0aCBzZXRTZWNyZXQgaW4gTm9kZUpTLlwiKTtcbiAgICB9XG4gICAgbG9jYWxTdG9yYWdlLnNldEl0ZW0oZ2V0U3RvcmFnZUtleShrZXkpLCB2YWx1ZSk7XG59XG4iXX0=
|
|
139
|
-
/* _JS_SOURCE_HASH = "
|
|
139
|
+
/* _JS_SOURCE_HASH = "43dfc5991cbc841376e1b832e2b30c17341058ed45b2accd36ec4e823580f05b"; */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict"; var console = (function shimConsole() { let baseConsole = globalThis.console; if (typeof window !== "undefined") return baseConsole; let name = __filename.replaceAll("\\", "/").split("/").pop(); let dirName = __dirname.replaceAll("\\", "/").split("/").pop(); let context = { __FILE__: __filename, __DIR__: __dirname, __NAME__: name, __DIRNAME__: dirName }; let newConsole = { ...baseConsole }; for (let shim of ["log", "info", "warn", "error"]) { newConsole[shim] = (...args) => { args.push(context); baseConsole[shim](...args); }; } newConsole.__context = context; return newConsole; })(); "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true , configurable: true});
|
|
3
3
|
//exports.ellipsize = void 0;
|
|
4
4
|
module.allowclient = true;
|
|
@@ -10,4 +10,4 @@ function ellipsize(text, maxLength) {
|
|
|
10
10
|
}
|
|
11
11
|
exports.ellipsize = ellipsize;
|
|
12
12
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsTUFBTSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUM7QUFFMUIsU0FBZ0IsU0FBUyxDQUFDLElBQVksRUFBRSxTQUFpQjtJQUNyRCxJQUFJLElBQUksQ0FBQyxNQUFNLElBQUksU0FBUyxFQUFFLENBQUM7UUFDM0IsT0FBTyxJQUFJLENBQUM7SUFDaEIsQ0FBQztJQUNELE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsU0FBUyxHQUFHLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQztBQUNoRCxDQUFDO0FBTEQsOEJBS0MiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuYWxsb3djbGllbnQgPSB0cnVlO1xuXG5leHBvcnQgZnVuY3Rpb24gZWxsaXBzaXplKHRleHQ6IHN0cmluZywgbWF4TGVuZ3RoOiBudW1iZXIpOiBzdHJpbmcge1xuICAgIGlmICh0ZXh0Lmxlbmd0aCA8PSBtYXhMZW5ndGgpIHtcbiAgICAgICAgcmV0dXJuIHRleHQ7XG4gICAgfVxuICAgIHJldHVybiB0ZXh0LnNsaWNlKDAsIG1heExlbmd0aCAtIDMpICsgXCIuLi5cIjtcbn1cbiJdfQ==
|
|
13
|
-
/* _JS_SOURCE_HASH = "
|
|
13
|
+
/* _JS_SOURCE_HASH = "7c28f5b0453f758b90a7c5426740a03efc1d246ca05a758851a7a212768dc4fa"; */
|
package/misc/dist/zip.ts.cache
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict"; var console = (function shimConsole() { let baseConsole = globalThis.console; if (typeof window !== "undefined") return baseConsole; let name = __filename.replaceAll("\\", "/").split("/").pop(); let dirName = __dirname.replaceAll("\\", "/").split("/").pop(); let context = { __FILE__: __filename, __DIR__: __dirname, __NAME__: name, __DIRNAME__: dirName }; let newConsole = { ...baseConsole }; for (let shim of ["log", "info", "warn", "error"]) { newConsole[shim] = (...args) => { args.push(context); baseConsole[shim](...args); }; } newConsole.__context = context; return newConsole; })(); "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true , configurable: true});
|
|
3
3
|
//exports.Zip = void 0;
|
|
4
4
|
const compileFlags_1 = require("socket-function/require/compileFlags");
|
|
@@ -6,4 +6,4 @@ const Zip_1 = require("socket-function/src/Zip");
|
|
|
6
6
|
Object.defineProperty(exports, "Zip", { enumerable: true, get: function () { return Zip_1.Zip; } , configurable: true});
|
|
7
7
|
(0, compileFlags_1.setFlag)(require, "pako", "allowclient", true);
|
|
8
8
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiemlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiemlwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUtBLHVFQUErRDtBQUUvRCxpREFBOEM7QUFHckMsb0ZBSEEsU0FBRyxPQUdBO0FBRlosSUFBQSxzQkFBTyxFQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsYUFBYSxFQUFFLElBQUksQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaXNOb2RlIH0gZnJvbSBcInNvY2tldC1mdW5jdGlvbi9zcmMvbWlzY1wiO1xuaW1wb3J0IHsgbWVhc3VyZUZuYyB9IGZyb20gXCJzb2NrZXQtZnVuY3Rpb24vc3JjL3Byb2ZpbGluZy9tZWFzdXJlXCI7XG5pbXBvcnQgemxpYiBmcm9tIFwiemxpYlwiO1xuaW1wb3J0ICogYXMgcGFrbyBmcm9tIFwicGFrb1wiO1xuXG5pbXBvcnQgeyBzZXRGbGFnIH0gZnJvbSBcInNvY2tldC1mdW5jdGlvbi9yZXF1aXJlL2NvbXBpbGVGbGFnc1wiO1xuaW1wb3J0IHsgTWF5YmVQcm9taXNlIH0gZnJvbSBcInNvY2tldC1mdW5jdGlvbi9zcmMvdHlwZXNcIjtcbmltcG9ydCB7IFppcCB9IGZyb20gXCJzb2NrZXQtZnVuY3Rpb24vc3JjL1ppcFwiO1xuc2V0RmxhZyhyZXF1aXJlLCBcInBha29cIiwgXCJhbGxvd2NsaWVudFwiLCB0cnVlKTtcblxuZXhwb3J0IHsgWmlwIH07Il19
|
|
9
|
-
/* _JS_SOURCE_HASH = "
|
|
9
|
+
/* _JS_SOURCE_HASH = "c12edb7a13e9f5bfb42f2fd9379966199847c174297f9f8cf3a6770cb8309264"; */
|