wexts 2.0.7 → 2.0.9
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/README.md +123 -237
- package/dist/chunk-63MTCWU2.mjs +361 -0
- package/dist/chunk-63MTCWU2.mjs.map +1 -0
- package/dist/chunk-67IJ6H4J.mjs +44 -0
- package/dist/chunk-67IJ6H4J.mjs.map +1 -0
- package/dist/chunk-7NSRDJ5C.mjs +1 -0
- package/dist/chunk-7NSRDJ5C.mjs.map +1 -0
- package/dist/chunk-ASDXAK6G.js +44 -0
- package/dist/chunk-ASDXAK6G.js.map +1 -0
- package/dist/chunk-CKZ4VSCB.mjs +18 -0
- package/dist/chunk-CKZ4VSCB.mjs.map +1 -0
- package/dist/chunk-DW6GOKMF.js +57 -0
- package/dist/chunk-DW6GOKMF.js.map +1 -0
- package/dist/chunk-GKVPGKAH.js +66 -0
- package/dist/chunk-GKVPGKAH.js.map +1 -0
- package/dist/chunk-HSFLZUJN.mjs +57 -0
- package/dist/chunk-HSFLZUJN.mjs.map +1 -0
- package/dist/chunk-HU63F22V.js +361 -0
- package/dist/chunk-HU63F22V.js.map +1 -0
- package/dist/chunk-JMBD6DOP.js +225 -0
- package/dist/chunk-JMBD6DOP.js.map +1 -0
- package/dist/chunk-K7EIJSYQ.js +1 -0
- package/dist/chunk-K7EIJSYQ.js.map +1 -0
- package/dist/chunk-OTBYRUBE.mjs +225 -0
- package/dist/chunk-OTBYRUBE.mjs.map +1 -0
- package/dist/chunk-WMHVXEYQ.mjs +66 -0
- package/dist/chunk-WMHVXEYQ.mjs.map +1 -0
- package/dist/cli/index.js +156 -25
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +140 -7
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +2 -2
- package/dist/codegen/index.d.mts +1 -0
- package/dist/codegen/index.d.ts +1 -0
- package/dist/codegen/index.js +13 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/codegen/index.mjs +13 -0
- package/dist/codegen/index.mjs.map +1 -0
- package/dist/dev-server/index.d.mts +1 -0
- package/dist/dev-server/index.d.ts +1 -0
- package/dist/dev-server/index.js +13 -0
- package/dist/dev-server/index.js.map +1 -0
- package/dist/dev-server/index.mjs +13 -0
- package/dist/dev-server/index.mjs.map +1 -0
- package/dist/index-SjUaHgFr.d.mts +75 -0
- package/dist/index-SjUaHgFr.d.ts +75 -0
- package/dist/index-tFGPFVfQ.d.mts +67 -0
- package/dist/index-tFGPFVfQ.d.ts +67 -0
- package/dist/index.d.mts +83 -164
- package/dist/index.d.ts +83 -164
- package/dist/index.js +89 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -9
- package/dist/index.mjs.map +1 -1
- package/dist/nest/index.js +2 -2
- package/dist/nest/index.mjs +2 -2
- package/dist/next/index.d.mts +61 -3
- package/dist/next/index.d.ts +61 -3
- package/dist/next/index.js +140 -7
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +102 -7
- package/dist/next/index.mjs.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.mjs +2 -1
- package/package.json +2 -2
- package/templates/nestjs-api/.env +4 -0
- package/templates/nestjs-api/.env.example +1 -2
- package/templates/nestjs-api/package-lock.json +5623 -0
- package/templates/nestjs-api/package.json +21 -19
- package/templates/nestjs-api/prisma/dev.db +0 -0
- package/templates/nestjs-api/prisma/migrations/20251123205437_init/migration.sql +24 -0
- package/templates/nestjs-api/prisma/migrations/migration_lock.toml +3 -0
- package/templates/nestjs-api/src/auth/auth.controller.ts +5 -5
- package/templates/nestjs-api/src/main.ts +1 -1
- package/templates/nestjs-api/src/todos/todos.controller.ts +7 -7
- package/templates/nestjs-api/src/users/users.controller.ts +3 -3
- package/templates/nestjs-api/tsconfig.json +20 -1
- package/templates/nextjs-web/app/actions/auth.ts +79 -0
- package/templates/nextjs-web/app/dashboard/error.tsx +39 -0
- package/templates/nextjs-web/app/dashboard/loading.tsx +14 -0
- package/templates/nextjs-web/app/dashboard/page.tsx +2 -172
- package/templates/nextjs-web/app/globals.css +80 -15
- package/templates/nextjs-web/app/layout.tsx +7 -5
- package/templates/nextjs-web/app/login/page.tsx +2 -104
- package/templates/nextjs-web/app/page.tsx +1 -1
- package/templates/nextjs-web/app/register/page.tsx +2 -127
- package/templates/nextjs-web/components/ui/button.tsx +56 -0
- package/templates/nextjs-web/components/ui/card.tsx +79 -0
- package/templates/nextjs-web/components/ui/input.tsx +25 -0
- package/templates/nextjs-web/components/ui/label.tsx +24 -0
- package/templates/nextjs-web/features/auth/LoginForm.tsx +140 -0
- package/templates/nextjs-web/features/auth/RegisterForm.tsx +159 -0
- package/templates/nextjs-web/features/auth/api.ts +35 -0
- package/templates/nextjs-web/features/auth/index.ts +3 -0
- package/templates/nextjs-web/features/dashboard/DashboardView.tsx +204 -0
- package/templates/nextjs-web/features/dashboard/api.ts +9 -0
- package/templates/nextjs-web/features/dashboard/components.tsx +74 -0
- package/templates/nextjs-web/features/dashboard/index.ts +3 -0
- package/templates/nextjs-web/hooks/index.ts +4 -0
- package/templates/nextjs-web/lib/api-client.ts +89 -0
- package/templates/nextjs-web/lib/axios-global-config.ts +17 -0
- package/templates/nextjs-web/lib/utils.ts +6 -0
- package/templates/nextjs-web/lib/wexts-client.ts +4 -0
- package/templates/nextjs-web/next-env.d.ts +6 -0
- package/templates/nextjs-web/next.config.ts +20 -0
- package/templates/nextjs-web/package-lock.json +3254 -0
- package/templates/nextjs-web/package.json +23 -14
- package/templates/nextjs-web/postcss.config.js +6 -0
- package/templates/nextjs-web/tailwind.config.ts +55 -1
- package/templates/nextjs-web/tsconfig.json +41 -39
- package/templates/nextjs-web/next.config.mjs +0 -4
- /package/templates/nextjs-web/{.env.local.example → .env} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export { i as Codegen } from './index-SjUaHgFr.mjs';
|
|
2
|
+
export { i as DevServer } from './index-tFGPFVfQ.mjs';
|
|
1
3
|
export { i as Nest } from './index-BsNaOUtH.mjs';
|
|
2
|
-
|
|
4
|
+
import React, { ReactNode } from 'react';
|
|
5
|
+
import { FusionFetcher } from './client/index.mjs';
|
|
3
6
|
export { Todo, User } from './types/index.mjs';
|
|
4
|
-
import 'react';
|
|
5
|
-
import './client/index.mjs';
|
|
6
7
|
|
|
7
8
|
interface FusionConfig {
|
|
8
9
|
[key: string]: any;
|
|
@@ -119,125 +120,51 @@ declare class APIError extends FusionError {
|
|
|
119
120
|
constructor(message: string, statusCode?: number | undefined);
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
type index$
|
|
123
|
-
declare const index$
|
|
124
|
-
type index$
|
|
125
|
-
declare const index$
|
|
126
|
-
type index$
|
|
127
|
-
declare const index$
|
|
128
|
-
type index$
|
|
129
|
-
declare const index$
|
|
130
|
-
type index$
|
|
131
|
-
type index$
|
|
132
|
-
declare const index$
|
|
133
|
-
type index$
|
|
134
|
-
declare const index$
|
|
135
|
-
type index$
|
|
136
|
-
declare const index$
|
|
137
|
-
type index$
|
|
138
|
-
type index$
|
|
139
|
-
declare const index$
|
|
140
|
-
type index$
|
|
141
|
-
declare const index$
|
|
142
|
-
declare const index$
|
|
143
|
-
declare const index$
|
|
144
|
-
declare const index$
|
|
145
|
-
declare const index$
|
|
146
|
-
declare const index$
|
|
147
|
-
declare namespace index$
|
|
148
|
-
export { index$
|
|
123
|
+
type index$4_APIError = APIError;
|
|
124
|
+
declare const index$4_APIError: typeof APIError;
|
|
125
|
+
type index$4_ConfigError = ConfigError;
|
|
126
|
+
declare const index$4_ConfigError: typeof ConfigError;
|
|
127
|
+
type index$4_ConfigLoader = ConfigLoader;
|
|
128
|
+
declare const index$4_ConfigLoader: typeof ConfigLoader;
|
|
129
|
+
type index$4_FileSystem = FileSystem;
|
|
130
|
+
declare const index$4_FileSystem: typeof FileSystem;
|
|
131
|
+
type index$4_FusionConfig = FusionConfig;
|
|
132
|
+
type index$4_FusionError = FusionError;
|
|
133
|
+
declare const index$4_FusionError: typeof FusionError;
|
|
134
|
+
type index$4_LogLevel = LogLevel;
|
|
135
|
+
declare const index$4_LogLevel: typeof LogLevel;
|
|
136
|
+
type index$4_Logger = Logger;
|
|
137
|
+
declare const index$4_Logger: typeof Logger;
|
|
138
|
+
type index$4_LoggerOptions = LoggerOptions;
|
|
139
|
+
type index$4_ProcessManager = ProcessManager;
|
|
140
|
+
declare const index$4_ProcessManager: typeof ProcessManager;
|
|
141
|
+
type index$4_ValidationError = ValidationError;
|
|
142
|
+
declare const index$4_ValidationError: typeof ValidationError;
|
|
143
|
+
declare const index$4_config: typeof config;
|
|
144
|
+
declare const index$4_createLogger: typeof createLogger;
|
|
145
|
+
declare const index$4_filesystem: typeof filesystem;
|
|
146
|
+
declare const index$4_load: typeof load;
|
|
147
|
+
declare const index$4_logger: typeof logger;
|
|
148
|
+
declare namespace index$4 {
|
|
149
|
+
export { index$4_APIError as APIError, index$4_ConfigError as ConfigError, index$4_ConfigLoader as ConfigLoader, index$4_FileSystem as FileSystem, type index$4_FusionConfig as FusionConfig, index$4_FusionError as FusionError, index$4_LogLevel as LogLevel, index$4_Logger as Logger, type index$4_LoggerOptions as LoggerOptions, index$4_ProcessManager as ProcessManager, index$4_ValidationError as ValidationError, index$4_config as config, index$4_createLogger as createLogger, index$4_filesystem as filesystem, index$4_load as load, index$4_logger as logger };
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
declare const loader: {
|
|
152
153
|
load: () => {};
|
|
153
154
|
};
|
|
154
155
|
|
|
155
|
-
declare const index$
|
|
156
|
-
declare namespace index$
|
|
157
|
-
export { index$
|
|
156
|
+
declare const index$3_loader: typeof loader;
|
|
157
|
+
declare namespace index$3 {
|
|
158
|
+
export { index$3_loader as loader };
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
declare const server: {
|
|
161
162
|
start: () => void;
|
|
162
163
|
};
|
|
163
164
|
|
|
164
|
-
declare const index$
|
|
165
|
-
declare namespace index$3 {
|
|
166
|
-
export { index$3_server as server };
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
interface RouteInfo {
|
|
170
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
171
|
-
path: string;
|
|
172
|
-
handler: string;
|
|
173
|
-
controllerName: string;
|
|
174
|
-
}
|
|
175
|
-
interface ControllerInfo {
|
|
176
|
-
name: string;
|
|
177
|
-
prefix: string;
|
|
178
|
-
routes: RouteInfo[];
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Parse NestJS controllers to extract Fusion metadata
|
|
182
|
-
*/
|
|
183
|
-
declare class NestJSParser {
|
|
184
|
-
private projectPath;
|
|
185
|
-
private program;
|
|
186
|
-
constructor(projectPath: string);
|
|
187
|
-
/**
|
|
188
|
-
* Find all controllers with @FusionController decorator
|
|
189
|
-
*/
|
|
190
|
-
findFusionControllers(): ControllerInfo[];
|
|
191
|
-
private parseSourceFile;
|
|
192
|
-
private parseController;
|
|
193
|
-
private parseRoutes;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
interface GenerateOptions {
|
|
197
|
-
controllers: ControllerInfo[];
|
|
198
|
-
outputPath: string;
|
|
199
|
-
baseUrl?: string;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Generate TypeScript API client from controller metadata
|
|
203
|
-
*/
|
|
204
|
-
declare class ClientGenerator {
|
|
205
|
-
generate(options: GenerateOptions): Promise<void>;
|
|
206
|
-
private generateClientCode;
|
|
207
|
-
private generateClientClass;
|
|
208
|
-
private generateControllerMethods;
|
|
209
|
-
private generateMethodName;
|
|
210
|
-
private generateMethod;
|
|
211
|
-
private capitalize;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
interface WatchOptions {
|
|
215
|
-
projectPath: string;
|
|
216
|
-
outputPath: string;
|
|
217
|
-
pattern?: string;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Watch NestJS controllers and regenerate client on changes
|
|
221
|
-
*/
|
|
222
|
-
declare class CodegenWatcher {
|
|
223
|
-
private watcher;
|
|
224
|
-
watch(options: WatchOptions): Promise<void>;
|
|
225
|
-
stop(): Promise<void>;
|
|
226
|
-
private generateClient;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
type index$2_ClientGenerator = ClientGenerator;
|
|
230
|
-
declare const index$2_ClientGenerator: typeof ClientGenerator;
|
|
231
|
-
type index$2_CodegenWatcher = CodegenWatcher;
|
|
232
|
-
declare const index$2_CodegenWatcher: typeof CodegenWatcher;
|
|
233
|
-
type index$2_ControllerInfo = ControllerInfo;
|
|
234
|
-
type index$2_GenerateOptions = GenerateOptions;
|
|
235
|
-
type index$2_NestJSParser = NestJSParser;
|
|
236
|
-
declare const index$2_NestJSParser: typeof NestJSParser;
|
|
237
|
-
type index$2_RouteInfo = RouteInfo;
|
|
238
|
-
type index$2_WatchOptions = WatchOptions;
|
|
165
|
+
declare const index$2_server: typeof server;
|
|
239
166
|
declare namespace index$2 {
|
|
240
|
-
export { index$
|
|
167
|
+
export { index$2_server as server };
|
|
241
168
|
}
|
|
242
169
|
|
|
243
170
|
interface ScaffoldOptions {
|
|
@@ -259,70 +186,62 @@ declare namespace index$1 {
|
|
|
259
186
|
export { index$1_ProjectScaffolder as ProjectScaffolder, type index$1_ScaffoldOptions as ScaffoldOptions };
|
|
260
187
|
}
|
|
261
188
|
|
|
262
|
-
interface
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
189
|
+
interface FusionContextType {
|
|
190
|
+
client: FusionFetcher;
|
|
191
|
+
}
|
|
192
|
+
interface FusionProviderProps {
|
|
193
|
+
children: ReactNode;
|
|
194
|
+
baseUrl?: string;
|
|
268
195
|
}
|
|
269
196
|
/**
|
|
270
|
-
*
|
|
197
|
+
* FusionProvider - Provides API client to React components
|
|
198
|
+
* Usage:
|
|
199
|
+
* ```tsx
|
|
200
|
+
* <FusionProvider baseUrl="/api">
|
|
201
|
+
* <App />
|
|
202
|
+
* </FusionProvider>
|
|
203
|
+
* ```
|
|
271
204
|
*/
|
|
272
|
-
declare
|
|
273
|
-
private processRunner;
|
|
274
|
-
private proxyServer;
|
|
275
|
-
constructor();
|
|
276
|
-
start(config: DevServerConfig): Promise<void>;
|
|
277
|
-
stop(): void;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
interface ProcessConfig {
|
|
281
|
-
name: string;
|
|
282
|
-
command: string;
|
|
283
|
-
args: string[];
|
|
284
|
-
cwd: string;
|
|
285
|
-
color: 'cyan' | 'green' | 'yellow' | 'magenta' | 'blue';
|
|
286
|
-
env?: Record<string, string>;
|
|
287
|
-
}
|
|
205
|
+
declare function FusionProvider({ children, baseUrl }: FusionProviderProps): React.JSX.Element;
|
|
288
206
|
/**
|
|
289
|
-
*
|
|
207
|
+
* useFusion hook - Access API client in components
|
|
208
|
+
* Usage:
|
|
209
|
+
* ```tsx
|
|
210
|
+
* const { client } = useFusion();
|
|
211
|
+
* const data = await client.get('/users');
|
|
212
|
+
* ```
|
|
290
213
|
*/
|
|
291
|
-
declare
|
|
292
|
-
private processes;
|
|
293
|
-
private colors;
|
|
294
|
-
run(configs: ProcessConfig[]): Promise<void>;
|
|
295
|
-
private startProcess;
|
|
296
|
-
stopAll(): void;
|
|
297
|
-
isRunning(name: string): boolean;
|
|
298
|
-
}
|
|
214
|
+
declare function useFusion(): FusionContextType;
|
|
299
215
|
|
|
300
|
-
interface
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
216
|
+
interface AuthUser {
|
|
217
|
+
id: string;
|
|
218
|
+
email: string;
|
|
219
|
+
name?: string;
|
|
220
|
+
}
|
|
221
|
+
interface UseAuthReturn {
|
|
222
|
+
user: AuthUser | null;
|
|
223
|
+
loading: boolean;
|
|
224
|
+
login: (email: string, password: string) => Promise<void>;
|
|
225
|
+
logout: () => Promise<void>;
|
|
226
|
+
isAuthenticated: boolean;
|
|
304
227
|
}
|
|
305
228
|
/**
|
|
306
|
-
*
|
|
229
|
+
* useAuth hook - Authentication state management
|
|
230
|
+
* Usage:
|
|
231
|
+
* ```tsx
|
|
232
|
+
* const { user, login, logout, isAuthenticated } = useAuth();
|
|
233
|
+
* ```
|
|
307
234
|
*/
|
|
308
|
-
declare
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
type index_FusionDevServer = FusionDevServer;
|
|
317
|
-
declare const index_FusionDevServer: typeof FusionDevServer;
|
|
318
|
-
type index_ProcessConfig = ProcessConfig;
|
|
319
|
-
type index_ProcessRunner = ProcessRunner;
|
|
320
|
-
declare const index_ProcessRunner: typeof ProcessRunner;
|
|
321
|
-
type index_ProxyConfig = ProxyConfig;
|
|
322
|
-
type index_ProxyServer = ProxyServer;
|
|
323
|
-
declare const index_ProxyServer: typeof ProxyServer;
|
|
235
|
+
declare function useAuth(): UseAuthReturn;
|
|
236
|
+
|
|
237
|
+
type index_AuthUser = AuthUser;
|
|
238
|
+
declare const index_FusionProvider: typeof FusionProvider;
|
|
239
|
+
type index_FusionProviderProps = FusionProviderProps;
|
|
240
|
+
type index_UseAuthReturn = UseAuthReturn;
|
|
241
|
+
declare const index_useAuth: typeof useAuth;
|
|
242
|
+
declare const index_useFusion: typeof useFusion;
|
|
324
243
|
declare namespace index {
|
|
325
|
-
export { type
|
|
244
|
+
export { type index_AuthUser as AuthUser, index_FusionProvider as FusionProvider, type index_FusionProviderProps as FusionProviderProps, type index_UseAuthReturn as UseAuthReturn, index_useAuth as useAuth, index_useFusion as useFusion };
|
|
326
245
|
}
|
|
327
246
|
|
|
328
|
-
export { index$
|
|
247
|
+
export { index$3 as Config, index$4 as Core, index$1 as CreateFusion, index$2 as Insight, index as Next };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export { i as Codegen } from './index-SjUaHgFr.js';
|
|
2
|
+
export { i as DevServer } from './index-tFGPFVfQ.js';
|
|
1
3
|
export { i as Nest } from './index-BsNaOUtH.js';
|
|
2
|
-
|
|
4
|
+
import React, { ReactNode } from 'react';
|
|
5
|
+
import { FusionFetcher } from './client/index.js';
|
|
3
6
|
export { Todo, User } from './types/index.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import './client/index.js';
|
|
6
7
|
|
|
7
8
|
interface FusionConfig {
|
|
8
9
|
[key: string]: any;
|
|
@@ -119,125 +120,51 @@ declare class APIError extends FusionError {
|
|
|
119
120
|
constructor(message: string, statusCode?: number | undefined);
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
type index$
|
|
123
|
-
declare const index$
|
|
124
|
-
type index$
|
|
125
|
-
declare const index$
|
|
126
|
-
type index$
|
|
127
|
-
declare const index$
|
|
128
|
-
type index$
|
|
129
|
-
declare const index$
|
|
130
|
-
type index$
|
|
131
|
-
type index$
|
|
132
|
-
declare const index$
|
|
133
|
-
type index$
|
|
134
|
-
declare const index$
|
|
135
|
-
type index$
|
|
136
|
-
declare const index$
|
|
137
|
-
type index$
|
|
138
|
-
type index$
|
|
139
|
-
declare const index$
|
|
140
|
-
type index$
|
|
141
|
-
declare const index$
|
|
142
|
-
declare const index$
|
|
143
|
-
declare const index$
|
|
144
|
-
declare const index$
|
|
145
|
-
declare const index$
|
|
146
|
-
declare const index$
|
|
147
|
-
declare namespace index$
|
|
148
|
-
export { index$
|
|
123
|
+
type index$4_APIError = APIError;
|
|
124
|
+
declare const index$4_APIError: typeof APIError;
|
|
125
|
+
type index$4_ConfigError = ConfigError;
|
|
126
|
+
declare const index$4_ConfigError: typeof ConfigError;
|
|
127
|
+
type index$4_ConfigLoader = ConfigLoader;
|
|
128
|
+
declare const index$4_ConfigLoader: typeof ConfigLoader;
|
|
129
|
+
type index$4_FileSystem = FileSystem;
|
|
130
|
+
declare const index$4_FileSystem: typeof FileSystem;
|
|
131
|
+
type index$4_FusionConfig = FusionConfig;
|
|
132
|
+
type index$4_FusionError = FusionError;
|
|
133
|
+
declare const index$4_FusionError: typeof FusionError;
|
|
134
|
+
type index$4_LogLevel = LogLevel;
|
|
135
|
+
declare const index$4_LogLevel: typeof LogLevel;
|
|
136
|
+
type index$4_Logger = Logger;
|
|
137
|
+
declare const index$4_Logger: typeof Logger;
|
|
138
|
+
type index$4_LoggerOptions = LoggerOptions;
|
|
139
|
+
type index$4_ProcessManager = ProcessManager;
|
|
140
|
+
declare const index$4_ProcessManager: typeof ProcessManager;
|
|
141
|
+
type index$4_ValidationError = ValidationError;
|
|
142
|
+
declare const index$4_ValidationError: typeof ValidationError;
|
|
143
|
+
declare const index$4_config: typeof config;
|
|
144
|
+
declare const index$4_createLogger: typeof createLogger;
|
|
145
|
+
declare const index$4_filesystem: typeof filesystem;
|
|
146
|
+
declare const index$4_load: typeof load;
|
|
147
|
+
declare const index$4_logger: typeof logger;
|
|
148
|
+
declare namespace index$4 {
|
|
149
|
+
export { index$4_APIError as APIError, index$4_ConfigError as ConfigError, index$4_ConfigLoader as ConfigLoader, index$4_FileSystem as FileSystem, type index$4_FusionConfig as FusionConfig, index$4_FusionError as FusionError, index$4_LogLevel as LogLevel, index$4_Logger as Logger, type index$4_LoggerOptions as LoggerOptions, index$4_ProcessManager as ProcessManager, index$4_ValidationError as ValidationError, index$4_config as config, index$4_createLogger as createLogger, index$4_filesystem as filesystem, index$4_load as load, index$4_logger as logger };
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
declare const loader: {
|
|
152
153
|
load: () => {};
|
|
153
154
|
};
|
|
154
155
|
|
|
155
|
-
declare const index$
|
|
156
|
-
declare namespace index$
|
|
157
|
-
export { index$
|
|
156
|
+
declare const index$3_loader: typeof loader;
|
|
157
|
+
declare namespace index$3 {
|
|
158
|
+
export { index$3_loader as loader };
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
declare const server: {
|
|
161
162
|
start: () => void;
|
|
162
163
|
};
|
|
163
164
|
|
|
164
|
-
declare const index$
|
|
165
|
-
declare namespace index$3 {
|
|
166
|
-
export { index$3_server as server };
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
interface RouteInfo {
|
|
170
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
171
|
-
path: string;
|
|
172
|
-
handler: string;
|
|
173
|
-
controllerName: string;
|
|
174
|
-
}
|
|
175
|
-
interface ControllerInfo {
|
|
176
|
-
name: string;
|
|
177
|
-
prefix: string;
|
|
178
|
-
routes: RouteInfo[];
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Parse NestJS controllers to extract Fusion metadata
|
|
182
|
-
*/
|
|
183
|
-
declare class NestJSParser {
|
|
184
|
-
private projectPath;
|
|
185
|
-
private program;
|
|
186
|
-
constructor(projectPath: string);
|
|
187
|
-
/**
|
|
188
|
-
* Find all controllers with @FusionController decorator
|
|
189
|
-
*/
|
|
190
|
-
findFusionControllers(): ControllerInfo[];
|
|
191
|
-
private parseSourceFile;
|
|
192
|
-
private parseController;
|
|
193
|
-
private parseRoutes;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
interface GenerateOptions {
|
|
197
|
-
controllers: ControllerInfo[];
|
|
198
|
-
outputPath: string;
|
|
199
|
-
baseUrl?: string;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Generate TypeScript API client from controller metadata
|
|
203
|
-
*/
|
|
204
|
-
declare class ClientGenerator {
|
|
205
|
-
generate(options: GenerateOptions): Promise<void>;
|
|
206
|
-
private generateClientCode;
|
|
207
|
-
private generateClientClass;
|
|
208
|
-
private generateControllerMethods;
|
|
209
|
-
private generateMethodName;
|
|
210
|
-
private generateMethod;
|
|
211
|
-
private capitalize;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
interface WatchOptions {
|
|
215
|
-
projectPath: string;
|
|
216
|
-
outputPath: string;
|
|
217
|
-
pattern?: string;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Watch NestJS controllers and regenerate client on changes
|
|
221
|
-
*/
|
|
222
|
-
declare class CodegenWatcher {
|
|
223
|
-
private watcher;
|
|
224
|
-
watch(options: WatchOptions): Promise<void>;
|
|
225
|
-
stop(): Promise<void>;
|
|
226
|
-
private generateClient;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
type index$2_ClientGenerator = ClientGenerator;
|
|
230
|
-
declare const index$2_ClientGenerator: typeof ClientGenerator;
|
|
231
|
-
type index$2_CodegenWatcher = CodegenWatcher;
|
|
232
|
-
declare const index$2_CodegenWatcher: typeof CodegenWatcher;
|
|
233
|
-
type index$2_ControllerInfo = ControllerInfo;
|
|
234
|
-
type index$2_GenerateOptions = GenerateOptions;
|
|
235
|
-
type index$2_NestJSParser = NestJSParser;
|
|
236
|
-
declare const index$2_NestJSParser: typeof NestJSParser;
|
|
237
|
-
type index$2_RouteInfo = RouteInfo;
|
|
238
|
-
type index$2_WatchOptions = WatchOptions;
|
|
165
|
+
declare const index$2_server: typeof server;
|
|
239
166
|
declare namespace index$2 {
|
|
240
|
-
export { index$
|
|
167
|
+
export { index$2_server as server };
|
|
241
168
|
}
|
|
242
169
|
|
|
243
170
|
interface ScaffoldOptions {
|
|
@@ -259,70 +186,62 @@ declare namespace index$1 {
|
|
|
259
186
|
export { index$1_ProjectScaffolder as ProjectScaffolder, type index$1_ScaffoldOptions as ScaffoldOptions };
|
|
260
187
|
}
|
|
261
188
|
|
|
262
|
-
interface
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
189
|
+
interface FusionContextType {
|
|
190
|
+
client: FusionFetcher;
|
|
191
|
+
}
|
|
192
|
+
interface FusionProviderProps {
|
|
193
|
+
children: ReactNode;
|
|
194
|
+
baseUrl?: string;
|
|
268
195
|
}
|
|
269
196
|
/**
|
|
270
|
-
*
|
|
197
|
+
* FusionProvider - Provides API client to React components
|
|
198
|
+
* Usage:
|
|
199
|
+
* ```tsx
|
|
200
|
+
* <FusionProvider baseUrl="/api">
|
|
201
|
+
* <App />
|
|
202
|
+
* </FusionProvider>
|
|
203
|
+
* ```
|
|
271
204
|
*/
|
|
272
|
-
declare
|
|
273
|
-
private processRunner;
|
|
274
|
-
private proxyServer;
|
|
275
|
-
constructor();
|
|
276
|
-
start(config: DevServerConfig): Promise<void>;
|
|
277
|
-
stop(): void;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
interface ProcessConfig {
|
|
281
|
-
name: string;
|
|
282
|
-
command: string;
|
|
283
|
-
args: string[];
|
|
284
|
-
cwd: string;
|
|
285
|
-
color: 'cyan' | 'green' | 'yellow' | 'magenta' | 'blue';
|
|
286
|
-
env?: Record<string, string>;
|
|
287
|
-
}
|
|
205
|
+
declare function FusionProvider({ children, baseUrl }: FusionProviderProps): React.JSX.Element;
|
|
288
206
|
/**
|
|
289
|
-
*
|
|
207
|
+
* useFusion hook - Access API client in components
|
|
208
|
+
* Usage:
|
|
209
|
+
* ```tsx
|
|
210
|
+
* const { client } = useFusion();
|
|
211
|
+
* const data = await client.get('/users');
|
|
212
|
+
* ```
|
|
290
213
|
*/
|
|
291
|
-
declare
|
|
292
|
-
private processes;
|
|
293
|
-
private colors;
|
|
294
|
-
run(configs: ProcessConfig[]): Promise<void>;
|
|
295
|
-
private startProcess;
|
|
296
|
-
stopAll(): void;
|
|
297
|
-
isRunning(name: string): boolean;
|
|
298
|
-
}
|
|
214
|
+
declare function useFusion(): FusionContextType;
|
|
299
215
|
|
|
300
|
-
interface
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
216
|
+
interface AuthUser {
|
|
217
|
+
id: string;
|
|
218
|
+
email: string;
|
|
219
|
+
name?: string;
|
|
220
|
+
}
|
|
221
|
+
interface UseAuthReturn {
|
|
222
|
+
user: AuthUser | null;
|
|
223
|
+
loading: boolean;
|
|
224
|
+
login: (email: string, password: string) => Promise<void>;
|
|
225
|
+
logout: () => Promise<void>;
|
|
226
|
+
isAuthenticated: boolean;
|
|
304
227
|
}
|
|
305
228
|
/**
|
|
306
|
-
*
|
|
229
|
+
* useAuth hook - Authentication state management
|
|
230
|
+
* Usage:
|
|
231
|
+
* ```tsx
|
|
232
|
+
* const { user, login, logout, isAuthenticated } = useAuth();
|
|
233
|
+
* ```
|
|
307
234
|
*/
|
|
308
|
-
declare
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
type index_FusionDevServer = FusionDevServer;
|
|
317
|
-
declare const index_FusionDevServer: typeof FusionDevServer;
|
|
318
|
-
type index_ProcessConfig = ProcessConfig;
|
|
319
|
-
type index_ProcessRunner = ProcessRunner;
|
|
320
|
-
declare const index_ProcessRunner: typeof ProcessRunner;
|
|
321
|
-
type index_ProxyConfig = ProxyConfig;
|
|
322
|
-
type index_ProxyServer = ProxyServer;
|
|
323
|
-
declare const index_ProxyServer: typeof ProxyServer;
|
|
235
|
+
declare function useAuth(): UseAuthReturn;
|
|
236
|
+
|
|
237
|
+
type index_AuthUser = AuthUser;
|
|
238
|
+
declare const index_FusionProvider: typeof FusionProvider;
|
|
239
|
+
type index_FusionProviderProps = FusionProviderProps;
|
|
240
|
+
type index_UseAuthReturn = UseAuthReturn;
|
|
241
|
+
declare const index_useAuth: typeof useAuth;
|
|
242
|
+
declare const index_useFusion: typeof useFusion;
|
|
324
243
|
declare namespace index {
|
|
325
|
-
export { type
|
|
244
|
+
export { type index_AuthUser as AuthUser, index_FusionProvider as FusionProvider, type index_FusionProviderProps as FusionProviderProps, type index_UseAuthReturn as UseAuthReturn, index_useAuth as useAuth, index_useFusion as useFusion };
|
|
326
245
|
}
|
|
327
246
|
|
|
328
|
-
export { index$
|
|
247
|
+
export { index$3 as Config, index$4 as Core, index$1 as CreateFusion, index$2 as Insight, index as Next };
|