@toa.io/extensions.realtime 1.0.0-alpha.304 → 1.0.0-alpha.306
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/extensions.realtime",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.306",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Toa Realtime",
|
|
6
6
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"!**/.env*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@toa.io/core": "1.0.0-alpha.
|
|
30
|
-
"@toa.io/definitions": "1.0.0-alpha.
|
|
29
|
+
"@toa.io/core": "1.0.0-alpha.306",
|
|
30
|
+
"@toa.io/definitions": "1.0.0-alpha.306",
|
|
31
31
|
"@toa.io/generic": "1.0.0-alpha.304",
|
|
32
|
-
"openspan": "1.0.0-alpha.
|
|
32
|
+
"openspan": "1.0.0-alpha.305"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"transpile": "npx tsc && npx tsc -p ./components/realtime.streams",
|
|
36
36
|
"features": "TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "0693d180a8053a7d07dca879dac2a3c4784d6d45"
|
|
39
39
|
}
|
package/readme.md
CHANGED
|
@@ -106,10 +106,14 @@ Realtime extension, and are
|
|
|
106
106
|
accessible via the `/realtime/streams/:key/` resource with
|
|
107
107
|
the [`auth:id: key`](/extensions/exposition/documentation/access.md#id) authorization rule.
|
|
108
108
|
|
|
109
|
+
Opening a stream is not a read, and `GET` is the method a client opens one with, so the route
|
|
110
|
+
declares [`io:readonly: false`](/extensions/exposition/documentation/io.md#readonly).
|
|
111
|
+
|
|
109
112
|
Refer to the [Exposition extension](/extensions/exposition) for more details:
|
|
110
113
|
|
|
111
114
|
- [Multipart responses](/extensions/exposition/documentation/protocol.md#multipart-types)
|
|
112
115
|
- [Access authorization](/extensions/exposition/documentation/access.md)
|
|
116
|
+
- [Readonly chains](/documentation/readonly.md)
|
|
113
117
|
|
|
114
118
|
## Resources management
|
|
115
119
|
|
package/transpiled/Factory.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { type Connector } from '@toa.io/core';
|
|
1
2
|
import type { extensions } from '@toa.io/core/types';
|
|
2
|
-
import { Realtime } from './Realtime.ts';
|
|
3
3
|
export declare class Factory implements extensions.Factory {
|
|
4
4
|
private readonly host;
|
|
5
5
|
constructor(host: Host);
|
|
6
|
-
service():
|
|
6
|
+
service(): Connector;
|
|
7
7
|
private discovery;
|
|
8
8
|
}
|
|
9
9
|
export type Host = extensions.Host;
|
package/transpiled/Factory.js
CHANGED
|
@@ -7,13 +7,16 @@ export class Factory {
|
|
|
7
7
|
constructor(host) {
|
|
8
8
|
this.host = host;
|
|
9
9
|
}
|
|
10
|
+
// a halt takes the whole of it: a stream it would keep open has nothing to carry
|
|
10
11
|
service() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return this.host.gate(async () => {
|
|
13
|
+
const routes = new Routes(this.host);
|
|
14
|
+
const composition = new Composition(this.host);
|
|
15
|
+
const realtime = new Realtime(routes, async () => await this.discovery());
|
|
16
|
+
realtime.depends(routes);
|
|
17
|
+
realtime.depends(composition);
|
|
18
|
+
return realtime;
|
|
19
|
+
});
|
|
17
20
|
}
|
|
18
21
|
async discovery() {
|
|
19
22
|
const locator = new Locator('streams', 'realtime');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["../source/Factory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["../source/Factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAO,OAAO;IACD,IAAI,CAAM;IAE3B,YAAmB,IAAU;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,iFAAiF;IAC1E,OAAO;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;YAC/B,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACpC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC9C,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,CAAA;YAEzE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACxB,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;YAE7B,OAAO,QAAQ,CAAA;QACjB,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,KAAK,CAAC,SAAS;QACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QAElD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;IACjE,CAAC;CACF"}
|