every-plugin 2.5.10 → 2.7.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.
Files changed (76) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +0 -16
  2. package/dist/_virtual/_rolldown/runtime.mjs +1 -33
  3. package/dist/build/rspack/dev-server-middleware.cjs.map +1 -1
  4. package/dist/build/rspack/dev-server-middleware.mjs.map +1 -1
  5. package/dist/build/rspack/fix-mf-data-uri-plugin.cjs.map +1 -1
  6. package/dist/build/rspack/fix-mf-data-uri-plugin.mjs.map +1 -1
  7. package/dist/build/rspack/plugin.cjs.map +1 -1
  8. package/dist/build/rspack/plugin.mjs.map +1 -1
  9. package/dist/build/shared-deps.cjs +14 -3
  10. package/dist/build/shared-deps.cjs.map +1 -1
  11. package/dist/build/shared-deps.d.cts +14 -0
  12. package/dist/build/shared-deps.d.cts.map +1 -1
  13. package/dist/build/shared-deps.d.mts +14 -0
  14. package/dist/build/shared-deps.d.mts.map +1 -1
  15. package/dist/build/shared-deps.mjs +14 -3
  16. package/dist/build/shared-deps.mjs.map +1 -1
  17. package/dist/errors.cjs +37 -35
  18. package/dist/errors.cjs.map +1 -1
  19. package/dist/errors.d.cts +130 -130
  20. package/dist/errors.d.mts +130 -130
  21. package/dist/errors.mjs +35 -35
  22. package/dist/errors.mjs.map +1 -1
  23. package/dist/package.cjs +23 -0
  24. package/dist/package.cjs.map +1 -0
  25. package/dist/package.mjs +17 -0
  26. package/dist/package.mjs.map +1 -0
  27. package/dist/plugin.cjs.map +1 -1
  28. package/dist/plugin.mjs.map +1 -1
  29. package/dist/runtime/errors.cjs.map +1 -1
  30. package/dist/runtime/errors.mjs.map +1 -1
  31. package/dist/runtime/index.cjs.map +1 -1
  32. package/dist/runtime/index.mjs.map +1 -1
  33. package/dist/runtime/mf-config.cjs +28 -7
  34. package/dist/runtime/mf-config.cjs.map +1 -1
  35. package/dist/runtime/mf-config.d.cts +25 -38
  36. package/dist/runtime/mf-config.d.cts.map +1 -1
  37. package/dist/runtime/mf-config.d.mts +25 -38
  38. package/dist/runtime/mf-config.d.mts.map +1 -1
  39. package/dist/runtime/mf-config.mjs +28 -7
  40. package/dist/runtime/mf-config.mjs.map +1 -1
  41. package/dist/runtime/services/module-federation.service.cjs +2 -0
  42. package/dist/runtime/services/module-federation.service.cjs.map +1 -1
  43. package/dist/runtime/services/module-federation.service.d.cts.map +1 -1
  44. package/dist/runtime/services/module-federation.service.d.mts.map +1 -1
  45. package/dist/runtime/services/module-federation.service.mjs +2 -0
  46. package/dist/runtime/services/module-federation.service.mjs.map +1 -1
  47. package/dist/runtime/services/plugin-loader.service.cjs.map +1 -1
  48. package/dist/runtime/services/plugin-loader.service.mjs.map +1 -1
  49. package/dist/runtime/services/secrets.service.cjs +2 -1
  50. package/dist/runtime/services/secrets.service.cjs.map +1 -1
  51. package/dist/runtime/services/secrets.service.mjs +2 -2
  52. package/dist/runtime/services/secrets.service.mjs.map +1 -1
  53. package/dist/testing/index.cjs.map +1 -1
  54. package/dist/testing/index.mjs.map +1 -1
  55. package/dist/zod.cjs +5 -17
  56. package/dist/zod.d.cts +2 -8
  57. package/dist/zod.d.mts +2 -8
  58. package/dist/zod.mjs +2 -11
  59. package/package.json +16 -21
  60. package/skills/plugin-development/SKILL.md +16 -8
  61. package/skills/plugin-testing/SKILL.md +19 -9
  62. package/src/build/shared-deps.ts +17 -2
  63. package/src/runtime/mf-config.ts +49 -14
  64. package/src/runtime/services/module-federation.service.ts +3 -0
  65. package/src/runtime/services/secrets.service.ts +1 -1
  66. package/src/zod-core.ts +0 -3
  67. package/src/zod.ts +3 -1
  68. package/dist/orpc-client.cjs +0 -17
  69. package/dist/orpc-client.d.cts +0 -2
  70. package/dist/orpc-client.d.mts +0 -2
  71. package/dist/orpc-client.mjs +0 -5
  72. package/dist/zod.cjs.map +0 -1
  73. package/dist/zod.d.cts.map +0 -1
  74. package/dist/zod.d.mts.map +0 -1
  75. package/dist/zod.mjs.map +0 -1
  76. package/src/orpc-client.ts +0 -2
