@nmvuong92/fluxe 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/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative
95
+ Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works.
111
+
112
+ You may add Your own copyright statement to Your modifications and
113
+ may provide additional or different license terms and conditions
114
+ for use, reproduction, or distribution of Your modifications, or
115
+ for any such Derivative Works as a whole, provided Your use,
116
+ reproduction, and distribution of the Work otherwise complies with
117
+ the conditions stated in this License.
118
+
119
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
120
+ any Contribution intentionally submitted for inclusion in the Work
121
+ by You to the Licensor shall be under the terms and conditions of
122
+ this License, without any additional terms or conditions.
123
+ Notwithstanding the above, nothing herein shall supersede or modify
124
+ the terms of any separate license agreement you may have executed
125
+ with Licensor regarding such Contributions.
126
+
127
+ 6. Trademarks. This License does not grant permission to use the trade
128
+ names, trademarks, service marks, or product names of the Licensor,
129
+ except as required for reasonable and customary use in describing the
130
+ origin of the Work and reproducing the content of the NOTICE file.
131
+
132
+ 7. Disclaimer of Warranty. Unless required by applicable law or
133
+ agreed to in writing, Licensor provides the Work (and each
134
+ Contributor provides its Contributions) on an "AS IS" BASIS,
135
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
136
+ implied, including, without limitation, any warranties or conditions
137
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
138
+ PARTICULAR PURPOSE. You are solely responsible for determining the
139
+ appropriateness of using or redistributing the Work and assume any
140
+ risks associated with Your exercise of permissions under this License.
141
+
142
+ 8. Limitation of Liability. In no event and under no legal theory,
143
+ whether in tort (including negligence), contract, or otherwise,
144
+ unless required by applicable law (such as deliberate and grossly
145
+ negligent acts) or agreed to in writing, shall any Contributor be
146
+ liable to You for damages, including any direct, indirect, special,
147
+ incidental, or consequential damages of any character arising as a
148
+ result of this License or out of the use or inability to use the
149
+ Work (including but not limited to damages for loss of goodwill,
150
+ work stoppage, computer failure or malfunction, or any and all
151
+ other commercial damages or losses), even if such Contributor
152
+ has been advised of the possibility of such damages.
153
+
154
+ 9. Accepting Warranty or Additional Liability. While redistributing
155
+ the Work or Derivative Works thereof, You may choose to offer,
156
+ and charge a fee for, acceptance of support, warranty, indemnity,
157
+ or other liability obligations and/or rights consistent with this
158
+ License. However, in accepting such obligations, You may act only
159
+ on Your own behalf and on Your sole responsibility, not on behalf
160
+ of any other Contributor, and only if You agree to indemnify,
161
+ defend, and hold each Contributor harmless for any liability
162
+ incurred by, or claims asserted against, such Contributor by reason
163
+ of your accepting any such warranty or additional liability.
164
+
165
+ END OF TERMS AND CONDITIONS
166
+
167
+ APPENDIX: How to apply the Apache License to your work.
168
+
169
+ To apply the Apache License to your work, attach the following
170
+ boilerplate notice, with the fields enclosed by brackets "[]"
171
+ replaced with your own identifying information. (Don't include
172
+ the brackets!) The text should be enclosed in the appropriate
173
+ comment syntax for the file format. We also recommend that a
174
+ file or class name and description of purpose be included on the
175
+ same "printed page" as the copyright notice for easier
176
+ identification within third-party archives.
177
+
178
+ Copyright 2026 nmvuong92
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ fluxe (@nmvuong92/fluxe)
2
+ Copyright 2026 nmvuong92
3
+
4
+ This product includes software developed by nmvuong92.
5
+ Licensed under the Apache License, Version 2.0.
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # fluxe
2
2
 
