@zerotal/client 1.7.2 → 1.7.3
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/CHANGELOG.md +4 -5
- package/api-surface.md +25 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,10 +11,10 @@ follows the Zerotal monorepo's unified versioning.
|
|
|
11
11
|
### Fixed
|
|
12
12
|
|
|
13
13
|
- **The documented import could not be bundled for a browser.** `import { Socket } from
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
"@zerotal/client"` — the line the broadcasting guide taught — failed with `Browser build cannot
|
|
15
|
+
import() Bun builtin: "bun"`. The root entry also exports `ClientProvider`, which extends core's
|
|
16
16
|
`ServiceProvider`, which reaches `CommandRunner`, which reaches the built-in CLI commands, one of
|
|
17
|
-
which does `await import("bun")`. That is a
|
|
17
|
+
which does `await import("bun")`. That is a _resolution_-time error, so tree-shaking never got the
|
|
18
18
|
chance to drop the half nobody in a browser wanted: one server-only export made the whole package
|
|
19
19
|
unusable in the environment it exists for.
|
|
20
20
|
|
|
@@ -29,14 +29,13 @@ follows the Zerotal monorepo's unified versioning.
|
|
|
29
29
|
browser entry re-exporting it from the barrel pulls the barrel back in — the first attempt at this
|
|
30
30
|
fix did exactly that and bundled straight back into the same error. And the modules a browser can
|
|
31
31
|
reach now import from narrow core subpaths (`@zerotal/core/errors`, `@zerotal/core/helpers`)
|
|
32
|
-
rather than the root, because importing
|
|
32
|
+
rather than the root, because importing _anything at all_ from core's root is enough to poison a
|
|
33
33
|
browser bundle.
|
|
34
34
|
|
|
35
35
|
Guarded by a test that runs `Bun.build` with `target: "browser"` — no unit test can see this,
|
|
36
36
|
since every module imports fine under Bun — plus one that holds the browser entry in step with
|
|
37
37
|
the barrel, since two entry points means two places to remember to add an export to.
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
## [1.0.3] — 2026-08-07
|
|
41
40
|
|
|
42
41
|
### Changed
|
package/api-surface.md
CHANGED
|
@@ -289,6 +289,31 @@ type SocketState = 'error' | 'connecting' | 'connected' | 'disconnected' | 'reco
|
|
|
289
289
|
|
|
290
290
|
type TokenSource = string | (() => string | null | undefined | Promise<string | null | undefined>)
|
|
291
291
|
|
|
292
|
+
## ./provider `(./src/provider/ClientProvider.ts)`
|
|
293
|
+
|
|
294
|
+
class ClientProvider = {
|
|
295
|
+
new (app: Application): ClientProvider
|
|
296
|
+
static dependsOn?: (new (app: Application) => ServiceProvider)[]
|
|
297
|
+
static environments: AppEnvironment[]
|
|
298
|
+
static priority?: number
|
|
299
|
+
static provides: readonly ['client']
|
|
300
|
+
devProcesses: () => DevProcessDefinition[]
|
|
301
|
+
doctorChecks: () => DoctorCheck[]
|
|
302
|
+
onBooted: () => Promise<void>
|
|
303
|
+
onBooting: () => Promise<void>
|
|
304
|
+
onRegister: () => void
|
|
305
|
+
onRequestProcessed: (_ctx: HttpContext) => Promise<void>
|
|
306
|
+
onRequestReceived: (_ctx: HttpContext) => Promise<void>
|
|
307
|
+
onResponseSent: (_ctx: HttpContext) => Promise<void>
|
|
308
|
+
onStarted: () => Promise<void>
|
|
309
|
+
onStarting: () => Promise<void>
|
|
310
|
+
onStopped: () => Promise<void>
|
|
311
|
+
onStopping: () => Promise<void>
|
|
312
|
+
replContext: () => Record<string, unknown>
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const Client = ApiClient<Partial<Record<`GET ${string}` | `POST ${string}` | `PUT ${string}` | `PATCH ${string}` | `DELETE ${string}`, RouteShape>>>
|
|
316
|
+
|
|
292
317
|
## ./Socket `(./src/Socket.ts)`
|
|
293
318
|
|
|
294
319
|
class Channel = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/client",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@zerotal/core": "1.7.
|
|
38
|
+
"@zerotal/core": "1.7.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "^5.8.0"
|