@oasiz/sdk 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/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @oasiz/sdk
2
+
3
+ Typed SDK for Oasiz game bridge APIs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @oasiz/sdk
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { oasis } from "@oasiz/sdk";
15
+
16
+ oasis.emitScoreConfig({
17
+ anchors: [
18
+ { raw: 30, normalized: 100 },
19
+ { raw: 60, normalized: 300 },
20
+ { raw: 120, normalized: 600 },
21
+ { raw: 300, normalized: 950 },
22
+ ],
23
+ });
24
+
25
+ const saved = oasis.loadGameState();
26
+ oasis.saveGameState({ ...saved, level: 3 });
27
+ oasis.triggerHaptic("light");
28
+ oasis.submitScore(42);
29
+ ```
30
+
31
+ ## API
32
+
33
+ - `submitScore(score)`
34
+ - `emitScoreConfig(config)`
35
+ - `triggerHaptic(type)`
36
+ - `loadGameState()`
37
+ - `saveGameState(state)`
38
+ - `flushGameState()`
39
+ - `shareRoomCode(code)`
40
+ - `onPause(callback)`
41
+ - `onResume(callback)`
42
+ - `oasis.gameId`, `oasis.roomCode`, `oasis.playerName`, `oasis.playerAvatar`
package/dist/index.cjs ADDED
@@ -0,0 +1,277 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ emitScoreConfig: () => emitScoreConfig,
24
+ flushGameState: () => flushGameState,
25
+ getGameId: () => getGameId,
26
+ getPlayerAvatar: () => getPlayerAvatar,
27
+ getPlayerName: () => getPlayerName,
28
+ getRoomCode: () => getRoomCode,
29
+ loadGameState: () => loadGameState,
30
+ oasis: () => oasis,
31
+ onPause: () => onPause,
32
+ onResume: () => onResume,
33
+ saveGameState: () => saveGameState,
34
+ shareRoomCode: () => shareRoomCode,
35
+ submitScore: () => submitScore,
36
+ triggerHaptic: () => triggerHaptic
37
+ });
38
+ module.exports = __toCommonJS(index_exports);
39
+
40
+ // src/haptics.ts
41
+ function isDevelopment() {
42
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
43
+ return nodeEnv !== "production";
44
+ }
45
+ function getBridgeWindow() {
46
+ if (typeof window === "undefined") {
47
+ return void 0;
48
+ }
49
+ return window;
50
+ }
51
+ function triggerHaptic(type) {
52
+ const bridge = getBridgeWindow();
53
+ if (typeof bridge?.triggerHaptic === "function") {
54
+ bridge.triggerHaptic(type);
55
+ return;
56
+ }
57
+ if (isDevelopment()) {
58
+ console.warn(
59
+ "[oasiz/sdk] triggerHaptic bridge is unavailable. This is expected in local development."
60
+ );
61
+ }
62
+ }
63
+
64
+ // src/multiplayer.ts
65
+ function isDevelopment2() {
66
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
67
+ return nodeEnv !== "production";
68
+ }
69
+ function getBridgeWindow2() {
70
+ if (typeof window === "undefined") {
71
+ return void 0;
72
+ }
73
+ return window;
74
+ }
75
+ function shareRoomCode(roomCode) {
76
+ const bridge = getBridgeWindow2();
77
+ if (typeof bridge?.shareRoomCode === "function") {
78
+ bridge.shareRoomCode(roomCode);
79
+ return;
80
+ }
81
+ if (isDevelopment2()) {
82
+ console.warn(
83
+ "[oasiz/sdk] shareRoomCode bridge is unavailable. This is expected in local development."
84
+ );
85
+ }
86
+ }
87
+ function getGameId() {
88
+ const bridge = getBridgeWindow2();
89
+ return bridge?.__GAME_ID__;
90
+ }
91
+ function getRoomCode() {
92
+ const bridge = getBridgeWindow2();
93
+ return bridge?.__ROOM_CODE__;
94
+ }
95
+ function getPlayerName() {
96
+ const bridge = getBridgeWindow2();
97
+ return bridge?.__PLAYER_NAME__;
98
+ }
99
+ function getPlayerAvatar() {
100
+ const bridge = getBridgeWindow2();
101
+ return bridge?.__PLAYER_AVATAR__;
102
+ }
103
+
104
+ // src/score.ts
105
+ function isDevelopment3() {
106
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
107
+ return nodeEnv !== "production";
108
+ }
109
+ function warnMissingBridge(methodName) {
110
+ if (isDevelopment3()) {
111
+ console.warn(
112
+ "[oasiz/sdk] " + methodName + " bridge is unavailable. This is expected in local development."
113
+ );
114
+ }
115
+ }
116
+ function getBridgeWindow3() {
117
+ if (typeof window === "undefined") {
118
+ return void 0;
119
+ }
120
+ return window;
121
+ }
122
+ function submitScore(score) {
123
+ if (!Number.isFinite(score)) {
124
+ if (isDevelopment3()) {
125
+ console.warn("[oasiz/sdk] submitScore expected a finite number:", score);
126
+ }
127
+ return;
128
+ }
129
+ const bridge = getBridgeWindow3();
130
+ const normalizedScore = Math.max(0, Math.floor(score));
131
+ if (typeof bridge?.submitScore === "function") {
132
+ bridge.submitScore(normalizedScore);
133
+ return;
134
+ }
135
+ warnMissingBridge("submitScore");
136
+ }
137
+ function emitScoreConfig(config) {
138
+ const bridge = getBridgeWindow3();
139
+ if (typeof bridge?.emitScoreConfig === "function") {
140
+ bridge.emitScoreConfig(config);
141
+ return;
142
+ }
143
+ warnMissingBridge("emitScoreConfig");
144
+ }
145
+
146
+ // src/state.ts
147
+ function isDevelopment4() {
148
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
149
+ return nodeEnv !== "production";
150
+ }
151
+ function getBridgeWindow4() {
152
+ if (typeof window === "undefined") {
153
+ return void 0;
154
+ }
155
+ return window;
156
+ }
157
+ function isPlainObject(value) {
158
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
159
+ return false;
160
+ }
161
+ const proto = Object.getPrototypeOf(value);
162
+ return proto === Object.prototype || proto === null;
163
+ }
164
+ function warnMissingBridge2(methodName) {
165
+ if (isDevelopment4()) {
166
+ console.warn(
167
+ "[oasiz/sdk] " + methodName + " bridge is unavailable. This is expected in local development."
168
+ );
169
+ }
170
+ }
171
+ function loadGameState() {
172
+ const bridge = getBridgeWindow4();
173
+ if (typeof bridge?.loadGameState !== "function") {
174
+ warnMissingBridge2("loadGameState");
175
+ return {};
176
+ }
177
+ const state = bridge.loadGameState();
178
+ if (!isPlainObject(state)) {
179
+ if (isDevelopment4()) {
180
+ console.warn(
181
+ "[oasiz/sdk] loadGameState returned invalid data. Falling back to empty object."
182
+ );
183
+ }
184
+ return {};
185
+ }
186
+ return state;
187
+ }
188
+ function saveGameState(state) {
189
+ if (!isPlainObject(state)) {
190
+ if (isDevelopment4()) {
191
+ console.warn("[oasiz/sdk] saveGameState expected a plain object:", state);
192
+ }
193
+ return;
194
+ }
195
+ const bridge = getBridgeWindow4();
196
+ if (typeof bridge?.saveGameState === "function") {
197
+ bridge.saveGameState(state);
198
+ return;
199
+ }
200
+ warnMissingBridge2("saveGameState");
201
+ }
202
+ function flushGameState() {
203
+ const bridge = getBridgeWindow4();
204
+ if (typeof bridge?.flushGameState === "function") {
205
+ bridge.flushGameState();
206
+ return;
207
+ }
208
+ warnMissingBridge2("flushGameState");
209
+ }
210
+
211
+ // src/lifecycle.ts
212
+ function isDevelopment5() {
213
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
214
+ return nodeEnv !== "production";
215
+ }
216
+ function addLifecycleListener(eventName, callback) {
217
+ if (typeof window === "undefined") {
218
+ if (isDevelopment5()) {
219
+ console.warn(
220
+ "[oasiz/sdk] " + eventName + " listener registered without a browser window. This is expected in local development."
221
+ );
222
+ }
223
+ return () => {
224
+ };
225
+ }
226
+ const handler = () => callback();
227
+ window.addEventListener(eventName, handler);
228
+ return () => window.removeEventListener(eventName, handler);
229
+ }
230
+ function onPause(callback) {
231
+ return addLifecycleListener("oasiz:pause", callback);
232
+ }
233
+ function onResume(callback) {
234
+ return addLifecycleListener("oasiz:resume", callback);
235
+ }
236
+
237
+ // src/index.ts
238
+ var oasis = {
239
+ submitScore,
240
+ emitScoreConfig,
241
+ triggerHaptic,
242
+ loadGameState,
243
+ saveGameState,
244
+ flushGameState,
245
+ shareRoomCode,
246
+ onPause,
247
+ onResume,
248
+ get gameId() {
249
+ return getGameId();
250
+ },
251
+ get roomCode() {
252
+ return getRoomCode();
253
+ },
254
+ get playerName() {
255
+ return getPlayerName();
256
+ },
257
+ get playerAvatar() {
258
+ return getPlayerAvatar();
259
+ }
260
+ };
261
+ // Annotate the CommonJS export names for ESM import in node:
262
+ 0 && (module.exports = {
263
+ emitScoreConfig,
264
+ flushGameState,
265
+ getGameId,
266
+ getPlayerAvatar,
267
+ getPlayerName,
268
+ getRoomCode,
269
+ loadGameState,
270
+ oasis,
271
+ onPause,
272
+ onResume,
273
+ saveGameState,
274
+ shareRoomCode,
275
+ submitScore,
276
+ triggerHaptic
277
+ });
@@ -0,0 +1,46 @@
1
+ type HapticType = "light" | "medium" | "heavy" | "success" | "error";
2
+ interface ScoreAnchor {
3
+ raw: number;
4
+ normalized: 100 | 300 | 600 | 950;
5
+ }
6
+ interface ScoreConfig {
7
+ anchors: [ScoreAnchor, ScoreAnchor, ScoreAnchor, ScoreAnchor];
8
+ }
9
+ type GameState = Record<string, unknown>;
10
+
11
+ declare function triggerHaptic(type: HapticType): void;
12
+
13
+ declare function shareRoomCode(roomCode: string | null): void;
14
+ declare function getGameId(): string | undefined;
15
+ declare function getRoomCode(): string | undefined;
16
+ declare function getPlayerName(): string | undefined;
17
+ declare function getPlayerAvatar(): string | undefined;
18
+
19
+ declare function submitScore(score: number): void;
20
+ declare function emitScoreConfig(config: ScoreConfig): void;
21
+
22
+ declare function loadGameState(): GameState;
23
+ declare function saveGameState(state: GameState): void;
24
+ declare function flushGameState(): void;
25
+
26
+ type Unsubscribe = () => void;
27
+ declare function onPause(callback: () => void): Unsubscribe;
28
+ declare function onResume(callback: () => void): Unsubscribe;
29
+
30
+ declare const oasis: {
31
+ submitScore: typeof submitScore;
32
+ emitScoreConfig: typeof emitScoreConfig;
33
+ triggerHaptic: typeof triggerHaptic;
34
+ loadGameState: typeof loadGameState;
35
+ saveGameState: typeof saveGameState;
36
+ flushGameState: typeof flushGameState;
37
+ shareRoomCode: typeof shareRoomCode;
38
+ onPause: typeof onPause;
39
+ onResume: typeof onResume;
40
+ readonly gameId: string | undefined;
41
+ readonly roomCode: string | undefined;
42
+ readonly playerName: string | undefined;
43
+ readonly playerAvatar: string | undefined;
44
+ };
45
+
46
+ export { type GameState, type HapticType, type ScoreAnchor, type ScoreConfig, type Unsubscribe, emitScoreConfig, flushGameState, getGameId, getPlayerAvatar, getPlayerName, getRoomCode, loadGameState, oasis, onPause, onResume, saveGameState, shareRoomCode, submitScore, triggerHaptic };
@@ -0,0 +1,46 @@
1
+ type HapticType = "light" | "medium" | "heavy" | "success" | "error";
2
+ interface ScoreAnchor {
3
+ raw: number;
4
+ normalized: 100 | 300 | 600 | 950;
5
+ }
6
+ interface ScoreConfig {
7
+ anchors: [ScoreAnchor, ScoreAnchor, ScoreAnchor, ScoreAnchor];
8
+ }
9
+ type GameState = Record<string, unknown>;
10
+
11
+ declare function triggerHaptic(type: HapticType): void;
12
+
13
+ declare function shareRoomCode(roomCode: string | null): void;
14
+ declare function getGameId(): string | undefined;
15
+ declare function getRoomCode(): string | undefined;
16
+ declare function getPlayerName(): string | undefined;
17
+ declare function getPlayerAvatar(): string | undefined;
18
+
19
+ declare function submitScore(score: number): void;
20
+ declare function emitScoreConfig(config: ScoreConfig): void;
21
+
22
+ declare function loadGameState(): GameState;
23
+ declare function saveGameState(state: GameState): void;
24
+ declare function flushGameState(): void;
25
+
26
+ type Unsubscribe = () => void;
27
+ declare function onPause(callback: () => void): Unsubscribe;
28
+ declare function onResume(callback: () => void): Unsubscribe;
29
+
30
+ declare const oasis: {
31
+ submitScore: typeof submitScore;
32
+ emitScoreConfig: typeof emitScoreConfig;
33
+ triggerHaptic: typeof triggerHaptic;
34
+ loadGameState: typeof loadGameState;
35
+ saveGameState: typeof saveGameState;
36
+ flushGameState: typeof flushGameState;
37
+ shareRoomCode: typeof shareRoomCode;
38
+ onPause: typeof onPause;
39
+ onResume: typeof onResume;
40
+ readonly gameId: string | undefined;
41
+ readonly roomCode: string | undefined;
42
+ readonly playerName: string | undefined;
43
+ readonly playerAvatar: string | undefined;
44
+ };
45
+
46
+ export { type GameState, type HapticType, type ScoreAnchor, type ScoreConfig, type Unsubscribe, emitScoreConfig, flushGameState, getGameId, getPlayerAvatar, getPlayerName, getRoomCode, loadGameState, oasis, onPause, onResume, saveGameState, shareRoomCode, submitScore, triggerHaptic };
package/dist/index.js ADDED
@@ -0,0 +1,237 @@
1
+ // src/haptics.ts
2
+ function isDevelopment() {
3
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
4
+ return nodeEnv !== "production";
5
+ }
6
+ function getBridgeWindow() {
7
+ if (typeof window === "undefined") {
8
+ return void 0;
9
+ }
10
+ return window;
11
+ }
12
+ function triggerHaptic(type) {
13
+ const bridge = getBridgeWindow();
14
+ if (typeof bridge?.triggerHaptic === "function") {
15
+ bridge.triggerHaptic(type);
16
+ return;
17
+ }
18
+ if (isDevelopment()) {
19
+ console.warn(
20
+ "[oasiz/sdk] triggerHaptic bridge is unavailable. This is expected in local development."
21
+ );
22
+ }
23
+ }
24
+
25
+ // src/multiplayer.ts
26
+ function isDevelopment2() {
27
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
28
+ return nodeEnv !== "production";
29
+ }
30
+ function getBridgeWindow2() {
31
+ if (typeof window === "undefined") {
32
+ return void 0;
33
+ }
34
+ return window;
35
+ }
36
+ function shareRoomCode(roomCode) {
37
+ const bridge = getBridgeWindow2();
38
+ if (typeof bridge?.shareRoomCode === "function") {
39
+ bridge.shareRoomCode(roomCode);
40
+ return;
41
+ }
42
+ if (isDevelopment2()) {
43
+ console.warn(
44
+ "[oasiz/sdk] shareRoomCode bridge is unavailable. This is expected in local development."
45
+ );
46
+ }
47
+ }
48
+ function getGameId() {
49
+ const bridge = getBridgeWindow2();
50
+ return bridge?.__GAME_ID__;
51
+ }
52
+ function getRoomCode() {
53
+ const bridge = getBridgeWindow2();
54
+ return bridge?.__ROOM_CODE__;
55
+ }
56
+ function getPlayerName() {
57
+ const bridge = getBridgeWindow2();
58
+ return bridge?.__PLAYER_NAME__;
59
+ }
60
+ function getPlayerAvatar() {
61
+ const bridge = getBridgeWindow2();
62
+ return bridge?.__PLAYER_AVATAR__;
63
+ }
64
+
65
+ // src/score.ts
66
+ function isDevelopment3() {
67
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
68
+ return nodeEnv !== "production";
69
+ }
70
+ function warnMissingBridge(methodName) {
71
+ if (isDevelopment3()) {
72
+ console.warn(
73
+ "[oasiz/sdk] " + methodName + " bridge is unavailable. This is expected in local development."
74
+ );
75
+ }
76
+ }
77
+ function getBridgeWindow3() {
78
+ if (typeof window === "undefined") {
79
+ return void 0;
80
+ }
81
+ return window;
82
+ }
83
+ function submitScore(score) {
84
+ if (!Number.isFinite(score)) {
85
+ if (isDevelopment3()) {
86
+ console.warn("[oasiz/sdk] submitScore expected a finite number:", score);
87
+ }
88
+ return;
89
+ }
90
+ const bridge = getBridgeWindow3();
91
+ const normalizedScore = Math.max(0, Math.floor(score));
92
+ if (typeof bridge?.submitScore === "function") {
93
+ bridge.submitScore(normalizedScore);
94
+ return;
95
+ }
96
+ warnMissingBridge("submitScore");
97
+ }
98
+ function emitScoreConfig(config) {
99
+ const bridge = getBridgeWindow3();
100
+ if (typeof bridge?.emitScoreConfig === "function") {
101
+ bridge.emitScoreConfig(config);
102
+ return;
103
+ }
104
+ warnMissingBridge("emitScoreConfig");
105
+ }
106
+
107
+ // src/state.ts
108
+ function isDevelopment4() {
109
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
110
+ return nodeEnv !== "production";
111
+ }
112
+ function getBridgeWindow4() {
113
+ if (typeof window === "undefined") {
114
+ return void 0;
115
+ }
116
+ return window;
117
+ }
118
+ function isPlainObject(value) {
119
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
120
+ return false;
121
+ }
122
+ const proto = Object.getPrototypeOf(value);
123
+ return proto === Object.prototype || proto === null;
124
+ }
125
+ function warnMissingBridge2(methodName) {
126
+ if (isDevelopment4()) {
127
+ console.warn(
128
+ "[oasiz/sdk] " + methodName + " bridge is unavailable. This is expected in local development."
129
+ );
130
+ }
131
+ }
132
+ function loadGameState() {
133
+ const bridge = getBridgeWindow4();
134
+ if (typeof bridge?.loadGameState !== "function") {
135
+ warnMissingBridge2("loadGameState");
136
+ return {};
137
+ }
138
+ const state = bridge.loadGameState();
139
+ if (!isPlainObject(state)) {
140
+ if (isDevelopment4()) {
141
+ console.warn(
142
+ "[oasiz/sdk] loadGameState returned invalid data. Falling back to empty object."
143
+ );
144
+ }
145
+ return {};
146
+ }
147
+ return state;
148
+ }
149
+ function saveGameState(state) {
150
+ if (!isPlainObject(state)) {
151
+ if (isDevelopment4()) {
152
+ console.warn("[oasiz/sdk] saveGameState expected a plain object:", state);
153
+ }
154
+ return;
155
+ }
156
+ const bridge = getBridgeWindow4();
157
+ if (typeof bridge?.saveGameState === "function") {
158
+ bridge.saveGameState(state);
159
+ return;
160
+ }
161
+ warnMissingBridge2("saveGameState");
162
+ }
163
+ function flushGameState() {
164
+ const bridge = getBridgeWindow4();
165
+ if (typeof bridge?.flushGameState === "function") {
166
+ bridge.flushGameState();
167
+ return;
168
+ }
169
+ warnMissingBridge2("flushGameState");
170
+ }
171
+
172
+ // src/lifecycle.ts
173
+ function isDevelopment5() {
174
+ const nodeEnv = globalThis.process?.env?.NODE_ENV;
175
+ return nodeEnv !== "production";
176
+ }
177
+ function addLifecycleListener(eventName, callback) {
178
+ if (typeof window === "undefined") {
179
+ if (isDevelopment5()) {
180
+ console.warn(
181
+ "[oasiz/sdk] " + eventName + " listener registered without a browser window. This is expected in local development."
182
+ );
183
+ }
184
+ return () => {
185
+ };
186
+ }
187
+ const handler = () => callback();
188
+ window.addEventListener(eventName, handler);
189
+ return () => window.removeEventListener(eventName, handler);
190
+ }
191
+ function onPause(callback) {
192
+ return addLifecycleListener("oasiz:pause", callback);
193
+ }
194
+ function onResume(callback) {
195
+ return addLifecycleListener("oasiz:resume", callback);
196
+ }
197
+
198
+ // src/index.ts
199
+ var oasis = {
200
+ submitScore,
201
+ emitScoreConfig,
202
+ triggerHaptic,
203
+ loadGameState,
204
+ saveGameState,
205
+ flushGameState,
206
+ shareRoomCode,
207
+ onPause,
208
+ onResume,
209
+ get gameId() {
210
+ return getGameId();
211
+ },
212
+ get roomCode() {
213
+ return getRoomCode();
214
+ },
215
+ get playerName() {
216
+ return getPlayerName();
217
+ },
218
+ get playerAvatar() {
219
+ return getPlayerAvatar();
220
+ }
221
+ };
222
+ export {
223
+ emitScoreConfig,
224
+ flushGameState,
225
+ getGameId,
226
+ getPlayerAvatar,
227
+ getPlayerName,
228
+ getRoomCode,
229
+ loadGameState,
230
+ oasis,
231
+ onPause,
232
+ onResume,
233
+ saveGameState,
234
+ shareRoomCode,
235
+ submitScore,
236
+ triggerHaptic
237
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@oasiz/sdk",
3
+ "version": "0.1.0",
4
+ "description": "Typed SDK for Oasiz game platform bridge APIs.",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "sideEffects": false,
20
+ "scripts": {
21
+ "build": "tsup src/index.ts --format esm,cjs --dts",
22
+ "prepack": "bun run build",
23
+ "test": "node --experimental-strip-types --test ./tests/**/*.test.ts"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "release": {
29
+ "branches": [
30
+ "main"
31
+ ]
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^25.3.0",
35
+ "semantic-release": "^25.0.3",
36
+ "tsup": "^8.5.1",
37
+ "typescript": "^5.9.3"
38
+ }
39
+ }