package/dist/zod.cjs CHANGED
@@ -1,23 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let zod = require("zod");
4
+ zod = require_runtime.__toESM(zod, 1);
3
5
 
4
- //#region src/zod.ts
5
- var zod_exports = /* @__PURE__ */ require_runtime.__exportAll({});
6
- require_runtime.__reExport(zod_exports, require("zod"));
7
-
8
- //#endregion
9
- Object.defineProperty(exports, 'zod_exports', {
6
+ Object.defineProperty(exports, 'z', {
10
7
  enumerable: true,
11
8
  get: function () {
12
- return zod_exports;
9
+ return zod;
13
10
  }
14
- });
15
- var zod = require("zod");
16
- Object.keys(zod).forEach(function (k) {
17
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
- enumerable: true,
19
- get: function () { return zod[k]; }
20
- });
21
- });
22
-
23
- //# sourceMappingURL=zod.cjs.map
11
+ });
package/dist/zod.d.cts CHANGED
@@ -1,8 +1,2 @@
1
- export * from "zod";
2
-
3
- //#region src/zod.d.ts
4
-
5
- import * as import_zod from "zod";
6
- //#endregion
7
- export { import_zod as zod_d_exports };
8
- //# sourceMappingURL=zod.d.cts.map
1
+ import * as z from "zod";
2
+ export { z };
package/dist/zod.d.mts CHANGED
@@ -1,8 +1,2 @@
1
- export * from "zod";
2
-
3
- //#region src/zod.d.ts
4
-
5
- import * as import_zod from "zod";
6
- //#endregion
7
- export { import_zod as zod_d_exports };
8
- //# sourceMappingURL=zod.d.mts.map
1
+ import * as z from "zod";
2
+ export { z };
package/dist/zod.mjs CHANGED
@@ -1,12 +1,3 @@
1
- import { __exportAll, __reExport } from "./_virtual/_rolldown/runtime.mjs";
1
+ import * as z from "zod";
2
2
 
3
- export * from "zod"
4
-
5
- //#region src/zod.ts
6
- var zod_exports = /* @__PURE__ */ __exportAll({});
7
- import * as import_zod from "zod";
8
- __reExport(zod_exports, import_zod);
9
-
10
- //#endregion
11
- export { zod_exports };
12
- //# sourceMappingURL=zod.mjs.map
3
+ export { z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "every-plugin",
3
- "version": "2.5.10",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -49,11 +49,6 @@
49
49
  "import": "./dist/orpc.mjs",
50
50
  "require": "./dist/orpc.cjs"
51
51
  },
52
- "./orpc/client": {
53
- "types": "./dist/orpc-client.d.mts",
54
- "import": "./dist/orpc-client.mjs",
55
- "require": "./dist/orpc-client.cjs"
56
- },
57
52
  "./orpc/openapi": {
58
53
  "types": "./dist/orpc-openapi.d.mts",
59
54
  "import": "./dist/orpc-openapi.mjs",
@@ -96,23 +91,23 @@
96
91
  "typecheck": "tsc --noEmit"
97
92
  },
