wexts 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2MCBBWEA.js +1 -0
- package/dist/chunk-2MCBBWEA.js.map +1 -0
- package/dist/{chunk-6K3RXN4Y.mjs → chunk-6SVQEGEX.mjs} +2 -3
- package/dist/{chunk-6K3RXN4Y.mjs.map → chunk-6SVQEGEX.mjs.map} +1 -1
- package/dist/chunk-EFZPSZWO.mjs +1 -0
- package/dist/{chunk-QUV6QXTP.js → chunk-FYGXL4V7.js} +16 -18
- package/dist/chunk-FYGXL4V7.js.map +1 -0
- package/dist/{chunk-J7J2LRG7.js → chunk-GWP6PNSP.js} +46 -50
- package/dist/chunk-GWP6PNSP.js.map +1 -0
- package/dist/{chunk-HHXRAV67.mjs → chunk-HQKTXE7E.mjs} +18 -22
- package/dist/chunk-HQKTXE7E.mjs.map +1 -0
- package/dist/{chunk-H6XDQJ3N.mjs → chunk-J5LGTIGS.mjs} +1 -2
- package/dist/{chunk-2ZKONAXC.js → chunk-MTHKZO55.js} +3 -4
- package/dist/chunk-MTHKZO55.js.map +1 -0
- package/dist/{chunk-WZBBQLFT.mjs → chunk-NNQFLD7O.mjs} +5 -7
- package/dist/{chunk-WZBBQLFT.mjs.map → chunk-NNQFLD7O.mjs.map} +1 -1
- package/dist/{chunk-ELVFG4US.js → chunk-NU2UB242.js} +5 -6
- package/dist/chunk-NU2UB242.js.map +1 -0
- package/dist/{chunk-A5OZK2TO.mjs → chunk-NULGSZFE.mjs} +4 -3
- package/dist/{chunk-A5OZK2TO.mjs.map → chunk-NULGSZFE.mjs.map} +1 -1
- package/dist/{chunk-XMPCR7N3.mjs → chunk-OTSAVKLY.mjs} +2 -3
- package/dist/{chunk-XMPCR7N3.mjs.map → chunk-OTSAVKLY.mjs.map} +1 -1
- package/dist/{chunk-2H7UOFLK.js → chunk-PZ5AY32C.js} +1 -2
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-HE3JQ62E.js → chunk-QP2TMRLG.js} +5 -4
- package/dist/chunk-QP2TMRLG.js.map +1 -0
- package/dist/{chunk-57VDULE3.mjs → chunk-RS23R3ZQ.mjs} +3 -4
- package/dist/{chunk-57VDULE3.mjs.map → chunk-RS23R3ZQ.mjs.map} +1 -1
- package/dist/{chunk-6KN6UIHT.js → chunk-W3YRVEFQ.js} +3 -4
- package/dist/chunk-W3YRVEFQ.js.map +1 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +68 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +8 -9
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.d.mts +12 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.js +3 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +2 -3
- package/dist/codegen-MRZDLCYI.js +13 -0
- package/dist/codegen-MRZDLCYI.js.map +1 -0
- package/dist/codegen-UI5HTMXE.mjs +13 -0
- package/dist/dev-server-JKRVBWPY.mjs +13 -0
- package/dist/dev-server-TLL7UQMR.js +13 -0
- package/dist/dev-server-TLL7UQMR.js.map +1 -0
- package/dist/index-BsNaOUtH.d.mts +44 -0
- package/dist/index-BsNaOUtH.d.ts +44 -0
- package/dist/index-CrbXnXsO.d.ts +62 -0
- package/dist/index-kEbGExWM.d.mts +62 -0
- package/dist/index.d.mts +328 -0
- package/dist/index.d.ts +328 -0
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/index.mjs.map +1 -1
- package/dist/nest/index.d.mts +1 -0
- package/dist/nest/index.d.ts +1 -0
- package/dist/nest/index.js +3 -4
- package/dist/nest/index.js.map +1 -1
- package/dist/nest/index.mjs +2 -3
- package/dist/next/index.d.mts +3 -0
- package/dist/next/index.d.ts +3 -0
- package/dist/next/index.js +4 -5
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +3 -4
- package/dist/types/index.d.mts +12 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +1 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +1 -2
- package/package.json +1 -1
- package/dist/chunk-2H7UOFLK.js.map +0 -1
- package/dist/chunk-2ZKONAXC.js.map +0 -1
- package/dist/chunk-6KN6UIHT.js.map +0 -1
- package/dist/chunk-ELVFG4US.js.map +0 -1
- package/dist/chunk-HE3JQ62E.js.map +0 -1
- package/dist/chunk-HHXRAV67.mjs.map +0 -1
- package/dist/chunk-J7J2LRG7.js.map +0 -1
- package/dist/chunk-LWNHEPTL.mjs +0 -2
- package/dist/chunk-MAVJYD6O.js +0 -2
- package/dist/chunk-MAVJYD6O.js.map +0 -1
- package/dist/chunk-QUV6QXTP.js.map +0 -1
- package/dist/codegen-J3XOZCQZ.js +0 -14
- package/dist/codegen-J3XOZCQZ.js.map +0 -1
- package/dist/codegen-ZZBQIGUQ.mjs +0 -14
- package/dist/dev-server-K5YZAZY2.mjs +0 -14
- package/dist/dev-server-X453DBCE.js +0 -14
- package/dist/dev-server-X453DBCE.js.map +0 -1
- /package/dist/{chunk-H6XDQJ3N.mjs.map → chunk-EFZPSZWO.mjs.map} +0 -0
- /package/dist/{chunk-LWNHEPTL.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/{codegen-ZZBQIGUQ.mjs.map → codegen-UI5HTMXE.mjs.map} +0 -0
- /package/dist/{dev-server-K5YZAZY2.mjs.map → dev-server-JKRVBWPY.mjs.map} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClientGenerator,
|
|
3
|
+
CodegenWatcher,
|
|
4
|
+
NestJSParser
|
|
5
|
+
} from "./chunk-NNQFLD7O.mjs";
|
|
6
|
+
import "./chunk-NULGSZFE.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
ClientGenerator,
|
|
10
|
+
CodegenWatcher,
|
|
11
|
+
NestJSParser
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=codegen-UI5HTMXE.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FusionDevServer,
|
|
3
|
+
ProcessRunner,
|
|
4
|
+
ProxyServer
|
|
5
|
+
} from "./chunk-HQKTXE7E.mjs";
|
|
6
|
+
import "./chunk-NULGSZFE.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
FusionDevServer,
|
|
10
|
+
ProcessRunner,
|
|
11
|
+
ProxyServer
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=dev-server-JKRVBWPY.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkGWP6PNSPjs = require('./chunk-GWP6PNSP.js');
|
|
6
|
+
require('./chunk-QP2TMRLG.js');
|
|
7
|
+
require('./chunk-PZ5AY32C.js');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.FusionDevServer = _chunkGWP6PNSPjs.FusionDevServer; exports.ProcessRunner = _chunkGWP6PNSPjs.ProcessRunner; exports.ProxyServer = _chunkGWP6PNSPjs.ProxyServer;
|
|
13
|
+
//# sourceMappingURL=dev-server-TLL7UQMR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["c:\\Users\\ziad\\Desktop\\wexts\\packages\\fusionjs\\dist\\dev-server-TLL7UQMR.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACF,uKAAC","file":"C:\\Users\\ziad\\Desktop\\wexts\\packages\\fusionjs\\dist\\dev-server-TLL7UQMR.js"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
interface FusionRouteMetadata {
|
|
2
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3
|
+
path: string;
|
|
4
|
+
responseType?: string;
|
|
5
|
+
requestType?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Mark a NestJS controller for Fusion codegen
|
|
9
|
+
* Usage: @FusionController('users')
|
|
10
|
+
*/
|
|
11
|
+
declare function FusionController(prefix?: string): ClassDecorator;
|
|
12
|
+
/**
|
|
13
|
+
* Mark a route for API client generation
|
|
14
|
+
* Usage: @FusionRoute({ method: 'GET', path: '/:id' })
|
|
15
|
+
*/
|
|
16
|
+
declare function FusionRoute(metadata: FusionRouteMetadata): MethodDecorator;
|
|
17
|
+
/**
|
|
18
|
+
* Helper decorators for common HTTP methods
|
|
19
|
+
*/
|
|
20
|
+
declare function FusionGet(path?: string): MethodDecorator;
|
|
21
|
+
declare function FusionPost(path?: string): MethodDecorator;
|
|
22
|
+
declare function FusionPut(path?: string): MethodDecorator;
|
|
23
|
+
declare function FusionDelete(path?: string): MethodDecorator;
|
|
24
|
+
/**
|
|
25
|
+
* Get Fusion metadata from a controller
|
|
26
|
+
*/
|
|
27
|
+
declare function getFusionMetadata(controller: any): {
|
|
28
|
+
controller: any;
|
|
29
|
+
routes: any[];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare const index_FusionController: typeof FusionController;
|
|
33
|
+
declare const index_FusionDelete: typeof FusionDelete;
|
|
34
|
+
declare const index_FusionGet: typeof FusionGet;
|
|
35
|
+
declare const index_FusionPost: typeof FusionPost;
|
|
36
|
+
declare const index_FusionPut: typeof FusionPut;
|
|
37
|
+
declare const index_FusionRoute: typeof FusionRoute;
|
|
38
|
+
type index_FusionRouteMetadata = FusionRouteMetadata;
|
|
39
|
+
declare const index_getFusionMetadata: typeof getFusionMetadata;
|
|
40
|
+
declare namespace index {
|
|
41
|
+
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, type index_FusionRouteMetadata as FusionRouteMetadata, index_getFusionMetadata as getFusionMetadata };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { type FusionRouteMetadata as F, FusionController as a, FusionRoute as b, FusionGet as c, FusionPost as d, FusionPut as e, FusionDelete as f, getFusionMetadata as g, index as i };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
interface FusionRouteMetadata {
|
|
2
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3
|
+
path: string;
|
|
4
|
+
responseType?: string;
|
|
5
|
+
requestType?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Mark a NestJS controller for Fusion codegen
|
|
9
|
+
* Usage: @FusionController('users')
|
|
10
|
+
*/
|
|
11
|
+
declare function FusionController(prefix?: string): ClassDecorator;
|
|
12
|
+
/**
|
|
13
|
+
* Mark a route for API client generation
|
|
14
|
+
* Usage: @FusionRoute({ method: 'GET', path: '/:id' })
|
|
15
|
+
*/
|
|
16
|
+
declare function FusionRoute(metadata: FusionRouteMetadata): MethodDecorator;
|
|
17
|
+
/**
|
|
18
|
+
* Helper decorators for common HTTP methods
|
|
19
|
+
*/
|
|
20
|
+
declare function FusionGet(path?: string): MethodDecorator;
|
|
21
|
+
declare function FusionPost(path?: string): MethodDecorator;
|
|
22
|
+
declare function FusionPut(path?: string): MethodDecorator;
|
|
23
|
+
declare function FusionDelete(path?: string): MethodDecorator;
|
|
24
|
+
/**
|
|
25
|
+
* Get Fusion metadata from a controller
|
|
26
|
+
*/
|
|
27
|
+
declare function getFusionMetadata(controller: any): {
|
|
28
|
+
controller: any;
|
|
29
|
+
routes: any[];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare const index_FusionController: typeof FusionController;
|
|
33
|
+
declare const index_FusionDelete: typeof FusionDelete;
|
|
34
|
+
declare const index_FusionGet: typeof FusionGet;
|
|
35
|
+
declare const index_FusionPost: typeof FusionPost;
|
|
36
|
+
declare const index_FusionPut: typeof FusionPut;
|
|
37
|
+
declare const index_FusionRoute: typeof FusionRoute;
|
|
38
|
+
type index_FusionRouteMetadata = FusionRouteMetadata;
|
|
39
|
+
declare const index_getFusionMetadata: typeof getFusionMetadata;
|
|
40
|
+
declare namespace index {
|
|
41
|
+
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, type index_FusionRouteMetadata as FusionRouteMetadata, index_getFusionMetadata as getFusionMetadata };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { type FusionRouteMetadata as F, FusionController as a, FusionRoute as b, FusionGet as c, FusionPost as d, FusionPut as e, FusionDelete as f, getFusionMetadata as g, index as i };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { FusionFetcher } from './client/index.js';
|
|
3
|
+
|
|
4
|
+
interface FusionContextType {
|
|
5
|
+
client: FusionFetcher;
|
|
6
|
+
}
|
|
7
|
+
interface FusionProviderProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* FusionProvider - Provides API client to React components
|
|
13
|
+
* Usage:
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <FusionProvider baseUrl="/api">
|
|
16
|
+
* <App />
|
|
17
|
+
* </FusionProvider>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function FusionProvider({ children, baseUrl }: FusionProviderProps): React.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* useFusion hook - Access API client in components
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const { client } = useFusion();
|
|
26
|
+
* const data = await client.get('/users');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function useFusion(): FusionContextType;
|
|
30
|
+
|
|
31
|
+
interface AuthUser {
|
|
32
|
+
id: string;
|
|
33
|
+
email: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
}
|
|
36
|
+
interface UseAuthReturn {
|
|
37
|
+
user: AuthUser | null;
|
|
38
|
+
loading: boolean;
|
|
39
|
+
login: (email: string, password: string) => Promise<void>;
|
|
40
|
+
logout: () => Promise<void>;
|
|
41
|
+
isAuthenticated: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* useAuth hook - Authentication state management
|
|
45
|
+
* Usage:
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const { user, login, logout, isAuthenticated } = useAuth();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function useAuth(): UseAuthReturn;
|
|
51
|
+
|
|
52
|
+
type index_AuthUser = AuthUser;
|
|
53
|
+
declare const index_FusionProvider: typeof FusionProvider;
|
|
54
|
+
type index_FusionProviderProps = FusionProviderProps;
|
|
55
|
+
type index_UseAuthReturn = UseAuthReturn;
|
|
56
|
+
declare const index_useAuth: typeof useAuth;
|
|
57
|
+
declare const index_useFusion: typeof useFusion;
|
|
58
|
+
declare namespace index {
|
|
59
|
+
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 };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { type AuthUser as A, type FusionProviderProps as F, type UseAuthReturn as U, FusionProvider as a, useAuth as b, index as i, useFusion as u };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { FusionFetcher } from './client/index.mjs';
|
|
3
|
+
|
|
4
|
+
interface FusionContextType {
|
|
5
|
+
client: FusionFetcher;
|
|
6
|
+
}
|
|
7
|
+
interface FusionProviderProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* FusionProvider - Provides API client to React components
|
|
13
|
+
* Usage:
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <FusionProvider baseUrl="/api">
|
|
16
|
+
* <App />
|
|
17
|
+
* </FusionProvider>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare function FusionProvider({ children, baseUrl }: FusionProviderProps): React.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* useFusion hook - Access API client in components
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const { client } = useFusion();
|
|
26
|
+
* const data = await client.get('/users');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function useFusion(): FusionContextType;
|
|
30
|
+
|
|
31
|
+
interface AuthUser {
|
|
32
|
+
id: string;
|
|
33
|
+
email: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
}
|
|
36
|
+
interface UseAuthReturn {
|
|
37
|
+
user: AuthUser | null;
|
|
38
|
+
loading: boolean;
|
|
39
|
+
login: (email: string, password: string) => Promise<void>;
|
|
40
|
+
logout: () => Promise<void>;
|
|
41
|
+
isAuthenticated: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* useAuth hook - Authentication state management
|
|
45
|
+
* Usage:
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const { user, login, logout, isAuthenticated } = useAuth();
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function useAuth(): UseAuthReturn;
|
|
51
|
+
|
|
52
|
+
type index_AuthUser = AuthUser;
|
|
53
|
+
declare const index_FusionProvider: typeof FusionProvider;
|
|
54
|
+
type index_FusionProviderProps = FusionProviderProps;
|
|
55
|
+
type index_UseAuthReturn = UseAuthReturn;
|
|
56
|
+
declare const index_useAuth: typeof useAuth;
|
|
57
|
+
declare const index_useFusion: typeof useFusion;
|
|
58
|
+
declare namespace index {
|
|
59
|
+
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 };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { type AuthUser as A, type FusionProviderProps as F, type UseAuthReturn as U, FusionProvider as a, useAuth as b, index as i, useFusion as u };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
export { i as Nest } from './index-BsNaOUtH.mjs';
|
|
2
|
+
export { i as Next } from './index-kEbGExWM.mjs';
|
|
3
|
+
export { Todo, User } from './types/index.mjs';
|
|
4
|
+
import 'react';
|
|
5
|
+
import './client/index.mjs';
|
|
6
|
+
|
|
7
|
+
interface FusionConfig {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
declare class ConfigLoader {
|
|
11
|
+
private config;
|
|
12
|
+
private configDir;
|
|
13
|
+
constructor(configDir?: string);
|
|
14
|
+
/**
|
|
15
|
+
* Load configuration from file or environment
|
|
16
|
+
*/
|
|
17
|
+
load(key: string, defaultValue?: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Set configuration value
|
|
20
|
+
*/
|
|
21
|
+
set(key: string, value: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* Get all configuration
|
|
24
|
+
*/
|
|
25
|
+
getAll(): FusionConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Parse environment value (handles JSON strings)
|
|
28
|
+
*/
|
|
29
|
+
private parseEnvValue;
|
|
30
|
+
}
|
|
31
|
+
declare const config: ConfigLoader;
|
|
32
|
+
declare function load(key: string, defaultValue?: any): any;
|
|
33
|
+
|
|
34
|
+
declare enum LogLevel {
|
|
35
|
+
DEBUG = 0,
|
|
36
|
+
INFO = 1,
|
|
37
|
+
WARN = 2,
|
|
38
|
+
ERROR = 3
|
|
39
|
+
}
|
|
40
|
+
interface LoggerOptions {
|
|
41
|
+
level?: LogLevel;
|
|
42
|
+
prefix?: string;
|
|
43
|
+
timestamp?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare class Logger {
|
|
46
|
+
private level;
|
|
47
|
+
private prefix;
|
|
48
|
+
private timestamp;
|
|
49
|
+
constructor(options?: LoggerOptions);
|
|
50
|
+
private formatMessage;
|
|
51
|
+
debug(...args: any[]): void;
|
|
52
|
+
info(...args: any[]): void;
|
|
53
|
+
warn(...args: any[]): void;
|
|
54
|
+
error(...args: any[]): void;
|
|
55
|
+
success(...args: any[]): void;
|
|
56
|
+
}
|
|
57
|
+
declare const logger: Logger;
|
|
58
|
+
declare function createLogger(options: LoggerOptions): Logger;
|
|
59
|
+
|
|
60
|
+
declare class FileSystem {
|
|
61
|
+
/**
|
|
62
|
+
* Read file as string
|
|
63
|
+
*/
|
|
64
|
+
readFile(filePath: string, encoding?: BufferEncoding): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Write file
|
|
67
|
+
*/
|
|
68
|
+
writeFile(filePath: string, content: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Read JSON file
|
|
71
|
+
*/
|
|
72
|
+
readJSON<T = any>(filePath: string): Promise<T>;
|
|
73
|
+
/**
|
|
74
|
+
* Write JSON file
|
|
75
|
+
*/
|
|
76
|
+
writeJSON(filePath: string, data: any, pretty?: boolean): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Check if file/directory exists
|
|
79
|
+
*/
|
|
80
|
+
exists(filePath: string): Promise<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* Ensure directory exists (create if not)
|
|
83
|
+
*/
|
|
84
|
+
ensureDir(dirPath: string): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Copy file
|
|
87
|
+
*/
|
|
88
|
+
copyFile(src: string, dest: string): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Read directory
|
|
91
|
+
*/
|
|
92
|
+
readDir(dirPath: string): Promise<string[]>;
|
|
93
|
+
}
|
|
94
|
+
declare const filesystem: FileSystem;
|
|
95
|
+
|
|
96
|
+
declare class ProcessManager {
|
|
97
|
+
/**
|
|
98
|
+
* Setup process error handlers
|
|
99
|
+
*/
|
|
100
|
+
static initialize(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Graceful shutdown helper
|
|
103
|
+
*/
|
|
104
|
+
static shutdown(cleanup: () => Promise<void>): Promise<void>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare class FusionError extends Error {
|
|
108
|
+
code?: string | undefined;
|
|
109
|
+
constructor(message: string, code?: string | undefined);
|
|
110
|
+
}
|
|
111
|
+
declare class ConfigError extends FusionError {
|
|
112
|
+
constructor(message: string);
|
|
113
|
+
}
|
|
114
|
+
declare class ValidationError extends FusionError {
|
|
115
|
+
constructor(message: string);
|
|
116
|
+
}
|
|
117
|
+
declare class APIError extends FusionError {
|
|
118
|
+
statusCode?: number | undefined;
|
|
119
|
+
constructor(message: string, statusCode?: number | undefined);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
type index$5_APIError = APIError;
|
|
123
|
+
declare const index$5_APIError: typeof APIError;
|
|
124
|
+
type index$5_ConfigError = ConfigError;
|
|
125
|
+
declare const index$5_ConfigError: typeof ConfigError;
|
|
126
|
+
type index$5_ConfigLoader = ConfigLoader;
|
|
127
|
+
declare const index$5_ConfigLoader: typeof ConfigLoader;
|
|
128
|
+
type index$5_FileSystem = FileSystem;
|
|
129
|
+
declare const index$5_FileSystem: typeof FileSystem;
|
|
130
|
+
type index$5_FusionConfig = FusionConfig;
|
|
131
|
+
type index$5_FusionError = FusionError;
|
|
132
|
+
declare const index$5_FusionError: typeof FusionError;
|
|
133
|
+
type index$5_LogLevel = LogLevel;
|
|
134
|
+
declare const index$5_LogLevel: typeof LogLevel;
|
|
135
|
+
type index$5_Logger = Logger;
|
|
136
|
+
declare const index$5_Logger: typeof Logger;
|
|
137
|
+
type index$5_LoggerOptions = LoggerOptions;
|
|
138
|
+
type index$5_ProcessManager = ProcessManager;
|
|
139
|
+
declare const index$5_ProcessManager: typeof ProcessManager;
|
|
140
|
+
type index$5_ValidationError = ValidationError;
|
|
141
|
+
declare const index$5_ValidationError: typeof ValidationError;
|
|
142
|
+
declare const index$5_config: typeof config;
|
|
143
|
+
declare const index$5_createLogger: typeof createLogger;
|
|
144
|
+
declare const index$5_filesystem: typeof filesystem;
|
|
145
|
+
declare const index$5_load: typeof load;
|
|
146
|
+
declare const index$5_logger: typeof logger;
|
|
147
|
+
declare namespace index$5 {
|
|
148
|
+
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 };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare const loader: {
|
|
152
|
+
load: () => {};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare const index$4_loader: typeof loader;
|
|
156
|
+
declare namespace index$4 {
|
|
157
|
+
export { index$4_loader as loader };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare const server: {
|
|
161
|
+
start: () => void;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
declare const index$3_server: typeof server;
|
|
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;
|
|
239
|
+
declare namespace index$2 {
|
|
240
|
+
export { index$2_ClientGenerator as ClientGenerator, index$2_CodegenWatcher as CodegenWatcher, type index$2_ControllerInfo as ControllerInfo, type index$2_GenerateOptions as GenerateOptions, index$2_NestJSParser as NestJSParser, type index$2_RouteInfo as RouteInfo, type index$2_WatchOptions as WatchOptions };
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface ScaffoldOptions {
|
|
244
|
+
projectName: string;
|
|
245
|
+
template: 'monorepo' | 'api' | 'web';
|
|
246
|
+
packageManager?: 'npm' | 'pnpm' | 'yarn';
|
|
247
|
+
}
|
|
248
|
+
declare class ProjectScaffolder {
|
|
249
|
+
scaffold(options: ScaffoldOptions): Promise<void>;
|
|
250
|
+
private createMonorepo;
|
|
251
|
+
private createNestJSApp;
|
|
252
|
+
private createNextJSApp;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
type index$1_ProjectScaffolder = ProjectScaffolder;
|
|
256
|
+
declare const index$1_ProjectScaffolder: typeof ProjectScaffolder;
|
|
257
|
+
type index$1_ScaffoldOptions = ScaffoldOptions;
|
|
258
|
+
declare namespace index$1 {
|
|
259
|
+
export { index$1_ProjectScaffolder as ProjectScaffolder, type index$1_ScaffoldOptions as ScaffoldOptions };
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
interface DevServerConfig {
|
|
263
|
+
apiPath: string;
|
|
264
|
+
webPath: string;
|
|
265
|
+
webPort?: number;
|
|
266
|
+
apiPort?: number;
|
|
267
|
+
useProxy?: boolean;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Unified development server for Fusion projects
|
|
271
|
+
*/
|
|
272
|
+
declare class FusionDevServer {
|
|
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
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Run multiple processes concurrently with colored output
|
|
290
|
+
*/
|
|
291
|
+
declare class ProcessRunner {
|
|
292
|
+
private processes;
|
|
293
|
+
private colors;
|
|
294
|
+
run(configs: ProcessConfig[]): Promise<void>;
|
|
295
|
+
private startProcess;
|
|
296
|
+
stopAll(): void;
|
|
297
|
+
isRunning(name: string): boolean;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
interface ProxyConfig {
|
|
301
|
+
port: number;
|
|
302
|
+
apiTarget: string;
|
|
303
|
+
apiPrefix: string;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Proxy server to forward API requests from Next.js to NestJS
|
|
307
|
+
*/
|
|
308
|
+
declare class ProxyServer {
|
|
309
|
+
private server;
|
|
310
|
+
private proxy;
|
|
311
|
+
start(config: ProxyConfig): Promise<void>;
|
|
312
|
+
stop(): void;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
type index_DevServerConfig = DevServerConfig;
|
|
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;
|
|
324
|
+
declare namespace index {
|
|
325
|
+
export { type index_DevServerConfig as DevServerConfig, index_FusionDevServer as FusionDevServer, type index_ProcessConfig as ProcessConfig, index_ProcessRunner as ProcessRunner, type index_ProxyConfig as ProxyConfig, index_ProxyServer as ProxyServer };
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export { index$2 as Codegen, index$4 as Config, index$5 as Core, index$1 as CreateFusion, index as DevServer, index$3 as Insight };
|