@adobe/data 0.9.5 → 0.9.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/ecs/database/create-plugin-cryos-pattern.test.d.ts +3 -0
- package/ecs/database/create-plugin-cryos-pattern.test.js +83 -0
- package/ecs/database/create-plugin-cryos-pattern.test.js.map +1 -0
- package/ecs/database/create-plugin-graphics.test.d.ts +93 -0
- package/ecs/database/create-plugin-graphics.test.js +135 -0
- package/ecs/database/create-plugin-graphics.test.js.map +1 -0
- package/ecs/database/create-plugin-type.type-test.js +563 -0
- package/ecs/database/create-plugin-type.type-test.js.map +1 -0
- package/ecs/database/create-plugin-type.type.test.js +563 -0
- package/ecs/database/create-plugin-type.type.test.js.map +1 -0
- package/ecs/database/database.d.ts +6 -1
- package/ecs/database/database.js.map +1 -1
- package/ecs/database/experimental-action-types.js +275 -0
- package/ecs/database/experimental-action-types.js.map +1 -0
- package/ecs/database/from-plugin.type-test.js +180 -0
- package/ecs/database/from-plugin.type-test.js.map +1 -0
- package/ecs/database/plugin-types.js +5 -0
- package/ecs/database/plugin-types.js.map +1 -0
- package/ecs/database/type-investigation.test.js +54 -0
- package/ecs/database/type-investigation.test.js.map +1 -0
- package/ecs/store/core/create-core.test.js +21 -0
- package/ecs/store/core/create-core.test.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/typed-buffer/create-array-buffer.js +10 -0
- package/typed-buffer/create-array-buffer.js.map +1 -1
- package/typed-buffer/create-array-buffer.test.js +50 -0
- package/typed-buffer/create-array-buffer.test.js.map +1 -1
- package/typed-buffer/create-const-buffer.js +3 -0
- package/typed-buffer/create-const-buffer.js.map +1 -1
- package/typed-buffer/create-const-buffer.test.js +24 -0
- package/typed-buffer/create-const-buffer.test.js.map +1 -1
- package/typed-buffer/create-number-buffer.js +4 -0
- package/typed-buffer/create-number-buffer.js.map +1 -1
- package/typed-buffer/create-number-buffer.test.js +38 -0
- package/typed-buffer/create-number-buffer.test.js.map +1 -1
- package/typed-buffer/create-struct-buffer.js +11 -0
- package/typed-buffer/create-struct-buffer.js.map +1 -1
- package/typed-buffer/create-struct-buffer.test.js +60 -0
- package/typed-buffer/create-struct-buffer.test.js.map +1 -1
- package/typed-buffer/typed-buffer.d.ts +2 -0
- package/typed-buffer/typed-buffer.js.map +1 -1
- package/assembly/package.json +0 -1
- package/blob/package.json +0 -1
- package/cache/package.json +0 -1
- package/debug-type-test.js +0 -12
- package/debug-type-test.js.map +0 -1
- package/ecs/database/archetype-type-safety-test.d.ts +0 -21
- package/ecs/database/archetype-type-safety-test.js +0 -36
- package/ecs/database/archetype-type-safety-test.js.map +0 -1
- package/ecs/database/create-database-schema-test.js +0 -150
- package/ecs/database/create-database-schema-test.js.map +0 -1
- package/ecs/database/create-plugin-v2.d.ts +0 -79
- package/ecs/database/create-plugin-v2.js +0 -68
- package/ecs/database/create-plugin-v2.js.map +0 -1
- package/ecs/database/create-plugin-v2.test.js +0 -362
- package/ecs/database/create-plugin-v2.test.js.map +0 -1
- package/ecs/database/create-plugin.OLD.d.ts +0 -138
- package/ecs/database/create-plugin.OLD.js +0 -59
- package/ecs/database/create-plugin.OLD.js.map +0 -1
- package/ecs/database/database-with-systems.test.js +0 -292
- package/ecs/database/database-with-systems.test.js.map +0 -1
- package/ecs/database/database.plugin.create.test.OLD.js +0 -601
- package/ecs/database/database.plugin.create.test.OLD.js.map +0 -1
- package/ecs/database/database.plugin.create.test.js +0 -321
- package/ecs/database/database.plugin.create.test.js.map +0 -1
- package/ecs/database/database.plugin.test.d.ts +0 -1
- package/ecs/database/database.plugin.test.js +0 -90
- package/ecs/database/database.plugin.test.js.map +0 -1
- package/ecs/database/database.test copy.d.ts +0 -1
- package/ecs/database/database.test copy.js +0 -199
- package/ecs/database/database.test copy.js.map +0 -1
- package/ecs/database/multi-param-inference-poc.test.d.ts +0 -1
- package/ecs/database/multi-param-inference-poc.test.js +0 -96
- package/ecs/database/multi-param-inference-poc.test.js.map +0 -1
- package/ecs/database/old-plugin-create-with-dependencies-array.d.ts +0 -61
- package/ecs/database/old-plugin-create-with-dependencies-array.js +0 -76
- package/ecs/database/old-plugin-create-with-dependencies-array.js.map +0 -1
- package/ecs/database/overload-inference-poc.test.d.ts +0 -1
- package/ecs/database/overload-inference-poc.test.js +0 -109
- package/ecs/database/overload-inference-poc.test.js.map +0 -1
- package/ecs/database/schedule-type-check-demo.d.ts +0 -10
- package/ecs/database/schedule-type-check-demo.js +0 -71
- package/ecs/database/schedule-type-check-demo.js.map +0 -1
- package/ecs/database/test-archetype-validation.d.ts +0 -9
- package/ecs/database/test-archetype-validation.js +0 -14
- package/ecs/database/test-archetype-validation.js.map +0 -1
- package/ecs/database/test-exactkeys.d.ts +0 -1
- package/ecs/database/test-exactkeys.js +0 -17
- package/ecs/database/test-exactkeys.js.map +0 -1
- package/ecs/database/transactional-store/coalesce-transactions.test.js +0 -433
- package/ecs/database/transactional-store/coalesce-transactions.test.js.map +0 -1
- package/ecs/database/type-inference-demo.d.ts +0 -75
- package/ecs/database/type-inference-demo.js +0 -73
- package/ecs/database/type-inference-demo.js.map +0 -1
- package/ecs/database/type-inference-poc.test.d.ts +0 -1
- package/ecs/database/type-inference-poc.test.js +0 -73
- package/ecs/database/type-inference-poc.test.js.map +0 -1
- package/ecs/package.json +0 -1
- package/ecs/plugins/scheduler/create-scheduler-plugin.d.ts +0 -8
- package/ecs/plugins/scheduler/create-scheduler-plugin.js +0 -54
- package/ecs/plugins/scheduler/create-scheduler-plugin.js.map +0 -1
- package/ecs/plugins/scheduler/create-scheduler-plugin.test.d.ts +0 -1
- package/ecs/plugins/scheduler/create-scheduler-plugin.test.js +0 -198
- package/ecs/plugins/scheduler/create-scheduler-plugin.test.js.map +0 -1
- package/ecs/plugins/scheduler/type-inference-test.d.ts +0 -1
- package/ecs/plugins/scheduler/type-inference-test.js +0 -2
- package/ecs/plugins/scheduler/type-inference-test.js.map +0 -1
- package/ecs/store/entity-functions.d.ts +0 -7
- package/ecs/store/entity-functions.js +0 -2
- package/ecs/store/entity-functions.js.map +0 -1
- package/ecs/store/functions.d.ts +0 -2
- package/ecs/store/functions.js +0 -2
- package/ecs/store/functions.js.map +0 -1
- package/ecs/system/system-declaration.d.ts +0 -7
- package/ecs/system/system-declaration.js +0 -23
- package/ecs/system/system-declaration.js.map +0 -1
- package/ecs/system/system-declarations.d.ts +0 -4
- package/ecs/system/system-declarations.js +0 -23
- package/ecs/system/system-declarations.js.map +0 -1
- package/ecs/system/system-factory/public/create copy.d.ts +0 -12
- package/ecs/system/system-factory/public/create copy.js +0 -8
- package/ecs/system/system-factory/public/create copy.js.map +0 -1
- package/ecs/system/system-factory/public/create.d.ts +0 -12
- package/ecs/system/system-factory/public/create.js +0 -8
- package/ecs/system/system-factory/public/create.js.map +0 -1
- package/ecs/system/system-factory/public/create.test.d.ts +0 -1
- package/ecs/system/system-factory/public/create.test.js +0 -42
- package/ecs/system/system-factory/public/create.test.js.map +0 -1
- package/ecs/system/system-factory/public/index.d.ts +0 -1
- package/ecs/system/system-factory/public/index.js +0 -2
- package/ecs/system/system-factory/public/index.js.map +0 -1
- package/ecs/system/system-factory/system-factory.d.ts +0 -17
- package/ecs/system/system-factory/system-factory.js +0 -23
- package/ecs/system/system-factory/system-factory.js.map +0 -1
- package/ecs/system/system-factory.d.ts +0 -9
- package/ecs/system/system-factory.js +0 -23
- package/ecs/system/system-factory.js.map +0 -1
- package/ecs/system/system-interface.d.ts +0 -5
- package/ecs/system/system-interface.js +0 -2
- package/ecs/system/system-interface.js.map +0 -1
- package/ecs/system/system.d.ts +0 -4
- package/ecs/system/system.js +0 -23
- package/ecs/system/system.js.map +0 -1
- package/ecs/system/systems-type.d.ts +0 -2
- package/ecs/system/systems-type.js +0 -2
- package/ecs/system/systems-type.js.map +0 -1
- package/ecs/system/systems.d.ts +0 -2
- package/ecs/system/systems.js +0 -23
- package/ecs/system/systems.js.map +0 -1
- package/ecs/system/world-schema/public/create.d.ts +0 -12
- package/ecs/system/world-schema/public/create.js +0 -8
- package/ecs/system/world-schema/public/create.js.map +0 -1
- package/ecs/system/world-schema/public/create.test.d.ts +0 -1
- package/ecs/system/world-schema/public/create.test.js +0 -42
- package/ecs/system/world-schema/public/create.test.js.map +0 -1
- package/ecs/system/world-schema/public/index.d.ts +0 -1
- package/ecs/system/world-schema/public/index.js +0 -2
- package/ecs/system/world-schema/public/index.js.map +0 -1
- package/ecs/system/world-schema/system-factory.d.ts +0 -17
- package/ecs/system/world-schema/system-factory.js +0 -23
- package/ecs/system/world-schema/system-factory.js.map +0 -1
- package/ecs/world/calculate-system-order.d.ts +0 -18
- package/ecs/world/calculate-system-order.js +0 -113
- package/ecs/world/calculate-system-order.js.map +0 -1
- package/ecs/world/calculate-system-order.test.d.ts +0 -1
- package/ecs/world/calculate-system-order.test.js +0 -168
- package/ecs/world/calculate-system-order.test.js.map +0 -1
- package/ecs/world/create-world-schema-test.d.ts +0 -1
- package/ecs/world/create-world-schema-test.js +0 -294
- package/ecs/world/create-world-schema-test.js.map +0 -1
- package/ecs/world/create-world-type-test.d.ts +0 -1
- package/ecs/world/create-world-type-test.js +0 -129
- package/ecs/world/create-world-type-test.js.map +0 -1
- package/ecs/world/create-world.d.ts +0 -19
- package/ecs/world/create-world.js +0 -80
- package/ecs/world/create-world.js.map +0 -1
- package/ecs/world/create-world.test.d.ts +0 -1
- package/ecs/world/create-world.test.js +0 -292
- package/ecs/world/create-world.test.js.map +0 -1
- package/ecs/world/public/world-schema/public/create.d.ts +0 -12
- package/ecs/world/public/world-schema/public/create.js +0 -8
- package/ecs/world/public/world-schema/public/create.js.map +0 -1
- package/ecs/world/public/world-schema/public/create.test.d.ts +0 -1
- package/ecs/world/public/world-schema/public/create.test.js +0 -42
- package/ecs/world/public/world-schema/public/create.test.js.map +0 -1
- package/ecs/world/public/world-schema/public/index.d.ts +0 -1
- package/ecs/world/public/world-schema/public/index.js +0 -2
- package/ecs/world/public/world-schema/public/index.js.map +0 -1
- package/ecs/world/public/world-schema/world-schema.d.ts +0 -17
- package/ecs/world/public/world-schema/world-schema.js +0 -23
- package/ecs/world/public/world-schema/world-schema.js.map +0 -1
- package/ecs/world/system-declaration.d.ts +0 -1
- package/ecs/world/system-declaration.js +0 -23
- package/ecs/world/system-declaration.js.map +0 -1
- package/ecs/world/system-schedule-typing-test.d.ts +0 -1
- package/ecs/world/system-schedule-typing-test.js +0 -83
- package/ecs/world/system-schedule-typing-test.js.map +0 -1
- package/ecs/world/world-schema/public/create.d.ts +0 -12
- package/ecs/world/world-schema/public/create.js +0 -10
- package/ecs/world/world-schema/public/create.js.map +0 -1
- package/ecs/world/world-schema/public/create.test.d.ts +0 -1
- package/ecs/world/world-schema/public/create.test.js +0 -41
- package/ecs/world/world-schema/public/create.test.js.map +0 -1
- package/ecs/world/world-schema/public/index.d.ts +0 -1
- package/ecs/world/world-schema/public/index.js +0 -2
- package/ecs/world/world-schema/public/index.js.map +0 -1
- package/ecs/world/world-schema/system-factory.d.ts +0 -17
- package/ecs/world/world-schema/system-factory.js +0 -23
- package/ecs/world/world-schema/system-factory.js.map +0 -1
- package/ecs/world/world-schema/world-schema.d.ts +0 -19
- package/ecs/world/world-schema/world-schema.js +0 -23
- package/ecs/world/world-schema/world-schema.js.map +0 -1
- package/ecs/world/world.d.ts +0 -86
- package/ecs/world/world.js +0 -81
- package/ecs/world/world.js.map +0 -1
- package/ecs/world/world.test.d.ts +0 -1
- package/ecs/world/world.test.js +0 -176
- package/ecs/world/world.test.js.map +0 -1
- package/functions/package.json +0 -1
- package/lit/elements/application-element copy.d.ts +0 -9
- package/lit/elements/application-element copy.js +0 -62
- package/lit/elements/application-element copy.js.map +0 -1
- package/lit/package.json +0 -1
- package/math/package.json +0 -1
- package/observe/package.json +0 -1
- package/old-ecs/package.json +0 -1
- package/perftest/package.json +0 -1
- package/samples/package.json +0 -1
- package/schema/package.json +0 -1
- package/service/package.json +0 -1
- package/table/package.json +0 -1
- package/typed-buffer/package.json +0 -1
- package/types/package.json +0 -1
- /package/{debug-type-test.d.ts → ecs/database/create-plugin-type.type-test.d.ts} +0 -0
- /package/ecs/database/{create-database-schema-test.d.ts → create-plugin-type.type.test.d.ts} +0 -0
- /package/ecs/database/{create-plugin-v2.test.d.ts → experimental-action-types.d.ts} +0 -0
- /package/ecs/database/{database-with-systems.test.d.ts → from-plugin.type-test.d.ts} +0 -0
- /package/ecs/database/{database.plugin.create.test.OLD.d.ts → plugin-types.d.ts} +0 -0
- /package/ecs/database/{database.plugin.create.test.d.ts → type-investigation.test.d.ts} +0 -0
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
import { createPlugin } from "./create-plugin.js";
|
|
23
|
+
/**
|
|
24
|
+
* Type-only tests for createPlugin type inference and constraints.
|
|
25
|
+
*
|
|
26
|
+
* These tests verify that:
|
|
27
|
+
* 1. Type inference works correctly for all valid plugin configurations
|
|
28
|
+
* 2. Invalid property usage is properly blocked by TypeScript
|
|
29
|
+
*
|
|
30
|
+
* Note: These are compile-time type checks only - they don't need to execute.
|
|
31
|
+
*/
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// VALID TYPE INFERENCE TESTS
|
|
34
|
+
// ============================================================================
|
|
35
|
+
function validTypeInferenceTests() {
|
|
36
|
+
// Test: Empty plugin inference
|
|
37
|
+
const emptyPlugin = createPlugin({});
|
|
38
|
+
// type CheckEmptyPlugin = Assert<Equal<typeof emptyPlugin, Database.Plugin<{}, {}, {}, {}, never, {}>>>;
|
|
39
|
+
// Test: Valid archetype component references
|
|
40
|
+
const validArchetypePlugin = createPlugin({
|
|
41
|
+
components: {
|
|
42
|
+
a: { type: "number" },
|
|
43
|
+
b: { type: "string" }
|
|
44
|
+
},
|
|
45
|
+
archetypes: {
|
|
46
|
+
A: ["a", "b"],
|
|
47
|
+
ABTransient: ["a", "b", "transient"],
|
|
48
|
+
Transient: ["transient"],
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
// Test: Valid transactions with components, resources, and archetypes
|
|
52
|
+
const validTransactionPlugin = createPlugin({
|
|
53
|
+
components: {
|
|
54
|
+
a: { type: "number" },
|
|
55
|
+
b: { type: "string" }
|
|
56
|
+
},
|
|
57
|
+
resources: {
|
|
58
|
+
c: { default: false }
|
|
59
|
+
},
|
|
60
|
+
archetypes: {
|
|
61
|
+
A: ["a", "b"],
|
|
62
|
+
ABTransient: ["a", "b", "transient"],
|
|
63
|
+
},
|
|
64
|
+
transactions: {
|
|
65
|
+
testChanges: (store) => {
|
|
66
|
+
// valid resource assignment
|
|
67
|
+
store.resources.c = true;
|
|
68
|
+
// valid archetype
|
|
69
|
+
store.archetypes.A.insert({ a: 1, b: "2" });
|
|
70
|
+
// valid update
|
|
71
|
+
store.update(0, { a: 2 });
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
// Test: Valid systems with transactions
|
|
76
|
+
const validSystemPlugin = createPlugin({
|
|
77
|
+
components: {
|
|
78
|
+
a: { type: "number" },
|
|
79
|
+
b: { type: "string" }
|
|
80
|
+
},
|
|
81
|
+
resources: {
|
|
82
|
+
c: { default: false }
|
|
83
|
+
},
|
|
84
|
+
archetypes: {
|
|
85
|
+
A: ["a", "b"],
|
|
86
|
+
},
|
|
87
|
+
transactions: {
|
|
88
|
+
testChanges: (store) => {
|
|
89
|
+
store.resources.c = true;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
systems: {
|
|
93
|
+
update: {
|
|
94
|
+
create: (db) => () => {
|
|
95
|
+
db.transactions.testChanges();
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
render: {
|
|
99
|
+
create: (db) => () => { },
|
|
100
|
+
schedule: {
|
|
101
|
+
after: ["update"],
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
// Test: Valid base plugin with all properties
|
|
107
|
+
const basePlugin = createPlugin({
|
|
108
|
+
components: {
|
|
109
|
+
alpha: { type: "number" },
|
|
110
|
+
beta: { type: "string" }
|
|
111
|
+
},
|
|
112
|
+
resources: {
|
|
113
|
+
charlie: { default: false }
|
|
114
|
+
},
|
|
115
|
+
archetypes: {
|
|
116
|
+
Foo: ["alpha", "beta"],
|
|
117
|
+
FooTransient: ["alpha", "beta", "transient"],
|
|
118
|
+
},
|
|
119
|
+
transactions: {
|
|
120
|
+
doAlpha: (store, input) => { },
|
|
121
|
+
doBeta: (store) => { }
|
|
122
|
+
},
|
|
123
|
+
actions: {
|
|
124
|
+
doAction: (db) => {
|
|
125
|
+
db.transactions.doAlpha({ a: 1, b: "2" });
|
|
126
|
+
db.transactions.doBeta();
|
|
127
|
+
},
|
|
128
|
+
doOtherAction: (db) => {
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
systems: {
|
|
132
|
+
input: {
|
|
133
|
+
create: (db) => () => {
|
|
134
|
+
db.transactions.doAlpha({ a: 1, b: "2" });
|
|
135
|
+
db.transactions.doBeta();
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
output: {
|
|
139
|
+
create: (db) => () => {
|
|
140
|
+
db.actions.doAction();
|
|
141
|
+
db.actions.doOtherAction();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
// Test: Valid extended plugin accessing base plugin properties
|
|
147
|
+
const extendedPlugin = createPlugin({
|
|
148
|
+
components: {
|
|
149
|
+
a: { type: "number" },
|
|
150
|
+
b: { type: "string" },
|
|
151
|
+
},
|
|
152
|
+
resources: {
|
|
153
|
+
c: { default: false }
|
|
154
|
+
},
|
|
155
|
+
archetypes: {
|
|
156
|
+
A: ["a", "b", "alpha", "beta"],
|
|
157
|
+
ABTransient: ["a", "b", "alpha", "beta", "transient"],
|
|
158
|
+
},
|
|
159
|
+
transactions: {
|
|
160
|
+
testChanges: (store) => {
|
|
161
|
+
// assign to resources from this plugin
|
|
162
|
+
store.resources.c = true;
|
|
163
|
+
// valid archetype
|
|
164
|
+
store.archetypes.A.insert({ a: 1, b: "2", alpha: 3, beta: "4" });
|
|
165
|
+
// valid update using base components
|
|
166
|
+
store.update(0, { a: 2, alpha: 3 });
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
systems: {
|
|
170
|
+
update: {
|
|
171
|
+
create: (db) => () => {
|
|
172
|
+
db.transactions.doAlpha({ a: 1, b: "2" });
|
|
173
|
+
db.transactions.doBeta();
|
|
174
|
+
db.transactions.testChanges();
|
|
175
|
+
},
|
|
176
|
+
schedule: {},
|
|
177
|
+
},
|
|
178
|
+
render: {
|
|
179
|
+
create: (db) => () => {
|
|
180
|
+
db.transactions.testChanges();
|
|
181
|
+
},
|
|
182
|
+
schedule: {},
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
actions: {
|
|
186
|
+
doExtendedAction: (db) => {
|
|
187
|
+
db.transactions.doAlpha({ a: 1, b: "2" });
|
|
188
|
+
db.transactions.doBeta();
|
|
189
|
+
db.transactions.testChanges();
|
|
190
|
+
},
|
|
191
|
+
doOtherExtendedAction: (db) => {
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
extends: basePlugin
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
// ============================================================================
|
|
198
|
+
// INVALID TYPE INFERENCE TESTS
|
|
199
|
+
// ============================================================================
|
|
200
|
+
/**
|
|
201
|
+
* ⚠️ CRITICAL: Why Invalid Tests Must Be Isolated
|
|
202
|
+
*
|
|
203
|
+
* Invalid type tests (those using @ts-expect-error) MUST be in separate
|
|
204
|
+
* plugin definitions from valid tests. This is because:
|
|
205
|
+
*
|
|
206
|
+
* 1. **Type Inference Failure Propagation**: When TypeScript encounters a type
|
|
207
|
+
* error in a plugin definition, it can cause the entire plugin's type
|
|
208
|
+
* inference to fail or degrade. This means that if you have both valid and
|
|
209
|
+
* invalid usage in the same plugin, the invalid errors can break the
|
|
210
|
+
* inference for the valid parts, making it impossible to verify that valid
|
|
211
|
+
* code actually works correctly.
|
|
212
|
+
*
|
|
213
|
+
* 2. **Constraint Satisfaction**: The createPlugin function uses complex
|
|
214
|
+
* generic constraints that depend on all properties being valid. If one
|
|
215
|
+
* property has an error, TypeScript may fail to satisfy the constraints
|
|
216
|
+
* for other properties, even if those other properties are themselves valid.
|
|
217
|
+
*
|
|
218
|
+
* 3. **Type Narrowing**: Errors in one part of a plugin can cause TypeScript
|
|
219
|
+
* to narrow types incorrectly or give up on inference entirely, leading to
|
|
220
|
+
* `any` types or overly permissive types that don't actually test what we
|
|
221
|
+
* want to test.
|
|
222
|
+
*
|
|
223
|
+
* 4. **Test Isolation**: By isolating invalid tests, we ensure that:
|
|
224
|
+
* - Each test verifies exactly one constraint
|
|
225
|
+
* - Valid inference tests aren't affected by invalid ones
|
|
226
|
+
* - We can verify that our type system actually blocks invalid usage
|
|
227
|
+
* rather than just allowing `any` types
|
|
228
|
+
*
|
|
229
|
+
* Therefore, each invalid test below is in its own isolated plugin definition
|
|
230
|
+
* that only tests the specific invalid usage pattern.
|
|
231
|
+
*/
|
|
232
|
+
// Test: Invalid archetype component reference (no components defined)
|
|
233
|
+
function invalidArchetypeComponentReference() {
|
|
234
|
+
createPlugin({
|
|
235
|
+
archetypes: {
|
|
236
|
+
// @ts-expect-error - invalid archetype reference (component "bar" does not exist)
|
|
237
|
+
InvalidArchetype: ["bar"],
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// Test: Invalid archetype component reference (component not in schema)
|
|
242
|
+
function invalidArchetypeComponentReference2() {
|
|
243
|
+
createPlugin({
|
|
244
|
+
components: {
|
|
245
|
+
a: { type: "number" }
|
|
246
|
+
},
|
|
247
|
+
archetypes: {
|
|
248
|
+
// @ts-expect-error - invalid archetype reference (component "b" does not exist)
|
|
249
|
+
InvalidArchetype: ["b"],
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
// Test: Invalid resource access in transaction
|
|
254
|
+
function invalidResourceAccessInTransaction() {
|
|
255
|
+
createPlugin({
|
|
256
|
+
resources: {
|
|
257
|
+
c: { default: false }
|
|
258
|
+
},
|
|
259
|
+
transactions: {
|
|
260
|
+
testChanges: (store) => {
|
|
261
|
+
// @ts-expect-error - invalid resource assignment (resource "d" does not exist)
|
|
262
|
+
store.resources.d = true;
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
// Test: Invalid archetype access in transaction
|
|
268
|
+
function invalidArchetypeAccessInTransaction() {
|
|
269
|
+
createPlugin({
|
|
270
|
+
components: {
|
|
271
|
+
a: { type: "number" }
|
|
272
|
+
},
|
|
273
|
+
archetypes: {
|
|
274
|
+
A: ["a"],
|
|
275
|
+
},
|
|
276
|
+
transactions: {
|
|
277
|
+
testChanges: (store) => {
|
|
278
|
+
// @ts-expect-error - invalid archetype reference (archetype "foo" does not exist)
|
|
279
|
+
store.archetypes.foo;
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
// Test: Invalid component update in transaction
|
|
285
|
+
function invalidComponentUpdateInTransaction() {
|
|
286
|
+
createPlugin({
|
|
287
|
+
components: {
|
|
288
|
+
a: { type: "number" },
|
|
289
|
+
b: { type: "string" }
|
|
290
|
+
},
|
|
291
|
+
transactions: {
|
|
292
|
+
testChanges: (store) => {
|
|
293
|
+
// @ts-expect-error - invalid update (component "d" does not exist)
|
|
294
|
+
store.update(0, { d: 10 });
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
// Test: Invalid system self-reference in schedule
|
|
300
|
+
function invalidSystemSelfReference() {
|
|
301
|
+
createPlugin({
|
|
302
|
+
systems: {
|
|
303
|
+
render: {
|
|
304
|
+
create: (db) => () => { },
|
|
305
|
+
schedule: {
|
|
306
|
+
// @ts-expect-error - render would be a self-reference (prevented by Exclude<S | SX, K>)
|
|
307
|
+
before: ["render"],
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
// Test: Invalid system reference in schedule
|
|
314
|
+
function invalidSystemReference() {
|
|
315
|
+
createPlugin({
|
|
316
|
+
systems: {
|
|
317
|
+
update: {
|
|
318
|
+
create: (db) => () => { },
|
|
319
|
+
},
|
|
320
|
+
render: {
|
|
321
|
+
create: (db) => () => { },
|
|
322
|
+
schedule: {
|
|
323
|
+
// @ts-expect-error - invalid system reference (system "invalid" does not exist)
|
|
324
|
+
during: ["invalid"],
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
// Test: Invalid transaction call in action
|
|
331
|
+
function invalidTransactionCallInAction() {
|
|
332
|
+
createPlugin({
|
|
333
|
+
transactions: {
|
|
334
|
+
validTransaction: (store) => { },
|
|
335
|
+
},
|
|
336
|
+
actions: {
|
|
337
|
+
doAction: (db) => {
|
|
338
|
+
// @ts-expect-error - invalid transaction call (transaction "doesNotExist" does not exist)
|
|
339
|
+
db.transactions.doesNotExist();
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
// Test: Invalid action call in system
|
|
345
|
+
function invalidActionCallInSystem() {
|
|
346
|
+
createPlugin({
|
|
347
|
+
actions: {
|
|
348
|
+
validAction: (db) => { },
|
|
349
|
+
},
|
|
350
|
+
systems: {
|
|
351
|
+
testSystem: {
|
|
352
|
+
create: (db) => () => {
|
|
353
|
+
// @ts-expect-error - invalid action call (action "doesNotExist" does not exist)
|
|
354
|
+
db.actions.doesNotExist();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
// Test: Invalid resource access in system
|
|
361
|
+
function invalidResourceAccessInSystem() {
|
|
362
|
+
createPlugin({
|
|
363
|
+
resources: {
|
|
364
|
+
validResource: { default: 0 }
|
|
365
|
+
},
|
|
366
|
+
systems: {
|
|
367
|
+
testSystem: {
|
|
368
|
+
create: (db) => () => {
|
|
369
|
+
// @ts-expect-error - invalid resource access (resource "invalidResource" does not exist)
|
|
370
|
+
const value = db.resources.invalidResource;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
// Test: Invalid archetype access in system
|
|
377
|
+
function invalidArchetypeAccessInSystem() {
|
|
378
|
+
createPlugin({
|
|
379
|
+
components: {
|
|
380
|
+
a: { type: "number" }
|
|
381
|
+
},
|
|
382
|
+
archetypes: {
|
|
383
|
+
A: ["a"],
|
|
384
|
+
},
|
|
385
|
+
systems: {
|
|
386
|
+
testSystem: {
|
|
387
|
+
create: (db) => () => {
|
|
388
|
+
// @ts-expect-error - invalid archetype access (archetype "invalid" does not exist)
|
|
389
|
+
db.archetypes.invalid;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
// Test: Invalid extended plugin - invalid resource access
|
|
396
|
+
function invalidExtendedPluginResourceAccess() {
|
|
397
|
+
const basePlugin = createPlugin({
|
|
398
|
+
resources: {
|
|
399
|
+
charlie: { default: false }
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
createPlugin({
|
|
403
|
+
resources: {
|
|
404
|
+
c: { default: false }
|
|
405
|
+
},
|
|
406
|
+
transactions: {
|
|
407
|
+
testChanges: (store) => {
|
|
408
|
+
// @ts-expect-error - invalid resource assignment (resource "delta" does not exist in base or current)
|
|
409
|
+
store.resources.delta = true;
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
extends: basePlugin
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
// Test: Invalid extended plugin - invalid archetype access
|
|
416
|
+
function invalidExtendedPluginArchetypeAccess() {
|
|
417
|
+
const basePlugin = createPlugin({
|
|
418
|
+
components: {
|
|
419
|
+
alpha: { type: "number" }
|
|
420
|
+
},
|
|
421
|
+
archetypes: {
|
|
422
|
+
Foo: ["alpha"],
|
|
423
|
+
},
|
|
424
|
+
});
|
|
425
|
+
createPlugin({
|
|
426
|
+
components: {
|
|
427
|
+
a: { type: "number" }
|
|
428
|
+
},
|
|
429
|
+
transactions: {
|
|
430
|
+
testChanges: (store) => {
|
|
431
|
+
// @ts-expect-error - invalid archetype reference (archetype "foo" does not exist in base or current)
|
|
432
|
+
store.archetypes.foo;
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
extends: basePlugin
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
// Test: Invalid extended plugin - invalid system reference in schedule
|
|
439
|
+
function invalidExtendedPluginSystemReference() {
|
|
440
|
+
const basePlugin = createPlugin({
|
|
441
|
+
systems: {
|
|
442
|
+
input: {
|
|
443
|
+
create: (db) => () => { },
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
});
|
|
447
|
+
createPlugin({
|
|
448
|
+
systems: {
|
|
449
|
+
render: {
|
|
450
|
+
create: (db) => () => { },
|
|
451
|
+
schedule: {
|
|
452
|
+
// @ts-expect-error - invalid system reference (system "invalid" does not exist in base or current)
|
|
453
|
+
after: ["invalid"],
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
extends: basePlugin
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
// Test: Invalid extended plugin - invalid transaction call
|
|
461
|
+
function invalidExtendedPluginTransactionCall() {
|
|
462
|
+
const basePlugin = createPlugin({
|
|
463
|
+
transactions: {
|
|
464
|
+
doAlpha: (store) => { },
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
createPlugin({
|
|
468
|
+
systems: {
|
|
469
|
+
testSystem: {
|
|
470
|
+
create: (db) => () => {
|
|
471
|
+
// @ts-expect-error - invalid transaction call (transaction "doesNotExist" does not exist)
|
|
472
|
+
db.transactions.doesNotExist();
|
|
473
|
+
db.transactions.doAlpha();
|
|
474
|
+
// @ts-expect-error - invalid transaction call (transaction "doAlpha" does not takes input)
|
|
475
|
+
db.transactions.doAlpha({ a: 1, b: "2" });
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
extends: basePlugin
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
// Test: Invalid extended plugin - invalid action call
|
|
483
|
+
function invalidExtendedPluginActionCall() {
|
|
484
|
+
const basePlugin = createPlugin({
|
|
485
|
+
actions: {
|
|
486
|
+
doAction: (db) => { },
|
|
487
|
+
},
|
|
488
|
+
});
|
|
489
|
+
createPlugin({
|
|
490
|
+
systems: {
|
|
491
|
+
testSystem: {
|
|
492
|
+
create: (db) => () => {
|
|
493
|
+
// @ts-expect-error - invalid action call (action "doesNotExist" does not exist)
|
|
494
|
+
db.actions.doesNotExist();
|
|
495
|
+
db.actions.doAction();
|
|
496
|
+
// @ts-expect-error - invalid action call (action "doAction" does not take input)
|
|
497
|
+
db.actions.doAction({ a: 1, b: "2" });
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
extends: basePlugin
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
// Test: Invalid action call in action (same plugin) - actions can only call actions from extended plugin
|
|
505
|
+
function invalidActionCallInActionSamePlugin() {
|
|
506
|
+
createPlugin({
|
|
507
|
+
actions: {
|
|
508
|
+
action1: (db) => {
|
|
509
|
+
// @ts-expect-error - actions cannot call other actions from same plugin (only from extended plugin)
|
|
510
|
+
db.actions.action2();
|
|
511
|
+
},
|
|
512
|
+
action2: (db) => { },
|
|
513
|
+
},
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
// Test: Invalid component access in transaction (component doesn't exist)
|
|
517
|
+
function invalidComponentAccessInTransaction() {
|
|
518
|
+
createPlugin({
|
|
519
|
+
components: {
|
|
520
|
+
a: { type: "number" }
|
|
521
|
+
},
|
|
522
|
+
transactions: {
|
|
523
|
+
testChanges: (store) => {
|
|
524
|
+
// @ts-expect-error - invalid component access (component "b" does not exist)
|
|
525
|
+
const value = store.components.b;
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
// Test: Invalid component access in system (component doesn't exist)
|
|
531
|
+
function invalidComponentAccessInSystem() {
|
|
532
|
+
createPlugin({
|
|
533
|
+
components: {
|
|
534
|
+
a: { type: "number" }
|
|
535
|
+
},
|
|
536
|
+
systems: {
|
|
537
|
+
testSystem: {
|
|
538
|
+
create: (db) => () => {
|
|
539
|
+
// @ts-expect-error - invalid component access (component "b" does not exist)
|
|
540
|
+
const value = db.components.b;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
// Test: Valid action call in action (from extended plugin)
|
|
547
|
+
function validActionCallInActionFromExtended() {
|
|
548
|
+
const basePlugin = createPlugin({
|
|
549
|
+
actions: {
|
|
550
|
+
baseAction: (db) => { },
|
|
551
|
+
},
|
|
552
|
+
});
|
|
553
|
+
createPlugin({
|
|
554
|
+
actions: {
|
|
555
|
+
extendedAction: (db) => {
|
|
556
|
+
// Valid - can call actions from extended plugin
|
|
557
|
+
db.actions.baseAction();
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
extends: basePlugin
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
//# sourceMappingURL=create-plugin-type.type-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-plugin-type.type-test.js","sourceRoot":"","sources":["../../../src/ecs/database/create-plugin-type.type-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;;;;GAQG;AAEH,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,SAAS,uBAAuB;IAC5B,+BAA+B;IAC/B,MAAM,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC,CAAC;IACrC,yGAAyG;IAEzG,6CAA6C;IAC7C,MAAM,oBAAoB,GAAG,YAAY,CAAC;QACtC,UAAU,EAAE;YACR,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACrB,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACxB;QACD,UAAU,EAAE;YACR,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;YACb,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC;YACpC,SAAS,EAAE,CAAC,WAAW,CAAC;SAC3B;KACJ,CAAC,CAAC;IAEH,sEAAsE;IACtE,MAAM,sBAAsB,G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