simetra 0.1.0 → 0.3.0-next.1
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 +1 -0
- package/dist/channel-grant-BATD6oQu.js +15 -0
- package/dist/compiler/index.d.ts +1470 -227
- package/dist/compiler/index.js +39407 -14041
- package/dist/data/centrifugo/index.d.ts +24 -0
- package/dist/data/centrifugo/index.js +173 -0
- package/dist/data/index.d.ts +27 -0
- package/dist/data/index.js +9779 -0
- package/dist/data/react/index.d.ts +103 -0
- package/dist/data/react/index.js +214 -0
- package/dist/grant-Zg0hmqK7.d.ts +11 -0
- package/dist/handle-C6PFsnUX.js +44 -0
- package/dist/holder-CkR-qRYU.d.ts +585 -0
- package/dist/model/index.d.ts +5240 -276
- package/dist/model/index.js +5030 -276
- package/dist/schema/index.d.ts +1812 -660
- package/dist/schema/index.js +12649 -6849
- package/dist/server/index.d.ts +747 -0
- package/dist/server/index.js +5356 -0
- package/dist/server/signals/index.d.ts +92 -0
- package/dist/server/signals/index.js +140 -0
- package/dist/shell/index.d.ts +100 -0
- package/dist/shell/index.js +148 -0
- package/dist/ui/index.d.ts +213 -0
- package/dist/ui/index.js +1075 -0
- package/package.json +87 -10
- package/schemas/accumulation-registers.schema.json +46 -5
- package/schemas/catalogs.schema.json +114 -7
- package/schemas/constants.schema.json +31 -5
- package/schemas/custom-tables.schema.json +77 -2
- package/schemas/documents.schema.json +83 -5
- package/schemas/functions.schema.json +129 -0
- package/schemas/information-registers.schema.json +47 -5
- package/schemas/project.schema.json +266 -4
- package/schemas/rights-sets.schema.json +3 -1
- package/schemas/roles.schema.json +6 -2
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ Node.js 24 or newer. The package is ESM only.
|
|
|
29
29
|
| `simetra/model` | Zod schemas and types of the metamodel, the kind registry |
|
|
30
30
|
| `simetra/compiler` | The compiler: metadata files in, contracts and diagnostics out |
|
|
31
31
|
| `simetra/schema` | Desired database state and the schema-engine port |
|
|
32
|
+
| `simetra/server` | The command runtime: `createCommandRuntime` over a database port, `fromPgPool` for a `pg` pool |
|
|
32
33
|
| `simetra/schemas/*` | JSON Schema files for editor support of metadata files |
|
|
33
34
|
|
|
34
35
|
Most projects start with the command line from
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/server/signals/grant.ts
|
|
2
|
+
const grants = /* @__PURE__ */ new WeakSet();
|
|
3
|
+
/** Internal: the only producer is `runtime.authorizeChannels`. */
|
|
4
|
+
function createChannelGrant(subject, channels) {
|
|
5
|
+
const grant = Object.freeze({
|
|
6
|
+
subject,
|
|
7
|
+
channels: Object.freeze([...channels])
|
|
8
|
+
});
|
|
9
|
+
grants.add(grant);
|
|
10
|
+
return grant;
|
|
11
|
+
}
|
|
12
|
+
function isChannelGrant(value) {
|
|
13
|
+
return typeof value === "object" && value !== null && grants.has(value);
|
|
14
|
+
}
|
|
15
|
+
export { isChannelGrant as n, createChannelGrant as t };
|