sliftutils 1.7.14 → 1.7.16
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/index.d.ts +12 -6
- package/misc/https/hostServer.d.ts +1 -1
- package/misc/https/hostServer.ts +29 -50
- package/package.json +1 -1
- package/storage/dist/ArchivesDisk.ts.cache +3 -2
- package/storage/dist/IArchives.ts.cache +2 -2
- package/storage/dist/backblaze.ts.cache +10 -6
- package/storage/remoteStorage/createArchives.d.ts +6 -1
- package/storage/remoteStorage/createArchives.ts +263 -177
- package/storage/remoteStorage/deployTakeover.d.ts +4 -4
- package/storage/remoteStorage/deployTakeover.ts +5 -6
- package/storage/remoteStorage/dist/ArchivesRemote.ts.cache +3 -2
- package/storage/remoteStorage/dist/ArchivesUrl.ts.cache +2 -2
- package/storage/remoteStorage/dist/blobStore.ts.cache +6 -5
- package/storage/remoteStorage/dist/createArchives.ts.cache +16 -20
- package/storage/remoteStorage/dist/deployTakeover.ts.cache +6 -7
- package/storage/remoteStorage/dist/storageServerState.ts.cache +3 -2
- package/storage/remoteStorage/sourceWrapper.d.ts +1 -0
- package/storage/remoteStorage/sourceWrapper.ts +8 -0
- package/storage/remoteStorage/storageServer.ts +6 -5
|
@@ -119,21 +119,22 @@ export async function hostStorageServer(config: HostStorageServerConfig): Promis
|
|
|
119
119
|
}, DISK_SPACE_CHECK_INTERVAL_MS);
|
|
120
120
|
(interval as { unref?: () => void }).unref?.();
|
|
121
121
|
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
|
|
122
|
+
// Port fallback is always on: a busy port means listening on an alternate, registering it, and
|
|
123
|
+
// polling to take the real port. The deploy takeover machinery merely rides on top (tighter
|
|
124
|
+
// polling around a scheduled switchover, and the valid-window remap once a successor is known).
|
|
125
|
+
await initDeployTakeover({ domain, mainPort: port, storageFolder: path.resolve(folder) });
|
|
125
126
|
|
|
126
127
|
await hostServer({
|
|
127
128
|
domain,
|
|
128
129
|
port,
|
|
129
130
|
setDNSRecord: true,
|
|
130
|
-
portFallback:
|
|
131
|
+
portFallback: {
|
|
131
132
|
getAcquireDelay: getMainPortAcquireDelay,
|
|
132
133
|
onListening: (listeningPort, isMainPort) => {
|
|
133
134
|
if (isMainPort) return;
|
|
134
135
|
addExtraListenPort(listeningPort);
|
|
135
136
|
void registerAltPort(listeningPort).catch((e: Error) => console.error(`Registering alternate port ${listeningPort} failed: ${e.stack ?? e}`));
|
|
136
137
|
},
|
|
137
|
-
}
|
|
138
|
+
},
|
|
138
139
|
});
|
|
139
140
|
}
|