@zintrust/core 0.4.67 → 0.4.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/core",
3
- "version": "0.4.67",
3
+ "version": "0.4.68",
4
4
  "description": "Production-grade TypeScript backend framework for JavaScript",
5
5
  "homepage": "https://zintrust.com",
6
6
  "repository": {
@@ -2,5 +2,9 @@ declare const _default: {
2
2
  fetch(request: Request, _env: unknown, _ctx: unknown): Promise<Response>;
3
3
  };
4
4
  export default _default;
5
- export { ZintrustSocketHub } from '@zintrust/socket';
5
+ export declare class ZintrustSocketHub {
6
+ private readonly delegate;
7
+ constructor(state: unknown, env: unknown);
8
+ fetch(request: Request): Promise<Response>;
9
+ }
6
10
  //# sourceMappingURL=cloudflare.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../../src/functions/cloudflare.ts"],"names":[],"mappings":";mBAiOuB,OAAO,QAAQ,OAAO,QAAQ,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;;AADhF,wBA+CE;AAEF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../../src/functions/cloudflare.ts"],"names":[],"mappings":";mBA+OuB,OAAO,QAAQ,OAAO,QAAQ,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;;AADhF,wBA+CE;AAGF,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;gBAExC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO;IAKlC,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;CAkBjD"}
@@ -172,6 +172,9 @@ const ensureStartupConfigOverridesLoaded = async () => {
172
172
  startupConfigOverridesPromise ??= applyStartupConfigOverrides();
173
173
  await startupConfigOverridesPromise;
174
174
  };
175
+ const getRegisteredSocketHubClass = () => {
176
+ return globalThis.__zintrustSocketHubClass;
177
+ };
175
178
  export default {
176
179
  async fetch(request, _env, _ctx) {
177
180
  try {
@@ -215,4 +218,25 @@ export default {
215
218
  }
216
219
  },
217
220
  };
218
- export { ZintrustSocketHub } from '@zintrust/socket';
221
+ // eslint-disable-next-line no-restricted-syntax -- Cloudflare Durable Objects require class exports.
222
+ export class ZintrustSocketHub {
223
+ delegate;
224
+ constructor(state, env) {
225
+ const HubClass = getRegisteredSocketHubClass();
226
+ this.delegate = HubClass ? new HubClass(state, env) : null;
227
+ }
228
+ async fetch(request) {
229
+ if (this.delegate !== null) {
230
+ return this.delegate.fetch(request);
231
+ }
232
+ return new Response(JSON.stringify({
233
+ error: 'socket_runtime_unavailable',
234
+ message: 'Socket durable object support requires the optional @zintrust/socket package.',
235
+ }), {
236
+ status: 503,
237
+ headers: {
238
+ 'content-type': 'application/json',
239
+ },
240
+ });
241
+ }
242
+ }
package/src/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @zintrust/core v0.4.67
2
+ * @zintrust/core v0.4.68
3
3
  *
4
4
  * ZinTrust Framework - Production-Grade TypeScript Backend
5
5
  * Built for performance, type safety, and exceptional developer experience
6
6
  *
7
7
  * Build Information:
8
- * Built: 2026-04-06T10:02:30.824Z
8
+ * Built: 2026-04-06T11:26:22.690Z
9
9
  * Node: >=20.0.0
10
10
  * License: MIT
11
11
  *
@@ -21,7 +21,7 @@
21
21
  * Available at runtime for debugging and health checks
22
22
  */
23
23
  export const ZINTRUST_VERSION = '0.1.41';
24
- export const ZINTRUST_BUILD_DATE = '2026-04-06T10:02:30.746Z'; // Replaced during build
24
+ export const ZINTRUST_BUILD_DATE = '2026-04-06T11:26:22.656Z'; // Replaced during build
25
25
  export { Application } from './boot/Application.js';
26
26
  export { AwsSigV4 } from './common/index.js';
27
27
  export { SignedRequest } from './security/SignedRequest.js';