wexts 4.1.5 → 4.1.7

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 (192) hide show
  1. package/README.md +49 -49
  2. package/bin/wexts.cjs +2 -2
  3. package/dist/chunk-27NEYQD2.mjs +222 -0
  4. package/dist/chunk-27NEYQD2.mjs.map +1 -0
  5. package/dist/chunk-2LJVUMXW.js +228 -0
  6. package/dist/chunk-2LJVUMXW.js.map +1 -0
  7. package/dist/chunk-5DBFN65W.mjs +183 -0
  8. package/dist/chunk-5DBFN65W.mjs.map +1 -0
  9. package/dist/chunk-75HBI2XG.js +504 -0
  10. package/dist/chunk-75HBI2XG.js.map +1 -0
  11. package/dist/chunk-AVMQJWYD.js +95 -0
  12. package/dist/chunk-AVMQJWYD.js.map +1 -0
  13. package/dist/chunk-C2AG7Q3C.mjs +65 -0
  14. package/dist/chunk-C2AG7Q3C.mjs.map +1 -0
  15. package/dist/chunk-DS5KVVWJ.mjs +95 -0
  16. package/dist/chunk-DS5KVVWJ.mjs.map +1 -0
  17. package/dist/chunk-FUPLZMSR.mjs +228 -0
  18. package/dist/chunk-FUPLZMSR.mjs.map +1 -0
  19. package/dist/chunk-HLT3IHJY.js +183 -0
  20. package/dist/chunk-HLT3IHJY.js.map +1 -0
  21. package/dist/chunk-IRRJJ7KL.js +273 -0
  22. package/dist/chunk-IRRJJ7KL.js.map +1 -0
  23. package/dist/chunk-L77ANWWT.mjs +22 -0
  24. package/dist/chunk-L77ANWWT.mjs.map +1 -0
  25. package/dist/chunk-P3Q4I5FD.js +222 -0
  26. package/dist/chunk-P3Q4I5FD.js.map +1 -0
  27. package/dist/chunk-VBIQGUDI.mjs +504 -0
  28. package/dist/chunk-VBIQGUDI.mjs.map +1 -0
  29. package/dist/chunk-VJY6PHYF.mjs +273 -0
  30. package/dist/chunk-VJY6PHYF.mjs.map +1 -0
  31. package/dist/chunk-WCKSKU3C.js +65 -0
  32. package/dist/chunk-WCKSKU3C.js.map +1 -0
  33. package/dist/chunk-XE4OXN2W.js +12 -0
  34. package/dist/chunk-XE4OXN2W.js.map +1 -0
  35. package/dist/cli/index.d.mts +23 -0
  36. package/dist/cli/index.d.ts +23 -0
  37. package/dist/cli/index.js +634 -0
  38. package/dist/cli/index.js.map +1 -0
  39. package/dist/cli/index.mjs +636 -0
  40. package/dist/cli/index.mjs.map +1 -0
  41. package/dist/client/index.d.mts +43 -0
  42. package/dist/client/index.d.ts +43 -0
  43. package/dist/client/index.js +187 -0
  44. package/dist/client/index.js.map +1 -0
  45. package/dist/client/index.mjs +166 -0
  46. package/dist/client/index.mjs.map +1 -0
  47. package/dist/codegen/index.d.mts +2 -0
  48. package/dist/codegen/index.d.ts +2 -0
  49. package/dist/codegen/index.js +16 -0
  50. package/dist/codegen/index.js.map +1 -0
  51. package/dist/codegen/index.mjs +16 -0
  52. package/dist/codegen/index.mjs.map +1 -0
  53. package/dist/decorators-BiQtOHuF.d.ts +60 -0
  54. package/dist/decorators-vBopODtr.d.mts +60 -0
  55. package/dist/dev-server/index.d.mts +1 -0
  56. package/dist/dev-server/index.d.ts +1 -0
  57. package/dist/dev-server/index.js +13 -0
  58. package/dist/dev-server/index.js.map +1 -0
  59. package/dist/dev-server/index.mjs +13 -0
  60. package/dist/dev-server/index.mjs.map +1 -0
  61. package/dist/errors-D545UvXf.d.mts +37 -0
  62. package/dist/errors-D545UvXf.d.ts +37 -0
  63. package/dist/index-7RvU-jGE.d.mts +66 -0
  64. package/dist/index-7RvU-jGE.d.ts +66 -0
  65. package/dist/index-BsafLP-a.d.mts +70 -0
  66. package/dist/index-BsafLP-a.d.ts +70 -0
  67. package/dist/index-CJKs4wtN.d.ts +92 -0
  68. package/dist/index-CUR6CnLk.d.ts +27 -0
  69. package/dist/index-h66Vq9dK.d.mts +92 -0
  70. package/dist/index-tqmYsTUn.d.mts +27 -0
  71. package/dist/index.d.mts +289 -0
  72. package/dist/index.d.ts +289 -0
  73. package/dist/index.js +544 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/index.mjs +544 -0
  76. package/dist/index.mjs.map +1 -0
  77. package/dist/nest/index.d.mts +2 -0
  78. package/dist/nest/index.d.ts +2 -0
  79. package/dist/nest/index.js +36 -0
  80. package/dist/nest/index.js.map +1 -0
  81. package/dist/nest/index.mjs +36 -0
  82. package/dist/nest/index.mjs.map +1 -0
  83. package/dist/next/index.d.mts +66 -0
  84. package/dist/next/index.d.ts +66 -0
  85. package/dist/next/index.js +282 -0
  86. package/dist/next/index.js.map +1 -0
  87. package/dist/next/index.mjs +251 -0
  88. package/dist/next/index.mjs.map +1 -0
  89. package/dist/rpc/index.d.mts +32 -0
  90. package/dist/rpc/index.d.ts +32 -0
  91. package/dist/rpc/index.js +19 -0
  92. package/dist/rpc/index.js.map +1 -0
  93. package/dist/rpc/index.mjs +1 -0
  94. package/dist/rpc/index.mjs.map +1 -0
  95. package/dist/runtime/index.d.mts +55 -0
  96. package/dist/runtime/index.d.ts +55 -0
  97. package/dist/runtime/index.js +15 -0
  98. package/dist/runtime/index.js.map +1 -0
  99. package/dist/runtime/index.mjs +15 -0
  100. package/dist/runtime/index.mjs.map +1 -0
  101. package/dist/server/index.d.mts +7 -0
  102. package/dist/server/index.d.ts +7 -0
  103. package/dist/server/index.js +58 -0
  104. package/dist/server/index.js.map +1 -0
  105. package/dist/server/index.mjs +58 -0
  106. package/dist/server/index.mjs.map +1 -0
  107. package/dist/types/index.d.mts +12 -0
  108. package/dist/types/index.d.ts +12 -0
  109. package/dist/types/index.js +19 -0
  110. package/dist/types/index.js.map +1 -0
  111. package/dist/types/index.mjs +1 -0
  112. package/dist/types/index.mjs.map +1 -0
  113. package/dist/types-CQ_aexOX.d.mts +32 -0
  114. package/dist/types-CQ_aexOX.d.ts +32 -0
  115. package/dist/vercel-builder/index.d.mts +58 -0
  116. package/dist/vercel-builder/index.d.ts +58 -0
  117. package/dist/vercel-builder/index.js +330 -0
  118. package/dist/vercel-builder/index.js.map +1 -0
  119. package/dist/vercel-builder/index.mjs +330 -0
  120. package/dist/vercel-builder/index.mjs.map +1 -0
  121. package/package.json +153 -153
  122. package/templates/.dockerignore +43 -43
  123. package/templates/.env.example +17 -17
  124. package/templates/Dockerfile +60 -60
  125. package/templates/Procfile +1 -1
  126. package/templates/README.md +67 -67
  127. package/templates/api-sdk.ts +115 -115
  128. package/templates/docker-compose.yml +34 -34
  129. package/templates/nestjs-api/.env.example +3 -3
  130. package/templates/nestjs-api/README.md +87 -87
  131. package/templates/nestjs-api/nest-cli.json +6 -6
  132. package/templates/nestjs-api/package.json +40 -40
  133. package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +24 -24
  134. package/templates/nestjs-api/prisma/migrations/migration_lock.toml +3 -3
  135. package/templates/nestjs-api/prisma/schema.prisma +29 -29
  136. package/templates/nestjs-api/src/app.module.ts +19 -17
  137. package/templates/nestjs-api/src/auth/auth.controller.ts +27 -27
  138. package/templates/nestjs-api/src/auth/auth.module.ts +37 -37
  139. package/templates/nestjs-api/src/auth/auth.service.ts +86 -86
  140. package/templates/nestjs-api/src/auth/dto/auth.dto.ts +22 -22
  141. package/templates/nestjs-api/src/auth/guards/jwt-auth.guard.ts +5 -5
  142. package/templates/nestjs-api/src/auth/strategies/jwt.strategy.ts +27 -27
  143. package/templates/nestjs-api/src/hello.service.ts +11 -0
  144. package/templates/nestjs-api/src/main.ts +32 -32
  145. package/templates/nestjs-api/src/prisma/prisma.module.ts +9 -9
  146. package/templates/nestjs-api/src/prisma/prisma.service.ts +14 -14
  147. package/templates/nestjs-api/src/todos/dto/todo.dto.ts +24 -24
  148. package/templates/nestjs-api/src/todos/todos.controller.ts +39 -39
  149. package/templates/nestjs-api/src/todos/todos.module.ts +11 -11
  150. package/templates/nestjs-api/src/todos/todos.service.ts +53 -53
  151. package/templates/nestjs-api/src/users/users.controller.ts +14 -14
  152. package/templates/nestjs-api/src/users/users.module.ts +12 -12
  153. package/templates/nestjs-api/src/users/users.service.ts +19 -19
  154. package/templates/nestjs-api/tsconfig.json +39 -39
  155. package/templates/nextjs-web/README.md +76 -76
  156. package/templates/nextjs-web/app/actions/auth.ts +108 -108
  157. package/templates/nextjs-web/app/dashboard/error.tsx +39 -39
  158. package/templates/nextjs-web/app/dashboard/loading.tsx +14 -14
  159. package/templates/nextjs-web/app/dashboard/page.tsx +5 -5
  160. package/templates/nextjs-web/app/globals.css +93 -93
  161. package/templates/nextjs-web/app/layout.tsx +29 -29
  162. package/templates/nextjs-web/app/login/page.tsx +5 -5
  163. package/templates/nextjs-web/app/page.tsx +138 -28
  164. package/templates/nextjs-web/app/register/page.tsx +5 -5
  165. package/templates/nextjs-web/components/ui/button.tsx +56 -56
  166. package/templates/nextjs-web/components/ui/card.tsx +79 -79
  167. package/templates/nextjs-web/components/ui/input.tsx +25 -25
  168. package/templates/nextjs-web/components/ui/label.tsx +24 -24
  169. package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -140
  170. package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -159
  171. package/templates/nextjs-web/features/auth/api.ts +35 -35
  172. package/templates/nextjs-web/features/auth/index.ts +3 -3
  173. package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -204
  174. package/templates/nextjs-web/features/dashboard/api.ts +9 -9
  175. package/templates/nextjs-web/features/dashboard/components.tsx +74 -74
  176. package/templates/nextjs-web/features/dashboard/index.ts +3 -3
  177. package/templates/nextjs-web/hooks/index.ts +4 -4
  178. package/templates/nextjs-web/lib/api-client.ts +89 -89
  179. package/templates/nextjs-web/lib/api.ts +115 -115
  180. package/templates/nextjs-web/lib/axios-global-config.ts +17 -17
  181. package/templates/nextjs-web/lib/utils.ts +6 -6
  182. package/templates/nextjs-web/lib/wexts-client.ts +4 -4
  183. package/templates/nextjs-web/next-env.d.ts +6 -6
  184. package/templates/nextjs-web/next.config.ts +20 -20
  185. package/templates/nextjs-web/package.json +37 -37
  186. package/templates/nextjs-web/postcss.config.js +6 -6
  187. package/templates/nextjs-web/tailwind.config.ts +69 -69
  188. package/templates/nextjs-web/tsconfig.json +41 -41
  189. package/templates/nixpacks.toml +11 -11
  190. package/templates/root-package.json +31 -31
  191. package/templates/server.ts +66 -66
  192. package/templates/tsconfig.json +30 -30
