every-plugin 0.1.5 → 0.2.0
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/plugin.d.ts +0 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +0 -1
- package/dist/runtime/index.d.ts +15 -35
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +55 -68
- package/dist/runtime/services/module-federation.service.d.ts +7 -11
- package/dist/runtime/services/module-federation.service.d.ts.map +1 -1
- package/dist/runtime/services/module-federation.service.js +7 -9
- package/dist/runtime/services/plugin-lifecycle.service.d.ts +9 -12
- package/dist/runtime/services/plugin-lifecycle.service.d.ts.map +1 -1
- package/dist/runtime/services/plugin-lifecycle.service.js +5 -6
- package/dist/runtime/services/plugin-loader.service.d.ts +50 -13
- package/dist/runtime/services/plugin-loader.service.d.ts.map +1 -1
- package/dist/runtime/services/plugin-loader.service.js +25 -15
- package/dist/runtime/services/plugin.service.d.ts +41 -17
- package/dist/runtime/services/plugin.service.d.ts.map +1 -1
- package/dist/runtime/services/plugin.service.js +13 -7
- package/dist/runtime/services/secrets.service.d.ts +8 -9
- package/dist/runtime/services/secrets.service.d.ts.map +1 -1
- package/dist/runtime/services/secrets.service.js +28 -27
- package/dist/runtime/services.d.ts +3 -1
- package/dist/runtime/services.d.ts.map +1 -1
- package/dist/runtime/services.js +3 -1
- package/dist/testing/index.d.ts +45 -12
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +34 -27
- package/dist/testing/mocks/module-federation.service.d.ts +3 -5
- package/dist/testing/mocks/module-federation.service.d.ts.map +1 -1
- package/dist/testing/mocks/module-federation.service.js +18 -24
- package/dist/types.d.ts +21 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -2
|
@@ -1,21 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AnyPlugin, InitializedPlugin,
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
1
|
+
import { Effect, Layer, Scope } from "effect";
|
|
2
|
+
import type { AnyPlugin, InitializedPlugin, PluginRegistry, SecretsConfig } from "../../types";
|
|
3
|
+
import { PluginLifecycleService } from "./plugin-lifecycle.service";
|
|
4
|
+
import { PluginLoaderService } from "./plugin-loader.service";
|
|
5
|
+
declare const PluginService_base: Effect.Service.Class<PluginService, "PluginService", {
|
|
6
|
+
readonly scoped: Effect.Effect<{
|
|
7
|
+
loadPlugin: (pluginId: string) => Effect.Effect<{
|
|
8
|
+
ctor: new () => AnyPlugin;
|
|
9
|
+
metadata: {
|
|
10
|
+
pluginId: string;
|
|
11
|
+
version: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
}, import("../errors").PluginRuntimeError, never>;
|
|
14
|
+
instantiatePlugin: <T extends AnyPlugin>(pluginConstructor: import("../..").PluginConstructor<T>) => Effect.Effect<{
|
|
15
|
+
plugin: T;
|
|
16
|
+
metadata: {
|
|
17
|
+
readonly pluginId: string;
|
|
18
|
+
readonly version?: string;
|
|
19
|
+
readonly description?: string;
|
|
20
|
+
readonly type?: string;
|
|
21
|
+
};
|
|
22
|
+
}, import("../errors").PluginRuntimeError, never>;
|
|
23
|
+
initializePlugin: <T extends AnyPlugin>(pluginInstance: import("../..").PluginInstance<T>, config: {
|
|
24
|
+
variables: unknown;
|
|
25
|
+
secrets: unknown;
|
|
26
|
+
}) => Effect.Effect<{
|
|
27
|
+
plugin: T;
|
|
28
|
+
metadata: {
|
|
29
|
+
readonly pluginId: string;
|
|
30
|
+
readonly version?: string;
|
|
31
|
+
readonly description?: string;
|
|
32
|
+
};
|
|
33
|
+
config: import("zod").infer<T["configSchema"]>;
|
|
34
|
+
context: any;
|
|
35
|
+
scope: Scope.CloseableScope;
|
|
36
|
+
}, import("../errors").PluginRuntimeError, never>;
|
|
37
|
+
shutdownPlugin: (plugin: InitializedPlugin<AnyPlugin>) => Effect.Effect<void, never, never>;
|
|
38
|
+
cleanup: () => Effect.Effect<void, never, never>;
|
|
39
|
+
}, never, PluginLoaderService | PluginLifecycleService>;
|
|
40
|
+
}>;
|
|
15
41
|
export declare class PluginService extends PluginService_base {
|
|
16
|
-
static Live: (registry: PluginRegistry, secrets: SecretsConfig) => Layer.Layer<PluginService, never,
|
|
42
|
+
static Live: (registry: PluginRegistry, secrets: SecretsConfig) => Layer.Layer<PluginService, never, never>;
|
|
17
43
|
}
|
|
18
|
-
export declare const PluginServiceTag: typeof PluginService;
|
|
19
|
-
export declare const PluginServiceLive: (registry: PluginRegistry, secrets: SecretsConfig) => Layer.Layer<PluginService, never, import("./module-federation.service").ModuleFederationService | import("./secrets.service").SecretsService>;
|
|
20
44
|
export {};
|
|
21
45
|
//# sourceMappingURL=plugin.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/services/plugin.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/services/plugin.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EACX,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAsC,MAAM,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAYtE,iBAAiB,CAAC,SAAS,CAAC;;;;AATxD,qBAAa,aAAc,SAAQ,kBAyBjC;IACD,MAAM,CAAC,IAAI,GAAI,UAAU,cAAc,EAAE,SAAS,aAAa,8CAmB9D;CACD"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Effect, Exit, Layer, Scope } from "effect";
|
|
2
|
+
import { ModuleFederationService } from "./module-federation.service";
|
|
2
3
|
import { PluginLifecycleService } from "./plugin-lifecycle.service";
|
|
3
|
-
import { PluginLoaderService } from "./plugin-loader.service";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { PluginLoaderService, PluginRegistryTag, RegistryService } from "./plugin-loader.service";
|
|
5
|
+
import { SecretsConfigTag, SecretsService } from "./secrets.service";
|
|
6
|
+
export class PluginService extends Effect.Service()("PluginService", {
|
|
7
|
+
scoped: Effect.gen(function* () {
|
|
6
8
|
const loader = yield* PluginLoaderService;
|
|
7
9
|
const lifecycle = yield* PluginLifecycleService;
|
|
8
10
|
return {
|
|
@@ -19,7 +21,11 @@ export class PluginService extends Context.Tag("PluginService")() {
|
|
|
19
21
|
}),
|
|
20
22
|
cleanup: lifecycle.cleanup,
|
|
21
23
|
};
|
|
22
|
-
})
|
|
24
|
+
}),
|
|
25
|
+
}) {
|
|
26
|
+
static Live = (registry, secrets) => {
|
|
27
|
+
const contextLayer = Layer.mergeAll(Layer.succeed(PluginRegistryTag, registry), Layer.succeed(SecretsConfigTag, secrets));
|
|
28
|
+
const servicesLayer = Layer.mergeAll(ModuleFederationService.Default, SecretsService.Default, RegistryService.Default, PluginLifecycleService.Default).pipe(Layer.provide(contextLayer));
|
|
29
|
+
return PluginService.Default.pipe(Layer.provide(PluginLoaderService.Default), Layer.provide(servicesLayer));
|
|
30
|
+
};
|
|
23
31
|
}
|
|
24
|
-
export const PluginServiceTag = PluginService;
|
|
25
|
-
export const PluginServiceLive = PluginService.Live;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
2
|
import type { SecretsConfig } from "../../types";
|
|
3
3
|
import { PluginRuntimeError } from "../errors";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare const SecretsConfigTag_base: Context.TagClass<SecretsConfigTag, "SecretsConfig", SecretsConfig>;
|
|
5
|
+
export declare class SecretsConfigTag extends SecretsConfigTag_base {
|
|
6
6
|
}
|
|
7
|
-
declare const SecretsService_base:
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
declare const SecretsService_base: Effect.Service.Class<SecretsService, "SecretsService", {
|
|
8
|
+
readonly effect: Effect.Effect<{
|
|
9
|
+
hydrateSecrets: <T>(config: T) => Effect.Effect<T, PluginRuntimeError, never>;
|
|
10
|
+
}, never, SecretsConfigTag>;
|
|
11
|
+
}>;
|
|
10
12
|
export declare class SecretsService extends SecretsService_base {
|
|
11
|
-
static Live: (secrets: SecretsConfig) => Layer.Layer<SecretsService, never, never>;
|
|
12
13
|
}
|
|
13
|
-
export declare const SecretsServiceTag: typeof SecretsService;
|
|
14
|
-
export declare const SecretsServiceLive: (secrets: SecretsConfig) => Layer.Layer<SecretsService, never, never>;
|
|
15
14
|
export {};
|
|
16
15
|
//# sourceMappingURL=secrets.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/services/secrets.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"secrets.service.d.ts","sourceRoot":"","sources":["../../../src/runtime/services/secrets.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;;AAM/C,qBAAa,gBAAiB,SAAQ,qBAGnC;CAAI;;;yBAOa,CAAC,UAAU,CAAC;;;AALhC,qBAAa,cAAe,SAAQ,mBA+BlC;CAAI"}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { PluginRuntimeError } from "../errors";
|
|
4
4
|
const configSchema = z.object({
|
|
5
5
|
secrets: z.record(z.string(), z.unknown())
|
|
6
6
|
}).loose();
|
|
7
|
-
export class
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
7
|
+
export class SecretsConfigTag extends Context.Tag("SecretsConfig")() {
|
|
8
|
+
}
|
|
9
|
+
export class SecretsService extends Effect.Service()("SecretsService", {
|
|
10
|
+
effect: Effect.gen(function* () {
|
|
11
|
+
const secrets = yield* SecretsConfigTag;
|
|
12
|
+
return {
|
|
13
|
+
hydrateSecrets: (config) => Effect.gen(function* () {
|
|
14
|
+
const parseResult = configSchema.parse(config);
|
|
15
|
+
try {
|
|
16
|
+
const configString = JSON.stringify(parseResult);
|
|
17
|
+
let hydratedString = configString;
|
|
18
|
+
for (const [key, value] of Object.entries(secrets)) {
|
|
19
|
+
const pattern = new RegExp(`{{${key}}}`, "g");
|
|
20
|
+
hydratedString = hydratedString.replace(pattern, String(value));
|
|
21
|
+
}
|
|
22
|
+
return JSON.parse(hydratedString);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return yield* Effect.fail(new PluginRuntimeError({
|
|
26
|
+
operation: "hydrate-secrets",
|
|
27
|
+
cause: error instanceof Error ? error : new Error(String(error)),
|
|
28
|
+
retryable: false,
|
|
29
|
+
}));
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
operation: "hydrate-secrets",
|
|
26
|
-
cause: error instanceof Error ? error : new Error(String(error)),
|
|
27
|
-
retryable: false,
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
}),
|
|
34
|
+
}) {
|
|
32
35
|
}
|
|
33
|
-
export const SecretsServiceTag = SecretsService;
|
|
34
|
-
export const SecretsServiceLive = SecretsService.Live;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from "./services/module-federation.service";
|
|
1
2
|
export * from "./services/plugin.service";
|
|
3
|
+
export * from "./services/plugin-lifecycle.service";
|
|
4
|
+
export * from "./services/plugin-loader.service";
|
|
2
5
|
export * from "./services/secrets.service";
|
|
3
|
-
export * from "./services/module-federation.service";
|
|
4
6
|
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/runtime/services.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/runtime/services.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAA;AACpD,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA"}
|
package/dist/runtime/services.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./services/module-federation.service";
|
|
1
2
|
export * from "./services/plugin.service";
|
|
3
|
+
export * from "./services/plugin-lifecycle.service";
|
|
4
|
+
export * from "./services/plugin-loader.service";
|
|
2
5
|
export * from "./services/secrets.service";
|
|
3
|
-
export * from "./services/module-federation.service";
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,20 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Layer } from "effect";
|
|
2
|
+
import type { PluginBinding } from "../plugin";
|
|
3
|
+
import { PluginRuntime } from "../runtime";
|
|
4
|
+
import { PluginService } from "../runtime/services";
|
|
3
5
|
import type { PluginRuntimeConfig, RegistryBindings } from "../types";
|
|
4
|
-
import { type
|
|
6
|
+
import { type PluginMap } from "./mocks/module-federation.service";
|
|
7
|
+
/**
|
|
8
|
+
* Automatically infer RegistryBindings from a map of locally available plugins.
|
|
9
|
+
* Eliminates the need for manual binding definitions when using createLocalPluginRuntime.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const pluginMap = { "my-plugin": MyPlugin } as const;
|
|
14
|
+
* type MyBindings = InferBindingsFromMap<typeof pluginMap>;
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export type InferBindingsFromMap<T extends PluginMap> = {
|
|
18
|
+
[K in keyof T]: PluginBinding<T[K]>;
|
|
19
|
+
} & RegistryBindings;
|
|
5
20
|
/**
|
|
6
21
|
* Creates a test layer with mock ModuleFederationService for unit testing.
|
|
7
|
-
* This mirrors
|
|
22
|
+
* This mirrors PluginService.Live() but uses mock ModuleFederationService.
|
|
23
|
+
*/
|
|
24
|
+
export declare const createTestLayer: <R extends RegistryBindings = RegistryBindings>(config: PluginRuntimeConfig<R>, pluginMap: PluginMap) => Layer.Layer<PluginService, never, never>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a plugin runtime for locally available plugins (non-remote).
|
|
27
|
+
* Automatically infers type bindings from the plugin map, eliminating
|
|
28
|
+
* the need for manual RegistryBindings definitions.
|
|
29
|
+
*
|
|
30
|
+
* Ideal for:
|
|
31
|
+
* - Unit and integration tests
|
|
32
|
+
* - Local development and debugging
|
|
33
|
+
* - Monorepo setups where all plugins are in the same workspace
|
|
34
|
+
*
|
|
35
|
+
* For production with remote Module Federation plugins, use createPluginRuntime().
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const pluginMap = { "my-plugin": MyPlugin } as const;
|
|
40
|
+
* const runtime = createLocalPluginRuntime({ registry, secrets }, pluginMap);
|
|
41
|
+
*
|
|
42
|
+
* // Types are automatically inferred - no manual bindings needed!
|
|
43
|
+
* const plugin = await runtime.usePlugin("my-plugin", config);
|
|
44
|
+
* ```
|
|
8
45
|
*/
|
|
9
|
-
export declare
|
|
46
|
+
export declare function createLocalPluginRuntime<T extends PluginMap>(config: PluginRuntimeConfig, pluginMap: T): PluginRuntime<InferBindingsFromMap<T>>;
|
|
10
47
|
/**
|
|
11
|
-
*
|
|
12
|
-
* This mirrors createPluginRuntime exactly but uses test layer.
|
|
48
|
+
* @deprecated Use `createLocalPluginRuntime` instead. This alias is kept for backward compatibility.
|
|
13
49
|
*/
|
|
14
|
-
export declare const createTestPluginRuntime:
|
|
15
|
-
runtime: ManagedRuntime.ManagedRuntime<PluginRuntimeService, never>;
|
|
16
|
-
PluginRuntime: Effect.Effect<PluginRuntimeImpl<R>, never, never>;
|
|
17
|
-
};
|
|
50
|
+
export declare const createTestPluginRuntime: typeof createLocalPluginRuntime;
|
|
18
51
|
export type { PluginRegistry, RegistryBindings } from "../types";
|
|
19
|
-
export type {
|
|
52
|
+
export type { PluginMap, PluginRuntimeConfig };
|
|
20
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAIN,aAAa,EAIb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtE,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE3G;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,SAAS,IAAI;KACtD,CAAC,IAAI,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,GAAG,gBAAgB,CAAC;AAErB;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAC5E,QAAQ,mBAAmB,CAAC,CAAC,CAAC,EAC9B,WAAW,SAAS,6CAwBpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,SAAS,EAC3D,MAAM,EAAE,mBAAmB,EAC3B,SAAS,EAAE,CAAC,GACV,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAKxC;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,iCAA2B,CAAC;AAGhE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/testing/index.js
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { PluginService, SecretsService } from "../runtime/services";
|
|
1
|
+
import { Layer, ManagedRuntime } from "effect";
|
|
2
|
+
import { PluginRuntime } from "../runtime";
|
|
3
|
+
import { PluginLifecycleService, PluginLoaderService, PluginRegistryTag, PluginService, RegistryService, SecretsConfigTag, SecretsService } from "../runtime/services";
|
|
5
4
|
import { createMockModuleFederationServiceLayer } from "./mocks/module-federation.service";
|
|
6
5
|
/**
|
|
7
6
|
* Creates a test layer with mock ModuleFederationService for unit testing.
|
|
8
|
-
* This mirrors
|
|
7
|
+
* This mirrors PluginService.Live() but uses mock ModuleFederationService.
|
|
9
8
|
*/
|
|
10
9
|
export const createTestLayer = (config, pluginMap) => {
|
|
11
10
|
const secrets = config.secrets || {};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
yield* Effect.addFinalizer(() => pluginService.cleanup().pipe(Effect.catchAll(() => Effect.void) // Ensure cleanup never fails
|
|
17
|
-
));
|
|
18
|
-
return pluginService;
|
|
19
|
-
})).pipe(Layer.provide(PluginService.Live(config.registry, secrets).pipe(Layer.provide(Layer.mergeAll(createMockModuleFederationServiceLayer(pluginMap), // Mock instead of real
|
|
20
|
-
SecretsService.Live(secrets))))));
|
|
11
|
+
const contextLayer = Layer.mergeAll(Layer.succeed(PluginRegistryTag, config.registry), Layer.succeed(SecretsConfigTag, secrets));
|
|
12
|
+
const mockModuleFederationLayer = createMockModuleFederationServiceLayer(pluginMap);
|
|
13
|
+
const servicesLayer = Layer.mergeAll(mockModuleFederationLayer, SecretsService.Default, RegistryService.Default, PluginLifecycleService.Default).pipe(Layer.provide(contextLayer));
|
|
14
|
+
return PluginService.Default.pipe(Layer.provide(PluginLoaderService.Default), Layer.provide(servicesLayer));
|
|
21
15
|
};
|
|
22
16
|
/**
|
|
23
|
-
* Creates a
|
|
24
|
-
*
|
|
17
|
+
* Creates a plugin runtime for locally available plugins (non-remote).
|
|
18
|
+
* Automatically infers type bindings from the plugin map, eliminating
|
|
19
|
+
* the need for manual RegistryBindings definitions.
|
|
20
|
+
*
|
|
21
|
+
* Ideal for:
|
|
22
|
+
* - Unit and integration tests
|
|
23
|
+
* - Local development and debugging
|
|
24
|
+
* - Monorepo setups where all plugins are in the same workspace
|
|
25
|
+
*
|
|
26
|
+
* For production with remote Module Federation plugins, use createPluginRuntime().
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const pluginMap = { "my-plugin": MyPlugin } as const;
|
|
31
|
+
* const runtime = createLocalPluginRuntime({ registry, secrets }, pluginMap);
|
|
32
|
+
*
|
|
33
|
+
* // Types are automatically inferred - no manual bindings needed!
|
|
34
|
+
* const plugin = await runtime.usePlugin("my-plugin", config);
|
|
35
|
+
* ```
|
|
25
36
|
*/
|
|
26
|
-
export
|
|
37
|
+
export function createLocalPluginRuntime(config, pluginMap) {
|
|
27
38
|
const layer = createTestLayer(config, pluginMap);
|
|
28
39
|
const runtime = ManagedRuntime.make(layer);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
runtime,
|
|
36
|
-
PluginRuntime: createTypedRuntime.pipe(Effect.provide(runtime))
|
|
37
|
-
};
|
|
38
|
-
};
|
|
40
|
+
return new PluginRuntime(runtime, config.registry);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `createLocalPluginRuntime` instead. This alias is kept for backward compatibility.
|
|
44
|
+
*/
|
|
45
|
+
export const createTestPluginRuntime = createLocalPluginRuntime;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Layer } from "effect";
|
|
2
|
+
import type { PluginConstructorWithBinding } from "../../plugin";
|
|
2
3
|
import { ModuleFederationService } from "../../runtime/services/module-federation.service";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
[pluginId: string]: new () => AnyPlugin;
|
|
6
|
-
}
|
|
7
|
-
export declare const createMockModuleFederationServiceLayer: (pluginMap: TestPluginMap) => Layer.Layer<ModuleFederationService, never, never>;
|
|
4
|
+
export type PluginMap = Record<string, PluginConstructorWithBinding<any, any, any, any>>;
|
|
5
|
+
export declare const createMockModuleFederationServiceLayer: (pluginMap: PluginMap) => Layer.Layer<ModuleFederationService, never, never>;
|
|
8
6
|
//# sourceMappingURL=module-federation.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation.service.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/module-federation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"module-federation.service.d.ts","sourceRoot":"","sources":["../../../src/testing/mocks/module-federation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAE3F,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAEzF,eAAO,MAAM,sCAAsC,GAAI,WAAW,SAAS,uDAoCxE,CAAC"}
|
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
import { Effect, Layer } from "effect";
|
|
2
2
|
import { ModuleFederationError } from "../../runtime/errors";
|
|
3
3
|
import { ModuleFederationService } from "../../runtime/services/module-federation.service";
|
|
4
|
-
|
|
5
|
-
const createMockService = (pluginMap) => ({
|
|
4
|
+
export const createMockModuleFederationServiceLayer = (pluginMap) => Layer.succeed(ModuleFederationService, {
|
|
6
5
|
registerRemote: (pluginId, url) => Effect.gen(function* () {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
console.log(`[MOCK] registerRemote called for ${pluginId}`);
|
|
7
|
+
if (!(pluginId in pluginMap)) {
|
|
8
|
+
return yield* Effect.fail(new ModuleFederationError({
|
|
9
|
+
pluginId,
|
|
10
|
+
remoteUrl: url,
|
|
11
|
+
cause: new Error(`Mock: Plugin ${pluginId} not available in test plugin map`),
|
|
12
|
+
}));
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
return yield* Effect.fail(new ModuleFederationError({
|
|
14
|
-
pluginId,
|
|
15
|
-
remoteUrl: url,
|
|
16
|
-
cause: new Error(`Mock: Plugin ${pluginId} not available in test plugin map`),
|
|
17
|
-
}));
|
|
14
|
+
console.log(`[MOCK] registerRemote succeeded for ${pluginId}`);
|
|
18
15
|
}),
|
|
19
16
|
loadRemoteConstructor: (pluginId, url) => Effect.gen(function* () {
|
|
20
|
-
|
|
21
|
-
// Use original pluginId as key since TestPluginMap uses original plugin IDs
|
|
17
|
+
console.log(`[MOCK] loadRemoteConstructor called for ${pluginId}`);
|
|
22
18
|
const PluginConstructor = pluginMap[pluginId];
|
|
23
|
-
if (PluginConstructor) {
|
|
24
|
-
return
|
|
19
|
+
if (!PluginConstructor) {
|
|
20
|
+
return yield* Effect.fail(new ModuleFederationError({
|
|
21
|
+
pluginId,
|
|
22
|
+
remoteUrl: url,
|
|
23
|
+
cause: new Error(`Mock: Constructor for ${pluginId} not found in test plugin map`),
|
|
24
|
+
}));
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
pluginId,
|
|
29
|
-
remoteUrl: url,
|
|
30
|
-
cause: new Error(`Mock: Constructor for ${pluginId} not found in test plugin map`),
|
|
31
|
-
}));
|
|
26
|
+
console.log(`[MOCK] loadRemoteConstructor succeeded for ${pluginId}`);
|
|
27
|
+
return PluginConstructor;
|
|
32
28
|
}),
|
|
33
29
|
});
|
|
34
|
-
// Create a Layer that provides the mock ModuleFederationService
|
|
35
|
-
export const createMockModuleFederationServiceLayer = (pluginMap) => Layer.succeed(ModuleFederationService, createMockService(pluginMap));
|
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AnyContractRouter } from "@orpc/contract";
|
|
2
2
|
import type { Context, Router } from "@orpc/server";
|
|
3
|
-
import { Scope } from "effect";
|
|
3
|
+
import type { Scope } from "effect";
|
|
4
4
|
import type { z } from "zod";
|
|
5
5
|
import type { Plugin, PluginConfigFor, PluginConstructorWithBinding } from "./plugin";
|
|
6
|
+
import type { PluginRuntime } from "./runtime";
|
|
6
7
|
export type AnyContract = Router<AnyContractRouter, any>;
|
|
7
8
|
/**
|
|
8
9
|
* Base type for any plugin instance.
|
|
@@ -26,7 +27,7 @@ export type RegistryBindings = Record<string, {
|
|
|
26
27
|
export type PluginOf<B> = B extends {
|
|
27
28
|
contract: infer C;
|
|
28
29
|
config: infer Conf;
|
|
29
|
-
} ? Conf extends PluginConfigFor<infer V, infer S> ? C extends AnyContractRouter ? Plugin<C, V, S> : never : never : never;
|
|
30
|
+
} ? Conf extends PluginConfigFor<infer V, infer S> ? C extends AnyContractRouter ? Plugin<C, V, S, Context> : never : never : never;
|
|
30
31
|
/**
|
|
31
32
|
* Extracts the config type from a binding definition.
|
|
32
33
|
* This provides strongly-typed configuration based on the plugin's zod schema.
|
|
@@ -68,7 +69,6 @@ export type PluginBindingsFor<R extends RegistryBindings> = {
|
|
|
68
69
|
*/
|
|
69
70
|
export type PluginRegistry = Record<string, {
|
|
70
71
|
remoteUrl: string;
|
|
71
|
-
type: string;
|
|
72
72
|
version?: string;
|
|
73
73
|
description?: string;
|
|
74
74
|
}>;
|
|
@@ -79,7 +79,6 @@ export type PluginRegistry = Record<string, {
|
|
|
79
79
|
export type PluginRegistryFor<R extends RegistryBindings> = {
|
|
80
80
|
[K in keyof R]: {
|
|
81
81
|
remoteUrl: string;
|
|
82
|
-
type: string;
|
|
83
82
|
version?: string;
|
|
84
83
|
description?: string;
|
|
85
84
|
};
|
|
@@ -114,7 +113,6 @@ export interface PluginInstance<T extends AnyPlugin = AnyPlugin> {
|
|
|
114
113
|
readonly pluginId: string;
|
|
115
114
|
readonly version?: string;
|
|
116
115
|
readonly description?: string;
|
|
117
|
-
readonly type?: string;
|
|
118
116
|
};
|
|
119
117
|
}
|
|
120
118
|
/**
|
|
@@ -128,7 +126,6 @@ export interface InitializedPlugin<T extends AnyPlugin = AnyPlugin> {
|
|
|
128
126
|
readonly pluginId: string;
|
|
129
127
|
readonly version?: string;
|
|
130
128
|
readonly description?: string;
|
|
131
|
-
readonly type?: string;
|
|
132
129
|
};
|
|
133
130
|
readonly config: z.infer<T["configSchema"]>;
|
|
134
131
|
readonly context: ContextOf<T>;
|
|
@@ -154,17 +151,33 @@ export interface RuntimeOptions {
|
|
|
154
151
|
/**
|
|
155
152
|
* Enhanced plugin result containing client, router, and metadata.
|
|
156
153
|
*/
|
|
157
|
-
export interface
|
|
154
|
+
export interface EveryPlugin<T extends AnyPlugin = AnyPlugin> {
|
|
158
155
|
readonly client: import("@orpc/server").RouterClient<RouterOf<T>, Record<never, never>>;
|
|
159
156
|
readonly router: RouterOf<T>;
|
|
160
157
|
readonly metadata: {
|
|
161
158
|
readonly pluginId: string;
|
|
162
159
|
readonly version?: string;
|
|
163
160
|
readonly description?: string;
|
|
164
|
-
readonly type?: string;
|
|
165
161
|
};
|
|
166
162
|
readonly initialized: InitializedPlugin<T>;
|
|
167
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Namespace containing type utilities for working with plugin results.
|
|
166
|
+
*/
|
|
167
|
+
export declare namespace EveryPlugin {
|
|
168
|
+
/**
|
|
169
|
+
* Extract the typed plugin result from a runtime instance.
|
|
170
|
+
* Provides full type safety for plugin clients, routers, and metadata.
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```ts
|
|
174
|
+
* const runtime = createPluginRuntime<MyBindings>({...});
|
|
175
|
+
* let plugin: EveryPlugin.Infer<typeof runtime, "my-plugin">;
|
|
176
|
+
* plugin = await runtime.usePlugin("my-plugin", config);
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
type Infer<T extends PluginRuntime<any>, K extends T extends PluginRuntime<infer R> ? keyof R : never> = T extends PluginRuntime<infer R> ? EveryPlugin<PluginOf<R[K]>> : never;
|
|
180
|
+
}
|
|
168
181
|
/**
|
|
169
182
|
* Runtime configuration for the plugin system.
|
|
170
183
|
* The generic R parameter enables compile-time type safety when provided.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAA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AAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,yBAAiB,WAAW,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,KAAY,KAAK,CACf,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,EAC5B,CAAC,SAAS,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,KAAK,IAC1D,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAChC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC3B,KAAK,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IAChF,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "every-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -59,6 +59,9 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@effect/language-service": "^0.38.1",
|
|
61
61
|
"@effect/vitest": "^0.25.1",
|
|
62
|
+
"@orpc/client": "^1.9.2",
|
|
63
|
+
"@orpc/openapi": "^1.9.2",
|
|
64
|
+
"@orpc/zod": "^1.9.2",
|
|
62
65
|
"@rspack/cli": "^1.5.2",
|
|
63
66
|
"@rspack/core": "^1.5.2",
|
|
64
67
|
"@types/bun": "^1.2.21",
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
"@module-federation/runtime-core": "^0.19.1",
|
|
76
79
|
"@orpc/contract": "1.8.6",
|
|
77
80
|
"@orpc/server": "1.8.6",
|
|
78
|
-
"effect": "3.
|
|
81
|
+
"effect": "3.18.1",
|
|
79
82
|
"zod": "4.1.5"
|
|
80
83
|
},
|
|
81
84
|
"keywords": [
|