98
93
  "peerDependencies": {
99
- "@rspack/core": "^1.7.11",
94
+ "@rspack/core": "1.7.11",
100
95
  "typescript": "^5.9.3",
101
- "effect": "^3.21.0",
102
- "zod": "^4.3.6",
103
- "@orpc/contract": "^1.13.4",
104
- "@orpc/server": "^1.13.4",
105
- "@orpc/client": "^1.13.4",
106
- "@orpc/openapi": "^1.13.4",
107
- "@orpc/zod": "^1.13.4",
108
- "@orpc/react-query": "^1.13.4"
96
+ "effect": "3.21.2",
97
+ "zod": "4.3.6",
98
+ "@orpc/contract": "1.14.3",
99
+ "@orpc/server": "1.14.3",
100
+ "@orpc/client": "1.14.3",
101
+ "@orpc/openapi": "1.14.3",
102
+ "@orpc/zod": "1.14.3",
103
+ "@orpc/tanstack-query": "1.14.3"
109
104
  },
110
105
  "devDependencies": {
111
106
  "@effect/language-service": "^0.85.1",
112
107
  "@effect/vitest": "^0.29.0",
113
108
  "@orpc/client": "^1.13.4",
114
109
  "@orpc/openapi": "^1.13.4",
115
- "@rspack/cli": "^1.7.11",
110
+ "@rspack/cli": "1.7.11",
116
111
  "@tanstack/intent": "^0.0.40",
117
112
  "@types/bun": "^1.3.7",
118
113
  "@types/node": "^25.1.0",
@@ -121,16 +116,16 @@
121
116
  "sirv": "^3.0.2",
122
117
  "tsdown": "^0.21.7",
123
118
  "vite-tsconfig-paths": "^6.0.5",
124
- "vitest": "^4.0.18"
119
+ "vitest": "^4.1.8"
125
120
  },
126
121
  "dependencies": {
127
- "@module-federation/enhanced": "^2.3.2",
128
- "@module-federation/node": "^2.7.40",
129
- "@module-federation/runtime-core": "^2.3.2",
122
+ "@module-federation/enhanced": "^2.4.0",
123
+ "@module-federation/node": "^2.7.42",
124
+ "@module-federation/runtime-core": "^2.4.0",
130
125
  "@orpc/contract": "^1.13.4",
131
126
  "@orpc/experimental-publisher": "^1.13.4",
132
127
  "@orpc/server": "^1.13.4",
133
- "@orpc/tanstack-query": "^1.13.4"
128
+ "@orpc/tanstack-query": "1.14.3"
134
129
  },
