@orpc/server 0.0.0-next.add5acf → 0.0.0-next.af087fc

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.
@@ -24,9 +24,9 @@ interface experimental_EncodeHibernationRPCEventOptions extends StandardRPCJsonS
24
24
  *
25
25
  * @see {@link https://orpc.unnoq.com/docs/plugins/hibernation Hibernation Plugin}
26
26
  */
27
- declare function experimental_encodeHibernationRPCEvent(id: string, payload: unknown, options?: experimental_EncodeHibernationRPCEventOptions): string;
27
+ declare function experimental_encodeHibernationRPCEvent(id: number, payload: unknown, options?: experimental_EncodeHibernationRPCEventOptions): string;
28
28
 
29
- interface experimental_HibernationPluginContext {
29
+ interface experimental_HibernationContext {
30
30
  iterator?: experimental_HibernationEventIterator<any>;
31
31
  }
32
32
  /**
@@ -35,10 +35,10 @@ interface experimental_HibernationPluginContext {
35
35
  * @see {@link https://orpc.unnoq.com/docs/plugins/hibernation Hibernation Plugin}
36
36
  */
37
37
  declare class experimental_HibernationPlugin<T extends Context> implements StandardHandlerPlugin<T> {
38
- readonly CONTEXT_SYMBOL: symbol;
38
+ readonly HIBERNATION_CONTEXT_SYMBOL: symbol;
39
39
  order: number;
40
40
  init(options: StandardHandlerOptions<T>, _router: Router<any, T>): void;
41
41
  }
42
42
 
43
43
  export { experimental_HibernationPlugin, experimental_encodeHibernationRPCEvent };
44
- export type { experimental_EncodeHibernationRPCEventOptions, experimental_HibernationPluginContext };
44
+ export type { experimental_EncodeHibernationRPCEventOptions, experimental_HibernationContext };
@@ -24,9 +24,9 @@ interface experimental_EncodeHibernationRPCEventOptions extends StandardRPCJsonS
24
24
  *
25
25
  * @see {@link https://orpc.unnoq.com/docs/plugins/hibernation Hibernation Plugin}
26
26
  */
27
- declare function experimental_encodeHibernationRPCEvent(id: string, payload: unknown, options?: experimental_EncodeHibernationRPCEventOptions): string;
27
+ declare function experimental_encodeHibernationRPCEvent(id: number, payload: unknown, options?: experimental_EncodeHibernationRPCEventOptions): string;
28
28
 
29
- interface experimental_HibernationPluginContext {
29
+ interface experimental_HibernationContext {
30
30
  iterator?: experimental_HibernationEventIterator<any>;
31
31
  }
32
32
  /**
@@ -35,10 +35,10 @@ interface experimental_HibernationPluginContext {
35
35
  * @see {@link https://orpc.unnoq.com/docs/plugins/hibernation Hibernation Plugin}
36
36
  */
37
37
  declare class experimental_HibernationPlugin<T extends Context> implements StandardHandlerPlugin<T> {
38
- readonly CONTEXT_SYMBOL: symbol;
38
+ readonly HIBERNATION_CONTEXT_SYMBOL: symbol;
39
39
  order: number;
40
40
  init(options: StandardHandlerOptions<T>, _router: Router<any, T>): void;
41
41
  }
42
42
 
43
43
  export { experimental_HibernationPlugin, experimental_encodeHibernationRPCEvent };
44
- export type { experimental_EncodeHibernationRPCEventOptions, experimental_HibernationPluginContext };
44
+ export type { experimental_EncodeHibernationRPCEventOptions, experimental_HibernationContext };
@@ -22,7 +22,7 @@ function experimental_encodeHibernationRPCEvent(id, payload, options = {}) {
22
22
  }
23
23
 
24
24
  class experimental_HibernationPlugin {
25
- CONTEXT_SYMBOL = Symbol("ORPC_HIBERNATION_CONTEXT");
25
+ HIBERNATION_CONTEXT_SYMBOL = Symbol("HIBERNATION_CONTEXT");
26
26
  order = 2e6;
27
27
  // make sure execute after the batch plugin
28
28
  init(options, _router) {
@@ -33,7 +33,7 @@ class experimental_HibernationPlugin {
33
33
  const result = await options2.next({
34
34
  ...options2,
35
35
  context: {
36
- [this.CONTEXT_SYMBOL]: hibernationContext,
36
+ [this.HIBERNATION_CONTEXT_SYMBOL]: hibernationContext,
37
37
  ...options2.context
38
38
  }
39
39
  });
@@ -49,7 +49,7 @@ class experimental_HibernationPlugin {
49
49
  };
50
50
  });
51
51
  options.clientInterceptors.unshift(async (options2) => {
52
- const hibernationContext = options2.context[this.CONTEXT_SYMBOL];
52
+ const hibernationContext = options2.context[this.HIBERNATION_CONTEXT_SYMBOL];
53
53
  if (!hibernationContext) {
54
54
  throw new TypeError("[HibernationPlugin] Hibernation context has been corrupted or modified by another plugin or interceptor");
55
55
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/server",
3
3
  "type": "module",
4
- "version": "0.0.0-next.add5acf",
4
+ "version": "0.0.0-next.af087fc",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -91,19 +91,19 @@
91
91
  }
92
92
  },
93
93
  "dependencies": {
94
- "@orpc/client": "0.0.0-next.add5acf",
95
- "@orpc/contract": "0.0.0-next.add5acf",
96
- "@orpc/standard-server": "0.0.0-next.add5acf",
97
- "@orpc/shared": "0.0.0-next.add5acf",
98
- "@orpc/standard-server-aws-lambda": "0.0.0-next.add5acf",
99
- "@orpc/standard-server-node": "0.0.0-next.add5acf",
100
- "@orpc/standard-server-fetch": "0.0.0-next.add5acf",
101
- "@orpc/standard-server-peer": "0.0.0-next.add5acf"
94
+ "@orpc/client": "0.0.0-next.af087fc",
95
+ "@orpc/shared": "0.0.0-next.af087fc",
96
+ "@orpc/contract": "0.0.0-next.af087fc",
97
+ "@orpc/standard-server": "0.0.0-next.af087fc",
98
+ "@orpc/standard-server-aws-lambda": "0.0.0-next.af087fc",
99
+ "@orpc/standard-server-fetch": "0.0.0-next.af087fc",
100
+ "@orpc/standard-server-node": "0.0.0-next.af087fc",
101
+ "@orpc/standard-server-peer": "0.0.0-next.af087fc"
102
102
  },
103
103
  "devDependencies": {
104
104
  "@types/ws": "^8.18.1",
105
105
  "crossws": "^0.4.1",
106
- "next": "^15.3.4",
106
+ "next": "^15.3.0",
107
107
  "supertest": "^7.1.0",
108
108
  "ws": "^8.18.1"
109
109
  },