@colspec/server 0.1.0 → 0.1.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 +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,9 +33,9 @@ import { createTableDefinitionService } from "@colspec/server";
|
|
|
33
33
|
const definitions = createTableDefinitionService(repository);
|
|
34
34
|
|
|
35
35
|
await definitions.saveDraft(json); // validates; throws ContractError if invalid
|
|
36
|
-
await definitions.publish("
|
|
37
|
-
await definitions.getPublished("
|
|
38
|
-
await definitions.listRevisions("
|
|
36
|
+
await definitions.publish("inventory.products", 4);
|
|
37
|
+
await definitions.getPublished("inventory.products"); // latest published revision
|
|
38
|
+
await definitions.listRevisions("inventory.products");
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Drafts can be saved repeatedly. A published revision is immutable; change a
|
|
@@ -65,8 +65,8 @@ you control.
|
|
|
65
65
|
import { resolveServerQuery } from "@colspec/server";
|
|
66
66
|
|
|
67
67
|
const result = resolveServerQuery(untrustedJson, {
|
|
68
|
-
"
|
|
69
|
-
status: "
|
|
68
|
+
"product.created_at": "products.created_at",
|
|
69
|
+
status: "products.status",
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
if (!result.ok) return badRequest(result.diagnostics);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colspec/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@repo/eslint-config": "0.0.0",
|
|
6
6
|
"@repo/typescript-config": "0.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@colspec/core": "0.1.
|
|
9
|
+
"@colspec/core": "0.1.1"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"license": "MIT",
|