135
130
  "keywords": [
136
131
  "plugin",
@@ -95,6 +95,7 @@ export class MyService {
95
95
  ```typescript
96
96
  import { createPlugin } from "every-plugin";
97
97
  import { Effect } from "every-plugin/effect";
98
+ import { ORPCError } from "every-plugin/orpc";
98
99
  import { z } from "every-plugin/zod";
99
100
  import { contract } from "./contract";
100
101
  import { MyService } from "./service";
@@ -186,23 +187,30 @@ Port assignments: host=3000, api=3001, auth=3002, ui=3003, ui-ssr=3004, plugins=
186
187
 
187
188
  ## Build Config (rspack.config.js)
188
189
 
189
- every-plugin provides rspack defaults via `EveryPluginDevServer`:
190
+ every-plugin provides rspack helpers as plugins:
190
191
 
191
192
  ```javascript
192
- const { EveryPluginDevServer } = require("every-plugin/build/rspack");
193
+ import {
194
+ EmitPluginManifest,
195
+ EveryPluginDevServer,
196
+ FixMfDataUriPlugin,
197
+ } from "every-plugin/build/rspack";
193
198
 
194
- module.exports = EveryPluginDevServer.configure(__dirname, {
195
- pluginId: "my-plugin",
196
- port: 3010,
197
- });
199
+ export default {
200
+ plugins: [
201
+ new EmitPluginManifest(),
202
+ new EveryPluginDevServer({ dts: false }),
203
+ new FixMfDataUriPlugin(),
204
+ ],
205
+ };
198
206
  ```
199
207
 
200
- No manual rspack configuration needed — the helper handles Module Federation, shared deps, and dev server setup.
208
+ `EveryPluginDevServer` configures the Module Federation dev server defaults. Add the manifest/fix plugins the same way the package templates do.
201
209
 
202
210
  ## Common Mistakes
203
211
 
204
212
  - Importing `oc` from `@orpc/contract` instead of `every-plugin/orpc` — will cause version mismatches in Module Federation
205
- - Importing `z` from `zod` instead of `every-plugin/zod` — same singleton issue
213
+ - Importing `z` from `zod` instead of `every-plugin/zod` — may cause Vitest CJS/ESM interop issues; always use `every-plugin/zod`
206
214
  - Forgetting `.errors(Errors)` on routes that can throw ORPCError — untyped errors
207
215
  - Using `Effect.runPromise` inside `Effect.gen` — use `yield*` instead for proper error channel
208
216
  - Putting business logic in `createRouter` — keep it in the service class, router is just glue
@@ -23,7 +23,7 @@ Test the service class directly without the plugin runtime:
23
23
 
24
24
  ```typescript
25
25
  import { describe, expect, it } from "vitest";
26
- import { Effect } from "effect";
26
+ import { Effect } from "every-plugin/effect";
27
27
  import { MyService } from "../service";
28
28
 
29
29
  describe("MyService", () => {
@@ -51,15 +51,19 @@ Test the full plugin lifecycle — initialization, router execution, shutdown:
51
51
 
52
52
  ```typescript
53
53
  import { describe, expect, it, beforeAll, afterAll } from "vitest";
54
- import { createPluginRuntime } from "every-plugin/runtime";
54
+ import { createPluginRuntime } from "every-plugin";
55
55
  import Plugin from "../index";
56
56
 
57
57
  describe("MyPlugin integration", () => {
58
- let runtime: Awaited<ReturnType<typeof createPluginRuntime>>;
58
+ let runtime: ReturnType<typeof createPluginRuntime>;
59
59
  let client: any;
60
60
 
61
61
  beforeAll(async () => {
62
- runtime = createPluginRuntime();
62
+ runtime = createPluginRuntime({
63
+ registry: {
64
+ "my-plugin": { module: Plugin },
65
+ },
66
+ });
63
67
  const result = await runtime.usePlugin("my-plugin", {
64
68
  variables: { baseUrl: "https://api.example.com" },
65
69
  secrets: { apiKey: "test-key" },
@@ -68,7 +72,7 @@ describe("MyPlugin integration", () => {
68
72
  });
69
73
 
70
74
  afterAll(async () => {
71
- await runtime.dispose();
75
+ await runtime.shutdown();
72
76
  });
73
77
 
74
78
  it("ping responds", async () => {
@@ -92,7 +96,8 @@ describe("MyPlugin integration", () => {
92
96
  When testing an API plugin that uses `withPlugins`, mock the `pluginsClient`:
93
97
 
94
98
  ```typescript
95
- import { createPluginRuntime } from "every-plugin/runtime";
99
+ import { createPluginRuntime } from "every-plugin";
100
+ import ApiPlugin from "../index";
96
101
 
97
102
  const mockRegistryClient = {
98
103
  getRegistryStatus: vi.fn().mockResolvedValue({ status: "ok" }),
@@ -101,7 +106,11 @@ const mockRegistryClient = {
101
106
 
102
107
  describe("API with mock registry", () => {
103
108
  it("pluginDemo returns composed data", async () => {
104
- const runtime = createPluginRuntime();
109
+ const runtime = createPluginRuntime({
110
+ registry: {
111
+ api: { module: ApiPlugin },
112
+ },
113
+ });
105
114
  const result = await runtime.usePlugin(
106
115
  "api",
107
116
  { variables: {}, secrets: {} },
@@ -110,7 +119,7 @@ describe("API with mock registry", () => {
110
119
  const client = result.createClient();
111
120
  const data = await client.pluginDemo();
112
121
  expect(data.registryStatus.status).toBe("ok");
113
- await runtime.dispose();
122
+ await runtime.shutdown();
114
123
  });
115
124
  });
116
125
  ```
@@ -146,7 +155,8 @@ export default defineConfig({
146
155
 
147
156
  ## Common Mistakes
148
157
 
149
- - Not calling `runtime.dispose()` in `afterAll` — leaves processes/resources running
158
+ - Not calling `runtime.shutdown()` in `afterAll` — leaves plugin scopes/resources running
150
159
  - Using `vi.fn()` without `.mockResolvedValue()` — unhandled promise rejections
151
160
  - Forgetting `vite-tsconfig-paths` plugin — path aliases like `every-plugin/orpc` won't resolve
161
+ - Omitting the `registry` object when calling `createPluginRuntime(...)` — the runtime requires explicit plugin entries
152
162
  - Testing only happy paths — always test error channels (Effect failures, ORPCError throws)
@@ -1,4 +1,4 @@
1
- import { readFileSync } from "node:fs";
1
+ import { existsSync, readFileSync } from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { dirname, join } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
@@ -20,6 +20,7 @@ export interface SharedDependencyConfig {
20
20
  singleton: boolean;
21
21
  strictVersion: boolean;
22
22
  eager: boolean;
23
+ shareScope: string;
23
24
  }
24
25
 
25
26
  export type SharedDependencies = Record<string, SharedDependencyConfig>;
@@ -29,6 +30,7 @@ const DEFAULT_SHARE_CONFIG: Omit<SharedDependencyConfig, "version"> = {
29
30
  singleton: true,
30
31
  strictVersion: false,
31
32
  eager: false,
33
+ shareScope: "default",
32
34
  };
33
35
 
34
36
  function extractExactVersion(input: string): string {
@@ -38,7 +40,16 @@ function extractExactVersion(input: string): string {
38
40
 
39
41
  function getInstalledPackageVersion(packageName: string, fallbackVersion: string): string {
40
42
  try {
41
- return require(`${packageName}/package.json`).version as string;
43
+ let currentDir = dirname(require.resolve(packageName));
44
+ for (let i = 0; i < 5; i += 1) {
45
+ const packageJsonPath = join(currentDir, "package.json");
46
+ if (existsSync(packageJsonPath)) {
47
+ return (JSON.parse(readFileSync(packageJsonPath, "utf-8")) as { version: string }).version;
48
+ }
49
+ currentDir = dirname(currentDir);
50
+ }
51
+
52
+ throw new Error(`Could not resolve installed version for ${packageName}`);
42
53
  } catch {
43
54
  return extractExactVersion(fallbackVersion);
44
55
  }
@@ -58,6 +69,10 @@ export const pluginSharedDependencies = {
58
69
  version: getInstalledPackageVersion("@orpc/contract", pkg.peerDependencies["@orpc/contract"]),
59
70
  ...DEFAULT_SHARE_CONFIG,
60
71
  },
72
+ "@orpc/client": {
73
+ version: getInstalledPackageVersion("@orpc/client", pkg.peerDependencies["@orpc/client"]),
74
+ ...DEFAULT_SHARE_CONFIG,
75
+ },
61
76
  "@orpc/server": {
62
77
  version: getInstalledPackageVersion("@orpc/server", pkg.peerDependencies["@orpc/server"]),
63
78
  ...DEFAULT_SHARE_CONFIG,
@@ -1,4 +1,7 @@
1
+ import { existsSync, readFileSync } from "node:fs";
1
2
  import { createRequire } from "node:module";
3
+ import { dirname, join } from "node:path";
4
+ import pkg from "../../package.json";
2
5
 
3
6
  const require = createRequire(import.meta.url);
4
7
  declare const __EVERY_PLUGIN_VERSION__: string | undefined;
@@ -13,7 +16,16 @@ function readPackageVersion(): string {
13
16
 
14
17
  function getInstalledPackageVersion(packageName: string, fallbackRange: string): string {
15
18
  try {
16
- return require(`${packageName}/package.json`).version as string;
19
+ let currentDir = dirname(require.resolve(packageName));
20
+ for (let i = 0; i < 5; i += 1) {
21
+ const packageJsonPath = join(currentDir, "package.json");
22
+ if (existsSync(packageJsonPath)) {
23
+ return (JSON.parse(readFileSync(packageJsonPath, "utf-8")) as { version: string }).version;
24
+ }
25
+ currentDir = dirname(currentDir);
26
+ }
27
+
28
+ throw new Error(`Could not resolve installed version for ${packageName}`);
17
29
  } catch {
18
30
  const match = fallbackRange.match(/\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?/);
19
31
  return match ? match[0] : fallbackRange.replace(/^[\^~>=<\s]+/, "");
@@ -23,32 +35,49 @@ function getInstalledPackageVersion(packageName: string, fallbackRange: string):
23
35
  export const PLUGIN_VERSION =
24
36
  typeof __EVERY_PLUGIN_VERSION__ === "string" ? __EVERY_PLUGIN_VERSION__ : readPackageVersion();
25
37
 
26
- export const SHARE_CONFIG = {
38
+ export interface SharedConfig {
39
+ singleton: boolean;
40
+ requiredVersion: string | false;
41
+ strictVersion: boolean;
42
+ eager: boolean;
43
+ }
44
+
45
+ export const SHARE_CONFIG: SharedConfig = {
27
46
  singleton: true,
28
47
  requiredVersion: false,
29
48
  strictVersion: false,
30
49
  eager: false,
31
- } as const;
50
+ };
32
51
 
33
52
  export const MF_CORE_SHARED_DEPS = {
34
53
  "every-plugin": {
35
54
  version: PLUGIN_VERSION,
55
+ shareScope: "default",
36
56
  shareConfig: SHARE_CONFIG,
37
57
  },
38
58
  effect: {
39
- version: getInstalledPackageVersion("effect", "^3.21.0"),
59
+ version: getInstalledPackageVersion("effect", pkg.peerDependencies.effect),
60
+ shareScope: "default",
40
61
  shareConfig: SHARE_CONFIG,
41
62
  },
42
63
  zod: {
43
- version: getInstalledPackageVersion("zod", "^4.3.6"),
64
+ version: getInstalledPackageVersion("zod", pkg.peerDependencies.zod),
65
+ shareScope: "default",
44
66
  shareConfig: SHARE_CONFIG,
45
67
  },
46
68
  "@orpc/contract": {
47
- version: getInstalledPackageVersion("@orpc/contract", "^1.13.4"),
69
+ version: getInstalledPackageVersion("@orpc/contract", pkg.peerDependencies["@orpc/contract"]),
70
+ shareScope: "default",
71
+ shareConfig: SHARE_CONFIG,
72
+ },
73
+ "@orpc/client": {
74
+ version: getInstalledPackageVersion("@orpc/client", pkg.peerDependencies["@orpc/client"]),
75
+ shareScope: "default",
48
76
  shareConfig: SHARE_CONFIG,
49
77
  },
50
78
  "@orpc/server": {
51
- version: getInstalledPackageVersion("@orpc/server", "^1.13.4"),
79
+ version: getInstalledPackageVersion("@orpc/server", pkg.peerDependencies["@orpc/server"]),
80
+ shareScope: "default",
52
81
  shareConfig: SHARE_CONFIG,
53
82
  },
54
83
  } as const;
@@ -68,22 +97,28 @@ export type AppSharedDeps = Record<string, AppSharedDepConfig>;
68
97
 
69
98
  export function buildMergedSharedDeps(
70
99
  appShared?: AppSharedDeps,
71
- ): Record<string, { version: string; shareConfig: typeof SHARE_CONFIG }> {
72
- const merged: Record<string, { version: string; shareConfig: typeof SHARE_CONFIG }> = {};
100
+ ): Record<string, { version: string; shareScope: string; shareConfig: SharedConfig }> {
101
+ const merged: Record<string, { version: string; shareScope: string; shareConfig: SharedConfig }> =
102
+ {};
73
103
 
74
104
  for (const [name, config] of Object.entries(MF_CORE_SHARED_DEPS)) {
75
- merged[name] = { version: config.version, shareConfig: config.shareConfig };
105
+ merged[name] = {
106
+ version: config.version,
107
+ shareScope: config.shareScope,
108
+ shareConfig: config.shareConfig,
109
+ };
76
110
  }
77
111
 
78
112
  if (appShared) {
79
113
  for (const [name, config] of Object.entries(appShared)) {
80
114
  merged[name] = {
81
115
  version: config.version,
116
+ shareScope: config.shareScope ?? "default",
82
117
  shareConfig: {
83
- singleton: (config.singleton ?? true) as true,
84
- requiredVersion: (config.requiredVersion ?? false) as false,
85
- strictVersion: (config.strictVersion ?? false) as false,
86
- eager: (config.eager ?? false) as false,
118
+ singleton: config.singleton ?? false,
119
+ requiredVersion: config.requiredVersion ?? false,
120
+ strictVersion: config.strictVersion ?? false,
121
+ eager: config.eager ?? false,
87
122
  },
88
123
  };
89
124
  }
@@ -13,6 +13,7 @@ const coreModuleLoaders: Record<CoreSharedDepName, () => Promise<unknown>> = {
13
13
  effect: () => import("effect"),
14
14
  zod: () => import("zod"),
15
15
  "@orpc/contract": () => import("@orpc/contract"),
16
+ "@orpc/client": () => import("@orpc/client"),
16
17
  "@orpc/server": () => import("@orpc/server"),
17
18
  };
18
19
 
@@ -20,6 +21,7 @@ function buildSharedConfig(): Record<
20
21
  string,
21
22
  {
22
23
  version: string;
24
+ shareScope: string;
23
25
  get: () => Promise<() => unknown>;
24
26
  shareConfig: (typeof MF_CORE_SHARED_DEPS)[CoreSharedDepName]["shareConfig"];
25
27
  }
@@ -41,6 +43,7 @@ function buildSharedConfig(): Record<
41
43
  name,
42
44
  {
43
45
  version: config.version,
46
+ shareScope: config.shareScope,
44
47
  get: () => load().then((mod) => () => mod),
45
48
  shareConfig: config.shareConfig,
46
49
  },
@@ -1,5 +1,5 @@
1
1
  import { Context, Effect } from "effect";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  import type { SecretsConfig } from "../../types";
4
4
  import { PluginRuntimeError } from "../errors";
5
5
 
package/src/zod-core.ts CHANGED
@@ -1,4 +1 @@
1
- /**
2
- * necessary for portable type annotations
3
- */
4
1
  export * from "zod/v4/core";
package/src/zod.ts CHANGED
@@ -1 +1,3 @@
1
- export * from "zod";
1
+ import * as z from "zod";
2
+
3
+ export { z };
@@ -1,17 +0,0 @@
1
-
2
-
3
- var _orpc_client = require("@orpc/client");
4
- Object.keys(_orpc_client).forEach(function (k) {
5
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
- enumerable: true,
7
- get: function () { return _orpc_client[k]; }
8
- });
9
- });
10
-
11
- var _orpc_react_query = require("@orpc/react-query");
12
- Object.keys(_orpc_react_query).forEach(function (k) {
13
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
14
- enumerable: true,
15
- get: function () { return _orpc_react_query[k]; }
16
- });
17
- });
@@ -1,2 +0,0 @@
1
- export * from "@orpc/client";
2
- export * from "@orpc/react-query";
@@ -1,2 +0,0 @@
1
- export * from "@orpc/client";
2
- export * from "@orpc/react-query";
@@ -1,5 +0,0 @@
1
- export * from "@orpc/client"
2
-
3
- export * from "@orpc/react-query"
4
-
5
- export { };
package/dist/zod.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod.cjs","names":[],"sources":["../src/zod.ts"],"sourcesContent":["export * from \"zod\";\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod.d.cts","names":[],"sources":["../src/zod.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod.d.mts","names":[],"sources":["../src/zod.ts"],"mappings":""}
package/dist/zod.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"zod.mjs","names":[],"sources":["../src/zod.ts"],"sourcesContent":["export * from \"zod\";\n"],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from "@orpc/client";
2
- export * from "@orpc/react-query";