@itrocks/sync 0.0.0-stage → 0.1.0
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/LICENSE +165 -0
- package/README.md +249 -2
- package/config.yaml +2 -0
- package/demo/src/demo.css +458 -0
- package/dist/client/author-background.d.ts +2 -0
- package/dist/client/author-background.js +28 -0
- package/dist/client/clock.d.ts +10 -0
- package/dist/client/clock.js +30 -0
- package/dist/client/collections/order.d.ts +10 -0
- package/dist/client/collections/order.js +77 -0
- package/dist/client/collections/reorder-nodes.d.ts +2 -0
- package/dist/client/collections/reorder-nodes.js +67 -0
- package/dist/client/collections/row-changes.d.ts +12 -0
- package/dist/client/collections/row-changes.js +26 -0
- package/dist/client/collections/row-history.d.ts +16 -0
- package/dist/client/collections/row-history.js +61 -0
- package/dist/client/collections/table-columns.d.ts +19 -0
- package/dist/client/collections/table-columns.js +200 -0
- package/dist/client/collections.d.ts +54 -0
- package/dist/client/collections.js +262 -0
- package/dist/client/discovery.d.ts +1 -0
- package/dist/client/discovery.js +57 -0
- package/dist/client/field-address.d.ts +38 -0
- package/dist/client/field-address.js +225 -0
- package/dist/client/field-value.d.ts +7 -0
- package/dist/client/field-value.js +105 -0
- package/dist/client/form-identity.d.ts +1 -0
- package/dist/client/form-identity.js +43 -0
- package/dist/client/form-session.d.ts +53 -0
- package/dist/client/form-session.js +218 -0
- package/dist/client/identity.d.ts +3 -0
- package/dist/client/identity.js +27 -0
- package/dist/client/index.d.ts +43 -0
- package/dist/client/index.js +109 -0
- package/dist/client/journal.d.ts +13 -0
- package/dist/client/journal.js +59 -0
- package/dist/client/lifecycle.d.ts +26 -0
- package/dist/client/lifecycle.js +112 -0
- package/dist/client/observation.d.ts +11 -0
- package/dist/client/observation.js +46 -0
- package/dist/client/outbox.d.ts +15 -0
- package/dist/client/outbox.js +71 -0
- package/dist/client/plugin.d.ts +42 -0
- package/dist/client/plugin.js +1 -0
- package/dist/client/plugins/column-order/apply.d.ts +2 -0
- package/dist/client/plugins/column-order/apply.js +30 -0
- package/dist/client/plugins/column-order/colgroups.d.ts +2 -0
- package/dist/client/plugins/column-order/colgroups.js +78 -0
- package/dist/client/plugins/column-order/index.d.ts +2 -0
- package/dist/client/plugins/column-order/index.js +98 -0
- package/dist/client/plugins/cursor/editable.d.ts +16 -0
- package/dist/client/plugins/cursor/editable.js +67 -0
- package/dist/client/plugins/cursor/geometry.d.ts +16 -0
- package/dist/client/plugins/cursor/geometry.js +122 -0
- package/dist/client/plugins/cursor/index.d.ts +4 -0
- package/dist/client/plugins/cursor/index.js +13 -0
- package/dist/client/plugins/cursor/indicators.d.ts +31 -0
- package/dist/client/plugins/cursor/indicators.js +144 -0
- package/dist/client/plugins/cursor/local-selection.d.ts +19 -0
- package/dist/client/plugins/cursor/local-selection.js +234 -0
- package/dist/client/plugins/cursor/selection.d.ts +9 -0
- package/dist/client/plugins/cursor/selection.js +49 -0
- package/dist/client/plugins/cursor/text-presence.d.ts +15 -0
- package/dist/client/plugins/cursor/text-presence.js +95 -0
- package/dist/client/plugins/fields/author.d.ts +7 -0
- package/dist/client/plugins/fields/author.js +22 -0
- package/dist/client/plugins/fields/index.d.ts +4 -0
- package/dist/client/plugins/fields/index.js +192 -0
- package/dist/client/plugins/fields/writes.d.ts +19 -0
- package/dist/client/plugins/fields/writes.js +51 -0
- package/dist/client/plugins/focus/index.d.ts +9 -0
- package/dist/client/plugins/focus/index.js +92 -0
- package/dist/client/plugins/focus/indicators.d.ts +19 -0
- package/dist/client/plugins/focus/indicators.js +163 -0
- package/dist/client/plugins/naming/algorithm.d.ts +7 -0
- package/dist/client/plugins/naming/algorithm.js +65 -0
- package/dist/client/plugins/naming/attributes.d.ts +16 -0
- package/dist/client/plugins/naming/attributes.js +195 -0
- package/dist/client/plugins/naming/index.d.ts +5 -0
- package/dist/client/plugins/naming/index.js +185 -0
- package/dist/client/plugins/range/index.d.ts +4 -0
- package/dist/client/plugins/range/index.js +15 -0
- package/dist/client/plugins/reconciliation/index.d.ts +6 -0
- package/dist/client/plugins/reconciliation/index.js +282 -0
- package/dist/client/plugins/reconciliation/matching.d.ts +12 -0
- package/dist/client/plugins/reconciliation/matching.js +37 -0
- package/dist/client/plugins/reconciliation/proposals.d.ts +11 -0
- package/dist/client/plugins/reconciliation/proposals.js +32 -0
- package/dist/client/plugins/row-order/index.d.ts +2 -0
- package/dist/client/plugins/row-order/index.js +99 -0
- package/dist/client/plugins/rows/clone.d.ts +2 -0
- package/dist/client/plugins/rows/clone.js +123 -0
- package/dist/client/plugins/rows/index.d.ts +2 -0
- package/dist/client/plugins/rows/index.js +191 -0
- package/dist/client/plugins/rows/materialize.d.ts +4 -0
- package/dist/client/plugins/rows/materialize.js +43 -0
- package/dist/client/plugins/rows/remove.d.ts +1 -0
- package/dist/client/plugins/rows/remove.js +13 -0
- package/dist/client/plugins/rows/template.d.ts +2 -0
- package/dist/client/plugins/rows/template.js +21 -0
- package/dist/client/transport.d.ts +23 -0
- package/dist/client/transport.js +128 -0
- package/dist/client/user-colour.d.ts +3 -0
- package/dist/client/user-colour.js +11 -0
- package/dist/server/acknowledgments.d.ts +3 -0
- package/dist/server/acknowledgments.js +8 -0
- package/dist/server/broadcast.d.ts +3 -0
- package/dist/server/broadcast.js +7 -0
- package/dist/server/cli.d.ts +2 -0
- package/dist/server/cli.js +44 -0
- package/dist/server/clock.d.ts +2 -0
- package/dist/server/clock.js +3 -0
- package/dist/server/configuration.d.ts +3 -0
- package/dist/server/configuration.js +7 -0
- package/dist/server/connection.d.ts +13 -0
- package/dist/server/connection.js +1 -0
- package/dist/server/express.d.ts +2 -0
- package/dist/server/express.js +1 -0
- package/dist/server/fastify.d.ts +10 -0
- package/dist/server/fastify.js +15 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.js +1 -0
- package/dist/server/journal.d.ts +7 -0
- package/dist/server/journal.js +16 -0
- package/dist/server/messages.d.ts +4 -0
- package/dist/server/messages.js +106 -0
- package/dist/server/participants.d.ts +9 -0
- package/dist/server/participants.js +7 -0
- package/dist/server/receipts.d.ts +13 -0
- package/dist/server/receipts.js +28 -0
- package/dist/server/recovery.d.ts +3 -0
- package/dist/server/recovery.js +9 -0
- package/dist/server/server.d.ts +34 -0
- package/dist/server/server.js +189 -0
- package/dist/server/sessions.d.ts +16 -0
- package/dist/server/sessions.js +37 -0
- package/dist/server/standalone.d.ts +9 -0
- package/dist/server/standalone.js +12 -0
- package/dist/server/transactions.d.ts +15 -0
- package/dist/server/transactions.js +50 -0
- package/dist/server/websocket-connection.d.ts +3 -0
- package/dist/server/websocket-connection.js +38 -0
- package/dist/server/websocket.d.ts +11 -0
- package/dist/server/websocket.js +26 -0
- package/dist/shared/field-update.d.ts +12 -0
- package/dist/shared/field-update.js +18 -0
- package/dist/shared/journal-entries.d.ts +9 -0
- package/dist/shared/journal-entries.js +33 -0
- package/dist/shared/protocol.d.ts +105 -0
- package/dist/shared/protocol.js +15 -0
- package/docs/dependencies.md +130 -0
- package/docs/spec-addendum-dependencies.md +10 -0
- package/docs/spec-addendum.md +717 -0
- package/docs/spec.md +1165 -0
- package/docs/testing.md +39 -0
- package/package.json +96 -5
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Transaction } from './protocol.js';
|
|
2
|
+
export declare class JournalEntries {
|
|
3
|
+
private readonly entries;
|
|
4
|
+
private readonly fields;
|
|
5
|
+
add(transaction: Transaction): boolean;
|
|
6
|
+
get(id: string): Transaction | undefined;
|
|
7
|
+
ids(): IterableIterator<string>;
|
|
8
|
+
values(): IterableIterator<Transaction>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { addressKey } from './field-update.js';
|
|
2
|
+
import { fieldUpdate } from './field-update.js';
|
|
3
|
+
import { compareTransactions } from './protocol.js';
|
|
4
|
+
export class JournalEntries {
|
|
5
|
+
entries = new Map();
|
|
6
|
+
fields = new Map();
|
|
7
|
+
add(transaction) {
|
|
8
|
+
if (this.entries.has(transaction.id))
|
|
9
|
+
return false;
|
|
10
|
+
const update = (transaction.type === 'field') && fieldUpdate(transaction.data);
|
|
11
|
+
if (update) {
|
|
12
|
+
const key = addressKey(update.address);
|
|
13
|
+
const previous = this.fields.get(key);
|
|
14
|
+
if (previous && (compareTransactions(transaction, previous) <= 0))
|
|
15
|
+
return false;
|
|
16
|
+
if (previous) {
|
|
17
|
+
this.entries.delete(previous.id);
|
|
18
|
+
}
|
|
19
|
+
this.fields.set(key, transaction);
|
|
20
|
+
}
|
|
21
|
+
this.entries.set(transaction.id, transaction);
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
get(id) {
|
|
25
|
+
return this.entries.get(id);
|
|
26
|
+
}
|
|
27
|
+
ids() {
|
|
28
|
+
return this.entries.keys();
|
|
29
|
+
}
|
|
30
|
+
values() {
|
|
31
|
+
return this.entries.values();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type ClientMessage = {
|
|
2
|
+
type: 'ping';
|
|
3
|
+
sent: number;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'join';
|
|
6
|
+
session: string;
|
|
7
|
+
known: string[];
|
|
8
|
+
} | {
|
|
9
|
+
type: 'leave';
|
|
10
|
+
session: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'push';
|
|
13
|
+
session: string;
|
|
14
|
+
transactions: Transaction[];
|
|
15
|
+
detached?: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'focus';
|
|
18
|
+
session: string;
|
|
19
|
+
field: string | null;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'cursor';
|
|
22
|
+
session: string;
|
|
23
|
+
position: CursorPosition | null;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'range';
|
|
26
|
+
session: string;
|
|
27
|
+
selection: RangeSelection | null;
|
|
28
|
+
};
|
|
29
|
+
export type ServerMessage = {
|
|
30
|
+
type: 'hello';
|
|
31
|
+
client: string;
|
|
32
|
+
user: User;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'pong';
|
|
35
|
+
sent: number;
|
|
36
|
+
time: number;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'history';
|
|
39
|
+
session: string;
|
|
40
|
+
transactions: Transaction[];
|
|
41
|
+
missing: string[];
|
|
42
|
+
} | {
|
|
43
|
+
type: 'transactions';
|
|
44
|
+
session: string;
|
|
45
|
+
transactions: Transaction[];
|
|
46
|
+
recovered?: boolean;
|
|
47
|
+
} | {
|
|
48
|
+
type: 'ack';
|
|
49
|
+
session: string;
|
|
50
|
+
ids: string[];
|
|
51
|
+
transactions: Transaction[];
|
|
52
|
+
} | {
|
|
53
|
+
type: 'presence';
|
|
54
|
+
session: string;
|
|
55
|
+
participants: Participant[];
|
|
56
|
+
} | {
|
|
57
|
+
type: 'cursor';
|
|
58
|
+
session: string;
|
|
59
|
+
client: string;
|
|
60
|
+
position: CursorPosition | null;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'range';
|
|
63
|
+
session: string;
|
|
64
|
+
client: string;
|
|
65
|
+
selection: RangeSelection | null;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'denied';
|
|
68
|
+
session: string;
|
|
69
|
+
};
|
|
70
|
+
export interface Participant {
|
|
71
|
+
client: string;
|
|
72
|
+
user: User;
|
|
73
|
+
field: string | null;
|
|
74
|
+
cursor?: CursorPosition;
|
|
75
|
+
range?: RangeSelection;
|
|
76
|
+
}
|
|
77
|
+
export interface CursorPosition {
|
|
78
|
+
field: string;
|
|
79
|
+
offset: number;
|
|
80
|
+
}
|
|
81
|
+
export interface CursorRange {
|
|
82
|
+
start: number;
|
|
83
|
+
end: number;
|
|
84
|
+
}
|
|
85
|
+
export interface RangeSelection {
|
|
86
|
+
field: string;
|
|
87
|
+
ranges: readonly CursorRange[];
|
|
88
|
+
}
|
|
89
|
+
export declare function sameCursor(first: CursorPosition | null | undefined, second: CursorPosition | null | undefined): boolean;
|
|
90
|
+
export declare function sameRange(first: RangeSelection | null | undefined, second: RangeSelection | null | undefined): boolean;
|
|
91
|
+
export interface Transaction {
|
|
92
|
+
id: string;
|
|
93
|
+
client: string;
|
|
94
|
+
timestamp: number;
|
|
95
|
+
type: string;
|
|
96
|
+
data: unknown;
|
|
97
|
+
user?: User;
|
|
98
|
+
proof?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface User {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const DEFAULT_PATH = "/@itrocks/sync";
|
|
105
|
+
export declare function compareTransactions(a: Transaction, b: Transaction): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function sameCursor(first, second) {
|
|
2
|
+
return (first?.field === second?.field) && (first?.offset === second?.offset);
|
|
3
|
+
}
|
|
4
|
+
export function sameRange(first, second) {
|
|
5
|
+
if (first?.field !== second?.field)
|
|
6
|
+
return false;
|
|
7
|
+
const left = first?.ranges;
|
|
8
|
+
const right = second?.ranges;
|
|
9
|
+
return (left === right) || (!!left && !!right && (left.length === right.length)
|
|
10
|
+
&& left.every(({ start, end }, index) => (start === right[index].start) && (end === right[index].end)));
|
|
11
|
+
}
|
|
12
|
+
export const DEFAULT_PATH = '/@itrocks/sync';
|
|
13
|
+
export function compareTransactions(a, b) {
|
|
14
|
+
return (a.timestamp - b.timestamp) || (a.id > b.id ? 1 : a.id < b.id ? -1 : 0);
|
|
15
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Server and integration setup
|
|
2
|
+
|
|
3
|
+
*This documentation was written by an artificial intelligence and may contain errors or approximations.
|
|
4
|
+
It has not yet been fully reviewed by a human. If anything seems unclear or incomplete,
|
|
5
|
+
please feel free to contact the author of this package.*
|
|
6
|
+
|
|
7
|
+
Every server adapter accepts `getUser(request)`. The callback receives the WebSocket upgrade request and resolves
|
|
8
|
+
the user through your application's authentication, for example through a server-side session associated with a
|
|
9
|
+
cookie. Return `{ id, name }` synchronously or asynchronously, or return an empty result to deny the connection.
|
|
10
|
+
Keep the ID stable across browsers and tabs.
|
|
11
|
+
|
|
12
|
+
When a client joins a form over WebSocket, it sends the form's collaboration key. For forms with record-level
|
|
13
|
+
permissions, supply `authorizeSession({ request, session, user })` and use `session`, the opaque form key, to
|
|
14
|
+
check the user's access through your own trusted record lookup.
|
|
15
|
+
|
|
16
|
+
The built-in route defaults to `/@itrocks/sync`. Use the same `path` in the server configuration and `endpoint`
|
|
17
|
+
in the browser configuration when mounting under a prefix. Browser traffic uses `wss:` for an HTTPS page.
|
|
18
|
+
When terminating TLS upstream, forward WebSocket upgrades to the adapter.
|
|
19
|
+
|
|
20
|
+
A shared `replaySecret` preserves the original authenticated author of transactions recovered after a server
|
|
21
|
+
process restart. The default key lasts for the current process. Keep the configured key private and stable across
|
|
22
|
+
instances meant to recover each other's history. Unverified replays are attributed to the currently authenticated user.
|
|
23
|
+
|
|
24
|
+
## it.rocks
|
|
25
|
+
|
|
26
|
+
Add `@itrocks/sync` and start the application normally. With framework version 0.25.0 or later, the package's
|
|
27
|
+
configuration enables the route and browser script automatically. In two signed-in browsers, open the editor
|
|
28
|
+
for the same saved record. Form discovery uses existing selectors and works with partial page navigation.
|
|
29
|
+
New record editors stay local until there is a saved record to share. The framework uses the current HTTP
|
|
30
|
+
session and a successful edit render to authorise access to the record's room.
|
|
31
|
+
|
|
32
|
+
Set `sync.enabled: false` in application configuration to disable the integration. When a reverse proxy passes
|
|
33
|
+
a public prefix through to Fastify, set `sync.path` to the forwarded WebSocket route, such as
|
|
34
|
+
`/workshop/@itrocks/sync`. For a proxy that strips the public prefix, forwarding WebSocket upgrades to the
|
|
35
|
+
default route is sufficient.
|
|
36
|
+
|
|
37
|
+
The package installs `@fastify/websocket` as an optional dependency. Install it explicitly when your install
|
|
38
|
+
omits optional dependencies and you use the Fastify adapter.
|
|
39
|
+
|
|
40
|
+
## Standalone server
|
|
41
|
+
|
|
42
|
+
Run the [standalone command](../README.md#standalone-applications) for a separate WebSocket listener. To run it
|
|
43
|
+
from Node.js, use the same factory as the command and start the returned HTTP server.
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import { createStandaloneServer } from '@itrocks/sync/standalone'
|
|
47
|
+
|
|
48
|
+
const { server } = createStandaloneServer()
|
|
49
|
+
server.listen(3001, '127.0.0.1')
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`createStandaloneServer(options?)` returns `{ server, close }`. You can supply an existing Node HTTP `server`,
|
|
53
|
+
replace the default guest identity through `getUser`, or set `authorizeSession`, `path` and `replaySecret`.
|
|
54
|
+
Use `createStandaloneServer({ path: '/collaboration' })` or `sync-server --path /collaboration` to change the route.
|
|
55
|
+
The returned `close()` removes the sync route and closes WebSocket connections. Call `server.close()` to stop
|
|
56
|
+
the HTTP listener.
|
|
57
|
+
|
|
58
|
+
## Native HTTP adapter
|
|
59
|
+
|
|
60
|
+
Install Sync and save this as `server.mjs`. The example gives local test clients a guest identity. Supply your
|
|
61
|
+
existing authentication callback and request handler when using it for application data.
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
import { createServer } from 'node:http'
|
|
65
|
+
import { sync } from '@itrocks/sync/websocket'
|
|
66
|
+
|
|
67
|
+
const server = createServer((_request, response) => response.end('Sync is ready.'))
|
|
68
|
+
|
|
69
|
+
sync({
|
|
70
|
+
server,
|
|
71
|
+
getUser: () => ({ id: 'guest', name: 'Local Guest' })
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
server.listen(3001, '127.0.0.1')
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Run `node server.mjs` to start the HTTP listener and its WebSocket endpoint.
|
|
78
|
+
For a ready-to-use HTML form and static asset server, run the
|
|
79
|
+
[interactive demo](../README.md#interactive-demo-and-development).
|
|
80
|
+
With an HTTPS server, use the same `sync({ server, getUser })` call with the Node HTTPS instance.
|
|
81
|
+
The returned `close()` removes the sync route and closes its connections.
|
|
82
|
+
|
|
83
|
+
## Fastify
|
|
84
|
+
|
|
85
|
+
Install `@itrocks/sync fastify @fastify/websocket`. The adapter registers its own WebSocket route before
|
|
86
|
+
`listen()` and uses an existing `@fastify/websocket` registration when present.
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
import fastify from 'fastify'
|
|
90
|
+
import { sync } from '@itrocks/sync/fastify'
|
|
91
|
+
|
|
92
|
+
const server = fastify()
|
|
93
|
+
server.get('/', () => 'Sync is ready.')
|
|
94
|
+
sync({
|
|
95
|
+
server,
|
|
96
|
+
getUser: () => ({ id: 'guest', name: 'Local Guest' })
|
|
97
|
+
})
|
|
98
|
+
await server.listen({ port: 3001, host: '127.0.0.1' })
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Express
|
|
102
|
+
|
|
103
|
+
Install `@itrocks/sync express`. For TypeScript, also install `@types/express`. Pass the Node HTTP server returned
|
|
104
|
+
by `app.listen()` or constructed with `createServer(app)`. The adapter handles upgrades on that server.
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
import { createServer } from 'node:http'
|
|
108
|
+
import express from 'express'
|
|
109
|
+
import { sync } from '@itrocks/sync/express'
|
|
110
|
+
|
|
111
|
+
const app = express()
|
|
112
|
+
app.get('/', (_request, response) => response.send('Sync is ready.'))
|
|
113
|
+
const server = createServer(app)
|
|
114
|
+
sync({
|
|
115
|
+
server,
|
|
116
|
+
getUser: () => ({ id: 'guest', name: 'Local Guest' })
|
|
117
|
+
})
|
|
118
|
+
server.listen(3001, '127.0.0.1')
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Custom WebSocket transport
|
|
122
|
+
|
|
123
|
+
Use `createSyncServer({ getUser, authorizeSession, replaySecret })` from `@itrocks/sync/server`
|
|
124
|
+
when the host already routes WebSockets. For each accepted upgrade, pass a
|
|
125
|
+
`ServerSocket` and the corresponding request to `engine.connect(socket, request)`. Implement
|
|
126
|
+
`send(message)`, `close(code, reason)`, `onMessage(listener)` and `onClose(listener)` in the
|
|
127
|
+
socket adapter. Messages are UTF-8 JSON strings. Call `engine.close()` when the host shuts down.
|
|
128
|
+
|
|
129
|
+
The core accepts opaque functional transactions and shares only their envelopes. The transport and authentication
|
|
130
|
+
are independent of the client's plugins.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Specification addendum 2 — it.rocks dependencies
|
|
2
|
+
|
|
3
|
+
For `@itrocks/*` dependencies, this addendum takes precedence over the [main specification](spec.md)
|
|
4
|
+
and the [architectural addendum](spec-addendum.md).
|
|
5
|
+
|
|
6
|
+
The browser client and WebSocket server must work in a standalone web application with their declared dependencies.
|
|
7
|
+
Every direct and transitive dependency must be usable independently of the it.rocks framework.
|
|
8
|
+
|
|
9
|
+
A basic `@itrocks/*` package may be reused to avoid reimplementing functionality required by `@itrocks/sync`.
|
|
10
|
+
The functionality of the package and its transitive dependencies must be limited to what `@itrocks/sync` needs.
|