sliftutils 1.7.37 → 1.7.39
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/allowclient.flag +0 -0
- package/electron/electronRenderer.tsx +2 -0
- package/examplestorage/browser.tsx +1 -1
- package/index.d.ts +0 -1
- package/misc/apiKeys.tsx +2 -0
- package/misc/dist/getSecret.ts.cache +2 -2
- package/misc/dist/strings.ts.cache +3 -4
- package/misc/https/certs.ts +0 -2
- package/misc/https/dist/certs.ts.cache +3 -4
- package/misc/https/dist/hostServer.ts.cache +49 -3
- package/misc/https/dist/httpsCerts.ts.cache +5 -11
- package/misc/https/dist/persistentLocalStorage.ts.cache +3 -4
- package/misc/https/persistentLocalStorage.ts +0 -2
- package/misc/strings.ts +0 -2
- package/package.json +1 -1
- package/render-utils/DropdownCustom.tsx +2 -0
- package/render-utils/FullscreenModal.tsx +2 -0
- package/render-utils/Input.tsx +0 -2
- package/render-utils/InputLabel.tsx +1 -1
- package/render-utils/InputPicker.tsx +2 -0
- package/render-utils/LocalStorageParam.ts +2 -0
- package/render-utils/SyncedController.ts +2 -0
- package/render-utils/Table.tsx +2 -0
- package/render-utils/URLParam.ts +2 -0
- package/render-utils/asyncObservable.ts +2 -0
- package/render-utils/colors.tsx +0 -2
- package/render-utils/dist/observer.tsx.cache +3 -3
- package/render-utils/mobxTyped.ts +2 -0
- package/render-utils/modal.tsx +2 -0
- package/render-utils/observer.tsx +1 -1
- package/storage/FileFolderAPI.tsx +2 -0
- package/storage/IArchives.ts +0 -2
- package/storage/PendingManager.tsx +2 -0
- package/storage/StorageObservable.ts +2 -0
- package/storage/dist/FileFolderAPI.tsx.cache +3 -2
- package/storage/dist/IArchives.ts.cache +4 -5
- package/storage/dist/PendingManager.tsx.cache +3 -2
- package/storage/dist/backblaze.ts.cache +2 -2
- package/storage/remoteStorage/ArchivesRemote.ts +0 -2
- package/storage/remoteStorage/ArchivesUrl.ts +0 -2
- package/storage/remoteStorage/accessPage.tsx +1 -1
- package/storage/remoteStorage/createArchives.ts +0 -2
- package/storage/remoteStorage/dist/ArchivesRemote.ts.cache +2 -3
- package/storage/remoteStorage/dist/ArchivesUrl.ts.cache +2 -3
- package/storage/remoteStorage/dist/accessPage.tsx.cache +4 -8
- package/storage/remoteStorage/dist/createArchives.ts.cache +2 -3
- package/storage/remoteStorage/dist/productionEnv.ts.cache +5 -0
- package/storage/remoteStorage/dist/remoteConfig.ts.cache +2 -3
- package/storage/remoteStorage/dist/sourceWrapper.ts.cache +2 -3
- package/storage/remoteStorage/dist/storageController.ts.cache +2 -3
- package/storage/remoteStorage/dist/storageServer.ts.cache +31 -18
- package/storage/remoteStorage/dist/storageServerCli.ts.cache +2 -3
- package/storage/remoteStorage/dist/storageServerState.ts.cache +10 -2
- package/storage/remoteStorage/remoteConfig.ts +0 -2
- package/storage/remoteStorage/sourceWrapper.ts +0 -2
- package/storage/remoteStorage/storageController.ts +0 -2
- package/storage/remoteStorage/storageServer.d.ts +0 -1
- package/storage/remoteStorage/storageServer.ts +2 -2
- package/storage/remoteStorage/storageServerState.ts +8 -0
- package/testsite/browser.tsx +1 -1
- package/testsite/serverInfoController.ts +0 -2
- package/web/ExamplePage.tsx +2 -0
- package/web/browser.tsx +2 -0
- package/storage/remoteStorage/productionEnv.ts +0 -2
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
module.allowclient = true;
|
|
2
|
-
|
|
3
1
|
import { sort, sha256HashBuffer } from "socket-function/src/misc";
|
|
4
2
|
import { getBufferInt } from "socket-function/src/bits";
|
|
5
3
|
import { RemoteConfig, RemoteConfigBase, HostedConfig, BackblazeConfig, FULL_VALID_WINDOW, FULL_ROUTE, VARIABLE_SHARD } from "../IArchives";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
process.env.NODE_ENV = "production";
|
|
2
|
+
|
|
3
3
|
import os from "os";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import fsp from "fs/promises";
|
|
@@ -508,6 +508,10 @@ function buildBucket(account: string, bucketName: string, routing: RemoteConfig,
|
|
|
508
508
|
let loaded: LoadedBucket = { account, bucketName, routing, routingJSON: JSON.stringify(routing), selfEntries, self, store, structureKey: plan.structureKey };
|
|
509
509
|
scheduleWindowBoundaryRebuild(loaded);
|
|
510
510
|
scheduleBoundaryScans(loaded);
|
|
511
|
+
// A loaded bucket must actually be running: the store's init loads its index and starts its source synchronization, and it is lazy, so without this a bucket nothing has read from or written to sits inert - reporting no data and no syncing while its disk is full of files.
|
|
512
|
+
if (store instanceof BlobStore) {
|
|
513
|
+
void store.init().catch((e: Error) => console.error(`Initializing the store for bucket ${account}/${bucketName} failed: ${e.stack ?? e}`));
|
|
514
|
+
}
|
|
511
515
|
return loaded;
|
|
512
516
|
}
|
|
513
517
|
|
|
@@ -870,6 +874,10 @@ export async function activateBucket(account: string, bucketName: string): Promi
|
|
|
870
874
|
if (!loaded) {
|
|
871
875
|
return `Bucket ${key} does not exist on this server (no routing file in ${getBucketFolder(account, bucketName)})`;
|
|
872
876
|
}
|
|
877
|
+
// Wait for the index to load, so the totals we return are the real ones rather than zeroes from a store that has not read its index yet. The source scans keep running in the background.
|
|
878
|
+
if (loaded.store instanceof BlobStore) {
|
|
879
|
+
await loaded.store.init();
|
|
880
|
+
}
|
|
873
881
|
if (!wasLoaded) {
|
|
874
882
|
console.log(`Activated bucket ${key} on request: it is now loaded and synchronizing`);
|
|
875
883
|
}
|
package/testsite/browser.tsx
CHANGED
package/web/ExamplePage.tsx
CHANGED
package/web/browser.tsx
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// Packages like mobx pick which build to require at runtime, from process.env.NODE_ENV. The browser require shim runs as production, so a server that loads the development build ships a module graph the client cannot satisfy ("Accessed unexpected module ./mobx.cjs.production.min.js ... Expected imports: ./mobx.cjs.development.js"). Setting this is the only way to make both sides agree, and it MUST happen before anything imports such a package - which is why it lives in its own module, imported first (import statements run in source order, so a plain statement at the top of storageServer.ts would run too late).
|
|
2
|
-
process.env.NODE_ENV = "production";
|