every-plugin 0.8.3 → 0.8.5
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/dist/_virtual/rolldown_runtime.cjs +1 -7
- package/dist/_virtual/rolldown_runtime.mjs +1 -7
- package/dist/build/rspack/dev-server-middleware.cjs.map +1 -1
- package/dist/build/rspack/dev-server-middleware.mjs.map +1 -1
- package/dist/build/rspack/index.cjs +7 -1
- package/dist/build/rspack/index.d.cts +2 -1
- package/dist/build/rspack/index.d.mts +2 -1
- package/dist/build/rspack/index.mjs +2 -1
- package/dist/build/rspack/module-federation.cjs +2 -33
- package/dist/build/rspack/module-federation.cjs.map +1 -1
- package/dist/build/rspack/module-federation.mjs +2 -33
- package/dist/build/rspack/module-federation.mjs.map +1 -1
- package/dist/build/rspack/plugin.cjs +2 -2
- package/dist/build/rspack/plugin.cjs.map +1 -1
- package/dist/build/rspack/plugin.d.cts.map +1 -1
- package/dist/build/rspack/plugin.d.mts.map +1 -1
- package/dist/build/rspack/plugin.mjs.map +1 -1
- package/dist/build/rspack/utils.cjs +2 -2
- package/dist/build/rspack/utils.cjs.map +1 -1
- package/dist/build/shared-deps.cjs +77 -0
- package/dist/build/shared-deps.cjs.map +1 -0
- package/dist/build/shared-deps.d.cts +16 -0
- package/dist/build/shared-deps.d.cts.map +1 -0
- package/dist/build/shared-deps.d.mts +16 -0
- package/dist/build/shared-deps.d.mts.map +1 -0
- package/dist/build/shared-deps.mjs +73 -0
- package/dist/build/shared-deps.mjs.map +1 -0
- package/dist/errors.cjs +105 -79
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +164 -5
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +164 -5
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +97 -81
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/orpc.cjs +15 -15
- package/dist/package.cjs +28 -10
- package/dist/package.cjs.map +1 -1
- package/dist/package.mjs +23 -11
- package/dist/package.mjs.map +1 -1
- package/dist/plugin.cjs +6 -3
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +5 -5
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +4 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/runtime/errors.cjs +22 -3
- package/dist/runtime/errors.cjs.map +1 -1
- package/dist/runtime/errors.d.cts +11 -5
- package/dist/runtime/errors.d.cts.map +1 -1
- package/dist/runtime/errors.d.mts +11 -5
- package/dist/runtime/errors.d.mts.map +1 -1
- package/dist/runtime/errors.mjs +20 -2
- package/dist/runtime/errors.mjs.map +1 -1
- package/dist/runtime/index.cjs +2 -2
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts.map +1 -1
- package/dist/runtime/index.d.mts.map +1 -1
- package/dist/runtime/index.mjs.map +1 -1
- package/dist/runtime/services/module-federation.service.cjs +11 -14
- package/dist/runtime/services/module-federation.service.cjs.map +1 -1
- package/dist/runtime/services/module-federation.service.d.cts.map +1 -1
- package/dist/runtime/services/module-federation.service.d.mts.map +1 -1
- package/dist/runtime/services/module-federation.service.mjs +6 -9
- package/dist/runtime/services/module-federation.service.mjs.map +1 -1
- package/dist/runtime/services/normalize.d.cts.map +1 -1
- package/dist/runtime/services/normalize.d.mts.map +1 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.cts.map +1 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.mts.map +1 -1
- package/dist/runtime/services/plugin-loader.service.d.cts.map +1 -1
- package/dist/runtime/services/plugin-loader.service.d.mts.map +1 -1
- package/dist/runtime/services/plugin.service.d.cts.map +1 -1
- package/dist/runtime/services/plugin.service.d.mts.map +1 -1
- package/dist/runtime/services/secrets.service.cjs.map +1 -1
- package/dist/runtime/services/secrets.service.d.cts.map +1 -1
- package/dist/runtime/services/secrets.service.d.mts.map +1 -1
- package/dist/runtime/services/secrets.service.mjs.map +1 -1
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts.map +1 -1
- package/dist/testing/index.d.mts.map +1 -1
- package/dist/testing/index.mjs.map +1 -1
- package/dist/types.d.cts +26 -27
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +26 -27
- package/dist/types.d.mts.map +1 -1
- package/dist/zod.d.cts.map +1 -1
- package/dist/zod.d.mts.map +1 -1
- package/package.json +54 -24
package/dist/errors.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zod_d_exports } from "./zod.mjs";
|
|
2
|
-
import { ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
+
import { ModuleFederationError, PluginRuntimeError, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.d.ts
|
|
5
5
|
/**
|
|
@@ -17,18 +17,177 @@ declare const ERROR_PATTERNS: {
|
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Common error schemas for plugin contracts.
|
|
20
|
-
* Import
|
|
20
|
+
* Import individually or use the grouped PluginErrors export.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```typescript
|
|
24
|
-
* import {
|
|
24
|
+
* import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from "every-plugin/errors";
|
|
25
25
|
*
|
|
26
26
|
* export const contract = oc.router({
|
|
27
27
|
* getData: oc.route(...)
|
|
28
|
-
* .errors(
|
|
28
|
+
* .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })
|
|
29
29
|
* });
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
declare const UNAUTHORIZED: {
|
|
33
|
+
readonly status: 401;
|
|
34
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
35
|
+
apiKeyProvided: zod_d_exports.z.ZodBoolean;
|
|
36
|
+
provider: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
37
|
+
authType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
38
|
+
apiKey: "apiKey";
|
|
39
|
+
oauth: "oauth";
|
|
40
|
+
token: "token";
|
|
41
|
+
}>>;
|
|
42
|
+
}, zod_d_exports.z.core.$strip>;
|
|
43
|
+
};
|
|
44
|
+
declare const RATE_LIMITED: {
|
|
45
|
+
readonly status: 429;
|
|
46
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
47
|
+
retryAfter: zod_d_exports.z.ZodNumber;
|
|
48
|
+
remainingRequests: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
49
|
+
resetTime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
50
|
+
limitType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
51
|
+
requests: "requests";
|
|
52
|
+
tokens: "tokens";
|
|
53
|
+
bandwidth: "bandwidth";
|
|
54
|
+
}>>;
|
|
55
|
+
}, zod_d_exports.z.core.$strip>;
|
|
56
|
+
};
|
|
57
|
+
declare const SERVICE_UNAVAILABLE: {
|
|
58
|
+
readonly status: 503;
|
|
59
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
60
|
+
retryAfter: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
61
|
+
maintenanceWindow: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
62
|
+
estimatedUptime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
63
|
+
}, zod_d_exports.z.core.$strip>;
|
|
64
|
+
};
|
|
65
|
+
declare const BAD_REQUEST: {
|
|
66
|
+
readonly status: 400;
|
|
67
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
68
|
+
invalidFields: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
69
|
+
validationErrors: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodObject<{
|
|
70
|
+
field: zod_d_exports.z.ZodString;
|
|
71
|
+
message: zod_d_exports.z.ZodString;
|
|
72
|
+
code: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
73
|
+
}, zod_d_exports.z.core.$strip>>>;
|
|
74
|
+
}, zod_d_exports.z.core.$strip>;
|
|
75
|
+
};
|
|
76
|
+
declare const NOT_FOUND: {
|
|
77
|
+
readonly status: 404;
|
|
78
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
79
|
+
resource: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
80
|
+
resourceId: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
81
|
+
}, zod_d_exports.z.core.$strip>;
|
|
82
|
+
};
|
|
83
|
+
declare const FORBIDDEN: {
|
|
84
|
+
readonly status: 403;
|
|
85
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
86
|
+
requiredPermissions: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
87
|
+
action: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
88
|
+
}, zod_d_exports.z.core.$strip>;
|
|
89
|
+
};
|
|
90
|
+
declare const TIMEOUT: {
|
|
91
|
+
readonly status: 504;
|
|
92
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
93
|
+
timeoutMs: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
94
|
+
operation: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
95
|
+
retryable: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
96
|
+
}, zod_d_exports.z.core.$strip>;
|
|
97
|
+
};
|
|
98
|
+
declare const CONNECTION_ERROR: {
|
|
99
|
+
readonly status: 502;
|
|
100
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
101
|
+
errorCode: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
102
|
+
host: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
103
|
+
port: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
104
|
+
suggestion: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
105
|
+
}, zod_d_exports.z.core.$strip>;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Grouped export for all plugin errors.
|
|
109
|
+
* Use individual imports for cleaner code.
|
|
110
|
+
*/
|
|
111
|
+
declare const PluginErrors: {
|
|
112
|
+
readonly UNAUTHORIZED: {
|
|
113
|
+
readonly status: 401;
|
|
114
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
115
|
+
apiKeyProvided: zod_d_exports.z.ZodBoolean;
|
|
116
|
+
provider: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
117
|
+
authType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
118
|
+
apiKey: "apiKey";
|
|
119
|
+
oauth: "oauth";
|
|
120
|
+
token: "token";
|
|
121
|
+
}>>;
|
|
122
|
+
}, zod_d_exports.z.core.$strip>;
|
|
123
|
+
};
|
|
124
|
+
readonly RATE_LIMITED: {
|
|
125
|
+
readonly status: 429;
|
|
126
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
127
|
+
retryAfter: zod_d_exports.z.ZodNumber;
|
|
128
|
+
remainingRequests: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
129
|
+
resetTime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
130
|
+
limitType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
131
|
+
requests: "requests";
|
|
132
|
+
tokens: "tokens";
|
|
133
|
+
bandwidth: "bandwidth";
|
|
134
|
+
}>>;
|
|
135
|
+
}, zod_d_exports.z.core.$strip>;
|
|
136
|
+
};
|
|
137
|
+
readonly SERVICE_UNAVAILABLE: {
|
|
138
|
+
readonly status: 503;
|
|
139
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
140
|
+
retryAfter: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
141
|
+
maintenanceWindow: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
142
|
+
estimatedUptime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
143
|
+
}, zod_d_exports.z.core.$strip>;
|
|
144
|
+
};
|
|
145
|
+
readonly BAD_REQUEST: {
|
|
146
|
+
readonly status: 400;
|
|
147
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
148
|
+
invalidFields: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
149
|
+
validationErrors: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodObject<{
|
|
150
|
+
field: zod_d_exports.z.ZodString;
|
|
151
|
+
message: zod_d_exports.z.ZodString;
|
|
152
|
+
code: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
153
|
+
}, zod_d_exports.z.core.$strip>>>;
|
|
154
|
+
}, zod_d_exports.z.core.$strip>;
|
|
155
|
+
};
|
|
156
|
+
readonly NOT_FOUND: {
|
|
157
|
+
readonly status: 404;
|
|
158
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
159
|
+
resource: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
160
|
+
resourceId: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
161
|
+
}, zod_d_exports.z.core.$strip>;
|
|
162
|
+
};
|
|
163
|
+
readonly FORBIDDEN: {
|
|
164
|
+
readonly status: 403;
|
|
165
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
166
|
+
requiredPermissions: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
167
|
+
action: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
168
|
+
}, zod_d_exports.z.core.$strip>;
|
|
169
|
+
};
|
|
170
|
+
readonly TIMEOUT: {
|
|
171
|
+
readonly status: 504;
|
|
172
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
173
|
+
timeoutMs: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
174
|
+
operation: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
175
|
+
retryable: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
176
|
+
}, zod_d_exports.z.core.$strip>;
|
|
177
|
+
};
|
|
178
|
+
readonly CONNECTION_ERROR: {
|
|
179
|
+
readonly status: 502;
|
|
180
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
181
|
+
errorCode: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
182
|
+
host: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
183
|
+
port: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
184
|
+
suggestion: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
185
|
+
}, zod_d_exports.z.core.$strip>;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* @deprecated Use individual imports or PluginErrors instead
|
|
190
|
+
*/
|
|
32
191
|
declare const CommonPluginErrors: {
|
|
33
192
|
readonly UNAUTHORIZED: {
|
|
34
193
|
readonly status: 401;
|
|
@@ -107,5 +266,5 @@ declare const CommonPluginErrors: {
|
|
|
107
266
|
};
|
|
108
267
|
};
|
|
109
268
|
//#endregion
|
|
110
|
-
export { CommonPluginErrors, ERROR_PATTERNS, ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
269
|
+
export { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, ModuleFederationError, NOT_FOUND, PluginErrors, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
111
270
|
//# sourceMappingURL=errors.d.mts.map
|
package/dist/errors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;AAKA;AA0BA;cA1Ba,cAAA;EAAA,SAAA,kBAAA;EAAA,SAAA,cAAA;EAAA,SAAA,OAAA;EAAA,SAAA,gBAAA;EAAA,SAAA,UAAA;EAAA,SAAA,IAAA;EAAA,SAAA,YAAA;EAAA,SAAA,mBAAA;AAAA;AAAA;AA0Bb;;;;;;;;;AASA;;;;AAnCa,cA0BA,YAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;;;;;cASA,YAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;;;;;;cAUA,mBAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;cASA,WAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;;;;cAYA,SAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;cAQA,SAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;cAQA,OAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;cASA,gBAAA;EAAA,SAAA,MAAA;EAAA,SAAA,IAAA;;;;;;;;;;AAcb;cAAa,YAAA;EAAA,SAAA,YAAA;IAAA,SAAA,MAAA;IAAA,SAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAcA,kBAAA;EAAA,SAAA,YAAA;IAAA,SAAA,MAAA;IAAA,SAAA,IAAA"}
|
package/dist/errors.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zod_exports } from "./zod.mjs";
|
|
2
|
-
import { ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
+
import { ModuleFederationError, PluginRuntimeError, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.ts
|
|
5
5
|
/**
|
|
@@ -33,96 +33,112 @@ const ERROR_PATTERNS = {
|
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Common error schemas for plugin contracts.
|
|
36
|
-
* Import
|
|
36
|
+
* Import individually or use the grouped PluginErrors export.
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```typescript
|
|
40
|
-
* import {
|
|
40
|
+
* import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from "every-plugin/errors";
|
|
41
41
|
*
|
|
42
42
|
* export const contract = oc.router({
|
|
43
43
|
* getData: oc.route(...)
|
|
44
|
-
* .errors(
|
|
44
|
+
* .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })
|
|
45
45
|
* });
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
},
|
|
61
|
-
RATE_LIMITED: {
|
|
62
|
-
status: 429,
|
|
63
|
-
data: zod_exports.z.object({
|
|
64
|
-
retryAfter: zod_exports.z.number().int().min(1),
|
|
65
|
-
remainingRequests: zod_exports.z.number().int().min(0).optional(),
|
|
66
|
-
resetTime: zod_exports.z.string().datetime().optional(),
|
|
67
|
-
limitType: zod_exports.z.enum([
|
|
68
|
-
"requests",
|
|
69
|
-
"tokens",
|
|
70
|
-
"bandwidth"
|
|
71
|
-
]).optional()
|
|
72
|
-
})
|
|
73
|
-
},
|
|
74
|
-
SERVICE_UNAVAILABLE: {
|
|
75
|
-
status: 503,
|
|
76
|
-
data: zod_exports.z.object({
|
|
77
|
-
retryAfter: zod_exports.z.number().int().optional(),
|
|
78
|
-
maintenanceWindow: zod_exports.z.boolean().default(false),
|
|
79
|
-
estimatedUptime: zod_exports.z.string().datetime().optional()
|
|
80
|
-
})
|
|
81
|
-
},
|
|
82
|
-
BAD_REQUEST: {
|
|
83
|
-
status: 400,
|
|
84
|
-
data: zod_exports.z.object({
|
|
85
|
-
invalidFields: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
86
|
-
validationErrors: zod_exports.z.array(zod_exports.z.object({
|
|
87
|
-
field: zod_exports.z.string(),
|
|
88
|
-
message: zod_exports.z.string(),
|
|
89
|
-
code: zod_exports.z.string().optional()
|
|
90
|
-
})).optional()
|
|
91
|
-
})
|
|
92
|
-
},
|
|
93
|
-
NOT_FOUND: {
|
|
94
|
-
status: 404,
|
|
95
|
-
data: zod_exports.z.object({
|
|
96
|
-
resource: zod_exports.z.string().optional(),
|
|
97
|
-
resourceId: zod_exports.z.string().optional()
|
|
98
|
-
})
|
|
99
|
-
},
|
|
100
|
-
FORBIDDEN: {
|
|
101
|
-
status: 403,
|
|
102
|
-
data: zod_exports.z.object({
|
|
103
|
-
requiredPermissions: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
104
|
-
action: zod_exports.z.string().optional()
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
TIMEOUT: {
|
|
108
|
-
status: 504,
|
|
109
|
-
data: zod_exports.z.object({
|
|
110
|
-
timeoutMs: zod_exports.z.number().int().min(0).optional(),
|
|
111
|
-
operation: zod_exports.z.string().optional(),
|
|
112
|
-
retryable: zod_exports.z.boolean().default(true)
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
CONNECTION_ERROR: {
|
|
116
|
-
status: 502,
|
|
117
|
-
data: zod_exports.z.object({
|
|
118
|
-
errorCode: zod_exports.z.string().optional(),
|
|
119
|
-
host: zod_exports.z.string().optional(),
|
|
120
|
-
port: zod_exports.z.number().int().optional(),
|
|
121
|
-
suggestion: zod_exports.z.string().optional()
|
|
122
|
-
})
|
|
123
|
-
}
|
|
48
|
+
const UNAUTHORIZED = {
|
|
49
|
+
status: 401,
|
|
50
|
+
data: zod_exports.z.object({
|
|
51
|
+
apiKeyProvided: zod_exports.z.boolean(),
|
|
52
|
+
provider: zod_exports.z.string().optional(),
|
|
53
|
+
authType: zod_exports.z.enum([
|
|
54
|
+
"apiKey",
|
|
55
|
+
"oauth",
|
|
56
|
+
"token"
|
|
57
|
+
]).optional()
|
|
58
|
+
})
|
|
124
59
|
};
|
|
60
|
+
const RATE_LIMITED = {
|
|
61
|
+
status: 429,
|
|
62
|
+
data: zod_exports.z.object({
|
|
63
|
+
retryAfter: zod_exports.z.number().int().min(1),
|
|
64
|
+
remainingRequests: zod_exports.z.number().int().min(0).optional(),
|
|
65
|
+
resetTime: zod_exports.z.string().datetime().optional(),
|
|
66
|
+
limitType: zod_exports.z.enum([
|
|
67
|
+
"requests",
|
|
68
|
+
"tokens",
|
|
69
|
+
"bandwidth"
|
|
70
|
+
]).optional()
|
|
71
|
+
})
|
|
72
|
+
};
|
|
73
|
+
const SERVICE_UNAVAILABLE = {
|
|
74
|
+
status: 503,
|
|
75
|
+
data: zod_exports.z.object({
|
|
76
|
+
retryAfter: zod_exports.z.number().int().optional(),
|
|
77
|
+
maintenanceWindow: zod_exports.z.boolean().default(false),
|
|
78
|
+
estimatedUptime: zod_exports.z.string().datetime().optional()
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
const BAD_REQUEST = {
|
|
82
|
+
status: 400,
|
|
83
|
+
data: zod_exports.z.object({
|
|
84
|
+
invalidFields: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
85
|
+
validationErrors: zod_exports.z.array(zod_exports.z.object({
|
|
86
|
+
field: zod_exports.z.string(),
|
|
87
|
+
message: zod_exports.z.string(),
|
|
88
|
+
code: zod_exports.z.string().optional()
|
|
89
|
+
})).optional()
|
|
90
|
+
})
|
|
91
|
+
};
|
|
92
|
+
const NOT_FOUND = {
|
|
93
|
+
status: 404,
|
|
94
|
+
data: zod_exports.z.object({
|
|
95
|
+
resource: zod_exports.z.string().optional(),
|
|
96
|
+
resourceId: zod_exports.z.string().optional()
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
const FORBIDDEN = {
|
|
100
|
+
status: 403,
|
|
101
|
+
data: zod_exports.z.object({
|
|
102
|
+
requiredPermissions: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
103
|
+
action: zod_exports.z.string().optional()
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
const TIMEOUT = {
|
|
107
|
+
status: 504,
|
|
108
|
+
data: zod_exports.z.object({
|
|
109
|
+
timeoutMs: zod_exports.z.number().int().min(0).optional(),
|
|
110
|
+
operation: zod_exports.z.string().optional(),
|
|
111
|
+
retryable: zod_exports.z.boolean().default(true)
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
const CONNECTION_ERROR = {
|
|
115
|
+
status: 502,
|
|
116
|
+
data: zod_exports.z.object({
|
|
117
|
+
errorCode: zod_exports.z.string().optional(),
|
|
118
|
+
host: zod_exports.z.string().optional(),
|
|
119
|
+
port: zod_exports.z.number().int().optional(),
|
|
120
|
+
suggestion: zod_exports.z.string().optional()
|
|
121
|
+
})
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Grouped export for all plugin errors.
|
|
125
|
+
* Use individual imports for cleaner code.
|
|
126
|
+
*/
|
|
127
|
+
const PluginErrors = {
|
|
128
|
+
UNAUTHORIZED,
|
|
129
|
+
RATE_LIMITED,
|
|
130
|
+
SERVICE_UNAVAILABLE,
|
|
131
|
+
BAD_REQUEST,
|
|
132
|
+
NOT_FOUND,
|
|
133
|
+
FORBIDDEN,
|
|
134
|
+
TIMEOUT,
|
|
135
|
+
CONNECTION_ERROR
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated Use individual imports or PluginErrors instead
|
|
139
|
+
*/
|
|
140
|
+
const CommonPluginErrors = PluginErrors;
|
|
125
141
|
|
|
126
142
|
//#endregion
|
|
127
|
-
export { CommonPluginErrors, ERROR_PATTERNS, ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
143
|
+
export { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, ModuleFederationError, NOT_FOUND, PluginErrors, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
128
144
|
//# sourceMappingURL=errors.mjs.map
|
package/dist/errors.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":["z"],"sources":["../src/errors.ts"],"sourcesContent":["import { z } from \"./zod\";\n\n/**\n * Error pattern constants for categorizing infrastructure errors\n */\nexport const ERROR_PATTERNS = {\n\tCONNECTION_REFUSED: ['ECONNREFUSED'],\n\tHOST_NOT_FOUND: ['ENOTFOUND', 'EHOSTUNREACH'],\n\tTIMEOUT: ['ETIMEDOUT', 'ESOCKETTIMEDOUT', 'timeout'],\n\tCONNECTION_RESET: ['ECONNRESET', 'EPIPE'],\n\tPERMISSION: ['EACCES', 'EPERM', 'permission denied'],\n\tAUTH: ['401', 'unauthorized', 'authentication failed'],\n\tRATE_LIMITED: ['429', 'too many requests', 'rate limit'],\n\tSERVICE_UNAVAILABLE: ['503', 'service unavailable'],\n} as const;\n\n/**\n * Common error schemas for plugin contracts.\n * Import
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":["z"],"sources":["../src/errors.ts"],"sourcesContent":["import { z } from \"./zod\";\n\n/**\n * Error pattern constants for categorizing infrastructure errors\n */\nexport const ERROR_PATTERNS = {\n\tCONNECTION_REFUSED: ['ECONNREFUSED'],\n\tHOST_NOT_FOUND: ['ENOTFOUND', 'EHOSTUNREACH'],\n\tTIMEOUT: ['ETIMEDOUT', 'ESOCKETTIMEDOUT', 'timeout'],\n\tCONNECTION_RESET: ['ECONNRESET', 'EPIPE'],\n\tPERMISSION: ['EACCES', 'EPERM', 'permission denied'],\n\tAUTH: ['401', 'unauthorized', 'authentication failed'],\n\tRATE_LIMITED: ['429', 'too many requests', 'rate limit'],\n\tSERVICE_UNAVAILABLE: ['503', 'service unavailable'],\n} as const;\n\n/**\n * Common error schemas for plugin contracts.\n * Import individually or use the grouped PluginErrors export.\n *\n * @example\n * ```typescript\n * import { NOT_FOUND, FORBIDDEN, UNAUTHORIZED } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors({ NOT_FOUND, FORBIDDEN, UNAUTHORIZED })\n * });\n * ```\n */\n\nexport const UNAUTHORIZED = {\n\tstatus: 401,\n\tdata: z.object({\n\t\tapiKeyProvided: z.boolean(),\n\t\tprovider: z.string().optional(),\n\t\tauthType: z.enum(['apiKey', 'oauth', 'token']).optional(),\n\t})\n} as const;\n\nexport const RATE_LIMITED = {\n\tstatus: 429,\n\tdata: z.object({\n\t\tretryAfter: z.number().int().min(1),\n\t\tremainingRequests: z.number().int().min(0).optional(),\n\t\tresetTime: z.string().datetime().optional(),\n\t\tlimitType: z.enum(['requests', 'tokens', 'bandwidth']).optional(),\n\t})\n} as const;\n\nexport const SERVICE_UNAVAILABLE = {\n\tstatus: 503,\n\tdata: z.object({\n\t\tretryAfter: z.number().int().optional(),\n\t\tmaintenanceWindow: z.boolean().default(false),\n\t\testimatedUptime: z.string().datetime().optional(),\n\t})\n} as const;\n\nexport const BAD_REQUEST = {\n\tstatus: 400,\n\tdata: z.object({\n\t\tinvalidFields: z.array(z.string()).optional(),\n\t\tvalidationErrors: z.array(z.object({\n\t\t\tfield: z.string(),\n\t\t\tmessage: z.string(),\n\t\t\tcode: z.string().optional(),\n\t\t})).optional(),\n\t})\n} as const;\n\nexport const NOT_FOUND = {\n\tstatus: 404,\n\tdata: z.object({\n\t\tresource: z.string().optional(),\n\t\tresourceId: z.string().optional(),\n\t})\n} as const;\n\nexport const FORBIDDEN = {\n\tstatus: 403,\n\tdata: z.object({\n\t\trequiredPermissions: z.array(z.string()).optional(),\n\t\taction: z.string().optional(),\n\t})\n} as const;\n\nexport const TIMEOUT = {\n\tstatus: 504,\n\tdata: z.object({\n\t\ttimeoutMs: z.number().int().min(0).optional(),\n\t\toperation: z.string().optional(),\n\t\tretryable: z.boolean().default(true),\n\t})\n} as const;\n\nexport const CONNECTION_ERROR = {\n\tstatus: 502,\n\tdata: z.object({\n\t\terrorCode: z.string().optional(),\n\t\thost: z.string().optional(),\n\t\tport: z.number().int().optional(),\n\t\tsuggestion: z.string().optional(),\n\t})\n} as const;\n\n/**\n * Grouped export for all plugin errors.\n * Use individual imports for cleaner code.\n */\nexport const PluginErrors = {\n\tUNAUTHORIZED,\n\tRATE_LIMITED,\n\tSERVICE_UNAVAILABLE,\n\tBAD_REQUEST,\n\tNOT_FOUND,\n\tFORBIDDEN,\n\tTIMEOUT,\n\tCONNECTION_ERROR,\n} as const;\n\n/**\n * @deprecated Use individual imports or PluginErrors instead\n */\nexport const CommonPluginErrors = PluginErrors;\n\nexport {\n\tformatORPCError,\n\tisRetryableORPCCode,\n\twrapORPCError,\n\ttoPluginRuntimeError,\n\textractFromFiberFailure,\n\tPluginRuntimeError,\n\tModuleFederationError,\n\tValidationError,\n} from \"./runtime/errors\";\n"],"mappings":";;;;;;;AAKA,MAAa,iBAAiB;CAC7B,oBAAoB,CAAC,eAAe;CACpC,gBAAgB,CAAC,aAAa,eAAe;CAC7C,SAAS;EAAC;EAAa;EAAmB;EAAU;CACpD,kBAAkB,CAAC,cAAc,QAAQ;CACzC,YAAY;EAAC;EAAU;EAAS;EAAoB;CACpD,MAAM;EAAC;EAAO;EAAgB;EAAwB;CACtD,cAAc;EAAC;EAAO;EAAqB;EAAa;CACxD,qBAAqB,CAAC,OAAO,sBAAsB;CACnD;;;;;;;;;;;;;;;AAiBD,MAAa,eAAe;CAC3B,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,gBAAgBA,cAAE,SAAS;EAC3B,UAAUA,cAAE,QAAQ,CAAC,UAAU;EAC/B,UAAUA,cAAE,KAAK;GAAC;GAAU;GAAS;GAAQ,CAAC,CAAC,UAAU;EACzD,CAAC;CACF;AAED,MAAa,eAAe;CAC3B,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,YAAYA,cAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;EACnC,mBAAmBA,cAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU;EACrD,WAAWA,cAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;EAC3C,WAAWA,cAAE,KAAK;GAAC;GAAY;GAAU;GAAY,CAAC,CAAC,UAAU;EACjE,CAAC;CACF;AAED,MAAa,sBAAsB;CAClC,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,YAAYA,cAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACvC,mBAAmBA,cAAE,SAAS,CAAC,QAAQ,MAAM;EAC7C,iBAAiBA,cAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;EACjD,CAAC;CACF;AAED,MAAa,cAAc;CAC1B,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,eAAeA,cAAE,MAAMA,cAAE,QAAQ,CAAC,CAAC,UAAU;EAC7C,kBAAkBA,cAAE,MAAMA,cAAE,OAAO;GAClC,OAAOA,cAAE,QAAQ;GACjB,SAASA,cAAE,QAAQ;GACnB,MAAMA,cAAE,QAAQ,CAAC,UAAU;GAC3B,CAAC,CAAC,CAAC,UAAU;EACd,CAAC;CACF;AAED,MAAa,YAAY;CACxB,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,UAAUA,cAAE,QAAQ,CAAC,UAAU;EAC/B,YAAYA,cAAE,QAAQ,CAAC,UAAU;EACjC,CAAC;CACF;AAED,MAAa,YAAY;CACxB,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,qBAAqBA,cAAE,MAAMA,cAAE,QAAQ,CAAC,CAAC,UAAU;EACnD,QAAQA,cAAE,QAAQ,CAAC,UAAU;EAC7B,CAAC;CACF;AAED,MAAa,UAAU;CACtB,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,WAAWA,cAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU;EAC7C,WAAWA,cAAE,QAAQ,CAAC,UAAU;EAChC,WAAWA,cAAE,SAAS,CAAC,QAAQ,KAAK;EACpC,CAAC;CACF;AAED,MAAa,mBAAmB;CAC/B,QAAQ;CACR,MAAMA,cAAE,OAAO;EACd,WAAWA,cAAE,QAAQ,CAAC,UAAU;EAChC,MAAMA,cAAE,QAAQ,CAAC,UAAU;EAC3B,MAAMA,cAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACjC,YAAYA,cAAE,QAAQ,CAAC,UAAU;EACjC,CAAC;CACF;;;;;AAMD,MAAa,eAAe;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAKD,MAAa,qBAAqB"}
|
package/dist/index.cjs
CHANGED
|
@@ -4,14 +4,24 @@ const require_plugin = require('./plugin.cjs');
|
|
|
4
4
|
const require_runtime_services_normalize = require('./runtime/services/normalize.cjs');
|
|
5
5
|
const require_runtime_index = require('./runtime/index.cjs');
|
|
6
6
|
|
|
7
|
+
exports.BAD_REQUEST = require_errors$1.BAD_REQUEST;
|
|
8
|
+
exports.CONNECTION_ERROR = require_errors$1.CONNECTION_ERROR;
|
|
7
9
|
exports.CommonPluginErrors = require_errors$1.CommonPluginErrors;
|
|
8
10
|
exports.ERROR_PATTERNS = require_errors$1.ERROR_PATTERNS;
|
|
11
|
+
exports.FORBIDDEN = require_errors$1.FORBIDDEN;
|
|
9
12
|
exports.ModuleFederationError = require_errors.ModuleFederationError;
|
|
13
|
+
exports.NOT_FOUND = require_errors$1.NOT_FOUND;
|
|
14
|
+
exports.PluginErrors = require_errors$1.PluginErrors;
|
|
10
15
|
exports.PluginRuntime = require_runtime_index.PluginRuntime;
|
|
11
16
|
exports.PluginRuntimeError = require_errors.PluginRuntimeError;
|
|
17
|
+
exports.RATE_LIMITED = require_errors$1.RATE_LIMITED;
|
|
18
|
+
exports.SERVICE_UNAVAILABLE = require_errors$1.SERVICE_UNAVAILABLE;
|
|
19
|
+
exports.TIMEOUT = require_errors$1.TIMEOUT;
|
|
20
|
+
exports.UNAUTHORIZED = require_errors$1.UNAUTHORIZED;
|
|
12
21
|
exports.ValidationError = require_errors.ValidationError;
|
|
13
22
|
exports.createPlugin = require_plugin.createPlugin;
|
|
14
23
|
exports.createPluginRuntime = require_runtime_index.createPluginRuntime;
|
|
24
|
+
exports.extractFromFiberFailure = require_errors.extractFromFiberFailure;
|
|
15
25
|
exports.formatORPCError = require_errors.formatORPCError;
|
|
16
26
|
exports.getNormalizedRemoteName = require_runtime_services_normalize.getNormalizedRemoteName;
|
|
17
27
|
exports.isRetryableORPCCode = require_errors.isRetryableORPCCode;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.cjs";
|
|
2
|
-
import { CommonPluginErrors, ERROR_PATTERNS } from "./errors.cjs";
|
|
1
|
+
import { ModuleFederationError, PluginRuntimeError, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.cjs";
|
|
2
|
+
import { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, NOT_FOUND, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.cjs";
|
|
3
3
|
import { LoadedPluginWithBinding, Plugin, PluginConfigFor, createPlugin } from "./plugin.cjs";
|
|
4
4
|
import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginVariables, RegisteredPlugins, SecretsConfig } from "./types.cjs";
|
|
5
5
|
import { PluginRuntime, createPluginRuntime } from "./runtime/index.cjs";
|
|
6
6
|
import { getNormalizedRemoteName } from "./runtime/services/normalize.cjs";
|
|
7
|
-
export { type AnyPlugin, CommonPluginErrors, ERROR_PATTERNS, type EveryPlugin, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, ModuleFederationError, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginVariables, type RegisteredPlugins, type SecretsConfig, ValidationError, createPlugin, createPluginRuntime, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
7
|
+
export { type AnyPlugin, BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, ModuleFederationError, NOT_FOUND, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, PluginErrors, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginVariables, RATE_LIMITED, type RegisteredPlugins, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, ValidationError, createPlugin, createPluginRuntime, extractFromFiberFailure, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
-
import { CommonPluginErrors, ERROR_PATTERNS } from "./errors.mjs";
|
|
1
|
+
import { ModuleFederationError, PluginRuntimeError, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
+
import { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, NOT_FOUND, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
|
|
3
3
|
import { LoadedPluginWithBinding, Plugin, PluginConfigFor, createPlugin } from "./plugin.mjs";
|
|
4
4
|
import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginVariables, RegisteredPlugins, SecretsConfig } from "./types.mjs";
|
|
5
5
|
import { PluginRuntime, createPluginRuntime } from "./runtime/index.mjs";
|
|
6
6
|
import { getNormalizedRemoteName } from "./runtime/services/normalize.mjs";
|
|
7
|
-
export { type AnyPlugin, CommonPluginErrors, ERROR_PATTERNS, type EveryPlugin, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, ModuleFederationError, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginVariables, type RegisteredPlugins, type SecretsConfig, ValidationError, createPlugin, createPluginRuntime, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
7
|
+
export { type AnyPlugin, BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, type EveryPlugin, FORBIDDEN, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, ModuleFederationError, NOT_FOUND, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, PluginErrors, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, PluginRuntimeError, type PluginSecrets, type PluginVariables, RATE_LIMITED, type RegisteredPlugins, SERVICE_UNAVAILABLE, type SecretsConfig, TIMEOUT, UNAUTHORIZED, ValidationError, createPlugin, createPluginRuntime, extractFromFiberFailure, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ModuleFederationError, PluginRuntimeError, ValidationError, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
-
import { CommonPluginErrors, ERROR_PATTERNS } from "./errors.mjs";
|
|
1
|
+
import { ModuleFederationError, PluginRuntimeError, ValidationError, extractFromFiberFailure, formatORPCError, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError } from "./runtime/errors.mjs";
|
|
2
|
+
import { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, NOT_FOUND, PluginErrors, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED } from "./errors.mjs";
|
|
3
3
|
import { createPlugin } from "./plugin.mjs";
|
|
4
4
|
import { getNormalizedRemoteName } from "./runtime/services/normalize.mjs";
|
|
5
5
|
import { PluginRuntime, createPluginRuntime } from "./runtime/index.mjs";
|
|
6
6
|
|
|
7
|
-
export { CommonPluginErrors, ERROR_PATTERNS, ModuleFederationError, PluginRuntime, PluginRuntimeError, ValidationError, createPlugin, createPluginRuntime, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
|
7
|
+
export { BAD_REQUEST, CONNECTION_ERROR, CommonPluginErrors, ERROR_PATTERNS, FORBIDDEN, ModuleFederationError, NOT_FOUND, PluginErrors, PluginRuntime, PluginRuntimeError, RATE_LIMITED, SERVICE_UNAVAILABLE, TIMEOUT, UNAUTHORIZED, ValidationError, createPlugin, createPluginRuntime, extractFromFiberFailure, formatORPCError, getNormalizedRemoteName, isRetryableORPCCode, toPluginRuntimeError, wrapORPCError };
|
package/dist/orpc.cjs
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let
|
|
3
|
-
let
|
|
4
|
-
let
|
|
2
|
+
let _orpc_experimental_publisher_ioredis = require("@orpc/experimental-publisher/ioredis");
|
|
3
|
+
let _orpc_experimental_publisher_memory = require("@orpc/experimental-publisher/memory");
|
|
4
|
+
let _orpc_experimental_publisher_upstash_redis = require("@orpc/experimental-publisher/upstash-redis");
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, 'IORedisPublisher', {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _orpc_experimental_publisher_ioredis.IORedisPublisher;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, 'MemoryPublisher', {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _orpc_experimental_publisher_memory.MemoryPublisher;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, 'UpstashRedisPublisher', {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _orpc_experimental_publisher_upstash_redis.UpstashRedisPublisher;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var
|
|
25
|
-
Object.keys(
|
|
24
|
+
var _orpc_contract = require("@orpc/contract");
|
|
25
|
+
Object.keys(_orpc_contract).forEach(function (k) {
|
|
26
26
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return _orpc_contract[k]; }
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
Object.keys(
|
|
32
|
+
var _orpc_server = require("@orpc/server");
|
|
33
|
+
Object.keys(_orpc_server).forEach(function (k) {
|
|
34
34
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return _orpc_server[k]; }
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
var
|
|
41
|
-
Object.keys(
|
|
40
|
+
var _orpc_experimental_publisher = require("@orpc/experimental-publisher");
|
|
41
|
+
Object.keys(_orpc_experimental_publisher).forEach(function (k) {
|
|
42
42
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return _orpc_experimental_publisher[k]; }
|
|
45
45
|
});
|
|
46
46
|
});
|
package/dist/package.cjs
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
//#region package.json
|
|
3
|
-
var version = "0.8.
|
|
3
|
+
var version = "0.8.4";
|
|
4
4
|
var dependencies = {
|
|
5
|
-
"@module-federation/enhanced": "^0.
|
|
6
|
-
"@module-federation/node": "^2.7.
|
|
7
|
-
"@module-federation/runtime-core": "^0.
|
|
8
|
-
"@orpc/
|
|
9
|
-
"@orpc/
|
|
10
|
-
"@orpc/
|
|
11
|
-
"@orpc/
|
|
12
|
-
"
|
|
13
|
-
"
|
|
5
|
+
"@module-federation/enhanced": "^0.22.1",
|
|
6
|
+
"@module-federation/node": "^2.7.27",
|
|
7
|
+
"@module-federation/runtime-core": "^0.22.1",
|
|
8
|
+
"@orpc/client": "^1.12.3",
|
|
9
|
+
"@orpc/contract": "^1.13.4",
|
|
10
|
+
"@orpc/experimental-publisher": "^1.13.4",
|
|
11
|
+
"@orpc/openapi": "^1.12.3",
|
|
12
|
+
"@orpc/react-query": "^1.13.4",
|
|
13
|
+
"@orpc/server": "^1.13.4",
|
|
14
|
+
"@orpc/tanstack-query": "^1.13.4",
|
|
15
|
+
"@orpc/zod": "^1.13.4",
|
|
16
|
+
"effect": "3.19.14",
|
|
17
|
+
"zod": "4.3.5"
|
|
14
18
|
};
|
|
19
|
+
var sharedDependencies = { "ui": {
|
|
20
|
+
"react": "^19.2.0",
|
|
21
|
+
"react-dom": "^19.2.0",
|
|
22
|
+
"@tanstack/react-query": "^5.90.11",
|
|
23
|
+
"@tanstack/react-router": "^1.139.14",
|
|
24
|
+
"@hot-labs/near-connect": "^0.6.11",
|
|
25
|
+
"near-kit": "^0.7.0"
|
|
26
|
+
} };
|
|
15
27
|
|
|
16
28
|
//#endregion
|
|
17
29
|
Object.defineProperty(exports, 'dependencies', {
|
|
@@ -20,6 +32,12 @@ Object.defineProperty(exports, 'dependencies', {
|
|
|
20
32
|
return dependencies;
|
|
21
33
|
}
|
|
22
34
|
});
|
|
35
|
+
Object.defineProperty(exports, 'sharedDependencies', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return sharedDependencies;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
23
41
|
Object.defineProperty(exports, 'version', {
|
|
24
42
|
enumerable: true,
|
|
25
43
|
get: function () {
|
package/dist/package.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|