@absolutejs/absolute 0.15.11 → 0.15.13
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 +2 -2
- package/dist/cli/index.js +391 -16
- package/dist/index.js +64 -44
- package/dist/index.js.map +7 -7
- package/dist/src/cli/interactive.d.ts +2 -0
- package/dist/src/cli/scripts/dev.d.ts +1 -0
- package/dist/src/cli/utils.d.ts +11 -0
- package/dist/src/utils/logger.d.ts +22 -13
- package/dist/types/cli.d.ts +17 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/types/cli.ts +20 -0
- package/types/index.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dev: (serverEntry: string) => Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DbScripts } from '../../types/cli';
|
|
2
|
+
export declare const isWSLEnvironment: () => boolean;
|
|
3
|
+
export declare const COMPOSE_PATH = "db/docker-compose.db.yml";
|
|
4
|
+
export declare const DEFAULT_SERVER_ENTRY = "src/backend/server.ts";
|
|
5
|
+
export declare const readDbScripts: () => Promise<DbScripts | null>;
|
|
6
|
+
export declare const timed: (label: string, fn: () => Promise<void>) => Promise<void>;
|
|
7
|
+
export declare const startDatabase: (scripts: DbScripts) => Promise<void>;
|
|
8
|
+
export declare const stopDatabase: (scripts: DbScripts) => Promise<void>;
|
|
9
|
+
export declare const printHelp: () => void;
|
|
10
|
+
export declare const printHint: () => void;
|
|
11
|
+
export declare const killStaleProcesses: (port: number) => void;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized logger utility for AbsoluteJS
|
|
3
|
-
* Provides
|
|
3
|
+
* Provides formatted output with ANSI colors and timestamps
|
|
4
4
|
*/
|
|
5
5
|
export declare const logger: {
|
|
6
6
|
/**
|
|
7
7
|
* HMR update message
|
|
8
8
|
* Format: "10:30:45 AM [hmr] hmr update /pages/App.tsx"
|
|
9
9
|
*/
|
|
10
|
-
hmrUpdate(path: string, framework?: string): void;
|
|
10
|
+
hmrUpdate(path: string, framework?: string, duration?: number): void;
|
|
11
11
|
/**
|
|
12
12
|
* Page reload message
|
|
13
|
-
* Format: "10:30:45 AM [hmr] page reload /src/App.tsx"
|
|
13
|
+
* Format: "10:30:45 AM [hmr] page reload /src/App.tsx (125ms)"
|
|
14
14
|
*/
|
|
15
|
-
pageReload(path: string, framework?: string): void;
|
|
15
|
+
pageReload(path: string, framework?: string, duration?: number): void;
|
|
16
16
|
/**
|
|
17
17
|
* CSS update message
|
|
18
|
-
* Format: "10:30:45 AM [hmr] css update /styles/main.css"
|
|
18
|
+
* Format: "10:30:45 AM [hmr] css update /styles/main.css (125ms)"
|
|
19
19
|
*/
|
|
20
|
-
cssUpdate(path: string, framework?: string): void;
|
|
20
|
+
cssUpdate(path: string, framework?: string, duration?: number): void;
|
|
21
21
|
/**
|
|
22
22
|
* Script update message
|
|
23
|
-
* Format: "10:30:45 AM [hmr] script update /scripts/counter.ts"
|
|
23
|
+
* Format: "10:30:45 AM [hmr] script update /scripts/counter.ts (125ms)"
|
|
24
24
|
*/
|
|
25
|
-
scriptUpdate(path: string, framework?: string): void;
|
|
26
|
-
/**
|
|
27
|
-
* Rebuild complete message
|
|
28
|
-
* Format: "10:30:45 AM [hmr] rebuilt (125ms)"
|
|
29
|
-
*/
|
|
30
|
-
rebuilt(duration: number): void;
|
|
25
|
+
scriptUpdate(path: string, framework?: string, duration?: number): void;
|
|
31
26
|
/**
|
|
32
27
|
* Build error
|
|
33
28
|
* Format: "10:30:45 AM [hmr] error Build failed: ..."
|
|
@@ -42,4 +37,18 @@ export declare const logger: {
|
|
|
42
37
|
* Generic info message
|
|
43
38
|
*/
|
|
44
39
|
info(message: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Server module reloaded (Bun --hot triggered a server-side change)
|
|
42
|
+
*/
|
|
43
|
+
serverReload(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Startup banner
|
|
46
|
+
*/
|
|
47
|
+
ready: (options: {
|
|
48
|
+
version: string;
|
|
49
|
+
duration: number;
|
|
50
|
+
port: string | number;
|
|
51
|
+
host: string;
|
|
52
|
+
networkUrl?: string;
|
|
53
|
+
}) => void;
|
|
45
54
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type Action = () => void | Promise<void>;
|
|
2
|
+
export type Actions = {
|
|
3
|
+
clear: Action;
|
|
4
|
+
help: Action;
|
|
5
|
+
open: Action;
|
|
6
|
+
pause: Action;
|
|
7
|
+
quit: Action;
|
|
8
|
+
restart: Action;
|
|
9
|
+
shell: (command: string) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export type DbScripts = {
|
|
12
|
+
upCommand: string;
|
|
13
|
+
downCommand: string;
|
|
14
|
+
};
|
|
15
|
+
export type InteractiveHandler = {
|
|
16
|
+
dispose: () => void;
|
|
17
|
+
};
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
package/types/cli.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Action = () => void | Promise<void>;
|
|
2
|
+
|
|
3
|
+
export type Actions = {
|
|
4
|
+
clear: Action;
|
|
5
|
+
help: Action;
|
|
6
|
+
open: Action;
|
|
7
|
+
pause: Action;
|
|
8
|
+
quit: Action;
|
|
9
|
+
restart: Action;
|
|
10
|
+
shell: (command: string) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type DbScripts = {
|
|
14
|
+
upCommand: string;
|
|
15
|
+
downCommand: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type InteractiveHandler = {
|
|
19
|
+
dispose: () => void;
|
|
20
|
+
};
|