@sockethub/server 5.0.0-alpha.14 → 5.0.0-alpha.15
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/cors.d.ts +30 -0
- package/dist/http/actions.d.ts +0 -8
- package/dist/index.js +155 -98
- package/dist/index.js.map +10 -9
- package/dist/platform-instance.d.ts +10 -1
- package/dist/platform.js +5 -3
- package/dist/platform.js.map +3 -3
- package/dist/process-manager.d.ts +10 -1
- package/package.json +13 -13
|
@@ -47,6 +47,7 @@ export default class PlatformInstance {
|
|
|
47
47
|
private heartbeatListener?;
|
|
48
48
|
private heartbeatFailureHandled;
|
|
49
49
|
private replaced;
|
|
50
|
+
private shutdownResult?;
|
|
50
51
|
private readonly actor?;
|
|
51
52
|
constructor(params: PlatformInstanceParams);
|
|
52
53
|
createQueue(): void;
|
|
@@ -66,9 +67,17 @@ export default class PlatformInstance {
|
|
|
66
67
|
*/
|
|
67
68
|
markReplaced(): void;
|
|
68
69
|
/**
|
|
69
|
-
* Destroys all references to this platform instance, internal listeners and controlled processes
|
|
70
|
+
* Destroys all references to this platform instance, internal listeners and controlled processes.
|
|
71
|
+
*
|
|
72
|
+
* Single-flight: every caller shares one teardown run. A crash-close
|
|
73
|
+
* teardown pauses and obliterates the Redis queue asynchronously, so a
|
|
74
|
+
* caller about to create a replacement (ProcessManager.ensureProcess)
|
|
75
|
+
* must be able to await the teardown *already in flight* — a second,
|
|
76
|
+
* independent run would resolve while the first is still obliterating
|
|
77
|
+
* the queue name the replacement is about to reuse.
|
|
70
78
|
*/
|
|
71
79
|
shutdown(): Promise<void>;
|
|
80
|
+
private teardown;
|
|
72
81
|
/**
|
|
73
82
|
* When jobs are completed or failed, we prepare the results and send them to the client socket
|
|
74
83
|
*/
|
package/dist/platform.js
CHANGED
|
@@ -69809,9 +69809,11 @@ function buildSchema() {
|
|
|
69809
69809
|
path: { format: String, default: "/sockethub" },
|
|
69810
69810
|
cors: {
|
|
69811
69811
|
origin: {
|
|
69812
|
-
doc: "Allowed CORS origin(s) for socket.io connections
|
|
69812
|
+
doc: "Allowed CORS origin(s) for socket.io connections " + "and the HTTP actions endpoint. '*' allows any " + "website to connect visitors' browsers to this " + "instance; public deployments should set an " + "explicit origin or comma-separated list of " + "origins.",
|
|
69813
69813
|
format: String,
|
|
69814
|
-
default: "*"
|
|
69814
|
+
default: "*",
|
|
69815
|
+
env: "SOCKETHUB_CORS_ORIGIN",
|
|
69816
|
+
arg: "cors.origin"
|
|
69815
69817
|
}
|
|
69816
69818
|
}
|
|
69817
69819
|
},
|
|
@@ -128439,4 +128441,4 @@ export {
|
|
|
128439
128441
|
derivePlatformCredentialsSecret
|
|
128440
128442
|
};
|
|
128441
128443
|
|
|
128442
|
-
//# debugId=
|
|
128444
|
+
//# debugId=07176F91F7BBE80164756E2164756E21
|