every-plugin 0.5.0 → 0.5.1
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/{chunk-zltIcp7o.cjs → _virtual/rolldown_runtime.cjs} +3 -18
- package/dist/{chunk-QQAxy9l9.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/build/rspack/dev-server-middleware.cjs +201 -0
- package/dist/build/rspack/dev-server-middleware.cjs.map +1 -0
- package/dist/build/rspack/dev-server-middleware.mjs +200 -0
- package/dist/build/rspack/dev-server-middleware.mjs.map +1 -0
- package/dist/build/rspack/index.cjs +2 -362
- package/dist/build/rspack/index.d.cts +2 -20
- package/dist/build/rspack/index.d.mts +2 -20
- package/dist/build/rspack/index.mjs +2 -360
- package/dist/build/rspack/module-federation.cjs +47 -0
- package/dist/build/rspack/module-federation.cjs.map +1 -0
- package/dist/build/rspack/module-federation.mjs +47 -0
- package/dist/build/rspack/module-federation.mjs.map +1 -0
- package/dist/build/rspack/plugin.cjs +90 -0
- package/dist/build/rspack/plugin.cjs.map +1 -0
- package/dist/build/rspack/plugin.d.cts +20 -0
- package/dist/build/rspack/plugin.d.cts.map +1 -0
- package/dist/build/rspack/plugin.d.mts +20 -0
- package/dist/build/rspack/plugin.d.mts.map +1 -0
- package/dist/build/rspack/plugin.mjs +89 -0
- package/dist/build/rspack/plugin.mjs.map +1 -0
- package/dist/build/rspack/utils.cjs +41 -0
- package/dist/build/rspack/utils.cjs.map +1 -0
- package/dist/build/rspack/utils.mjs +38 -0
- package/dist/build/rspack/utils.mjs.map +1 -0
- package/dist/errors.cjs +62 -3
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +75 -3
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.mts +75 -3
- package/dist/errors.d.mts.map +1 -0
- package/dist/errors.mjs +62 -3
- package/dist/errors.mjs.map +1 -0
- package/dist/index.cjs +8 -55
- package/dist/index.d.cts +6 -5
- package/dist/index.d.mts +6 -5
- package/dist/index.mjs +5 -51
- package/dist/orpc.cjs +1 -1
- package/dist/{package-DyTuSutr.cjs → package.cjs} +22 -7
- package/dist/package.cjs.map +1 -0
- package/dist/{package-CaRYwbRi.mjs → package.mjs} +22 -5
- package/dist/package.mjs.map +1 -0
- package/dist/plugin.cjs +48 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +62 -0
- package/dist/plugin.d.cts.map +1 -0
- package/dist/plugin.d.mts +62 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +47 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/runtime/errors.cjs +45 -0
- package/dist/runtime/errors.cjs.map +1 -0
- package/dist/runtime/errors.d.cts +27 -0
- package/dist/runtime/errors.d.cts.map +1 -0
- package/dist/runtime/errors.d.mts +27 -0
- package/dist/runtime/errors.d.mts.map +1 -0
- package/dist/runtime/errors.mjs +41 -0
- package/dist/runtime/errors.mjs.map +1 -0
- package/dist/runtime/index.cjs +157 -5
- package/dist/runtime/index.cjs.map +1 -0
- package/dist/runtime/index.d.cts +43 -5
- package/dist/runtime/index.d.cts.map +1 -0
- package/dist/runtime/index.d.mts +43 -5
- package/dist/runtime/index.d.mts.map +1 -0
- package/dist/runtime/index.mjs +155 -4
- package/dist/runtime/index.mjs.map +1 -0
- package/dist/runtime/services/module-federation.service.cjs +143 -0
- package/dist/runtime/services/module-federation.service.cjs.map +1 -0
- package/dist/runtime/services/module-federation.service.d.cts +15 -0
- package/dist/runtime/services/module-federation.service.d.cts.map +1 -0
- package/dist/runtime/services/module-federation.service.d.mts +15 -0
- package/dist/runtime/services/module-federation.service.d.mts.map +1 -0
- package/dist/runtime/services/module-federation.service.mjs +143 -0
- package/dist/runtime/services/module-federation.service.mjs.map +1 -0
- package/dist/runtime/services/normalize.cjs +22 -2
- package/dist/runtime/services/normalize.cjs.map +1 -0
- package/dist/runtime/services/normalize.d.cts +21 -2
- package/dist/runtime/services/normalize.d.cts.map +1 -0
- package/dist/runtime/services/normalize.d.mts +21 -2
- package/dist/runtime/services/normalize.d.mts.map +1 -0
- package/dist/runtime/services/normalize.mjs +21 -2
- package/dist/runtime/services/normalize.mjs.map +1 -0
- package/dist/runtime/services/plugin-lifecycle.service.cjs +33 -0
- package/dist/runtime/services/plugin-lifecycle.service.cjs.map +1 -0
- package/dist/runtime/services/plugin-lifecycle.service.d.cts +17 -0
- package/dist/runtime/services/plugin-lifecycle.service.d.cts.map +1 -0
- package/dist/runtime/services/plugin-lifecycle.service.d.mts +17 -0
- package/dist/runtime/services/plugin-lifecycle.service.d.mts.map +1 -0
- package/dist/runtime/services/plugin-lifecycle.service.mjs +32 -0
- package/dist/runtime/services/plugin-lifecycle.service.mjs.map +1 -0
- package/dist/runtime/services/plugin-loader.service.cjs +125 -0
- package/dist/runtime/services/plugin-loader.service.cjs.map +1 -0
- package/dist/runtime/services/plugin-loader.service.d.cts +54 -0
- package/dist/runtime/services/plugin-loader.service.d.cts.map +1 -0
- package/dist/runtime/services/plugin-loader.service.d.mts +54 -0
- package/dist/runtime/services/plugin-loader.service.d.mts.map +1 -0
- package/dist/runtime/services/plugin-loader.service.mjs +121 -0
- package/dist/runtime/services/plugin-loader.service.mjs.map +1 -0
- package/dist/runtime/services/plugin.service.cjs +33 -0
- package/dist/runtime/services/plugin.service.cjs.map +1 -0
- package/dist/runtime/services/plugin.service.d.cts +42 -0
- package/dist/runtime/services/plugin.service.d.cts.map +1 -0
- package/dist/runtime/services/plugin.service.d.mts +42 -0
- package/dist/runtime/services/plugin.service.d.mts.map +1 -0
- package/dist/runtime/services/plugin.service.mjs +32 -0
- package/dist/runtime/services/plugin.service.mjs.map +1 -0
- package/dist/runtime/services/secrets.service.cjs +50 -0
- package/dist/runtime/services/secrets.service.cjs.map +1 -0
- package/dist/runtime/services/secrets.service.d.cts +16 -0
- package/dist/runtime/services/secrets.service.d.cts.map +1 -0
- package/dist/runtime/services/secrets.service.d.mts +16 -0
- package/dist/runtime/services/secrets.service.d.mts.map +1 -0
- package/dist/runtime/services/secrets.service.mjs +48 -0
- package/dist/runtime/services/secrets.service.mjs.map +1 -0
- package/dist/runtime/validation.cjs +18 -0
- package/dist/runtime/validation.cjs.map +1 -0
- package/dist/runtime/validation.mjs +17 -0
- package/dist/runtime/validation.mjs.map +1 -0
- package/dist/testing/index.cjs +2 -4
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +4 -4
- package/dist/testing/index.d.mts +4 -4
- package/dist/testing/index.mjs +1 -3
- package/dist/testing/index.mjs.map +1 -1
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +261 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +261 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +1 -0
- package/dist/zod-core.cjs +9 -0
- package/dist/zod-core.d.cts +1 -0
- package/dist/zod-core.d.mts +1 -0
- package/dist/zod-core.mjs +3 -0
- package/dist/zod.cjs +13 -1
- package/dist/zod.cjs.map +1 -0
- package/dist/zod.d.cts +8 -2
- package/dist/zod.d.cts.map +1 -0
- package/dist/zod.d.mts +8 -2
- package/dist/zod.d.mts.map +1 -0
- package/dist/zod.mjs +9 -2
- package/dist/zod.mjs.map +1 -0
- package/package.json +17 -2
- package/dist/build/rspack/index.cjs.map +0 -1
- package/dist/build/rspack/index.d.cts.map +0 -1
- package/dist/build/rspack/index.d.mts.map +0 -1
- package/dist/build/rspack/index.mjs.map +0 -1
- package/dist/errors-9sNpYLv5.d.mts +0 -75
- package/dist/errors-9sNpYLv5.d.mts.map +0 -1
- package/dist/errors-CVnoPl9v.cjs +0 -68
- package/dist/errors-CVnoPl9v.cjs.map +0 -1
- package/dist/errors-D7keKf7a.mjs +0 -63
- package/dist/errors-D7keKf7a.mjs.map +0 -1
- package/dist/errors-DKPPPYYT.d.cts +0 -75
- package/dist/errors-DKPPPYYT.d.cts.map +0 -1
- package/dist/fetch-8DauUFDh.mjs +0 -335
- package/dist/fetch-8DauUFDh.mjs.map +0 -1
- package/dist/fetch-CrBvwsZ4.cjs +0 -336
- package/dist/fetch-CrBvwsZ4.cjs.map +0 -1
- package/dist/index-Bu2wtZrA.d.mts +0 -463
- package/dist/index-Bu2wtZrA.d.mts.map +0 -1
- package/dist/index-DtTqwV4f.d.cts +0 -462
- package/dist/index-DtTqwV4f.d.cts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/normalize-BW7kk8Lk.d.cts +0 -21
- package/dist/normalize-BW7kk8Lk.d.cts.map +0 -1
- package/dist/normalize-D4Qh0wVk.cjs +0 -28
- package/dist/normalize-D4Qh0wVk.cjs.map +0 -1
- package/dist/normalize-D7nae0Hn.mjs +0 -22
- package/dist/normalize-D7nae0Hn.mjs.map +0 -1
- package/dist/normalize-eB_j86fm.d.mts +0 -21
- package/dist/normalize-eB_j86fm.d.mts.map +0 -1
- package/dist/package-CaRYwbRi.mjs.map +0 -1
- package/dist/package-DyTuSutr.cjs.map +0 -1
- package/dist/plugins-C6MGKdD-.mjs +0 -790
- package/dist/plugins-C6MGKdD-.mjs.map +0 -1
- package/dist/plugins-DNaNtkG7.cjs +0 -791
- package/dist/plugins-DNaNtkG7.cjs.map +0 -1
- package/dist/runtime-BNcFgWDG.cjs +0 -558
- package/dist/runtime-BNcFgWDG.cjs.map +0 -1
- package/dist/runtime-CAWcnrAk.mjs +0 -547
- package/dist/runtime-CAWcnrAk.mjs.map +0 -1
- package/dist/standard-CkH8zNkx.mjs +0 -584
- package/dist/standard-CkH8zNkx.mjs.map +0 -1
- package/dist/standard-v75BC6Z5.cjs +0 -685
- package/dist/standard-v75BC6Z5.cjs.map +0 -1
- package/dist/zod-A7Pti5IV.d.cts +0 -4
- package/dist/zod-A7Pti5IV.d.cts.map +0 -1
- package/dist/zod-BVo51kgJ.mjs +0 -10
- package/dist/zod-BVo51kgJ.mjs.map +0 -1
- package/dist/zod-DYghWCz1.cjs +0 -14
- package/dist/zod-DYghWCz1.cjs.map +0 -1
- package/dist/zod-Zw8dlP3j.d.mts +0 -4
- package/dist/zod-Zw8dlP3j.d.mts.map +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { __require } from "../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { setupPluginMiddleware } from "./dev-server-middleware.mjs";
|
|
3
|
+
import { buildSharedDependencies } from "./module-federation.mjs";
|
|
4
|
+
import { getPluginInfo, loadDevConfig } from "./utils.mjs";
|
|
5
|
+
import { ModuleFederationPlugin } from "@module-federation/enhanced/rspack";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
|
|
8
|
+
//#region src/build/rspack/plugin.ts
|
|
9
|
+
var EveryPluginDevServer = class {
|
|
10
|
+
name = "EveryPluginDevServer";
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.options = options;
|
|
13
|
+
}
|
|
14
|
+
apply(compiler) {
|
|
15
|
+
const pluginInfo = getPluginInfo(compiler.options.context || process.cwd());
|
|
16
|
+
const devConfig = loadDevConfig(this.options.devConfigPath || "./plugin.dev.ts");
|
|
17
|
+
const port = this.options.port || devConfig?.port || 3999;
|
|
18
|
+
this.configureDefaults(compiler, pluginInfo);
|
|
19
|
+
if (!compiler.options.devServer) compiler.options.devServer = {};
|
|
20
|
+
this.configureDevServer(compiler, pluginInfo, devConfig, port);
|
|
21
|
+
new ModuleFederationPlugin({
|
|
22
|
+
name: pluginInfo.normalizedName,
|
|
23
|
+
filename: "remoteEntry.js",
|
|
24
|
+
dts: false,
|
|
25
|
+
runtimePlugins: [__require.resolve("@module-federation/node/runtimePlugin")],
|
|
26
|
+
library: { type: "commonjs-module" },
|
|
27
|
+
exposes: { "./plugin": "./src/index.ts" },
|
|
28
|
+
shared: buildSharedDependencies(pluginInfo)
|
|
29
|
+
}).apply(compiler);
|
|
30
|
+
}
|
|
31
|
+
configureDefaults(compiler, pluginInfo) {
|
|
32
|
+
const context = compiler.options.context || process.cwd();
|
|
33
|
+
if (!compiler.options.output) compiler.options.output = {};
|
|
34
|
+
compiler.options.output.uniqueName = pluginInfo.normalizedName;
|
|
35
|
+
compiler.options.output.publicPath = "auto";
|
|
36
|
+
compiler.options.output.path = path.resolve(context, "dist");
|
|
37
|
+
compiler.options.output.clean = true;
|
|
38
|
+
compiler.options.output.library = { type: "commonjs-module" };
|
|
39
|
+
if (!compiler.options.target) compiler.options.target = "async-node";
|
|
40
|
+
if (!compiler.options.mode) compiler.options.mode = process.env.NODE_ENV === "development" ? "development" : "production";
|
|
41
|
+
if (!compiler.options.devtool) compiler.options.devtool = "source-map";
|
|
42
|
+
if (!compiler.options.infrastructureLogging) compiler.options.infrastructureLogging = { level: "warn" };
|
|
43
|
+
this.ensureTypeScriptLoader(compiler);
|
|
44
|
+
if (!compiler.options.resolve) compiler.options.resolve = {};
|
|
45
|
+
compiler.options.resolve.extensions = [
|
|
46
|
+
"...",
|
|
47
|
+
".tsx",
|
|
48
|
+
".ts"
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
ensureTypeScriptLoader(compiler) {
|
|
52
|
+
if (!compiler.options.module) compiler.options.module = { rules: [] };
|
|
53
|
+
if (!compiler.options.module.rules) compiler.options.module.rules = [];
|
|
54
|
+
if (!compiler.options.module.rules.some((rule) => typeof rule === "object" && rule !== null && "test" in rule && rule.test instanceof RegExp && rule.test.test(".ts"))) compiler.options.module.rules.push({
|
|
55
|
+
test: /\.tsx?$/,
|
|
56
|
+
use: "builtin:swc-loader",
|
|
57
|
+
exclude: /node_modules/
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
configureDevServer(compiler, pluginInfo, devConfig, port) {
|
|
61
|
+
if (!compiler.options.devServer) return;
|
|
62
|
+
const context = compiler.options.context || process.cwd();
|
|
63
|
+
const originalSetup = compiler.options.devServer.setupMiddlewares;
|
|
64
|
+
compiler.options.devServer.port = port;
|
|
65
|
+
compiler.options.devServer.static = path.join(context, "dist");
|
|
66
|
+
compiler.options.devServer.hot = true;
|
|
67
|
+
compiler.options.devServer.devMiddleware = { writeToDisk: true };
|
|
68
|
+
compiler.options.devServer.headers = {
|
|
69
|
+
"Access-Control-Allow-Origin": "*",
|
|
70
|
+
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
|
|
71
|
+
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
|
|
72
|
+
};
|
|
73
|
+
compiler.options.devServer.client = {
|
|
74
|
+
logging: "warn",
|
|
75
|
+
overlay: {
|
|
76
|
+
warnings: false,
|
|
77
|
+
errors: true
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
compiler.options.devServer.setupMiddlewares = (middlewares, devServer) => {
|
|
81
|
+
setupPluginMiddleware(devServer, pluginInfo, devConfig, port);
|
|
82
|
+
return originalSetup ? originalSetup(middlewares, devServer) : middlewares;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { EveryPluginDevServer };
|
|
89
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":["options: EveryPluginOptions"],"sources":["../../../src/build/rspack/plugin.ts"],"sourcesContent":["import { ModuleFederationPlugin } from '@module-federation/enhanced/rspack';\nimport type { Compiler, RspackPluginInstance } from '@rspack/core';\nimport path from 'node:path';\nimport { setupPluginMiddleware } from './dev-server-middleware';\nimport { buildSharedDependencies } from './module-federation';\nimport { getPluginInfo, loadDevConfig } from './utils';\n\n\nexport interface EveryPluginOptions {\n devConfigPath?: string; // defaults to './plugin.dev.ts'\n port?: number; // override plugin.dev.ts port\n pluginId?: string; // override auto-detected\n}\n\nexport class EveryPluginDevServer implements RspackPluginInstance {\n name = 'EveryPluginDevServer';\n\n constructor(private options: EveryPluginOptions = {}) { }\n\n apply(compiler: Compiler) {\n // Load configuration\n const pluginInfo = getPluginInfo(compiler.options.context || process.cwd());\n const devConfig = loadDevConfig(this.options.devConfigPath || './plugin.dev.ts');\n const port = this.options.port || devConfig?.port || 3999;\n\n // Configure defaults immediately (no hooks needed)\n this.configureDefaults(compiler, pluginInfo);\n\n // Initialize devServer if it doesn't exist\n if (!compiler.options.devServer) {\n compiler.options.devServer = {};\n }\n\n // Configure dev server\n this.configureDevServer(compiler, pluginInfo, devConfig, port);\n\n // Apply Module Federation plugin\n new ModuleFederationPlugin({\n name: pluginInfo.normalizedName,\n filename: 'remoteEntry.js',\n // manifest: true, // Enable MF 2.0 manifest generation\n dts: false,\n runtimePlugins: [\n require.resolve('@module-federation/node/runtimePlugin'),\n ],\n library: { type: 'commonjs-module' },\n exposes: {\n './plugin': './src/index.ts',\n },\n shared: buildSharedDependencies(pluginInfo),\n }).apply(compiler);\n }\n\n private configureDefaults(compiler: Compiler, pluginInfo: any) {\n const context = compiler.options.context || process.cwd();\n\n // Configure output defaults\n if (!compiler.options.output) {\n compiler.options.output = {};\n }\n compiler.options.output.uniqueName = pluginInfo.normalizedName;\n compiler.options.output.publicPath = 'auto';\n compiler.options.output.path = path.resolve(context, 'dist');\n compiler.options.output.clean = true;\n compiler.options.output.library = { type: 'commonjs-module' };\n\n // Configure target and mode defaults\n if (!compiler.options.target) {\n compiler.options.target = 'async-node';\n }\n\n if (!compiler.options.mode) {\n compiler.options.mode = process.env.NODE_ENV === 'development' ? 'development' : 'production';\n }\n\n // Configure devtool\n if (!compiler.options.devtool) {\n compiler.options.devtool = 'source-map';\n }\n\n // Suppress verbose infrastructure logging\n if (!compiler.options.infrastructureLogging) {\n compiler.options.infrastructureLogging = {\n level: 'warn', // Only show warnings and errors\n };\n }\n\n // Configure module rules - ensure TypeScript loader is present\n this.ensureTypeScriptLoader(compiler);\n\n // Configure resolve extensions\n if (!compiler.options.resolve) {\n compiler.options.resolve = {};\n }\n compiler.options.resolve.extensions = ['...', '.tsx', '.ts'];\n }\n\n private ensureTypeScriptLoader(compiler: Compiler) {\n if (!compiler.options.module) {\n compiler.options.module = { rules: [] } as any;\n }\n\n if (!compiler.options.module.rules) {\n compiler.options.module.rules = [];\n }\n\n // Check if TypeScript loader is already configured\n const hasTsLoader = compiler.options.module.rules.some((rule: any) =>\n typeof rule === 'object' &&\n rule !== null &&\n 'test' in rule &&\n rule.test instanceof RegExp &&\n rule.test.test('.ts')\n );\n\n // Add TypeScript loader if not present\n if (!hasTsLoader) {\n compiler.options.module.rules.push({\n test: /\\.tsx?$/,\n use: 'builtin:swc-loader',\n exclude: /node_modules/,\n });\n }\n }\n\n private configureDevServer(compiler: Compiler, pluginInfo: any, devConfig: any, port: number) {\n if (!compiler.options.devServer) {\n return; // Should never happen due to check in apply()\n }\n\n const context = compiler.options.context || process.cwd();\n const originalSetup = compiler.options.devServer.setupMiddlewares;\n\n compiler.options.devServer.port = port;\n compiler.options.devServer.static = path.join(context, 'dist');\n compiler.options.devServer.hot = true;\n compiler.options.devServer.devMiddleware = { writeToDisk: true };\n compiler.options.devServer.headers = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',\n 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',\n };\n\n // Suppress verbose logging\n compiler.options.devServer.client = {\n logging: 'warn', // Only show warnings and errors\n overlay: {\n warnings: false, // Don't show warning overlay\n errors: true, // Still show errors\n },\n };\n\n compiler.options.devServer.setupMiddlewares = (middlewares, devServer) => {\n setupPluginMiddleware(devServer, pluginInfo, devConfig, port);\n return originalSetup ? originalSetup(middlewares, devServer) : middlewares;\n };\n }\n}\n"],"mappings":";;;;;;;;AAcA,IAAa,uBAAb,MAAkE;CAChE,OAAO;CAEP,YAAY,AAAQA,UAA8B,EAAE,EAAE;EAAlC;;CAEpB,MAAM,UAAoB;EAExB,MAAM,aAAa,cAAc,SAAS,QAAQ,WAAW,QAAQ,KAAK,CAAC;EAC3E,MAAM,YAAY,cAAc,KAAK,QAAQ,iBAAiB,kBAAkB;EAChF,MAAM,OAAO,KAAK,QAAQ,QAAQ,WAAW,QAAQ;AAGrD,OAAK,kBAAkB,UAAU,WAAW;AAG5C,MAAI,CAAC,SAAS,QAAQ,UACpB,UAAS,QAAQ,YAAY,EAAE;AAIjC,OAAK,mBAAmB,UAAU,YAAY,WAAW,KAAK;AAG9D,MAAI,uBAAuB;GACzB,MAAM,WAAW;GACjB,UAAU;GAEV,KAAK;GACL,gBAAgB,WACN,QAAQ,wCAAwC,CACzD;GACD,SAAS,EAAE,MAAM,mBAAmB;GACpC,SAAS,EACP,YAAY,kBACb;GACD,QAAQ,wBAAwB,WAAW;GAC5C,CAAC,CAAC,MAAM,SAAS;;CAGpB,AAAQ,kBAAkB,UAAoB,YAAiB;EAC7D,MAAM,UAAU,SAAS,QAAQ,WAAW,QAAQ,KAAK;AAGzD,MAAI,CAAC,SAAS,QAAQ,OACpB,UAAS,QAAQ,SAAS,EAAE;AAE9B,WAAS,QAAQ,OAAO,aAAa,WAAW;AAChD,WAAS,QAAQ,OAAO,aAAa;AACrC,WAAS,QAAQ,OAAO,OAAO,KAAK,QAAQ,SAAS,OAAO;AAC5D,WAAS,QAAQ,OAAO,QAAQ;AAChC,WAAS,QAAQ,OAAO,UAAU,EAAE,MAAM,mBAAmB;AAG7D,MAAI,CAAC,SAAS,QAAQ,OACpB,UAAS,QAAQ,SAAS;AAG5B,MAAI,CAAC,SAAS,QAAQ,KACpB,UAAS,QAAQ,OAAO,QAAQ,IAAI,aAAa,gBAAgB,gBAAgB;AAInF,MAAI,CAAC,SAAS,QAAQ,QACpB,UAAS,QAAQ,UAAU;AAI7B,MAAI,CAAC,SAAS,QAAQ,sBACpB,UAAS,QAAQ,wBAAwB,EACvC,OAAO,QACR;AAIH,OAAK,uBAAuB,SAAS;AAGrC,MAAI,CAAC,SAAS,QAAQ,QACpB,UAAS,QAAQ,UAAU,EAAE;AAE/B,WAAS,QAAQ,QAAQ,aAAa;GAAC;GAAO;GAAQ;GAAM;;CAG9D,AAAQ,uBAAuB,UAAoB;AACjD,MAAI,CAAC,SAAS,QAAQ,OACpB,UAAS,QAAQ,SAAS,EAAE,OAAO,EAAE,EAAE;AAGzC,MAAI,CAAC,SAAS,QAAQ,OAAO,MAC3B,UAAS,QAAQ,OAAO,QAAQ,EAAE;AAapC,MAAI,CATgB,SAAS,QAAQ,OAAO,MAAM,MAAM,SACtD,OAAO,SAAS,YAChB,SAAS,QACT,UAAU,QACV,KAAK,gBAAgB,UACrB,KAAK,KAAK,KAAK,MAAM,CACtB,CAIC,UAAS,QAAQ,OAAO,MAAM,KAAK;GACjC,MAAM;GACN,KAAK;GACL,SAAS;GACV,CAAC;;CAIN,AAAQ,mBAAmB,UAAoB,YAAiB,WAAgB,MAAc;AAC5F,MAAI,CAAC,SAAS,QAAQ,UACpB;EAGF,MAAM,UAAU,SAAS,QAAQ,WAAW,QAAQ,KAAK;EACzD,MAAM,gBAAgB,SAAS,QAAQ,UAAU;AAEjD,WAAS,QAAQ,UAAU,OAAO;AAClC,WAAS,QAAQ,UAAU,SAAS,KAAK,KAAK,SAAS,OAAO;AAC9D,WAAS,QAAQ,UAAU,MAAM;AACjC,WAAS,QAAQ,UAAU,gBAAgB,EAAE,aAAa,MAAM;AAChE,WAAS,QAAQ,UAAU,UAAU;GACnC,+BAA+B;GAC/B,gCAAgC;GAChC,gCAAgC;GACjC;AAGD,WAAS,QAAQ,UAAU,SAAS;GAClC,SAAS;GACT,SAAS;IACP,UAAU;IACV,QAAQ;IACT;GACF;AAED,WAAS,QAAQ,UAAU,oBAAoB,aAAa,cAAc;AACxE,yBAAsB,WAAW,YAAY,WAAW,KAAK;AAC7D,UAAO,gBAAgB,cAAc,aAAa,UAAU,GAAG"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_runtime_services_normalize = require('../../runtime/services/normalize.cjs');
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
5
|
+
let node_fs = require("node:fs");
|
|
6
|
+
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
7
|
+
|
|
8
|
+
//#region src/build/rspack/utils.ts
|
|
9
|
+
function getPluginInfo(context) {
|
|
10
|
+
const pkgPath = node_path.default.join(context, "package.json");
|
|
11
|
+
const pkg = JSON.parse(node_fs.default.readFileSync(pkgPath, "utf-8"));
|
|
12
|
+
return {
|
|
13
|
+
name: pkg.name,
|
|
14
|
+
version: pkg.version,
|
|
15
|
+
normalizedName: require_runtime_services_normalize.getNormalizedRemoteName(pkg.name),
|
|
16
|
+
dependencies: pkg.dependencies || {},
|
|
17
|
+
peerDependencies: pkg.peerDependencies || {}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const loadedModules = /* @__PURE__ */ new Set();
|
|
21
|
+
function loadDevConfig(devConfigPath) {
|
|
22
|
+
try {
|
|
23
|
+
const fullPath = node_path.default.resolve(devConfigPath);
|
|
24
|
+
if (loadedModules.has(fullPath)) {
|
|
25
|
+
delete require.cache[fullPath];
|
|
26
|
+
const dirPath = node_path.default.dirname(fullPath);
|
|
27
|
+
for (const key of Object.keys(require.cache)) if (key.startsWith(dirPath) && key !== fullPath) delete require.cache[key];
|
|
28
|
+
}
|
|
29
|
+
const module$1 = require(fullPath).default;
|
|
30
|
+
loadedModules.add(fullPath);
|
|
31
|
+
return module$1;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.warn(`Could not load dev config from ${devConfigPath}:`, error.message);
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.getPluginInfo = getPluginInfo;
|
|
40
|
+
exports.loadDevConfig = loadDevConfig;
|
|
41
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":["path","fs","getNormalizedRemoteName","module"],"sources":["../../../src/build/rspack/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\nimport { getNormalizedRemoteName } from 'every-plugin/normalize';\n\nexport interface PluginInfo {\n name: string;\n version: string;\n normalizedName: string;\n dependencies: Record<string, string>;\n peerDependencies: Record<string, string>;\n}\n\nexport function getPluginInfo(context: string): PluginInfo {\n const pkgPath = path.join(context, 'package.json');\n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));\n\n return {\n name: pkg.name,\n version: pkg.version,\n normalizedName: getNormalizedRemoteName(pkg.name),\n dependencies: pkg.dependencies || {},\n peerDependencies: pkg.peerDependencies || {},\n };\n}\n\nconst loadedModules = new Set<string>();\n\nexport function loadDevConfig(devConfigPath: string) {\n try {\n const fullPath = path.resolve(devConfigPath);\n \n if (loadedModules.has(fullPath)) {\n delete require.cache[fullPath];\n const dirPath = path.dirname(fullPath);\n for (const key of Object.keys(require.cache)) {\n if (key.startsWith(dirPath) && key !== fullPath) {\n delete require.cache[key];\n }\n }\n }\n \n const module = require(fullPath).default;\n loadedModules.add(fullPath);\n return module;\n } catch (error) {\n console.warn(`Could not load dev config from ${devConfigPath}:`, (error as Error).message);\n return null;\n }\n}\n\nexport function cleanupDevConfig() {\n for (const modulePath of loadedModules) {\n delete require.cache[modulePath];\n }\n loadedModules.clear();\n}\n"],"mappings":";;;;;;;;AAYA,SAAgB,cAAc,SAA6B;CACzD,MAAM,UAAUA,kBAAK,KAAK,SAAS,eAAe;CAClD,MAAM,MAAM,KAAK,MAAMC,gBAAG,aAAa,SAAS,QAAQ,CAAC;AAEzD,QAAO;EACL,MAAM,IAAI;EACV,SAAS,IAAI;EACb,gBAAgBC,2DAAwB,IAAI,KAAK;EACjD,cAAc,IAAI,gBAAgB,EAAE;EACpC,kBAAkB,IAAI,oBAAoB,EAAE;EAC7C;;AAGH,MAAM,gCAAgB,IAAI,KAAa;AAEvC,SAAgB,cAAc,eAAuB;AACnD,KAAI;EACF,MAAM,WAAWF,kBAAK,QAAQ,cAAc;AAE5C,MAAI,cAAc,IAAI,SAAS,EAAE;AAC/B,UAAO,QAAQ,MAAM;GACrB,MAAM,UAAUA,kBAAK,QAAQ,SAAS;AACtC,QAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,MAAM,CAC1C,KAAI,IAAI,WAAW,QAAQ,IAAI,QAAQ,SACrC,QAAO,QAAQ,MAAM;;EAK3B,MAAMG,WAAS,QAAQ,SAAS,CAAC;AACjC,gBAAc,IAAI,SAAS;AAC3B,SAAOA;UACA,OAAO;AACd,UAAQ,KAAK,kCAAkC,cAAc,IAAK,MAAgB,QAAQ;AAC1F,SAAO"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __require } from "../../_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { getNormalizedRemoteName } from "../../runtime/services/normalize.mjs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
|
|
6
|
+
//#region src/build/rspack/utils.ts
|
|
7
|
+
function getPluginInfo(context) {
|
|
8
|
+
const pkgPath = path.join(context, "package.json");
|
|
9
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
10
|
+
return {
|
|
11
|
+
name: pkg.name,
|
|
12
|
+
version: pkg.version,
|
|
13
|
+
normalizedName: getNormalizedRemoteName(pkg.name),
|
|
14
|
+
dependencies: pkg.dependencies || {},
|
|
15
|
+
peerDependencies: pkg.peerDependencies || {}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const loadedModules = /* @__PURE__ */ new Set();
|
|
19
|
+
function loadDevConfig(devConfigPath) {
|
|
20
|
+
try {
|
|
21
|
+
const fullPath = path.resolve(devConfigPath);
|
|
22
|
+
if (loadedModules.has(fullPath)) {
|
|
23
|
+
delete __require.cache[fullPath];
|
|
24
|
+
const dirPath = path.dirname(fullPath);
|
|
25
|
+
for (const key of Object.keys(__require.cache)) if (key.startsWith(dirPath) && key !== fullPath) delete __require.cache[key];
|
|
26
|
+
}
|
|
27
|
+
const module = __require(fullPath).default;
|
|
28
|
+
loadedModules.add(fullPath);
|
|
29
|
+
return module;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.warn(`Could not load dev config from ${devConfigPath}:`, error.message);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { getPluginInfo, loadDevConfig };
|
|
38
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/build/rspack/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs';\nimport { getNormalizedRemoteName } from 'every-plugin/normalize';\n\nexport interface PluginInfo {\n name: string;\n version: string;\n normalizedName: string;\n dependencies: Record<string, string>;\n peerDependencies: Record<string, string>;\n}\n\nexport function getPluginInfo(context: string): PluginInfo {\n const pkgPath = path.join(context, 'package.json');\n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));\n\n return {\n name: pkg.name,\n version: pkg.version,\n normalizedName: getNormalizedRemoteName(pkg.name),\n dependencies: pkg.dependencies || {},\n peerDependencies: pkg.peerDependencies || {},\n };\n}\n\nconst loadedModules = new Set<string>();\n\nexport function loadDevConfig(devConfigPath: string) {\n try {\n const fullPath = path.resolve(devConfigPath);\n \n if (loadedModules.has(fullPath)) {\n delete require.cache[fullPath];\n const dirPath = path.dirname(fullPath);\n for (const key of Object.keys(require.cache)) {\n if (key.startsWith(dirPath) && key !== fullPath) {\n delete require.cache[key];\n }\n }\n }\n \n const module = require(fullPath).default;\n loadedModules.add(fullPath);\n return module;\n } catch (error) {\n console.warn(`Could not load dev config from ${devConfigPath}:`, (error as Error).message);\n return null;\n }\n}\n\nexport function cleanupDevConfig() {\n for (const modulePath of loadedModules) {\n delete require.cache[modulePath];\n }\n loadedModules.clear();\n}\n"],"mappings":";;;;;;AAYA,SAAgB,cAAc,SAA6B;CACzD,MAAM,UAAU,KAAK,KAAK,SAAS,eAAe;CAClD,MAAM,MAAM,KAAK,MAAM,GAAG,aAAa,SAAS,QAAQ,CAAC;AAEzD,QAAO;EACL,MAAM,IAAI;EACV,SAAS,IAAI;EACb,gBAAgB,wBAAwB,IAAI,KAAK;EACjD,cAAc,IAAI,gBAAgB,EAAE;EACpC,kBAAkB,IAAI,oBAAoB,EAAE;EAC7C;;AAGH,MAAM,gCAAgB,IAAI,KAAa;AAEvC,SAAgB,cAAc,eAAuB;AACnD,KAAI;EACF,MAAM,WAAW,KAAK,QAAQ,cAAc;AAE5C,MAAI,cAAc,IAAI,SAAS,EAAE;AAC/B,oBAAe,MAAM;GACrB,MAAM,UAAU,KAAK,QAAQ,SAAS;AACtC,QAAK,MAAM,OAAO,OAAO,eAAa,MAAM,CAC1C,KAAI,IAAI,WAAW,QAAQ,IAAI,QAAQ,SACrC,kBAAe,MAAM;;EAK3B,MAAM,mBAAiB,SAAS,CAAC;AACjC,gBAAc,IAAI,SAAS;AAC3B,SAAO;UACA,OAAO;AACd,UAAQ,KAAK,kCAAkC,cAAc,IAAK,MAAgB,QAAQ;AAC1F,SAAO"}
|
package/dist/errors.cjs
CHANGED
|
@@ -1,4 +1,63 @@
|
|
|
1
|
-
require('./zod
|
|
2
|
-
const require_errors = require('./errors-CVnoPl9v.cjs');
|
|
1
|
+
const require_zod = require('./zod.cjs');
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
//#region src/errors.ts
|
|
4
|
+
/**
|
|
5
|
+
* Common error schemas for plugin contracts.
|
|
6
|
+
* Import these to ensure consistent error handling across plugins.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { CommonPluginErrors } from "every-plugin/errors";
|
|
11
|
+
*
|
|
12
|
+
* export const contract = oc.router({
|
|
13
|
+
* getData: oc.route(...)
|
|
14
|
+
* .errors(CommonPluginErrors)
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const CommonPluginErrors = {
|
|
19
|
+
UNAUTHORIZED: { data: require_zod.zod_exports.z.object({
|
|
20
|
+
apiKeyProvided: require_zod.zod_exports.z.boolean(),
|
|
21
|
+
provider: require_zod.zod_exports.z.string().optional(),
|
|
22
|
+
authType: require_zod.zod_exports.z.enum([
|
|
23
|
+
"apiKey",
|
|
24
|
+
"oauth",
|
|
25
|
+
"token"
|
|
26
|
+
]).optional()
|
|
27
|
+
}) },
|
|
28
|
+
RATE_LIMITED: { data: require_zod.zod_exports.z.object({
|
|
29
|
+
retryAfter: require_zod.zod_exports.z.number().int().min(1),
|
|
30
|
+
remainingRequests: require_zod.zod_exports.z.number().int().min(0).optional(),
|
|
31
|
+
resetTime: require_zod.zod_exports.z.string().datetime().optional(),
|
|
32
|
+
limitType: require_zod.zod_exports.z.enum([
|
|
33
|
+
"requests",
|
|
34
|
+
"tokens",
|
|
35
|
+
"bandwidth"
|
|
36
|
+
]).optional()
|
|
37
|
+
}) },
|
|
38
|
+
SERVICE_UNAVAILABLE: { data: require_zod.zod_exports.z.object({
|
|
39
|
+
retryAfter: require_zod.zod_exports.z.number().int().optional(),
|
|
40
|
+
maintenanceWindow: require_zod.zod_exports.z.boolean().default(false),
|
|
41
|
+
estimatedUptime: require_zod.zod_exports.z.string().datetime().optional()
|
|
42
|
+
}) },
|
|
43
|
+
BAD_REQUEST: { data: require_zod.zod_exports.z.object({
|
|
44
|
+
invalidFields: require_zod.zod_exports.z.array(require_zod.zod_exports.z.string()).optional(),
|
|
45
|
+
validationErrors: require_zod.zod_exports.z.array(require_zod.zod_exports.z.object({
|
|
46
|
+
field: require_zod.zod_exports.z.string(),
|
|
47
|
+
message: require_zod.zod_exports.z.string(),
|
|
48
|
+
code: require_zod.zod_exports.z.string().optional()
|
|
49
|
+
})).optional()
|
|
50
|
+
}) },
|
|
51
|
+
NOT_FOUND: { data: require_zod.zod_exports.z.object({
|
|
52
|
+
resource: require_zod.zod_exports.z.string().optional(),
|
|
53
|
+
resourceId: require_zod.zod_exports.z.string().optional()
|
|
54
|
+
}) },
|
|
55
|
+
FORBIDDEN: { data: require_zod.zod_exports.z.object({
|
|
56
|
+
requiredPermissions: require_zod.zod_exports.z.array(require_zod.zod_exports.z.string()).optional(),
|
|
57
|
+
action: require_zod.zod_exports.z.string().optional()
|
|
58
|
+
}) }
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
exports.CommonPluginErrors = CommonPluginErrors;
|
|
63
|
+
//# sourceMappingURL=errors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.cjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["import { z } from \"./zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import these to ensure consistent error handling across plugins.\n *\n * @example\n * ```typescript\n * import { CommonPluginErrors } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors(CommonPluginErrors)\n * });\n * ```\n */\nexport const CommonPluginErrors = {\n\tUNAUTHORIZED: {\n\t\tdata: z.object({\n\t\t\tapiKeyProvided: z.boolean(),\n\t\t\tprovider: z.string().optional(),\n\t\t\tauthType: z.enum(['apiKey', 'oauth', 'token']).optional(),\n\t\t})\n\t},\n\tRATE_LIMITED: {\n\t\tdata: z.object({\n\t\t\tretryAfter: z.number().int().min(1),\n\t\t\tremainingRequests: z.number().int().min(0).optional(),\n\t\t\tresetTime: z.string().datetime().optional(),\n\t\t\tlimitType: z.enum(['requests', 'tokens', 'bandwidth']).optional(),\n\t\t})\n\t},\n\tSERVICE_UNAVAILABLE: {\n\t\tdata: z.object({\n\t\t\tretryAfter: z.number().int().optional(),\n\t\t\tmaintenanceWindow: z.boolean().default(false),\n\t\t\testimatedUptime: z.string().datetime().optional(),\n\t\t})\n\t},\n\tBAD_REQUEST: {\n\t\tdata: z.object({\n\t\t\tinvalidFields: z.array(z.string()).optional(),\n\t\t\tvalidationErrors: z.array(z.object({\n\t\t\t\tfield: z.string(),\n\t\t\t\tmessage: z.string(),\n\t\t\t\tcode: z.string().optional(),\n\t\t\t})).optional(),\n\t\t})\n\t},\n\tNOT_FOUND: {\n\t\tdata: z.object({\n\t\t\tresource: z.string().optional(),\n\t\t\tresourceId: z.string().optional(),\n\t\t})\n\t},\n\tFORBIDDEN: {\n\t\tdata: z.object({\n\t\t\trequiredPermissions: z.array(z.string()).optional(),\n\t\t\taction: z.string().optional(),\n\t\t})\n\t}\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,MAAa,qBAAqB;CACjC,cAAc,EACb,8BAAM,EAAE,OAAO;EACd,wCAAgB,EAAE,SAAS;EAC3B,kCAAU,EAAE,QAAQ,CAAC,UAAU;EAC/B,kCAAU,EAAE,KAAK;GAAC;GAAU;GAAS;GAAQ,CAAC,CAAC,UAAU;EACzD,CAAC,EACF;CACD,cAAc,EACb,8BAAM,EAAE,OAAO;EACd,oCAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE;EACnC,2CAAmB,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU;EACrD,mCAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;EAC3C,mCAAW,EAAE,KAAK;GAAC;GAAY;GAAU;GAAY,CAAC,CAAC,UAAU;EACjE,CAAC,EACF;CACD,qBAAqB,EACpB,8BAAM,EAAE,OAAO;EACd,oCAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU;EACvC,2CAAmB,EAAE,SAAS,CAAC,QAAQ,MAAM;EAC7C,yCAAiB,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;EACjD,CAAC,EACF;CACD,aAAa,EACZ,8BAAM,EAAE,OAAO;EACd,uCAAe,EAAE,8BAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;EAC7C,0CAAkB,EAAE,8BAAM,EAAE,OAAO;GAClC,+BAAO,EAAE,QAAQ;GACjB,iCAAS,EAAE,QAAQ;GACnB,8BAAM,EAAE,QAAQ,CAAC,UAAU;GAC3B,CAAC,CAAC,CAAC,UAAU;EACd,CAAC,EACF;CACD,WAAW,EACV,8BAAM,EAAE,OAAO;EACd,kCAAU,EAAE,QAAQ,CAAC,UAAU;EAC/B,oCAAY,EAAE,QAAQ,CAAC,UAAU;EACjC,CAAC,EACF;CACD,WAAW,EACV,8BAAM,EAAE,OAAO;EACd,6CAAqB,EAAE,8BAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;EACnD,gCAAQ,EAAE,QAAQ,CAAC,UAAU;EAC7B,CAAC,EACF;CACD"}
|
package/dist/errors.d.cts
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
import "./zod
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { zod_d_exports } from "./zod.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/errors.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Common error schemas for plugin contracts.
|
|
7
|
+
* Import these to ensure consistent error handling across plugins.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { CommonPluginErrors } from "every-plugin/errors";
|
|
12
|
+
*
|
|
13
|
+
* export const contract = oc.router({
|
|
14
|
+
* getData: oc.route(...)
|
|
15
|
+
* .errors(CommonPluginErrors)
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare const CommonPluginErrors: {
|
|
20
|
+
readonly UNAUTHORIZED: {
|
|
21
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
22
|
+
apiKeyProvided: zod_d_exports.z.ZodBoolean;
|
|
23
|
+
provider: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
24
|
+
authType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
25
|
+
apiKey: "apiKey";
|
|
26
|
+
oauth: "oauth";
|
|
27
|
+
token: "token";
|
|
28
|
+
}>>;
|
|
29
|
+
}, zod_d_exports.z.core.$strip>;
|
|
30
|
+
};
|
|
31
|
+
readonly RATE_LIMITED: {
|
|
32
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
33
|
+
retryAfter: zod_d_exports.z.ZodNumber;
|
|
34
|
+
remainingRequests: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
35
|
+
resetTime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
36
|
+
limitType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
37
|
+
requests: "requests";
|
|
38
|
+
tokens: "tokens";
|
|
39
|
+
bandwidth: "bandwidth";
|
|
40
|
+
}>>;
|
|
41
|
+
}, zod_d_exports.z.core.$strip>;
|
|
42
|
+
};
|
|
43
|
+
readonly SERVICE_UNAVAILABLE: {
|
|
44
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
45
|
+
retryAfter: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
46
|
+
maintenanceWindow: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
47
|
+
estimatedUptime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
48
|
+
}, zod_d_exports.z.core.$strip>;
|
|
49
|
+
};
|
|
50
|
+
readonly BAD_REQUEST: {
|
|
51
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
52
|
+
invalidFields: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
53
|
+
validationErrors: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodObject<{
|
|
54
|
+
field: zod_d_exports.z.ZodString;
|
|
55
|
+
message: zod_d_exports.z.ZodString;
|
|
56
|
+
code: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
57
|
+
}, zod_d_exports.z.core.$strip>>>;
|
|
58
|
+
}, zod_d_exports.z.core.$strip>;
|
|
59
|
+
};
|
|
60
|
+
readonly NOT_FOUND: {
|
|
61
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
62
|
+
resource: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
63
|
+
resourceId: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
64
|
+
}, zod_d_exports.z.core.$strip>;
|
|
65
|
+
};
|
|
66
|
+
readonly FORBIDDEN: {
|
|
67
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
68
|
+
requiredPermissions: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
69
|
+
action: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
70
|
+
}, zod_d_exports.z.core.$strip>;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { CommonPluginErrors };
|
|
75
|
+
//# sourceMappingURL=errors.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;;cAAa"}
|
package/dist/errors.d.mts
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
import "./zod
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { zod_d_exports } from "./zod.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/errors.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Common error schemas for plugin contracts.
|
|
7
|
+
* Import these to ensure consistent error handling across plugins.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { CommonPluginErrors } from "every-plugin/errors";
|
|
12
|
+
*
|
|
13
|
+
* export const contract = oc.router({
|
|
14
|
+
* getData: oc.route(...)
|
|
15
|
+
* .errors(CommonPluginErrors)
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare const CommonPluginErrors: {
|
|
20
|
+
readonly UNAUTHORIZED: {
|
|
21
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
22
|
+
apiKeyProvided: zod_d_exports.z.ZodBoolean;
|
|
23
|
+
provider: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
24
|
+
authType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
25
|
+
apiKey: "apiKey";
|
|
26
|
+
oauth: "oauth";
|
|
27
|
+
token: "token";
|
|
28
|
+
}>>;
|
|
29
|
+
}, zod_d_exports.z.core.$strip>;
|
|
30
|
+
};
|
|
31
|
+
readonly RATE_LIMITED: {
|
|
32
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
33
|
+
retryAfter: zod_d_exports.z.ZodNumber;
|
|
34
|
+
remainingRequests: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
35
|
+
resetTime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
36
|
+
limitType: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodEnum<{
|
|
37
|
+
requests: "requests";
|
|
38
|
+
tokens: "tokens";
|
|
39
|
+
bandwidth: "bandwidth";
|
|
40
|
+
}>>;
|
|
41
|
+
}, zod_d_exports.z.core.$strip>;
|
|
42
|
+
};
|
|
43
|
+
readonly SERVICE_UNAVAILABLE: {
|
|
44
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
45
|
+
retryAfter: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodNumber>;
|
|
46
|
+
maintenanceWindow: zod_d_exports.z.ZodDefault<zod_d_exports.z.ZodBoolean>;
|
|
47
|
+
estimatedUptime: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
48
|
+
}, zod_d_exports.z.core.$strip>;
|
|
49
|
+
};
|
|
50
|
+
readonly BAD_REQUEST: {
|
|
51
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
52
|
+
invalidFields: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
53
|
+
validationErrors: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodObject<{
|
|
54
|
+
field: zod_d_exports.z.ZodString;
|
|
55
|
+
message: zod_d_exports.z.ZodString;
|
|
56
|
+
code: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
57
|
+
}, zod_d_exports.z.core.$strip>>>;
|
|
58
|
+
}, zod_d_exports.z.core.$strip>;
|
|
59
|
+
};
|
|
60
|
+
readonly NOT_FOUND: {
|
|
61
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
62
|
+
resource: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
63
|
+
resourceId: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
64
|
+
}, zod_d_exports.z.core.$strip>;
|
|
65
|
+
};
|
|
66
|
+
readonly FORBIDDEN: {
|
|
67
|
+
readonly data: zod_d_exports.z.ZodObject<{
|
|
68
|
+
requiredPermissions: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodArray<zod_d_exports.z.ZodString>>;
|
|
69
|
+
action: zod_d_exports.z.ZodOptional<zod_d_exports.z.ZodString>;
|
|
70
|
+
}, zod_d_exports.z.core.$strip>;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { CommonPluginErrors };
|
|
75
|
+
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;;cAAa"}
|
package/dist/errors.mjs
CHANGED
|
@@ -1,4 +1,63 @@
|
|
|
1
|
-
import "./zod
|
|
2
|
-
import { t as CommonPluginErrors } from "./errors-D7keKf7a.mjs";
|
|
1
|
+
import { zod_exports } from "./zod.mjs";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
//#region src/errors.ts
|
|
4
|
+
/**
|
|
5
|
+
* Common error schemas for plugin contracts.
|
|
6
|
+
* Import these to ensure consistent error handling across plugins.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { CommonPluginErrors } from "every-plugin/errors";
|
|
11
|
+
*
|
|
12
|
+
* export const contract = oc.router({
|
|
13
|
+
* getData: oc.route(...)
|
|
14
|
+
* .errors(CommonPluginErrors)
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const CommonPluginErrors = {
|
|
19
|
+
UNAUTHORIZED: { data: zod_exports.z.object({
|
|
20
|
+
apiKeyProvided: zod_exports.z.boolean(),
|
|
21
|
+
provider: zod_exports.z.string().optional(),
|
|
22
|
+
authType: zod_exports.z.enum([
|
|
23
|
+
"apiKey",
|
|
24
|
+
"oauth",
|
|
25
|
+
"token"
|
|
26
|
+
]).optional()
|
|
27
|
+
}) },
|
|
28
|
+
RATE_LIMITED: { data: zod_exports.z.object({
|
|
29
|
+
retryAfter: zod_exports.z.number().int().min(1),
|
|
30
|
+
remainingRequests: zod_exports.z.number().int().min(0).optional(),
|
|
31
|
+
resetTime: zod_exports.z.string().datetime().optional(),
|
|
32
|
+
limitType: zod_exports.z.enum([
|
|
33
|
+
"requests",
|
|
34
|
+
"tokens",
|
|
35
|
+
"bandwidth"
|
|
36
|
+
]).optional()
|
|
37
|
+
}) },
|
|
38
|
+
SERVICE_UNAVAILABLE: { data: zod_exports.z.object({
|
|
39
|
+
retryAfter: zod_exports.z.number().int().optional(),
|
|
40
|
+
maintenanceWindow: zod_exports.z.boolean().default(false),
|
|
41
|
+
estimatedUptime: zod_exports.z.string().datetime().optional()
|
|
42
|
+
}) },
|
|
43
|
+
BAD_REQUEST: { data: zod_exports.z.object({
|
|
44
|
+
invalidFields: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
45
|
+
validationErrors: zod_exports.z.array(zod_exports.z.object({
|
|
46
|
+
field: zod_exports.z.string(),
|
|
47
|
+
message: zod_exports.z.string(),
|
|
48
|
+
code: zod_exports.z.string().optional()
|
|
49
|
+
})).optional()
|
|
50
|
+
}) },
|
|
51
|
+
NOT_FOUND: { data: zod_exports.z.object({
|
|
52
|
+
resource: zod_exports.z.string().optional(),
|
|
53
|
+
resourceId: zod_exports.z.string().optional()
|
|
54
|
+
}) },
|
|
55
|
+
FORBIDDEN: { data: zod_exports.z.object({
|
|
56
|
+
requiredPermissions: zod_exports.z.array(zod_exports.z.string()).optional(),
|
|
57
|
+
action: zod_exports.z.string().optional()
|
|
58
|
+
}) }
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { CommonPluginErrors };
|
|
63
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":["z"],"sources":["../src/errors.ts"],"sourcesContent":["import { z } from \"./zod\";\n\n/**\n * Common error schemas for plugin contracts.\n * Import these to ensure consistent error handling across plugins.\n *\n * @example\n * ```typescript\n * import { CommonPluginErrors } from \"every-plugin/errors\";\n *\n * export const contract = oc.router({\n * getData: oc.route(...)\n * .errors(CommonPluginErrors)\n * });\n * ```\n */\nexport const CommonPluginErrors = {\n\tUNAUTHORIZED: {\n\t\tdata: z.object({\n\t\t\tapiKeyProvided: z.boolean(),\n\t\t\tprovider: z.string().optional(),\n\t\t\tauthType: z.enum(['apiKey', 'oauth', 'token']).optional(),\n\t\t})\n\t},\n\tRATE_LIMITED: {\n\t\tdata: z.object({\n\t\t\tretryAfter: z.number().int().min(1),\n\t\t\tremainingRequests: z.number().int().min(0).optional(),\n\t\t\tresetTime: z.string().datetime().optional(),\n\t\t\tlimitType: z.enum(['requests', 'tokens', 'bandwidth']).optional(),\n\t\t})\n\t},\n\tSERVICE_UNAVAILABLE: {\n\t\tdata: z.object({\n\t\t\tretryAfter: z.number().int().optional(),\n\t\t\tmaintenanceWindow: z.boolean().default(false),\n\t\t\testimatedUptime: z.string().datetime().optional(),\n\t\t})\n\t},\n\tBAD_REQUEST: {\n\t\tdata: z.object({\n\t\t\tinvalidFields: z.array(z.string()).optional(),\n\t\t\tvalidationErrors: z.array(z.object({\n\t\t\t\tfield: z.string(),\n\t\t\t\tmessage: z.string(),\n\t\t\t\tcode: z.string().optional(),\n\t\t\t})).optional(),\n\t\t})\n\t},\n\tNOT_FOUND: {\n\t\tdata: z.object({\n\t\t\tresource: z.string().optional(),\n\t\t\tresourceId: z.string().optional(),\n\t\t})\n\t},\n\tFORBIDDEN: {\n\t\tdata: z.object({\n\t\t\trequiredPermissions: z.array(z.string()).optional(),\n\t\t\taction: z.string().optional(),\n\t\t})\n\t}\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,MAAa,qBAAqB;CACjC,cAAc,EACb,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,EACF;CACD,cAAc,EACb,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,EACF;CACD,qBAAqB,EACpB,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,EACF;CACD,aAAa,EACZ,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,EACF;CACD,WAAW,EACV,MAAMA,cAAE,OAAO;EACd,UAAUA,cAAE,QAAQ,CAAC,UAAU;EAC/B,YAAYA,cAAE,QAAQ,CAAC,UAAU;EACjC,CAAC,EACF;CACD,WAAW,EACV,MAAMA,cAAE,OAAO;EACd,qBAAqBA,cAAE,MAAMA,cAAE,QAAQ,CAAC,CAAC,UAAU;EACnD,QAAQA,cAAE,QAAQ,CAAC,UAAU;EAC7B,CAAC,EACF;CACD"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,57 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
require('./
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const require_normalize = require('./normalize-D4Qh0wVk.cjs');
|
|
6
|
-
require('./package-DyTuSutr.cjs');
|
|
7
|
-
let effect = require("effect");
|
|
8
|
-
let __orpc_server = require("@orpc/server");
|
|
1
|
+
const require_errors = require('./errors.cjs');
|
|
2
|
+
const require_plugin = require('./plugin.cjs');
|
|
3
|
+
const require_runtime_services_normalize = require('./runtime/services/normalize.cjs');
|
|
4
|
+
const require_runtime_index = require('./runtime/index.cjs');
|
|
9
5
|
|
|
10
|
-
//#region src/plugin.ts
|
|
11
|
-
/**
|
|
12
|
-
* Factory function to create plugins
|
|
13
|
-
*/
|
|
14
|
-
function createPlugin(config) {
|
|
15
|
-
const configSchema = {
|
|
16
|
-
variables: config.variables,
|
|
17
|
-
secrets: config.secrets
|
|
18
|
-
};
|
|
19
|
-
class CreatedPlugin {
|
|
20
|
-
/** set during instantiation - registry key */
|
|
21
|
-
id;
|
|
22
|
-
contract = config.contract;
|
|
23
|
-
configSchema = configSchema;
|
|
24
|
-
_context = null;
|
|
25
|
-
initialize(pluginConfig) {
|
|
26
|
-
return (config.initialize ?? (() => effect.Effect.succeed({})))(pluginConfig).pipe(effect.Effect.tap((ctx) => effect.Effect.sync(() => {
|
|
27
|
-
this._context = ctx;
|
|
28
|
-
})), effect.Effect.map(() => this._context), effect.Effect.mapError((error) => error));
|
|
29
|
-
}
|
|
30
|
-
shutdown() {
|
|
31
|
-
const self = this;
|
|
32
|
-
return effect.Effect.gen(function* () {
|
|
33
|
-
if (config.shutdown && self._context) yield* config.shutdown(self._context).pipe(effect.Effect.catchAll(() => effect.Effect.void));
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
createRouter(context) {
|
|
37
|
-
const builder = (0, __orpc_server.implement)(config.contract).$context();
|
|
38
|
-
return config.createRouter(context, builder);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const PluginConstructor = CreatedPlugin;
|
|
42
|
-
PluginConstructor.binding = {
|
|
43
|
-
contract: config.contract,
|
|
44
|
-
variables: config.variables,
|
|
45
|
-
secrets: config.secrets,
|
|
46
|
-
context: {}
|
|
47
|
-
};
|
|
48
|
-
return PluginConstructor;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
6
|
exports.CommonPluginErrors = require_errors.CommonPluginErrors;
|
|
53
|
-
exports.PluginRuntime =
|
|
54
|
-
exports.createPlugin = createPlugin;
|
|
55
|
-
exports.createPluginRuntime =
|
|
56
|
-
exports.getNormalizedRemoteName =
|
|
57
|
-
//# sourceMappingURL=index.cjs.map
|
|
7
|
+
exports.PluginRuntime = require_runtime_index.PluginRuntime;
|
|
8
|
+
exports.createPlugin = require_plugin.createPlugin;
|
|
9
|
+
exports.createPluginRuntime = require_runtime_index.createPluginRuntime;
|
|
10
|
+
exports.getNormalizedRemoteName = require_runtime_services_normalize.getNormalizedRemoteName;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { CommonPluginErrors } from "./errors.cjs";
|
|
2
|
+
import { LoadedPluginWithBinding, Plugin, PluginConfigFor, createPlugin } from "./plugin.cjs";
|
|
3
|
+
import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginVariables, RegisteredPlugins, SecretsConfig } from "./types.cjs";
|
|
4
|
+
import { PluginRuntime, createPluginRuntime } from "./runtime/index.cjs";
|
|
5
|
+
import { getNormalizedRemoteName } from "./runtime/services/normalize.cjs";
|
|
6
|
+
export { type AnyPlugin, CommonPluginErrors, type EveryPlugin, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, type PluginSecrets, type PluginVariables, type RegisteredPlugins, type SecretsConfig, createPlugin, createPluginRuntime, getNormalizedRemoteName };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { CommonPluginErrors } from "./errors.mjs";
|
|
2
|
+
import { LoadedPluginWithBinding, Plugin, PluginConfigFor, createPlugin } from "./plugin.mjs";
|
|
3
|
+
import { AnyPlugin, EveryPlugin, InitializedPlugin, LoadedPlugin, PluginClientType, PluginConfigInput, PluginContext, PluginContract, PluginInstance, PluginMetadata, PluginRegistry, PluginRouterType, PluginRuntimeConfig, PluginSecrets, PluginVariables, RegisteredPlugins, SecretsConfig } from "./types.mjs";
|
|
4
|
+
import { PluginRuntime, createPluginRuntime } from "./runtime/index.mjs";
|
|
5
|
+
import { getNormalizedRemoteName } from "./runtime/services/normalize.mjs";
|
|
6
|
+
export { type AnyPlugin, CommonPluginErrors, type EveryPlugin, type InitializedPlugin, type LoadedPlugin, LoadedPluginWithBinding, Plugin, type PluginClientType, PluginConfigFor, type PluginConfigInput, type PluginContext, type PluginContract, type PluginInstance, type PluginMetadata, type PluginRegistry, type PluginRouterType, PluginRuntime, type PluginRuntimeConfig, type PluginSecrets, type PluginVariables, type RegisteredPlugins, type SecretsConfig, createPlugin, createPluginRuntime, getNormalizedRemoteName };
|