@spine-event-engine/proto 2.0.0-snapshot.2 → 2.0.0-snapshot.6
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/README.md
CHANGED
|
@@ -6,13 +6,34 @@ schemas, validation messages, options, and schemas needed by the supported
|
|
|
6
6
|
client and delivery packages. Most applications use it as a dependency of their
|
|
7
7
|
model package rather than calling it directly.
|
|
8
8
|
|
|
9
|
+
This is an experimental snapshot package; use generated Spine contracts and
|
|
10
|
+
Node 24 or newer.
|
|
11
|
+
|
|
12
|
+
## Install and create one Spine contract
|
|
13
|
+
|
|
14
|
+
Install the schema package with Protobuf-ES in an application or model package:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @spine-event-engine/proto@snapshot @bufbuild/protobuf
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use a generated schema immediately:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { create } from "@bufbuild/protobuf";
|
|
24
|
+
import { CommandIdSchema } from "@spine-event-engine/proto";
|
|
25
|
+
|
|
26
|
+
const commandId = create(CommandIdSchema, { uuid: "command-42" });
|
|
27
|
+
console.log(commandId.uuid);
|
|
28
|
+
```
|
|
29
|
+
|
|
9
30
|
## TypeScript interface options
|
|
10
31
|
|
|
11
32
|
Use `(every_is).ts_type = "TaskEvent"` with `(every_is).generate = true` to
|
|
12
33
|
generate a shared interface/token for a Proto file. Use
|
|
13
34
|
`(is).ts_type = "TaskAssignmentEvent"` when the model module authors that
|
|
14
35
|
interface. Run `pnpm proto:generate` after changing either declaration. The
|
|
15
|
-
[To-Do model](
|
|
36
|
+
[To-Do model](https://github.com/SpineEventEngine/spine-ts/blob/master/examples/todo/proto/spine/examples/todo/task_events.proto)
|
|
16
37
|
uses both forms.
|
|
17
38
|
|
|
18
39
|
For the complete export map and model-package contract, see
|
|
@@ -32,9 +53,8 @@ pnpm typecheck:build
|
|
|
32
53
|
```
|
|
33
54
|
|
|
34
55
|
Run this workspace-wide TypeScript build from the repository root. For an
|
|
35
|
-
experimental npm consumer, install
|
|
36
|
-
|
|
37
|
-
`@spine-event-engine/proto@snapshot` tag.
|
|
56
|
+
experimental npm consumer, install `@spine-event-engine/proto@snapshot`.
|
|
57
|
+
The snapshot tag can change before a stable release.
|
|
38
58
|
|
|
39
59
|
## 🧱 Use a Spine schema
|
|
40
60
|
|
|
@@ -92,8 +112,8 @@ Spine definitions preserve their original versioned Proto packages.
|
|
|
92
112
|
|
|
93
113
|
## 🔗 Learn more
|
|
94
114
|
|
|
95
|
-
- [Model-generation tools](
|
|
96
|
-
- [Core message tools](
|
|
115
|
+
- [Model-generation tools](https://github.com/SpineEventEngine/spine-ts/blob/master/packages/proto-tools/README.md)
|
|
116
|
+
- [Core message tools](https://github.com/SpineEventEngine/spine-ts/blob/master/packages/core/README.md)
|
|
97
117
|
- [Reference for coding agents](REFERENCE.md)
|
|
98
118
|
|
|
99
119
|
## Integration wire contracts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generationId":"
|
|
1
|
+
{"generationId":"0bcb9473c817a37926a8f0ed8e8506895fb139e510468b92e210d7fae89efdb6"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spine-event-engine/proto",
|
|
3
|
-
"version": "2.0.0-snapshot.
|
|
3
|
+
"version": "2.0.0-snapshot.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"registry": "https://registry.npmjs.org/",
|
|
13
|
-
"access": "public"
|
|
14
|
-
"tag": "snapshot"
|
|
13
|
+
"access": "public"
|
|
15
14
|
},
|
|
16
15
|
"description": "Spine TS generated Protobuf-ES schema exports.",
|
|
17
16
|
"exports": {
|
|
@@ -57,5 +56,9 @@
|
|
|
57
56
|
],
|
|
58
57
|
"dependencies": {
|
|
59
58
|
"@bufbuild/protobuf": "2.12.1"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@spine-event-engine/core": "2.0.0-snapshot.6",
|
|
62
|
+
"@spine-event-engine/server": "2.0.0-snapshot.6"
|
|
60
63
|
}
|
|
61
64
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"formatVersion": 2,
|
|
3
3
|
"packageName": "@spine-event-engine/proto",
|
|
4
|
-
"packageVersion": "2.0.0-snapshot.
|
|
4
|
+
"packageVersion": "2.0.0-snapshot.6",
|
|
5
5
|
"protoFiles": [
|
|
6
6
|
"grpc/health/v1/health.proto",
|
|
7
7
|
"spine/auth/authenticated_subscription.proto",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
},
|
|
109
109
|
"dependencies": [],
|
|
110
110
|
"moduleExport": "spineProtoModule",
|
|
111
|
-
"generationId": "
|
|
111
|
+
"generationId": "0bcb9473c817a37926a8f0ed8e8506895fb139e510468b92e210d7fae89efdb6"
|
|
112
112
|
}
|