@makoojs/cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.CN.md +4 -8
- package/README.md +4 -8
- package/dist/bin.js +103 -25
- package/dist/command/_util.d.ts +0 -8
- package/dist/command/inspect.d.ts +33 -0
- package/dist/config/types.d.ts +1 -3
- package/dist/config/validation.d.ts +1 -2
- package/dist/index.cjs +21 -12
- package/dist/index.js +1318 -1276
- package/dist/scanner/types.d.ts +4 -1
- package/dist/scanner/validation.d.ts +2 -2
- package/dist/shared/terminalColor.d.ts +8 -0
- package/dist/vitePlugin/hmrController.d.ts +2 -0
- package/dist/vitePlugin/types.d.ts +6 -0
- package/dist/vitePlugin/watchList.d.ts +2 -1
- package/package.json +1 -1
package/dist/scanner/types.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { InjectionManifest, InjectionModuleConfig, ResolvedConfig, ResolvedInjectionFramework, ResolvedInjectionModule } from '../config/types';
|
|
1
|
+
import { InjectionManifest, InjectionModuleConfig, ResolvedConfig, ResolvedInjectionFramework, ResolvedInjectionModule, ResolvedInjectorConfig } from '../config/types';
|
|
2
2
|
export type ScannerResult = {
|
|
3
3
|
manifestFile: string;
|
|
4
4
|
manifestDependencies: string[];
|
|
5
|
+
moduleManifestDependencies: string[];
|
|
6
|
+
runtimeSetupFiles: string[];
|
|
5
7
|
runtimeDependencies: string[];
|
|
6
8
|
config: ResolvedConfig;
|
|
9
|
+
injector: ResolvedInjectorConfig;
|
|
7
10
|
injections: ResolvedInjectionModule[];
|
|
8
11
|
frameworks: ResolvedInjectionFramework[];
|
|
9
12
|
};
|
|
@@ -67,7 +67,7 @@ export declare const InjectionModuleSchema: z.ZodObject<{
|
|
|
67
67
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
export declare const InjectionManifestSchema: z.ZodObject<{
|
|
70
|
-
|
|
70
|
+
injectionDefaults: z.ZodOptional<z.ZodObject<{
|
|
71
71
|
alive: z.ZodOptional<z.ZodBoolean>;
|
|
72
72
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
73
73
|
local: "local";
|
|
@@ -116,6 +116,6 @@ export declare const InjectionManifestSchema: z.ZodObject<{
|
|
|
116
116
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
117
|
}, z.core.$strip>]>>;
|
|
118
118
|
}, z.core.$strip>>]>;
|
|
119
|
-
}, z.core.$
|
|
119
|
+
}, z.core.$strict>;
|
|
120
120
|
export declare function validateManifest(data: unknown, file: string): z.infer<typeof InjectionManifestSchema>;
|
|
121
121
|
export declare function validateModuleMeta(data: unknown, file: string): z.infer<typeof InjectionModuleSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ansi: {
|
|
2
|
+
readonly reset: "\u001B[0m";
|
|
3
|
+
readonly bold: "\u001B[1m";
|
|
4
|
+
readonly cyan: "\u001B[36m";
|
|
5
|
+
readonly green: "\u001B[32m";
|
|
6
|
+
readonly dim: "\u001B[2m";
|
|
7
|
+
};
|
|
8
|
+
export declare const colorize: (value: string, ...codes: string[]) => string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ViteDevServer } from 'vite';
|
|
2
|
+
import { StructuralHmrPayload } from './types';
|
|
2
3
|
export declare function invalidateVirtualModule(server: ViteDevServer): void;
|
|
3
4
|
export declare function sendScanError(server: ViteDevServer, error: unknown): void;
|
|
4
5
|
export declare function triggerModuleHmr(server: ViteDevServer): void;
|
|
6
|
+
export declare function sendStructuralHmr(server: ViteDevServer, payload: StructuralHmrPayload): void;
|
|
@@ -10,3 +10,9 @@ export type WatchTargets = {
|
|
|
10
10
|
export type MakooOptions = CliConfig & {
|
|
11
11
|
root?: string;
|
|
12
12
|
};
|
|
13
|
+
export type StructuralChangeKind = 'top-level-manifest' | 'manifest-dependency' | 'module-manifest-dependency' | 'runtime-setup' | 'runtime-dependency' | 'module-manifest';
|
|
14
|
+
export type StructuralHmrPayload = {
|
|
15
|
+
file: string;
|
|
16
|
+
reason: StructuralChangeKind;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ScannerResult } from '../scanner/types';
|
|
2
|
-
import { WatchTargets } from './types';
|
|
2
|
+
import { StructuralChangeKind, WatchTargets } from './types';
|
|
3
3
|
export declare function getWatchTargets(scanResult: ScannerResult): WatchTargets;
|
|
4
4
|
export declare function isStructuralChange(changedFile: string, scanResult: ScannerResult): boolean;
|
|
5
|
+
export declare function classifyStructuralChange(changedFile: string, scanResult: ScannerResult): StructuralChangeKind | null;
|