@trpc/server 11.0.0-alpha-tmp-export-from-main-nuke-core.219 → 11.0.0-alpha-tmp-export-from-main-nuke-core.227

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.
Files changed (139) hide show
  1. package/dist/@trpc/server/http.d.ts +7 -0
  2. package/dist/@trpc/server/http.d.ts.map +1 -0
  3. package/dist/{@trpc-server.d.ts → @trpc/server/index.d.ts} +4 -4
  4. package/dist/@trpc/server/index.d.ts.map +1 -0
  5. package/dist/@trpc/server/rpc.d.ts +3 -0
  6. package/dist/@trpc/server/rpc.d.ts.map +1 -0
  7. package/dist/{TRPCError-af754aba.mjs → TRPCError-54f51dec.mjs} +1 -1
  8. package/dist/{TRPCError-57838b33.js → TRPCError-6f02e18d.js} +2 -2
  9. package/dist/{TRPCError-ebbde27d.js → TRPCError-792b0901.js} +1 -1
  10. package/dist/adapters/aws-lambda/index.d.ts +1 -2
  11. package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
  12. package/dist/adapters/aws-lambda/index.js +6 -9
  13. package/dist/adapters/aws-lambda/index.mjs +6 -9
  14. package/dist/adapters/aws-lambda/utils.d.ts +2 -3
  15. package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
  16. package/dist/adapters/express.d.ts +1 -2
  17. package/dist/adapters/express.d.ts.map +1 -1
  18. package/dist/adapters/express.js +7 -8
  19. package/dist/adapters/express.mjs +7 -8
  20. package/dist/adapters/fastify/fastifyRequestHandler.d.ts +2 -2
  21. package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
  22. package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +1 -2
  23. package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
  24. package/dist/adapters/fastify/index.js +8 -10
  25. package/dist/adapters/fastify/index.mjs +8 -10
  26. package/dist/adapters/fetch/fetchRequestHandler.d.ts +1 -2
  27. package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
  28. package/dist/adapters/fetch/index.js +6 -8
  29. package/dist/adapters/fetch/index.mjs +6 -8
  30. package/dist/adapters/fetch/types.d.ts +2 -3
  31. package/dist/adapters/fetch/types.d.ts.map +1 -1
  32. package/dist/adapters/next.d.ts +1 -2
  33. package/dist/adapters/next.d.ts.map +1 -1
  34. package/dist/adapters/next.js +7 -9
  35. package/dist/adapters/next.mjs +7 -9
  36. package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +1 -1
  37. package/dist/adapters/node-http/content-type/json/getPostBody.d.ts.map +1 -1
  38. package/dist/adapters/node-http/content-type/json/index.js +3 -4
  39. package/dist/adapters/node-http/content-type/json/index.mjs +3 -4
  40. package/dist/adapters/node-http/index.js +7 -8
  41. package/dist/adapters/node-http/index.mjs +7 -8
  42. package/dist/adapters/node-http/internals/contentType.d.ts +2 -2
  43. package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +1 -2
  44. package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
  45. package/dist/adapters/node-http/types.d.ts +2 -3
  46. package/dist/adapters/node-http/types.d.ts.map +1 -1
  47. package/dist/adapters/standalone.d.ts +1 -2
  48. package/dist/adapters/standalone.d.ts.map +1 -1
  49. package/dist/adapters/standalone.js +7 -8
  50. package/dist/adapters/standalone.mjs +7 -8
  51. package/dist/adapters/ws.d.ts +2 -2
  52. package/dist/adapters/ws.d.ts.map +1 -1
  53. package/dist/adapters/ws.js +6 -7
  54. package/dist/adapters/ws.mjs +6 -7
  55. package/dist/bundle-analysis.json +110 -123
  56. package/dist/{contentType-9756da28.js → contentType-19471015.js} +1 -1
  57. package/dist/{contentType-f93c6ba8.mjs → contentType-2e62862d.mjs} +1 -1
  58. package/dist/{contentType-b31eab56.js → contentType-4cd0be82.js} +1 -1
  59. package/dist/{createProxy-c5cd21e8.js → createProxy-562377d3.js} +1 -1
  60. package/dist/{createProxy-f6960c7b.js → createProxy-72161f42.js} +1 -1
  61. package/dist/{createProxy-7293f632.mjs → createProxy-f7ba8b4d.mjs} +1 -1
  62. package/dist/http.d.ts +1 -6
  63. package/dist/http.d.ts.map +1 -1
  64. package/dist/http.js +6 -7
  65. package/dist/http.mjs +6 -7
  66. package/dist/index.d.ts +1 -1
  67. package/dist/index.js +5 -6
  68. package/dist/index.mjs +5 -6
  69. package/dist/{initTRPC-b65b35e2.js → initTRPC-12d9099b.js} +4 -5
  70. package/dist/{initTRPC-8b5714ea.js → initTRPC-69a60dfb.js} +6 -7
  71. package/dist/{initTRPC-6c16fa27.mjs → initTRPC-dcdfb896.mjs} +4 -5
  72. package/dist/{nodeHTTPRequestHandler-0bc1dc41.js → nodeHTTPRequestHandler-71a3f758.js} +2 -3
  73. package/dist/{nodeHTTPRequestHandler-d8558115.mjs → nodeHTTPRequestHandler-c5d1d163.mjs} +2 -3
  74. package/dist/{nodeHTTPRequestHandler-c7d41cde.js → nodeHTTPRequestHandler-f60f0b99.js} +2 -2
  75. package/dist/observable/index.js +1 -2
  76. package/dist/observable/index.mjs +1 -2
  77. package/dist/observable/observable.d.ts.map +1 -1
  78. package/dist/{observable-cbbc588a.js → observable-25f4098f.js} +4 -3
  79. package/dist/{observable-7233bd21.mjs → observable-bf75028f.mjs} +3 -2
  80. package/dist/{observable-7865c812.js → observable-e837fe43.js} +3 -2
  81. package/dist/{parseTRPCMessage-3ae1b295.js → parseTRPCMessage-aeb00dbd.js} +1 -1
  82. package/dist/{parseTRPCMessage-abbd6862.mjs → parseTRPCMessage-ddbcc719.mjs} +1 -1
  83. package/dist/{parseTRPCMessage-c6022e94.js → parseTRPCMessage-ee50b281.js} +2 -2
  84. package/dist/{resolveHTTPResponse-9e260431.js → resolveHTTPResponse-104460bf.js} +4 -4
  85. package/dist/{resolveHTTPResponse-3133d603.js → resolveHTTPResponse-6a85f0a7.js} +4 -4
  86. package/dist/{resolveHTTPResponse-80c99f62.mjs → resolveHTTPResponse-eb29e5cf.mjs} +4 -4
  87. package/dist/{rootConfig-a1ad09d0.js → rootConfig-52aed7d7.js} +42 -2
  88. package/dist/{rootConfig-f741a4e7.mjs → rootConfig-7d3e1fc8.mjs} +38 -2
  89. package/dist/{rootConfig-db88d377.js → rootConfig-ccd626d6.js} +41 -2
  90. package/dist/{router-68063d64.mjs → router-5a3e1181.mjs} +3 -3
  91. package/dist/{router-c5bd7780.js → router-5e93cd14.js} +3 -3
  92. package/dist/{router-7a7bb4fd.js → router-d9e22315.js} +7 -7
  93. package/dist/rpc.d.ts +1 -2
  94. package/dist/rpc.d.ts.map +1 -1
  95. package/dist/rpc.js +2 -3
  96. package/dist/rpc.mjs +2 -3
  97. package/dist/shared.d.ts +1 -1
  98. package/dist/shared.js +2 -3
  99. package/dist/shared.mjs +2 -3
  100. package/dist/unstable-core-do-not-import/index.d.ts +6 -3
  101. package/dist/unstable-core-do-not-import/index.d.ts.map +1 -1
  102. package/dist/unstable-core-do-not-import/index.js +9 -10
  103. package/dist/unstable-core-do-not-import/index.mjs +8 -9
  104. package/dist/unstable-core-do-not-import/utils.d.ts +0 -4
  105. package/dist/unstable-core-do-not-import/utils.d.ts.map +1 -1
  106. package/package.json +2 -2
  107. package/src/@trpc/server/http.ts +26 -0
  108. package/src/{@trpc-server.ts → @trpc/server/index.ts} +3 -3
  109. package/src/@trpc/server/rpc.ts +26 -0
  110. package/src/adapters/aws-lambda/index.ts +4 -5
  111. package/src/adapters/aws-lambda/utils.ts +3 -4
  112. package/src/adapters/express.ts +2 -7
  113. package/src/adapters/fastify/fastifyRequestHandler.ts +6 -4
  114. package/src/adapters/fastify/fastifyTRPCPlugin.ts +1 -2
  115. package/src/adapters/fetch/fetchRequestHandler.ts +6 -4
  116. package/src/adapters/fetch/types.ts +2 -3
  117. package/src/adapters/next.ts +3 -8
  118. package/src/adapters/node-http/content-type/form-data/index.ts +1 -1
  119. package/src/adapters/node-http/content-type/json/getPostBody.ts +2 -2
  120. package/src/adapters/node-http/content-type/json/index.ts +1 -1
  121. package/src/adapters/node-http/internals/contentType.ts +2 -2
  122. package/src/adapters/node-http/nodeHTTPRequestHandler.ts +6 -4
  123. package/src/adapters/node-http/types.ts +3 -3
  124. package/src/adapters/standalone.ts +2 -3
  125. package/src/adapters/ws.ts +9 -7
  126. package/src/http.ts +1 -26
  127. package/src/index.ts +1 -1
  128. package/src/observable/observable.ts +4 -1
  129. package/src/rpc.ts +1 -26
  130. package/src/shared.ts +1 -1
  131. package/src/unstable-core-do-not-import/index.ts +6 -3
  132. package/src/unstable-core-do-not-import/utils.ts +0 -7
  133. package/dist/@trpc-server/http.d.ts +0 -2
  134. package/dist/@trpc-server/http.d.ts.map +0 -1
  135. package/dist/@trpc-server.d.ts.map +0 -1
  136. package/dist/utils-42a3ba6d.js +0 -50
  137. package/dist/utils-cf6178ec.mjs +0 -44
  138. package/dist/utils-e1d51fac.js +0 -49
  139. package/src/@trpc-server/http.ts +0 -3
