@flamework-experimental/networking 2.0.0-alpha.2 → 2.0.0-alpha.3
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 +34 -32
- package/flamework.build +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# Flamework
|
|
2
2
|
|
|
3
|
-
Flamework is an extensible framework for roblox-ts
|
|
3
|
+
Flamework is an extensible framework for roblox-ts. It is built around modules that are portable,
|
|
4
|
+
isolated and easy to test.
|
|
4
5
|
|
|
5
6
|
## Documentation
|
|
6
7
|
|
|
7
|
-
**[docs/](docs/README.md)
|
|
8
|
-
point to plugins
|
|
8
|
+
Start with **[docs/](docs/README.md)**. It holds a twelve-part guide, which starts from a working
|
|
9
|
+
entry point and builds up to plugins, project layout, scopes and testing. It also holds reference
|
|
10
|
+
material:
|
|
9
11
|
|
|
10
12
|
| | |
|
|
11
13
|
|---|---|
|
|
12
|
-
| [Guide](docs/README.md#guide) | Getting started, modules, providers, lifecycle events, components, networking, macros, plugins, project structure, migrating from v1. |
|
|
14
|
+
| [Guide](docs/README.md#guide) | Getting started, modules, providers, lifecycle events, components, networking, macros, plugins, project structure, migrating from v1, scopes, testing in the place. |
|
|
13
15
|
| [Internals](docs/reference/internals.md) | What the transformer does to your code and what the runtime does with the result. |
|
|
14
16
|
| [Transformer plugins](docs/reference/transformer-plugins.md) | Adding macro types of your own. |
|
|
15
17
|
|
|
@@ -37,36 +39,36 @@ bun run test:place # the in-place suite in Roblox Studio (tests/place); need
|
|
|
37
39
|
| `packages/core` | Modules, dependency injection, plugins and lifecycle events |
|
|
38
40
|
| `packages/components` | CollectionService components, built on the core plugin system |
|
|
39
41
|
| `packages/networking` | Remote events and functions |
|
|
40
|
-
| `packages/testing` |
|
|
42
|
+
| `packages/testing` | Tests that run inside a place: sections, cleanup, a bindable and a remote that run them, and a cloud entry point. Also `flamework-test` (`cli/`), the CLI that runs them in Roblox Studio on this machine or through Open Cloud |
|
|
41
43
|
| `packages/transformer` | The roblox-ts transformer |
|
|
42
44
|
| `packages/transformer-plugin` | Public API for writing transformer plugins |
|
|
43
|
-
| `packages/specs` | Runtime specs,
|
|
45
|
+
| `packages/specs` | Runtime specs, built by `rbxtsc` and run under Lune |
|
|
44
46
|
|
|
45
47
|
### Tests
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- **Transformer tests** (`bun run test:unit`)
|
|
50
|
-
|
|
51
|
-
- **Runtime specs** (`bun run test:runtime`)
|
|
52
|
-
`networking` under Lune
|
|
53
|
-
roblox-ts's `TS.import` tree over the filesystem
|
|
54
|
-
|
|
55
|
-
`Enum`, and a `Heartbeat` pump so `Promise.delay`
|
|
56
|
-
|
|
57
|
-
construction, dependencies and streaming
|
|
58
|
-
middleware and the generated guards.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
`@Provider`'s metadata, component streaming, and the client
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Specs live in [`packages/specs`](packages/specs)
|
|
67
|
-
Flamework
|
|
68
|
-
|
|
69
|
-
A third suite runs against the real engine and
|
|
70
|
-
[test place](tests/place/README.md), a small game linked to the packages' builds
|
|
71
|
-
|
|
72
|
-
under four Rojo projects (see [Testing in Roblox Studio](docs/testing/studio.md)).
|
|
49
|
+
`bun run test` runs two suites:
|
|
50
|
+
|
|
51
|
+
- **Transformer tests** (`bun run test:unit`) build a fixture project with the real `rbxtsc` and
|
|
52
|
+
check the Luau it emits: guard generation, identifiers, nested macros and the plugin system.
|
|
53
|
+
- **Runtime specs** (`bun run test:runtime`) run the built `@flamework-experimental/core`,
|
|
54
|
+
`components` and `networking` packages under Lune. The harness in [`tests/runtime`](tests/runtime)
|
|
55
|
+
models roblox-ts's `TS.import` tree over the filesystem. It also stubs the parts of the Roblox API
|
|
56
|
+
that Flamework uses: Instances, attributes, CollectionService, RemoteEvents, Players, signals,
|
|
57
|
+
`task`, `Enum`, and a `Heartbeat` pump so that `Promise.delay` runs (and with it, request
|
|
58
|
+
timeouts). The specs cover dependency injection, modules, hooks and the per-frame lifecycle
|
|
59
|
+
events; component construction, dependencies and streaming; and both halves of networking:
|
|
60
|
+
events, functions, middleware and the generated guards.
|
|
61
|
+
|
|
62
|
+
The specs run twice, once as `Server` and once as `Client`, because some code paths depend on the
|
|
63
|
+
realm: `@Provider`'s metadata, component streaming, and the client and server halves of
|
|
64
|
+
networking. Running a realm-specific spec from both sides proves that the two sides agree. For
|
|
65
|
+
example, from the server a function receives on `$name` and sends on `@name`, and from the client
|
|
66
|
+
it does the reverse, so the two runs pin down the wire format from both ends.
|
|
67
|
+
|
|
68
|
+
Specs live in [`packages/specs`](packages/specs). `rbxtsc` builds them like any other project that
|
|
69
|
+
uses Flamework, so they test the transformer and the runtime together.
|
|
70
|
+
|
|
71
|
+
A third suite runs against the real engine, and `bun run test` leaves it out. It lives in the
|
|
72
|
+
[test place](tests/place/README.md), a small game linked to the packages' builds.
|
|
73
|
+
`bun run test:place` runs its `@flamework-experimental/testing` sections in Roblox Studio, on both
|
|
74
|
+
realms, under four Rojo projects (see [Testing in Roblox Studio](docs/testing/studio.md)).
|
package/flamework.build
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flamework-experimental/networking",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"main": "out/init.luau",
|
|
5
5
|
"types": "out/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@flamework-experimental/core": "
|
|
18
|
+
"@flamework-experimental/core": "^2.0.0-alpha.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@flamework-experimental/core": "2.0.0-alpha.2",
|