3
+ [![CI](https://github.com/nmvuong92/fluxe/actions/workflows/ci.yml/badge.svg)](https://github.com/nmvuong92/fluxe/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@nmvuong92/fluxe.svg)](https://www.npmjs.com/package/@nmvuong92/fluxe)
5
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
6
+
3
7
  Khung fullstack **polyglot** dựa trên triết lý **RCA — Resolved Cell Architecture**:
4
8
  *logic chỉ phụ thuộc HỢP ĐỒNG; mọi quyết định vận hành (ngôn ngữ, render, transport,
5
9
  backend, scale) là **kết quả được GIẢI** bởi engine, không viết tay.*
@@ -86,3 +90,9 @@ mỗi tầng đúng ngôn ngữ tối ưu, đúng §6d của [idea.md](idea.md).
86
90
 
87
91
  Toàn bộ định hướng, các trục chiến lược, tenets và nguyên lý RCA: xem **[idea.md](idea.md)**.
88
92
  Spec + plan: `docs/superpowers/`.
93
+
94
+ ## License
95
+
96
+ **Apache-2.0** © 2026 nmvuong92. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
97
+ Copyright is held solely by the author, who reserves the right to offer the software under
98
+ separate commercial terms.
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { DatabaseSync } from "node:sqlite";
2
4
  /* Backend DB THẬT — SQLite qua node:sqlite (built-in, 0 dep, persist ra file).
3
5
  * Chạy cần cờ: node --experimental-sqlite … Cùng interface Backend → switch như mọi backend. */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* ============================================================
2
4
  * Backend Adapter — interface chuẩn để SWITCH backend.
3
5
  * loader/action chỉ biết tới interface này, không biết
package/lib/core/auth.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { createHmac, timingSafeEqual, scryptSync, randomBytes } from "node:crypto";
2
4
  export function hasRole(session, role) {
3
5
  return !!session?.roles?.includes(role);
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Broker pub/sub in-memory — nền của realtime channel (Trục 4g), bản 1-node.
2
4
  * Bản distributed: thay bằng NATS/Redis fan-out (cùng interface). Bản stateful:
3
5
  * actor-Go (app/native/actor-go). Đây là lõi đơn giản nhất, dependency-free. */
package/lib/core/cli.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* fx CLI — registry lệnh thuần (testable). bin/fx.ts dispatch + spawn. */
2
4
  const SYNC = "tsx scripts/sync.ts"; // auto-discovery: quét app/cells/* → app/app.ts
3
5
  const ESBUILD = "esbuild src/client.tsx --bundle --format=esm --outfile=dist/client.js --jsx=automatic --loader:.tsx=tsx";
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* ============================================================
2
4
  * Client runtime — Inertia-style + mutations DX.
3
5
  * - rpc(): gọi action, ném RpcError CÓ CẤU TRÚC (code/message/details) khi lỗi.
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Codegen contract polyglot — MỘT schema → types TS + Go + Rust (chữ ký RCA:
2
4
  * type-safe xuyên ngôn ngữ). Thuần (string-in/string-out), dễ test. */
3
5
  const pascal = (s) => s.charAt(0).toUpperCase() + s.slice(1);
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Error handling (tenet T5 / Trục 4q):
2
4
  * - FluxeError = domain error (giá trị có kiểu) → map status/code/message an toàn.
3
5
  * - Lỗi khác = unexpected → 500 generic + errorId; detail chỉ ở dev (không leak prod). */
package/lib/core/etag.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { createHash } from "node:crypto";
2
4
  /* Render cache — ETag/304: hash body, client gửi If-None-Match → 304 nếu không đổi
3
5
  * (không gửi lại body). Dùng cho JSON props (SPA nav refetch nhiều). */
package/lib/core/jobs.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { DatabaseSync } from "node:sqlite";
2
4
  /* Worker: xử lý cạn job pending (retry → dead-letter bao bọc nên luôn kết thúc). */
3
5
  export async function drain(queue, handlers, opts) {
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Nested layouts — phần thuần: giải chuỗi layout từ cell lên root.
2
4
  * Trả về thứ tự INNER→OUTER để render bọc dần (outermost cuối cùng bọc ngoài). */
3
5
  export function layoutChain(layoutId, layouts) {
package/lib/core/nav.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Resolved Navigation — phần THUẦN (testable, không DOM/fetch).
2
4
  * shouldIntercept: có nên chặn click để SPA-nav không. createPrefetchCache: cache props
3
5
  * theo URL + dedup in-flight (prefetch on hover → nav cảm giác tức thì). */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Observability — request log Ring Buffer CIRCULAR (#17).
2
4
  * Trước: push + shift (shift O(n) mỗi record khi đầy). Giờ: mảng vòng + con trỏ ghi →
3
5
  * record O(1) (không dời mảng). recent O(n) chỉ trên số phần tử yêu cầu. */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Presence — ai đang online per topic (Trục 4g). Refcount theo id để chịu multi-tab/
2
4
  * nhiều kết nối cùng user. Bản 1-node; distributed: chia sẻ qua NATS/Redis (gắn 4d). */
3
5
  export function createPresence() {
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Rate limiting (6b.F) — token bucket per key (vd IP/user/route). Thuần, clock injected.
2
4
  * Bucket bound bằng LRU (maxKeys) → CHỐNG RÒ RAM khi nhiều IP (kẻ tấn công nhiều nguồn).
3
5
  * Bản 1-node; distributed: chia sẻ bucket qua Redis (gắn 4d), cùng interface. */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* ============================================================
2
4
  * Render cache — memoize HTML đã render của cell static, key theo route.
3
5
  *
package/lib/core/seo.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* SEO / head management — builder thuần (testable). Cell khai báo head(data) →
2
4
  * framework bơm vào <head>; sitemap/robots tự sinh từ route table. */
3
5
  function esc(s) {
package/lib/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* @nmvuong92/fluxe — entry ENGINE (server-side, không kéo node:sqlite).
2
4
  * Subpath: /react (DX React), /client (rpc runtime), /jobs, /sqlite (cần node:sqlite). */
3
5
  export * from "./core/engine.js"; // defineCell, Ctx, CellDef, Loader, Action, Hydration
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { createElement as h, useState, useSyncExternalStore } from "react";
2
4
  import { debug } from "./store";
3
5
  import { setChaos, getChaos, setDevBackend, getDevBackend } from "../core/client";
package/lib/react/Nav.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright (c) 2026 nmvuong92
3
+ // SPDX-License-Identifier: Apache-2.0
2
4
  /* <Nav/> — render menu khai báo (app/nav.ts) bằng <Link>. Active set bởi shellScript (vanilla)
3
5
  * theo path → chạy cả trên trang static. <Link> cho SPA nav trên trang island. */
4
6
  import { Link } from "./Link";
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright (c) 2026 nmvuong92
3
+ // SPDX-License-Identifier: Apache-2.0
2
4
  /* <ThemeToggle/> — nút đổi light/dark. Render HTML thuần + marker; logic do shellScript (vanilla)
3
5
  * xử lý → chạy cả trên trang static (0 React JS). Không cần hydrate. */
4
6
  export function ThemeToggle() {
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* @fluxe/react — devtools lite: data fetching + tracing + debug bar.
2
4
  * Dùng: useQuery / useMutation trong cell; mount <DebugBar/> 1 lần. */
3
5
  export { useQuery } from "./query";
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { useState } from "react";
2
4
  import { debug } from "./store";
3
5
  import { lastRpcMeta } from "../core/client";
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Client nav controller — wire phần thuần (nav.ts) với DOM/history/fetch.
2
4
  * KHÔNG import cells/router (giữ client bundle sạch server code) → "internal?" = cùng origin +
3
5
  * server trả về cell hợp lệ. window/history/location chỉ đụng trong hàm (an toàn SSR import). */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { useState, useEffect, useRef } from "react";
2
4
  import { debug } from "./store";
3
5
  import { lastRpcMeta } from "../core/client";
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* shellScript — JS vanilla TÍ HON chạy trên MỌI trang (kể cả static 0-React-JS) để:
2
4
  * - no-flash theme: đọc localStorage.theme → set data-theme ngay khi parse (trước content).
3
5
  * - nút .theme-toggle: đổi light/dark + lưu localStorage (không cần React hydrate).
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* @fluxe/react — debug store + tracing (lite). Mọi query/mutation/error ghi vào đây;
2
4
  * DebugBar subscribe để hiển thị "full flow". Immutable update → useSyncExternalStore re-render. */
3
5
  const MAX = 50;
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  /* Theme — light/dark/auto qua data-theme trên <html> + localStorage. SSR-safe (window chỉ
2
4
  * đụng trong effect/handler). "auto" = theo OS (prefers-color-scheme) → static cell 0 JS vẫn
3
5
  * dark được nhờ CSS @media, không cần script. */
@@ -1,3 +1,5 @@
1
+ // Copyright (c) 2026 nmvuong92
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import http from "node:http";
2
4
  import { readFileSync, existsSync } from "node:fs";
3
5
  import { PassThrough } from "node:stream";
package/package.json CHANGED
@@ -1,17 +1,49 @@
1
1
  {
2
2
  "name": "@nmvuong92/fluxe",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "fluxe — khung fullstack tối giản polyglot (RCA: Resolved Cell Architecture).",
5
+ "license": "Apache-2.0",
6
+ "author": "nmvuong92",
5
7
  "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/nmvuong92/fluxe.git"
11
+ },
12
+ "homepage": "https://github.com/nmvuong92/fluxe#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/nmvuong92/fluxe/issues"
15
+ },
6
16
  "exports": {
7
- ".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
8
- "./react": { "types": "./lib/react/index.d.ts", "default": "./lib/react/index.js" },
9
- "./client": { "types": "./lib/core/client.d.ts", "default": "./lib/core/client.js" },
10
- "./jobs": { "types": "./lib/core/jobs.d.ts", "default": "./lib/core/jobs.js" },
11
- "./sqlite": { "types": "./lib/backends/sqlite.d.ts", "default": "./lib/backends/sqlite.js" }
17
+ ".": {
18
+ "types": "./lib/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./react": {
22
+ "types": "./lib/react/index.d.ts",
23
+ "default": "./lib/react/index.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/core/client.d.ts",
27
+ "default": "./lib/core/client.js"
28
+ },
29
+ "./jobs": {
30
+ "types": "./lib/core/jobs.d.ts",
31
+ "default": "./lib/core/jobs.js"
32
+ },
33
+ "./sqlite": {
34
+ "types": "./lib/backends/sqlite.d.ts",
35
+ "default": "./lib/backends/sqlite.js"
36
+ }
37
+ },
38
+ "files": [
39
+ "lib",
40
+ "README.md",
41
+ "LICENSE",
42
+ "NOTICE"
43
+ ],
44
+ "publishConfig": {
45
+ "access": "public"
12
46
  },
13
- "files": ["lib", "README.md"],
14
- "publishConfig": { "access": "public" },
15
47
  "scripts": {
16
48
  "typecheck": "tsc --noEmit",
17
49
  "sync": "tsx scripts/sync.ts",
@@ -25,9 +57,26 @@
25
57
  "resolve": "npm run sync && tsx scripts/resolve.ts",
26
58
  "fx": "tsx bin/fx.ts",
27
59
  "build": "rm -rf lib && tsc -p tsconfig.build.json",
28
- "prepublishOnly": "npm run build"
60
+ "prepublishOnly": "npm run build",
61
+ "release": "npm run test:all && npm version patch -m 'release: v%s' && git push --follow-tags",
62
+ "release:minor": "npm run test:all && npm version minor -m 'release: v%s' && git push --follow-tags",
63
+ "release:major": "npm run test:all && npm version major -m 'release: v%s' && git push --follow-tags"
64
+ },
65
+ "dependencies": {
66
+ "zod": "^3"
67
+ },
68
+ "peerDependencies": {
69
+ "react": "^18 || ^19",
70
+ "react-dom": "^18 || ^19"
29
71
  },
30
- "dependencies": { "zod": "^3" },
31
- "peerDependencies": { "react": "^18 || ^19", "react-dom": "^18 || ^19" },
32
- "devDependencies": { "typescript": "^5", "tsx": "^4", "esbuild": "^0.23", "react": "^18", "react-dom": "^18", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18" }
72
+ "devDependencies": {
73
+ "typescript": "^5",
74
+ "tsx": "^4",
75
+ "esbuild": "^0.23",
76
+ "react": "^18",
77
+ "react-dom": "^18",
78
+ "@types/node": "^20",
79
+ "@types/react": "^18",
80
+ "@types/react-dom": "^18"
81
+ }
33
82
  }