@@ -1,50 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * @internal
5
- */ function invert(obj) {
6
- const newObj = Object.create(null);
7
- for(const key in obj){
8
- const v = obj[key];
9
- newObj[v] = key;
10
- }
11
- return newObj;
12
- }
13
- /**
14
- * Ensures there are no duplicate keys when building a procedure.
15
- * @internal
16
- */ function mergeWithoutOverrides(obj1, ...objs) {
17
- const newObj = Object.assign(Object.create(null), obj1);
18
- for (const overrides of objs){
19
- for(const key in overrides){
20
- if (key in newObj && newObj[key] !== overrides[key]) {
21
- throw new Error(`Duplicate key ${key}`);
22
- }
23
- newObj[key] = overrides[key];
24
- }
25
- }
26
- return newObj;
27
- }
28
- /**
29
- * Check that value is object
30
- * @internal
31
- */ function isObject(value) {
32
- return !!value && !Array.isArray(value) && typeof value === 'object';
33
- }
34
- /**
35
- * Create an object without inheriting anything from `Object.prototype`
36
- * @internal
37
- */ function omitPrototype(obj) {
38
- return Object.assign(Object.create(null), obj);
39
- }
40
- /**
41
- * @internal
42
- */ function identity(x) {
43
- return x;
44
- }
45
-
46
- exports.identity = identity;
47
- exports.invert = invert;
48
- exports.isObject = isObject;
49
- exports.mergeWithoutOverrides = mergeWithoutOverrides;
50
- exports.omitPrototype = omitPrototype;
@@ -1,44 +0,0 @@
1
- /**
2
- * @internal
3
- */ function invert(obj) {
4
- const newObj = Object.create(null);
5
- for(const key in obj){
6
- const v = obj[key];
7
- newObj[v] = key;
8
- }
9
- return newObj;
10
- }
11
- /**
12
- * Ensures there are no duplicate keys when building a procedure.
13
- * @internal
14
- */ function mergeWithoutOverrides(obj1, ...objs) {
15
- const newObj = Object.assign(Object.create(null), obj1);
16
- for (const overrides of objs){
17
- for(const key in overrides){
18
- if (key in newObj && newObj[key] !== overrides[key]) {
19
- throw new Error(`Duplicate key ${key}`);
20
- }
21
- newObj[key] = overrides[key];
22
- }
23
- }
24
- return newObj;
25
- }
26
- /**
27
- * Check that value is object
28
- * @internal
29
- */ function isObject(value) {
30
- return !!value && !Array.isArray(value) && typeof value === 'object';
31
- }
32
- /**
33
- * Create an object without inheriting anything from `Object.prototype`
34
- * @internal
35
- */ function omitPrototype(obj) {
36
- return Object.assign(Object.create(null), obj);
37
- }
38
- /**
39
- * @internal
40
- */ function identity(x) {
41
- return x;
42
- }
43
-
44
- export { isObject as a, identity as b, invert as i, mergeWithoutOverrides as m, omitPrototype as o };
@@ -1,49 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- function invert(obj) {
5
- const newObj = Object.create(null);
6
- for (const key in obj) {
7
- const v = obj[key];
8
- newObj[v] = key;
9
- }
10
- return newObj;
11
- }
12
- /**
13
- * Ensures there are no duplicate keys when building a procedure.
14
- * @internal
15
- */
16
- function mergeWithoutOverrides(obj1, ...objs) {
17
- const newObj = Object.assign(Object.create(null), obj1);
18
- for (const overrides of objs) {
19
- for (const key in overrides) {
20
- if (key in newObj && newObj[key] !== overrides[key]) {
21
- throw new Error(`Duplicate key ${key}`);
22
- }
23
- newObj[key] = overrides[key];
24
- }
25
- }
26
- return newObj;
27
- }
28
- /**
29
- * Check that value is object
30
- * @internal
31
- */
32
- function isObject(value) {
33
- return !!value && !Array.isArray(value) && typeof value === 'object';
34
- }
35
- /**
36
- * Create an object without inheriting anything from `Object.prototype`
37
- * @internal
38
- */
39
- function omitPrototype(obj) {
40
- return Object.assign(Object.create(null), obj);
41
- }
42
- /**
43
- * @internal
44
- */
45
- function identity(x) {
46
- return x;
47
- }
48
-
49
- export { isObject as a, identity as b, invert as i, mergeWithoutOverrides as m, omitPrototype as o };
@@ -1,3 +0,0 @@
1
- // This should be moved to a like `@trpc/plugin`-package
2
- // FIXME - do not export *
3
- export * from '../unstable-core-do-not-import';