@duke333/builder-contracts 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Winu
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.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @duke333/builder-contracts
2
+
3
+ Shared builder schemas and types. This package is safe for both backend and frontend usage.
4
+
5
+ It contains only builder-owned contracts:
6
+
7
+ - form/list/view metadata schemas
8
+ - runtime entry schemas
9
+ - field trigger schemas
10
+ - pagination helpers used by builder endpoints
11
+
12
+ It does not contain host app contracts such as products, users, auth, organization, or role
13
+ definitions. Permission values are modeled as strings so each host app can keep its own
14
+ permission enum and validation policy.
15
+
16
+ ## Usage
17
+
18
+ Backend packages:
19
+
20
+ ```ts
21
+ import { builder } from "@duke333/builder-contracts";
22
+ ```
23
+
24
+ Install with backend runtime:
25
+
26
+ ```bash
27
+ pnpm add @duke333/builder-contracts @duke333/builder-backend
28
+ ```
29
+
30
+ Publish this package before `@duke333/builder-backend`, because backend depends on it.
31
+ The package is configured for public npm publishing.
32
+
33
+ The package publishes `dist` only. `prepack` runs `pnpm build`.