@@ -0,0 +1,92 @@
1
+ import { a as RpcManifest } from './types-CQ_aexOX.mjs';
2
+
3
+ interface RouteInfo {
4
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
5
+ path: string;
6
+ handler: string;
7
+ controllerName: string;
8
+ }
9
+ interface ControllerInfo {
10
+ name: string;
11
+ prefix: string;
12
+ routes: RouteInfo[];
13
+ }
14
+ /**
15
+ * Parse NestJS controllers to extract Fusion metadata
16
+ */
17
+ declare class NestJSParser {
18
+ private projectPath;
19
+ private program;
20
+ constructor(projectPath: string);
21
+ /**
22
+ * Find all controllers with @FusionController decorator
23
+ */
24
+ findFusionControllers(): ControllerInfo[];
25
+ findRpcManifest(): RpcManifest;
26
+ private parseSourceFile;
27
+ private parseController;
28
+ private parseRoutes;
29
+ private parseRpcServices;
30
+ private parseRpcMethods;
31
+ private parseParameter;
32
+ private findDecorator;
33
+ private hasDecorator;
34
+ private readDecoratorOptions;
35
+ }
36
+
37
+ interface GenerateOptions {
38
+ outputPath: string;
39
+ manifest: RpcManifest;
40
+ manifestFileName?: string;
41
+ clientFileName?: string;
42
+ }
43
+ interface GenerateRpcOptions {
44
+ projectPath: string;
45
+ outputPath: string;
46
+ manifestFileName?: string;
47
+ clientFileName?: string;
48
+ }
49
+ /**
50
+ * Generate TypeScript API client from controller metadata
51
+ */
52
+ declare class ClientGenerator {
53
+ generate(options: GenerateOptions): Promise<void>;
54
+ private generateRpcClientCode;
55
+ private generateClientInterface;
56
+ private generateServiceInterface;
57
+ private parametersToSignature;
58
+ }
59
+ declare function generateRpcClient(options: GenerateRpcOptions): Promise<RpcManifest>;
60
+
61
+ interface WatchOptions {
62
+ projectPath: string;
63
+ outputPath: string;
64
+ pattern?: string;
65
+ }
66
+ /**
67
+ * Watch NestJS controllers and regenerate client on changes
68
+ */
69
+ declare class CodegenWatcher {
70
+ private watcher;
71
+ watch(options: WatchOptions): Promise<void>;
72
+ stop(): Promise<void>;
73
+ private generateClient;
74
+ }
75
+
76
+ type index_ClientGenerator = ClientGenerator;
77
+ declare const index_ClientGenerator: typeof ClientGenerator;
78
+ type index_CodegenWatcher = CodegenWatcher;
79
+ declare const index_CodegenWatcher: typeof CodegenWatcher;
80
+ type index_ControllerInfo = ControllerInfo;
81
+ type index_GenerateOptions = GenerateOptions;
82
+ type index_GenerateRpcOptions = GenerateRpcOptions;
83
+ type index_NestJSParser = NestJSParser;
84
+ declare const index_NestJSParser: typeof NestJSParser;
85
+ type index_RouteInfo = RouteInfo;
86
+ type index_WatchOptions = WatchOptions;
87
+ declare const index_generateRpcClient: typeof generateRpcClient;
88
+ declare namespace index {
89
+ export { index_ClientGenerator as ClientGenerator, index_CodegenWatcher as CodegenWatcher, type index_ControllerInfo as ControllerInfo, type index_GenerateOptions as GenerateOptions, type index_GenerateRpcOptions as GenerateRpcOptions, index_NestJSParser as NestJSParser, type index_RouteInfo as RouteInfo, type index_WatchOptions as WatchOptions, index_generateRpcClient as generateRpcClient };
90
+ }
91
+
92
+ export { ClientGenerator as C, type GenerateOptions as G, NestJSParser as N, type RouteInfo as R, type WatchOptions as W, CodegenWatcher as a, type ControllerInfo as b, type GenerateRpcOptions as c, generateRpcClient as g, index as i };
@@ -0,0 +1,27 @@
1
+ import { F as FusionController, a as FusionDelete, b as FusionGet, c as FusionPost, d as FusionPut, e as FusionRoute, f as FusionRouteMetadata, R as RequireAuth, g as RpcMethod, h as RpcMethodOptions, i as RpcService, j as RpcServiceOptions, k as RuntimeRpcMethodMetadata, l as RuntimeRpcServiceMetadata, W as WextsRpc, m as WextsRpcService, n as getFusionMetadata, o as getRpcAuthPolicy, p as getRuntimeRpcMethodsMetadata, q as getRuntimeRpcServiceMetadata } from './decorators-vBopODtr.mjs';
2
+
3
+ declare const index_FusionController: typeof FusionController;
4
+ declare const index_FusionDelete: typeof FusionDelete;
5
+ declare const index_FusionGet: typeof FusionGet;
6
+ declare const index_FusionPost: typeof FusionPost;
7
+ declare const index_FusionPut: typeof FusionPut;
8
+ declare const index_FusionRoute: typeof FusionRoute;
9
+ declare const index_FusionRouteMetadata: typeof FusionRouteMetadata;
10
+ declare const index_RequireAuth: typeof RequireAuth;
11
+ declare const index_RpcMethod: typeof RpcMethod;
12
+ declare const index_RpcMethodOptions: typeof RpcMethodOptions;
13
+ declare const index_RpcService: typeof RpcService;
14
+ declare const index_RpcServiceOptions: typeof RpcServiceOptions;
15
+ declare const index_RuntimeRpcMethodMetadata: typeof RuntimeRpcMethodMetadata;
16
+ declare const index_RuntimeRpcServiceMetadata: typeof RuntimeRpcServiceMetadata;
17
+ declare const index_WextsRpc: typeof WextsRpc;
18
+ declare const index_WextsRpcService: typeof WextsRpcService;
19
+ declare const index_getFusionMetadata: typeof getFusionMetadata;
20
+ declare const index_getRpcAuthPolicy: typeof getRpcAuthPolicy;
21
+ declare const index_getRuntimeRpcMethodsMetadata: typeof getRuntimeRpcMethodsMetadata;
22
+ declare const index_getRuntimeRpcServiceMetadata: typeof getRuntimeRpcServiceMetadata;
23
+ declare namespace index {
24
+ export { index_FusionController as FusionController, index_FusionDelete as FusionDelete, index_FusionGet as FusionGet, index_FusionPost as FusionPost, index_FusionPut as FusionPut, index_FusionRoute as FusionRoute, index_FusionRouteMetadata as FusionRouteMetadata, index_RequireAuth as RequireAuth, index_RpcMethod as RpcMethod, index_RpcMethodOptions as RpcMethodOptions, index_RpcService as RpcService, index_RpcServiceOptions as RpcServiceOptions, index_RuntimeRpcMethodMetadata as RuntimeRpcMethodMetadata, index_RuntimeRpcServiceMetadata as RuntimeRpcServiceMetadata, index_WextsRpc as WextsRpc, index_WextsRpcService as WextsRpcService, index_getFusionMetadata as getFusionMetadata, index_getRpcAuthPolicy as getRpcAuthPolicy, index_getRuntimeRpcMethodsMetadata as getRuntimeRpcMethodsMetadata, index_getRuntimeRpcServiceMetadata as getRuntimeRpcServiceMetadata };
25
+ }
26
+
27
+ export { index as i };
@@ -0,0 +1,289 @@
1
+ export { i as Codegen } from './index-h66Vq9dK.mjs';
2
+ export { i as DevServer } from './index-BsafLP-a.mjs';
3
+ export { i as Nest } from './index-tqmYsTUn.mjs';
4
+ import React, { ReactNode } from 'react';
5
+ import { R as RpcAuthPolicy, b as RpcInvocationRequest, c as RpcInvocationResponse, a as RpcManifest, d as RpcMethodManifest, e as RpcParameterManifest, f as RpcServiceManifest } from './types-CQ_aexOX.mjs';
6
+ export { d as WextsCodegenError, W as WextsError, e as WextsErrorOptions, a as WextsRpcError, b as WextsRuntimeError, c as WextsSecurityError, f as formatWextsError } from './errors-D545UvXf.mjs';
7
+ import './decorators-vBopODtr.mjs';
8
+
9
+ interface FusionConfig {
10
+ [key: string]: any;
11
+ }
12
+ declare class ConfigLoader {
13
+ private config;
14
+ private configDir;
15
+ constructor(configDir?: string);
16
+ /**
17
+ * Load configuration from file or environment
18
+ */
19
+ load(key: string, defaultValue?: any): any;
20
+ /**
21
+ * Set configuration value
22
+ */
23
+ set(key: string, value: any): void;
24
+ /**
25
+ * Get all configuration
26
+ */
27
+ getAll(): FusionConfig;
28
+ /**
29
+ * Parse environment value (handles JSON strings)
30
+ */
31
+ private parseEnvValue;
32
+ }
33
+ declare const config: ConfigLoader;
34
+ declare function load(key: string, defaultValue?: any): any;
35
+
36
+ declare enum LogLevel {
37
+ DEBUG = 0,
38
+ INFO = 1,
39
+ WARN = 2,
40
+ ERROR = 3
41
+ }
42
+ interface LoggerOptions {
43
+ level?: LogLevel;
44
+ prefix?: string;
45
+ timestamp?: boolean;
46
+ }
47
+ declare class Logger {
48
+ private level;
49
+ private prefix;
50
+ private timestamp;
51
+ constructor(options?: LoggerOptions);
52
+ private formatMessage;
53
+ debug(...args: any[]): void;
54
+ info(...args: any[]): void;
55
+ warn(...args: any[]): void;
56
+ error(...args: any[]): void;
57
+ success(...args: any[]): void;
58
+ }
59
+ declare const logger: Logger;
60
+ declare function createLogger(options: LoggerOptions): Logger;
61
+
62
+ declare class FileSystem {
63
+ /**
64
+ * Read file as string
65
+ */
66
+ readFile(filePath: string, encoding?: BufferEncoding): Promise<string>;
67
+ /**
68
+ * Write file
69
+ */
70
+ writeFile(filePath: string, content: string): Promise<void>;
71
+ /**
72
+ * Read JSON file
73
+ */
74
+ readJSON<T = any>(filePath: string): Promise<T>;
75
+ /**
76
+ * Write JSON file
77
+ */
78
+ writeJSON(filePath: string, data: any, pretty?: boolean): Promise<void>;
79
+ /**
80
+ * Check if file/directory exists
81
+ */
82
+ exists(filePath: string): Promise<boolean>;
83
+ /**
84
+ * Ensure directory exists (create if not)
85
+ */
86
+ ensureDir(dirPath: string): Promise<void>;
87
+ /**
88
+ * Copy file
89
+ */
90
+ copyFile(src: string, dest: string): Promise<void>;
91
+ /**
92
+ * Read directory
93
+ */
94
+ readDir(dirPath: string): Promise<string[]>;
95
+ }
96
+ declare const filesystem: FileSystem;
97
+
98
+ declare class ProcessManager {
99
+ /**
100
+ * Setup process error handlers
101
+ */
102
+ static initialize(): void;
103
+ /**
104
+ * Graceful shutdown helper
105
+ */
106
+ static shutdown(cleanup: () => Promise<void>): Promise<void>;
107
+ }
108
+
109
+ declare class FusionError extends Error {
110
+ code?: string | undefined;
111
+ constructor(message: string, code?: string | undefined);
112
+ }
113
+ declare class ConfigError extends FusionError {
114
+ constructor(message: string);
115
+ }
116
+ declare class ValidationError extends FusionError {
117
+ constructor(message: string);
118
+ }
119
+ declare class APIError extends FusionError {
120
+ statusCode?: number | undefined;
121
+ constructor(message: string, statusCode?: number | undefined);
122
+ }
123
+
124
+ type index$5_APIError = APIError;
125
+ declare const index$5_APIError: typeof APIError;
126
+ type index$5_ConfigError = ConfigError;
127
+ declare const index$5_ConfigError: typeof ConfigError;
128
+ type index$5_ConfigLoader = ConfigLoader;
129
+ declare const index$5_ConfigLoader: typeof ConfigLoader;
130
+ type index$5_FileSystem = FileSystem;
131
+ declare const index$5_FileSystem: typeof FileSystem;
132
+ type index$5_FusionConfig = FusionConfig;
133
+ type index$5_FusionError = FusionError;
134
+ declare const index$5_FusionError: typeof FusionError;
135
+ type index$5_LogLevel = LogLevel;
136
+ declare const index$5_LogLevel: typeof LogLevel;
137
+ type index$5_Logger = Logger;
138
+ declare const index$5_Logger: typeof Logger;
139
+ type index$5_LoggerOptions = LoggerOptions;
140
+ type index$5_ProcessManager = ProcessManager;
141
+ declare const index$5_ProcessManager: typeof ProcessManager;
142
+ type index$5_ValidationError = ValidationError;
143
+ declare const index$5_ValidationError: typeof ValidationError;
144
+ declare const index$5_config: typeof config;
145
+ declare const index$5_createLogger: typeof createLogger;
146
+ declare const index$5_filesystem: typeof filesystem;
147
+ declare const index$5_load: typeof load;
148
+ declare const index$5_logger: typeof logger;
149
+ declare namespace index$5 {
150
+ export { index$5_APIError as APIError, index$5_ConfigError as ConfigError, index$5_ConfigLoader as ConfigLoader, index$5_FileSystem as FileSystem, type index$5_FusionConfig as FusionConfig, index$5_FusionError as FusionError, index$5_LogLevel as LogLevel, index$5_Logger as Logger, type index$5_LoggerOptions as LoggerOptions, index$5_ProcessManager as ProcessManager, index$5_ValidationError as ValidationError, index$5_config as config, index$5_createLogger as createLogger, index$5_filesystem as filesystem, index$5_load as load, index$5_logger as logger };
151
+ }
152
+
153
+ declare const loader: {
154
+ load: () => {};
155
+ };
156
+
157
+ declare const index$4_loader: typeof loader;
158
+ declare namespace index$4 {
159
+ export { index$4_loader as loader };
160
+ }
161
+
162
+ declare const server: {
163
+ start: () => void;
164
+ };
165
+
166
+ declare const index$3_server: typeof server;
167
+ declare namespace index$3 {
168
+ export { index$3_server as server };
169
+ }
170
+
171
+ interface ScaffoldOptions {
172
+ projectName: string;
173
+ template: 'monorepo' | 'api' | 'web';
174
+ packageManager?: 'npm' | 'pnpm' | 'yarn';
175
+ }
176
+ /**
177
+ * @deprecated Use the `wexts create` CLI and `examples/hello-rpc` canonical scaffold instead.
178
+ */
179
+ declare class ProjectScaffolder {
180
+ scaffold(options: ScaffoldOptions): Promise<void>;
181
+ private createMonorepo;
182
+ private createNestJSApp;
183
+ private createNextJSApp;
184
+ }
185
+
186
+ type index$2_ProjectScaffolder = ProjectScaffolder;
187
+ declare const index$2_ProjectScaffolder: typeof ProjectScaffolder;
188
+ type index$2_ScaffoldOptions = ScaffoldOptions;
189
+ declare namespace index$2 {
190
+ export { index$2_ProjectScaffolder as ProjectScaffolder, type index$2_ScaffoldOptions as ScaffoldOptions };
191
+ }
192
+
193
+ declare class FusionFetcher {
194
+ private baseUrl;
195
+ constructor(baseUrl?: string);
196
+ private request;
197
+ get<T>(path: string): Promise<T>;
198
+ post<T>(path: string, body: any): Promise<T>;
199
+ put<T>(path: string, body: any): Promise<T>;
200
+ delete<T>(path: string): Promise<T>;
201
+ }
202
+ type WextsRpcClient = Record<string, Record<string, (...args: unknown[]) => Promise<unknown>>>;
203
+
204
+ interface FusionContextType {
205
+ client: FusionFetcher;
206
+ wexts: WextsRpcClient;
207
+ }
208
+ interface FusionProviderProps {
209
+ children: ReactNode;
210
+ baseUrl?: string;
211
+ rpcBaseUrl?: string;
212
+ rpcClient?: object;
213
+ }
214
+ /**
215
+ * FusionProvider - Provides API client to React components
216
+ * Usage:
217
+ * ```tsx
218
+ * <FusionProvider baseUrl="/api">
219
+ * <App />
220
+ * </FusionProvider>
221
+ * ```
222
+ */
223
+ declare function FusionProvider({ children, baseUrl, rpcBaseUrl, rpcClient }: FusionProviderProps): React.JSX.Element;
224
+ /**
225
+ * useFusion hook - Access API client in components
226
+ * Usage:
227
+ * ```tsx
228
+ * const { client } = useFusion();
229
+ * const data = await client.get('/users');
230
+ * ```
231
+ */
232
+ declare function useFusion(): FusionContextType;
233
+ declare function useWexts<TClient = WextsRpcClient>(): TClient;
234
+
235
+ interface AuthUser {
236
+ id: string;
237
+ email: string;
238
+ name?: string;
239
+ }
240
+ interface UseAuthReturn {
241
+ user: AuthUser | null;
242
+ loading: boolean;
243
+ login: (email: string, password: string) => Promise<void>;
244
+ logout: () => Promise<void>;
245
+ isAuthenticated: boolean;
246
+ }
247
+ /**
248
+ * useAuth hook - Authentication state management
249
+ * Usage:
250
+ * ```tsx
251
+ * const { user, login, logout, isAuthenticated } = useAuth();
252
+ * ```
253
+ */
254
+ declare function useAuth(): UseAuthReturn;
255
+
256
+ type index$1_AuthUser = AuthUser;
257
+ declare const index$1_FusionProvider: typeof FusionProvider;
258
+ type index$1_FusionProviderProps = FusionProviderProps;
259
+ type index$1_UseAuthReturn = UseAuthReturn;
260
+ declare const index$1_useAuth: typeof useAuth;
261
+ declare const index$1_useFusion: typeof useFusion;
262
+ declare const index$1_useWexts: typeof useWexts;
263
+ declare namespace index$1 {
264
+ export { type index$1_AuthUser as AuthUser, index$1_FusionProvider as FusionProvider, type index$1_FusionProviderProps as FusionProviderProps, type index$1_UseAuthReturn as UseAuthReturn, index$1_useAuth as useAuth, index$1_useFusion as useFusion, index$1_useWexts as useWexts };
265
+ }
266
+
267
+ declare const index_RpcAuthPolicy: typeof RpcAuthPolicy;
268
+ declare const index_RpcInvocationRequest: typeof RpcInvocationRequest;
269
+ declare const index_RpcInvocationResponse: typeof RpcInvocationResponse;
270
+ declare const index_RpcManifest: typeof RpcManifest;
271
+ declare const index_RpcMethodManifest: typeof RpcMethodManifest;
272
+ declare const index_RpcParameterManifest: typeof RpcParameterManifest;
273
+ declare const index_RpcServiceManifest: typeof RpcServiceManifest;
274
+ declare namespace index {
275
+ export { index_RpcAuthPolicy as RpcAuthPolicy, index_RpcInvocationRequest as RpcInvocationRequest, index_RpcInvocationResponse as RpcInvocationResponse, index_RpcManifest as RpcManifest, index_RpcMethodManifest as RpcMethodManifest, index_RpcParameterManifest as RpcParameterManifest, index_RpcServiceManifest as RpcServiceManifest };
276
+ }
277
+
278
+ interface User {
279
+ id: string;
280
+ email: string;
281
+ name?: string;
282
+ }
283
+ interface Todo {
284
+ id: string;
285
+ title: string;
286
+ completed: boolean;
287
+ }
288
+
289
+ export { index$4 as Config, index$5 as Core, index$2 as CreateFusion, index$3 as Insight, index$1 as Next, index as Rpc, type Todo, type User };
@@ -0,0 +1,289 @@
1
+ export { i as Codegen } from './index-CJKs4wtN.js';
2
+ export { i as DevServer } from './index-BsafLP-a.js';
3
+ export { i as Nest } from './index-CUR6CnLk.js';
4
+ import React, { ReactNode } from 'react';
5
+ import { R as RpcAuthPolicy, b as RpcInvocationRequest, c as RpcInvocationResponse, a as RpcManifest, d as RpcMethodManifest, e as RpcParameterManifest, f as RpcServiceManifest } from './types-CQ_aexOX.js';
6
+ export { d as WextsCodegenError, W as WextsError, e as WextsErrorOptions, a as WextsRpcError, b as WextsRuntimeError, c as WextsSecurityError, f as formatWextsError } from './errors-D545UvXf.js';
7
+ import './decorators-BiQtOHuF.js';
8
+
9
+ interface FusionConfig {
10
+ [key: string]: any;
11
+ }
12
+ declare class ConfigLoader {
13
+ private config;
14
+ private configDir;
15
+ constructor(configDir?: string);
16
+ /**
17
+ * Load configuration from file or environment
18
+ */
19
+ load(key: string, defaultValue?: any): any;
20
+ /**
21
+ * Set configuration value
22
+ */
23
+ set(key: string, value: any): void;
24
+ /**
25
+ * Get all configuration
26
+ */
27
+ getAll(): FusionConfig;
28
+ /**
29
+ * Parse environment value (handles JSON strings)
30
+ */
31
+ private parseEnvValue;
32
+ }
33
+ declare const config: ConfigLoader;
34
+ declare function load(key: string, defaultValue?: any): any;
35
+
36
+ declare enum LogLevel {
37
+ DEBUG = 0,
38
+ INFO = 1,
39
+ WARN = 2,
40
+ ERROR = 3
41
+ }
42
+ interface LoggerOptions {
43
+ level?: LogLevel;
44
+ prefix?: string;
45
+ timestamp?: boolean;
46
+ }
47
+ declare class Logger {
48
+ private level;
49
+ private prefix;
50
+ private timestamp;
51
+ constructor(options?: LoggerOptions);
52
+ private formatMessage;
53
+ debug(...args: any[]): void;
54
+ info(...args: any[]): void;
55
+ warn(...args: any[]): void;
56
+ error(...args: any[]): void;
57
+ success(...args: any[]): void;
58
+ }
59
+ declare const logger: Logger;
60
+ declare function createLogger(options: LoggerOptions): Logger;
61
+
62
+ declare class FileSystem {
63
+ /**
64
+ * Read file as string
65
+ */
66
+ readFile(filePath: string, encoding?: BufferEncoding): Promise<string>;
67
+ /**
68
+ * Write file
69
+ */
70
+ writeFile(filePath: string, content: string): Promise<void>;
71
+ /**
72
+ * Read JSON file
73
+ */
74
+ readJSON<T = any>(filePath: string): Promise<T>;
75
+ /**
76
+ * Write JSON file
77
+ */
78
+ writeJSON(filePath: string, data: any, pretty?: boolean): Promise<void>;
79
+ /**
80
+ * Check if file/directory exists
81
+ */
82
+ exists(filePath: string): Promise<boolean>;
83
+ /**
84
+ * Ensure directory exists (create if not)
85
+ */
86
+ ensureDir(dirPath: string): Promise<void>;
87
+ /**
88
+ * Copy file
89
+ */
90
+ copyFile(src: string, dest: string): Promise<void>;
91
+ /**
92
+ * Read directory
93
+ */
94
+ readDir(dirPath: string): Promise<string[]>;
95
+ }
96
+ declare const filesystem: FileSystem;
97
+
98
+ declare class ProcessManager {
99
+ /**
100
+ * Setup process error handlers
101
+ */
102
+ static initialize(): void;
103
+ /**
104
+ * Graceful shutdown helper
105
+ */
106
+ static shutdown(cleanup: () => Promise<void>): Promise<void>;
107
+ }
108
+
109
+ declare class FusionError extends Error {
110
+ code?: string | undefined;
111
+ constructor(message: string, code?: string | undefined);
112
+ }
113
+ declare class ConfigError extends FusionError {
114
+ constructor(message: string);
115
+ }
116
+ declare class ValidationError extends FusionError {
117
+ constructor(message: string);
118
+ }
119
+ declare class APIError extends FusionError {
120
+ statusCode?: number | undefined;
121
+ constructor(message: string, statusCode?: number | undefined);
122
+ }
123
+
124
+ type index$5_APIError = APIError;
125
+ declare const index$5_APIError: typeof APIError;
126
+ type index$5_ConfigError = ConfigError;
127
+ declare const index$5_ConfigError: typeof ConfigError;
128
+ type index$5_ConfigLoader = ConfigLoader;
129
+ declare const index$5_ConfigLoader: typeof ConfigLoader;
130
+ type index$5_FileSystem = FileSystem;
131
+ declare const index$5_FileSystem: typeof FileSystem;
132
+ type index$5_FusionConfig = FusionConfig;
133
+ type index$5_FusionError = FusionError;
134
+ declare const index$5_FusionError: typeof FusionError;
135
+ type index$5_LogLevel = LogLevel;
136
+ declare const index$5_LogLevel: typeof LogLevel;
137
+ type index$5_Logger = Logger;
138
+ declare const index$5_Logger: typeof Logger;
139
+ type index$5_LoggerOptions = LoggerOptions;
140
+ type index$5_ProcessManager = ProcessManager;
141
+ declare const index$5_ProcessManager: typeof ProcessManager;
142
+ type index$5_ValidationError = ValidationError;
143
+ declare const index$5_ValidationError: typeof ValidationError;
144
+ declare const index$5_config: typeof config;
145
+ declare const index$5_createLogger: typeof createLogger;
146
+ declare const index$5_filesystem: typeof filesystem;
147
+ declare const index$5_load: typeof load;
148
+ declare const index$5_logger: typeof logger;
149
+ declare namespace index$5 {
150
+ export { index$5_APIError as APIError, index$5_ConfigError as ConfigError, index$5_ConfigLoader as ConfigLoader, index$5_FileSystem as FileSystem, type index$5_FusionConfig as FusionConfig, index$5_FusionError as FusionError, index$5_LogLevel as LogLevel, index$5_Logger as Logger, type index$5_LoggerOptions as LoggerOptions, index$5_ProcessManager as ProcessManager, index$5_ValidationError as ValidationError, index$5_config as config, index$5_createLogger as createLogger, index$5_filesystem as filesystem, index$5_load as load, index$5_logger as logger };
151
+ }
152
+
153
+ declare const loader: {
154
+ load: () => {};
155
+ };
156
+
157
+ declare const index$4_loader: typeof loader;
158
+ declare namespace index$4 {
159
+ export { index$4_loader as loader };
160
+ }
161
+
162
+ declare const server: {
163
+ start: () => void;
164
+ };
165
+
166
+ declare const index$3_server: typeof server;
167
+ declare namespace index$3 {
168
+ export { index$3_server as server };
169
+ }
170
+
171
+ interface ScaffoldOptions {
172
+ projectName: string;
173
+ template: 'monorepo' | 'api' | 'web';
174
+ packageManager?: 'npm' | 'pnpm' | 'yarn';
175
+ }
176
+ /**
177
+ * @deprecated Use the `wexts create` CLI and `examples/hello-rpc` canonical scaffold instead.
178
+ */
179
+ declare class ProjectScaffolder {
180
+ scaffold(options: ScaffoldOptions): Promise<void>;
181
+ private createMonorepo;
182
+ private createNestJSApp;
183
+ private createNextJSApp;
184
+ }
185
+
186
+ type index$2_ProjectScaffolder = ProjectScaffolder;
187
+ declare const index$2_ProjectScaffolder: typeof ProjectScaffolder;
188
+ type index$2_ScaffoldOptions = ScaffoldOptions;
189
+ declare namespace index$2 {
190
+ export { index$2_ProjectScaffolder as ProjectScaffolder, type index$2_ScaffoldOptions as ScaffoldOptions };
191
+ }
192
+
193
+ declare class FusionFetcher {
194
+ private baseUrl;
195
+ constructor(baseUrl?: string);
196
+ private request;
197
+ get<T>(path: string): Promise<T>;
198
+ post<T>(path: string, body: any): Promise<T>;
199
+ put<T>(path: string, body: any): Promise<T>;
200
+ delete<T>(path: string): Promise<T>;
201
+ }
202
+ type WextsRpcClient = Record<string, Record<string, (...args: unknown[]) => Promise<unknown>>>;
203
+
204
+ interface FusionContextType {
205
+ client: FusionFetcher;
206
+ wexts: WextsRpcClient;
207
+ }
208
+ interface FusionProviderProps {
209
+ children: ReactNode;
210
+ baseUrl?: string;
211
+ rpcBaseUrl?: string;
212
+ rpcClient?: object;
213
+ }
214
+ /**
215
+ * FusionProvider - Provides API client to React components
216
+ * Usage:
217
+ * ```tsx
218
+ * <FusionProvider baseUrl="/api">
219
+ * <App />
220
+ * </FusionProvider>
221
+ * ```
222
+ */
223
+ declare function FusionProvider({ children, baseUrl, rpcBaseUrl, rpcClient }: FusionProviderProps): React.JSX.Element;
224
+ /**
225
+ * useFusion hook - Access API client in components
226
+ * Usage:
227
+ * ```tsx
228
+ * const { client } = useFusion();
229
+ * const data = await client.get('/users');
230
+ * ```
231
+ */
232
+ declare function useFusion(): FusionContextType;
233
+ declare function useWexts<TClient = WextsRpcClient>(): TClient;
234
+
235
+ interface AuthUser {
236
+ id: string;
237
+ email: string;
238
+ name?: string;
239
+ }
240
+ interface UseAuthReturn {
241
+ user: AuthUser | null;
242
+ loading: boolean;
243
+ login: (email: string, password: string) => Promise<void>;
244
+ logout: () => Promise<void>;
245
+ isAuthenticated: boolean;
246
+ }
247
+ /**
248
+ * useAuth hook - Authentication state management
249
+ * Usage:
250
+ * ```tsx
251
+ * const { user, login, logout, isAuthenticated } = useAuth();
252
+ * ```
253
+ */
254
+ declare function useAuth(): UseAuthReturn;
255
+
256
+ type index$1_AuthUser = AuthUser;
257
+ declare const index$1_FusionProvider: typeof FusionProvider;
258
+ type index$1_FusionProviderProps = FusionProviderProps;
259
+ type index$1_UseAuthReturn = UseAuthReturn;
260
+ declare const index$1_useAuth: typeof useAuth;
261
+ declare const index$1_useFusion: typeof useFusion;
262
+ declare const index$1_useWexts: typeof useWexts;
263
+ declare namespace index$1 {
264
+ export { type index$1_AuthUser as AuthUser, index$1_FusionProvider as FusionProvider, type index$1_FusionProviderProps as FusionProviderProps, type index$1_UseAuthReturn as UseAuthReturn, index$1_useAuth as useAuth, index$1_useFusion as useFusion, index$1_useWexts as useWexts };
265
+ }
266
+
267
+ declare const index_RpcAuthPolicy: typeof RpcAuthPolicy;
268
+ declare const index_RpcInvocationRequest: typeof RpcInvocationRequest;
269
+ declare const index_RpcInvocationResponse: typeof RpcInvocationResponse;
270
+ declare const index_RpcManifest: typeof RpcManifest;
271
+ declare const index_RpcMethodManifest: typeof RpcMethodManifest;
272
+ declare const index_RpcParameterManifest: typeof RpcParameterManifest;
273
+ declare const index_RpcServiceManifest: typeof RpcServiceManifest;
274
+ declare namespace index {
275
+ export { index_RpcAuthPolicy as RpcAuthPolicy, index_RpcInvocationRequest as RpcInvocationRequest, index_RpcInvocationResponse as RpcInvocationResponse, index_RpcManifest as RpcManifest, index_RpcMethodManifest as RpcMethodManifest, index_RpcParameterManifest as RpcParameterManifest, index_RpcServiceManifest as RpcServiceManifest };
276
+ }
277
+
278
+ interface User {
279
+ id: string;
280
+ email: string;
281
+ name?: string;
282
+ }
283
+ interface Todo {
284
+ id: string;
285
+ title: string;
286
+ completed: boolean;
287
+ }
288
+
289
+ export { index$4 as Config, index$5 as Core, index$2 as CreateFusion, index$3 as Insight, index$1 as Next, index as Rpc, type Todo, type User };