@makoojs/cli 0.4.0 → 0.5.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 +93 -345
- package/README.md +93 -345
- package/dist/bin.js +516 -1151
- package/dist/cli/commands/build.d.ts +2 -0
- package/dist/cli/commands/dev/DevTerminal.d.ts +51 -0
- package/dist/cli/commands/dev/dev.d.ts +2 -0
- package/dist/cli/commands/preview.d.ts +2 -0
- package/dist/cli/tasks/renderTasks.d.ts +2 -0
- package/dist/{shared → cli}/terminalColor.d.ts +2 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/config/defaults.d.ts +3 -24
- package/dist/config/errors.d.ts +14 -0
- package/dist/config/resolve.d.ts +6 -18
- package/dist/config/types.d.ts +8 -105
- package/dist/config/validation.d.ts +4 -7
- package/dist/index.cjs +121 -38
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1036 -3240
- package/dist/session/DevSession.d.ts +13 -0
- package/dist/session/types.d.ts +22 -0
- package/dist/vite/makoo.d.ts +3 -0
- package/dist/vite/makooDev.d.ts +7 -0
- package/package.json +8 -13
- package/dist/command/_util.d.ts +0 -8
- package/dist/command/add.d.ts +0 -1
- package/dist/command/build.d.ts +0 -1
- package/dist/command/dev.d.ts +0 -1
- package/dist/command/inspect.d.ts +0 -35
- package/dist/config/config.d.ts +0 -3
- package/dist/error/MakooCliError.d.ts +0 -58
- package/dist/generator/generator.d.ts +0 -3
- package/dist/generator/render/import/importAdapter.d.ts +0 -3
- package/dist/generator/render/import/importComp.d.ts +0 -3
- package/dist/generator/render/import/importMakooRuntime.d.ts +0 -1
- package/dist/generator/render/import/importManifest.d.ts +0 -3
- package/dist/generator/render/import/importRuntimeSetup.d.ts +0 -1
- package/dist/generator/render/init/initMakooRuntime.d.ts +0 -4
- package/dist/generator/render/init/registerComp.d.ts +0 -3
- package/dist/generator/render/init/registerListener.d.ts +0 -4
- package/dist/generator/render/run/renderMakooStart.d.ts +0 -1
- package/dist/generator/render/util/match.d.ts +0 -1
- package/dist/generator/render/util/value.d.ts +0 -1
- package/dist/generator/types.d.ts +0 -27
- package/dist/manifest/index.cjs +0 -1
- package/dist/manifest/index.d.ts +0 -2
- package/dist/manifest/index.js +0 -7
- package/dist/scanner/collectDependenics.d.ts +0 -2
- package/dist/scanner/load/loadManifes.d.ts +0 -3
- package/dist/scanner/load/loadMeta.d.ts +0 -2
- package/dist/scanner/manifestBinding.d.ts +0 -14
- package/dist/scanner/scanner.d.ts +0 -3
- package/dist/scanner/types.d.ts +0 -50
- package/dist/scanner/util.d.ts +0 -2
- package/dist/scanner/validation.d.ts +0 -183
- package/dist/vitePlugin/hmrController.d.ts +0 -6
- package/dist/vitePlugin/makoo.d.ts +0 -3
- package/dist/vitePlugin/makooMonkey.d.ts +0 -3
- package/dist/vitePlugin/types.d.ts +0 -18
- package/dist/vitePlugin/virtualModule.d.ts +0 -2
- package/dist/vitePlugin/watchList.d.ts +0 -5
- /package/dist/{command → cli}/bin.d.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NormalizedHotChannelClient } from 'vite';
|
|
2
|
+
import { RuntimeEvent, RuntimeOpen, RuntimeSnapshot } from './types';
|
|
3
|
+
export declare class DevSession {
|
|
4
|
+
private readonly clients;
|
|
5
|
+
private nextClientId;
|
|
6
|
+
private onChange;
|
|
7
|
+
subscribe(onChange: () => void): () => void;
|
|
8
|
+
open(client: NormalizedHotChannelClient, payload: RuntimeOpen): void;
|
|
9
|
+
record(client: NormalizedHotChannelClient, payload: RuntimeEvent): void;
|
|
10
|
+
disconnect(client: NormalizedHotChannelClient): void;
|
|
11
|
+
isEmpty(): boolean;
|
|
12
|
+
getTasks(): RuntimeSnapshot[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ObserveEvent } from '../../../../../core';
|
|
2
|
+
type TaskKind = NonNullable<ObserveEvent['kind']>;
|
|
3
|
+
type TaskStatus = NonNullable<ObserveEvent['status']>;
|
|
4
|
+
export type RuntimeOpen = {
|
|
5
|
+
runtimeId: number;
|
|
6
|
+
};
|
|
7
|
+
export type RuntimeEvent = {
|
|
8
|
+
runtimeId: number;
|
|
9
|
+
event: ObserveEvent;
|
|
10
|
+
};
|
|
11
|
+
export type TaskSnapshot = {
|
|
12
|
+
taskId: string;
|
|
13
|
+
kind: TaskKind;
|
|
14
|
+
status: TaskStatus;
|
|
15
|
+
injectAt: string;
|
|
16
|
+
};
|
|
17
|
+
export type RuntimeSnapshot = {
|
|
18
|
+
clientId: number;
|
|
19
|
+
runtimeId: number;
|
|
20
|
+
tasks: TaskSnapshot[];
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InlineConfig, Plugin } from 'vite';
|
|
2
|
+
import { DevSession } from '../session/DevSession';
|
|
3
|
+
export declare const bindDevSession: unique symbol;
|
|
4
|
+
export type InlineConfigWithSession = InlineConfig & {
|
|
5
|
+
[bindDevSession]?: (session: DevSession) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function makooDev(): Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makoojs/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "CLI and Vite integration for the Makoo userscript development framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,11 +31,6 @@
|
|
|
31
31
|
"import": "./dist/index.js",
|
|
32
32
|
"require": "./dist/index.cjs"
|
|
33
33
|
},
|
|
34
|
-
"./manifest": {
|
|
35
|
-
"types": "./dist/manifest/index.d.ts",
|
|
36
|
-
"import": "./dist/manifest/index.js",
|
|
37
|
-
"require": "./dist/manifest/index.cjs"
|
|
38
|
-
},
|
|
39
34
|
"./monkey": {
|
|
40
35
|
"types": "./dist/monkey/index.d.ts",
|
|
41
36
|
"import": "./dist/monkey/index.js",
|
|
@@ -43,18 +38,18 @@
|
|
|
43
38
|
}
|
|
44
39
|
},
|
|
45
40
|
"dependencies": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
41
|
+
"cac": "^7.0.0",
|
|
42
|
+
"cli-table3": "^0.6.5",
|
|
43
|
+
"log-update": "^7.2.0",
|
|
44
|
+
"vite-plugin-monkey": "^8.1.0",
|
|
49
45
|
"zod": "^4.4.3"
|
|
50
46
|
},
|
|
51
47
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"@makoojs/core": "0.3.0"
|
|
48
|
+
"@makoojs/core": "0.4.0",
|
|
49
|
+
"vite": "^8.2.2"
|
|
55
50
|
},
|
|
56
51
|
"peerDependencies": {
|
|
57
52
|
"@makoojs/core": "*",
|
|
58
|
-
"vite": "
|
|
53
|
+
"vite": "^8.2.2"
|
|
59
54
|
}
|
|
60
55
|
}
|
package/dist/command/_util.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig } from '../config/types';
|
|
2
|
-
export declare function loadCliVersion(cliVersionCache: string | null): Promise<string>;
|
|
3
|
-
export declare function loadMakooConfig(): Promise<ResolvedConfig>;
|
|
4
|
-
export declare function getExtName(framework: string): string | null;
|
|
5
|
-
export declare function updateManifest(moduleName: string, updateData: Record<string, unknown>): Promise<void>;
|
|
6
|
-
export declare function moduleTemplate(framework: string): string;
|
|
7
|
-
export declare function vueTemplate(): string;
|
|
8
|
-
export declare function reactTemplate(): string;
|
package/dist/command/add.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addCommand(moduleName: string, framework: string): Promise<void>;
|
package/dist/command/build.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function buildCommand(): Promise<void>;
|
package/dist/command/dev.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function devCommand(): Promise<void>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig, ResolvedInjectionDefaults, ResolvedInjectionModule, ResolvedListener } from '../config/types';
|
|
2
|
-
import { ScannerResult } from '../scanner/types';
|
|
3
|
-
type InspectInjectionDefaultsFields = Pick<ResolvedInjectionModule, 'alive' | 'scope' | 'timeout'>;
|
|
4
|
-
type InspectInjection = Omit<ResolvedInjectionModule, keyof InspectInjectionDefaultsFields> & {
|
|
5
|
-
injectionDefaults: InspectInjectionDefaultsFields;
|
|
6
|
-
injectionDefaultsOverrides?: Partial<InspectInjectionDefaultsFields>;
|
|
7
|
-
};
|
|
8
|
-
type InspectResult = {
|
|
9
|
-
project: {
|
|
10
|
-
root: ResolvedConfig['root'];
|
|
11
|
-
app: ResolvedConfig['app'];
|
|
12
|
-
};
|
|
13
|
-
source: {
|
|
14
|
-
config: ResolvedConfig['source'];
|
|
15
|
-
manifestFile: ScannerResult['manifestFile'];
|
|
16
|
-
moduleManifestFiles: string[];
|
|
17
|
-
dependencies: {
|
|
18
|
-
manifest: ScannerResult['manifestDependencies'];
|
|
19
|
-
moduleManifests: ScannerResult['moduleManifestDependencies'];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
runtime: {
|
|
23
|
-
setupFiles: ScannerResult['runtimeSetupFiles'];
|
|
24
|
-
dependencies: ScannerResult['runtimeDependencies'];
|
|
25
|
-
};
|
|
26
|
-
monkey: ResolvedConfig['monkey'];
|
|
27
|
-
injectionDefaults: ScannerResult['injectionDefaults'];
|
|
28
|
-
injections: InspectInjection[];
|
|
29
|
-
listeners: ResolvedListener[];
|
|
30
|
-
frameworks: ScannerResult['frameworks'];
|
|
31
|
-
};
|
|
32
|
-
export declare function formatInspectInjection(injection: ResolvedInjectionModule, injectionDefaults: ResolvedInjectionDefaults): InspectInjection;
|
|
33
|
-
export declare function formatInspectResult(result: ScannerResult): InspectResult;
|
|
34
|
-
export declare function inspectCommand(): Promise<void>;
|
|
35
|
-
export {};
|
package/dist/config/config.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { InjectionManifest, InjectionModuleConfig, StrictShape } from './types';
|
|
2
|
-
export declare const defineInjection: <T extends InjectionModuleConfig>(config: StrictShape<InjectionModuleConfig, T>) => T;
|
|
3
|
-
export declare function defineInjections<T extends InjectionManifest>(manifest: StrictShape<InjectionManifest, T>): T;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { MakooError, MakooIssue } from '../../../../../core';
|
|
2
|
-
export interface ValidationIssue {
|
|
3
|
-
code: string;
|
|
4
|
-
path: PropertyKey[];
|
|
5
|
-
message: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class ModuleAlreadyExistsError extends MakooError {
|
|
8
|
-
constructor(message: string, code?: string, cause?: Error);
|
|
9
|
-
}
|
|
10
|
-
export declare class LoadViteMakooConfigError extends MakooError {
|
|
11
|
-
constructor(message: string, code: string, cause?: Error);
|
|
12
|
-
}
|
|
13
|
-
export declare class RuntimeSetupNotFoundError extends MakooError {
|
|
14
|
-
constructor(file: string, code?: string, cause?: Error);
|
|
15
|
-
}
|
|
16
|
-
export declare class ManifestValidationError extends MakooError {
|
|
17
|
-
constructor(file: string, zodIssues: ValidationIssue[], code?: string, cause?: Error);
|
|
18
|
-
}
|
|
19
|
-
export declare class ConfigValidationError extends MakooError {
|
|
20
|
-
constructor(issues: MakooIssue[], code?: string, cause?: Error);
|
|
21
|
-
}
|
|
22
|
-
export declare class UnknownFrameworkError extends MakooError {
|
|
23
|
-
constructor(componentPath: string, code?: string, cause?: Error);
|
|
24
|
-
}
|
|
25
|
-
export declare class ComponentNotFoundError extends MakooError {
|
|
26
|
-
constructor(injectionName: string, code?: string, cause?: Error);
|
|
27
|
-
}
|
|
28
|
-
export declare class UnsupportedFrameworkGenerationError extends MakooError {
|
|
29
|
-
constructor(ext: string, code?: string, cause?: Error);
|
|
30
|
-
}
|
|
31
|
-
export declare class SourceDirNotFoundError extends MakooError {
|
|
32
|
-
constructor(dir: string, code?: string, cause?: Error);
|
|
33
|
-
}
|
|
34
|
-
export declare class ManifestNotFoundError extends MakooError {
|
|
35
|
-
constructor(dir: string, code?: string, cause?: Error);
|
|
36
|
-
}
|
|
37
|
-
export declare class ManifestBindingNotFoundError extends MakooError {
|
|
38
|
-
constructor(kind: 'injectionDefaults' | 'injection' | 'listener', id: string, code?: string, cause?: Error);
|
|
39
|
-
}
|
|
40
|
-
export declare class ManifestImportNotFoundError extends MakooError {
|
|
41
|
-
constructor(manifestFile: string, code?: string, cause?: Error);
|
|
42
|
-
}
|
|
43
|
-
export declare class UnsupportedSelectorTargetError extends MakooError {
|
|
44
|
-
constructor(file: string, path: string, target: string, code?: string, cause?: Error);
|
|
45
|
-
}
|
|
46
|
-
export declare class FunctionSerializationError extends MakooError {
|
|
47
|
-
constructor(code?: string, cause?: Error);
|
|
48
|
-
}
|
|
49
|
-
export declare class ManifestLoadError extends MakooError {
|
|
50
|
-
constructor(path: string, code?: string, cause?: Error);
|
|
51
|
-
}
|
|
52
|
-
export declare class ModuleManifestLoadError extends MakooError {
|
|
53
|
-
constructor(path: string, code?: string, cause?: Error);
|
|
54
|
-
}
|
|
55
|
-
export declare class NoEnabledTasksError extends MakooError {
|
|
56
|
-
constructor(code?: string, cause?: Error);
|
|
57
|
-
}
|
|
58
|
-
export declare function toMakooIssue(issue: ValidationIssue): MakooIssue;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renderImportMakooRuntime(): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renderRuntimeSetupImport(setup: string[]): string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ResolvedInjectionDefaults } from '../../../config/types';
|
|
2
|
-
import { ScannerManifestBindings } from '../../../scanner/types';
|
|
3
|
-
import { RenderInitResult, RenderManifestReference } from '../../types';
|
|
4
|
-
export declare function renderInitMakooRuntime(frameworks: string[], injectionDefaults: ResolvedInjectionDefaults, manifestBinding: ScannerManifestBindings['injectionDefaults'], renderManifestReference: RenderManifestReference): RenderInitResult;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ScannerManifestBindings } from '../../../scanner/types';
|
|
2
|
-
import { Component, RenderInitResult, RenderManifestReference } from '../../types';
|
|
3
|
-
export declare function renderRegisterComponent(instanceName: string, components: Component[], manifestBindings: ScannerManifestBindings['injections'], renderManifestReference: RenderManifestReference): RenderInitResult;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ResolvedListener } from '../../../config/types';
|
|
2
|
-
import { ScannerManifestBindings } from '../../../scanner/types';
|
|
3
|
-
import { RenderInitResult, RenderManifestReference } from '../../types';
|
|
4
|
-
export declare function renderRegisterListener(instanceName: string, listeners: ResolvedListener[], manifestBindings: ScannerManifestBindings['listeners'], renderManifestReference: RenderManifestReference): RenderInitResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renderMakooStart(instanceName: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const renderMatchUrlHelper: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const renderInlineValue: (value: unknown) => string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ResolvedInjectionModule } from '../config/types';
|
|
2
|
-
import { ManifestBinding } from '../scanner/types';
|
|
3
|
-
export type RenderImportResult = {
|
|
4
|
-
code: string;
|
|
5
|
-
importsName: string[];
|
|
6
|
-
};
|
|
7
|
-
export type Component = {
|
|
8
|
-
code: string;
|
|
9
|
-
componentName: string;
|
|
10
|
-
componentMeta: ResolvedInjectionModule;
|
|
11
|
-
};
|
|
12
|
-
export type RenderImportCompResult = Omit<RenderImportResult, 'importsName'> & {
|
|
13
|
-
component: Component[];
|
|
14
|
-
};
|
|
15
|
-
export type RenderInitResult = {
|
|
16
|
-
code: string;
|
|
17
|
-
instanceName: string;
|
|
18
|
-
};
|
|
19
|
-
export type GeneratorResult = {
|
|
20
|
-
code: string;
|
|
21
|
-
instanceName: string;
|
|
22
|
-
};
|
|
23
|
-
export type RenderImportManifestResult = {
|
|
24
|
-
code: string;
|
|
25
|
-
renderReference: RenderManifestReference;
|
|
26
|
-
};
|
|
27
|
-
export type RenderManifestReference = (binding: ManifestBinding) => string;
|
package/dist/manifest/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>e;function t(e){return e}exports.defineInjection=e,exports.defineInjections=t;
|
package/dist/manifest/index.d.ts
DELETED
package/dist/manifest/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InjectionManifest, InjectionModuleConfig, ResolvedInjectionModule, ResolvedListener } from '../config/types';
|
|
2
|
-
import { ScannerManifestBindings } from './types';
|
|
3
|
-
type BuildManifestBindingsOptions = {
|
|
4
|
-
manifest: InjectionManifest;
|
|
5
|
-
manifestFile: string;
|
|
6
|
-
manifestInjections: ResolvedInjectionModule[];
|
|
7
|
-
moduleInjections: ResolvedInjectionModule[];
|
|
8
|
-
moduleInjectionConfigs: Map<string, InjectionModuleConfig>;
|
|
9
|
-
manifestListeners: ResolvedListener[];
|
|
10
|
-
enabledInjections: ResolvedInjectionModule[];
|
|
11
|
-
enabledListeners: ResolvedListener[];
|
|
12
|
-
};
|
|
13
|
-
export declare function buildManifestBindings(options: BuildManifestBindingsOptions): ScannerManifestBindings;
|
|
14
|
-
export {};
|
package/dist/scanner/types.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { InjectionManifest, InjectionModuleConfig, ResolvedConfig, ResolvedInjectionDefaults, ResolvedInjectionFramework, ResolvedInjectionModule, ResolvedListener } from '../config/types';
|
|
2
|
-
export type ScannerResult = {
|
|
3
|
-
manifestFile: string;
|
|
4
|
-
manifestBindings: ScannerManifestBindings;
|
|
5
|
-
manifestDependencies: string[];
|
|
6
|
-
moduleManifestDependencies: string[];
|
|
7
|
-
runtimeSetupFiles: string[];
|
|
8
|
-
runtimeDependencies: string[];
|
|
9
|
-
config: ResolvedConfig;
|
|
10
|
-
injectionDefaults: ResolvedInjectionDefaults;
|
|
11
|
-
injections: ResolvedInjectionModule[];
|
|
12
|
-
listeners: ResolvedListener[];
|
|
13
|
-
frameworks: ResolvedInjectionFramework[];
|
|
14
|
-
};
|
|
15
|
-
export type ManifestBinding = {
|
|
16
|
-
manifestFile: string;
|
|
17
|
-
valuePath: Array<string | number>;
|
|
18
|
-
};
|
|
19
|
-
export type InjectionManifestBindings = {
|
|
20
|
-
hooks?: ManifestBinding;
|
|
21
|
-
on?: {
|
|
22
|
-
callback: ManifestBinding;
|
|
23
|
-
activitySignal?: ManifestBinding;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export type ListenerManifestBindings = {
|
|
27
|
-
callback: ManifestBinding;
|
|
28
|
-
activitySignal?: ManifestBinding;
|
|
29
|
-
};
|
|
30
|
-
export type ScannerManifestBindings = {
|
|
31
|
-
injectionDefaults?: {
|
|
32
|
-
hooks: ManifestBinding;
|
|
33
|
-
};
|
|
34
|
-
injections: Record<string, InjectionManifestBindings>;
|
|
35
|
-
listeners: Record<string, ListenerManifestBindings>;
|
|
36
|
-
};
|
|
37
|
-
export type LoadManifestResult = {
|
|
38
|
-
manifest: InjectionManifest;
|
|
39
|
-
manifestFile: string;
|
|
40
|
-
dependencies: string[];
|
|
41
|
-
};
|
|
42
|
-
export type LoadMetaResult = {
|
|
43
|
-
moduleManifestFile: string;
|
|
44
|
-
moduleConfig: InjectionModuleConfig;
|
|
45
|
-
dependencies: string[];
|
|
46
|
-
};
|
|
47
|
-
export type CollectDependenciesOption = {
|
|
48
|
-
root: string;
|
|
49
|
-
includeEntry?: boolean;
|
|
50
|
-
};
|
package/dist/scanner/util.d.ts
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { ActivitySignalSource, ObserveHook } from '../../../../../core';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export declare const ObserveEventNameSchema: z.ZodEnum<{
|
|
4
|
-
"register:start": "register:start";
|
|
5
|
-
"register:success": "register:success";
|
|
6
|
-
"register:duplicate": "register:duplicate";
|
|
7
|
-
"register:error": "register:error";
|
|
8
|
-
"start:requested": "start:requested";
|
|
9
|
-
"start:taskScheduled": "start:taskScheduled";
|
|
10
|
-
"start:taskSkipped": "start:taskSkipped";
|
|
11
|
-
"artifact:mountStart": "artifact:mountStart";
|
|
12
|
-
"artifact:mountSuccess": "artifact:mountSuccess";
|
|
13
|
-
"artifact:mountFail": "artifact:mountFail";
|
|
14
|
-
"listener:attached": "listener:attached";
|
|
15
|
-
"listener:detached": "listener:detached";
|
|
16
|
-
"listener:attachFail": "listener:attachFail";
|
|
17
|
-
"alive:enabled": "alive:enabled";
|
|
18
|
-
"alive:disabled": "alive:disabled";
|
|
19
|
-
"alive:observerStarted": "alive:observerStarted";
|
|
20
|
-
"alive:observerStopped": "alive:observerStopped";
|
|
21
|
-
"task:targetReady": "task:targetReady";
|
|
22
|
-
"task:statusChange": "task:statusChange";
|
|
23
|
-
"task:beforeReset": "task:beforeReset";
|
|
24
|
-
"task:afterReset": "task:afterReset";
|
|
25
|
-
"task:beforeDestroy": "task:beforeDestroy";
|
|
26
|
-
"task:afterDestroy": "task:afterDestroy";
|
|
27
|
-
"signal:watcherReleased": "signal:watcherReleased";
|
|
28
|
-
"resource:listenerReleased": "resource:listenerReleased";
|
|
29
|
-
"artifact:unmounted": "artifact:unmounted";
|
|
30
|
-
"dom:targetFound": "dom:targetFound";
|
|
31
|
-
"dom:targetTimeout": "dom:targetTimeout";
|
|
32
|
-
"dom:targetRemoved": "dom:targetRemoved";
|
|
33
|
-
"dom:targetRestored": "dom:targetRestored";
|
|
34
|
-
}>;
|
|
35
|
-
export declare const LifecycleHookMapSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>;
|
|
36
|
-
export declare const InjectionDefaultsSchema: z.ZodObject<{
|
|
37
|
-
alive: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
39
|
-
local: "local";
|
|
40
|
-
global: "global";
|
|
41
|
-
}>>;
|
|
42
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
|
|
44
|
-
}, z.core.$strip>;
|
|
45
|
-
export declare const InjectionMatchSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
46
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
-
}, z.core.$strip>]>;
|
|
49
|
-
export declare const InjectionModuleListenerSchema: z.ZodObject<{
|
|
50
|
-
listenAt: z.ZodString;
|
|
51
|
-
type: z.ZodString;
|
|
52
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
53
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
|
-
export declare const InjectionModuleSchema: z.ZodObject<{
|
|
56
|
-
name: z.ZodOptional<z.ZodString>;
|
|
57
|
-
injectAt: z.ZodString;
|
|
58
|
-
component: z.ZodString;
|
|
59
|
-
framework: z.ZodOptional<z.ZodEnum<{
|
|
60
|
-
auto: "auto";
|
|
61
|
-
Vue: "Vue";
|
|
62
|
-
React: "React";
|
|
63
|
-
}>>;
|
|
64
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
66
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
-
}, z.core.$strip>]>>;
|
|
69
|
-
alive: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
71
|
-
local: "local";
|
|
72
|
-
global: "global";
|
|
73
|
-
}>>;
|
|
74
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
75
|
-
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
|
|
76
|
-
on: z.ZodOptional<z.ZodObject<{
|
|
77
|
-
listenAt: z.ZodString;
|
|
78
|
-
type: z.ZodString;
|
|
79
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
80
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
81
|
-
}, z.core.$strip>>;
|
|
82
|
-
}, z.core.$strip>;
|
|
83
|
-
export declare const InjectionListenerSchema: z.ZodObject<{
|
|
84
|
-
listenAt: z.ZodString;
|
|
85
|
-
type: z.ZodString;
|
|
86
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
87
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
88
|
-
name: z.ZodOptional<z.ZodString>;
|
|
89
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
91
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
-
}, z.core.$strip>]>>;
|
|
94
|
-
}, z.core.$strip>;
|
|
95
|
-
export declare const InjectionManifestSchema: z.ZodObject<{
|
|
96
|
-
injectionDefaults: z.ZodOptional<z.ZodObject<{
|
|
97
|
-
alive: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
99
|
-
local: "local";
|
|
100
|
-
global: "global";
|
|
101
|
-
}>>;
|
|
102
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
|
|
104
|
-
}, z.core.$strip>>;
|
|
105
|
-
injections: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
106
|
-
name: z.ZodOptional<z.ZodString>;
|
|
107
|
-
injectAt: z.ZodString;
|
|
108
|
-
component: z.ZodString;
|
|
109
|
-
framework: z.ZodOptional<z.ZodEnum<{
|
|
110
|
-
auto: "auto";
|
|
111
|
-
Vue: "Vue";
|
|
112
|
-
React: "React";
|
|
113
|
-
}>>;
|
|
114
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
116
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
|
-
}, z.core.$strip>]>>;
|
|
119
|
-
alive: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
121
|
-
local: "local";
|
|
122
|
-
global: "global";
|
|
123
|
-
}>>;
|
|
124
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
125
|
-
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
|
|
126
|
-
on: z.ZodOptional<z.ZodObject<{
|
|
127
|
-
listenAt: z.ZodString;
|
|
128
|
-
type: z.ZodString;
|
|
129
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
130
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
131
|
-
}, z.core.$strip>>;
|
|
132
|
-
}, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
133
|
-
alive: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
-
scope: z.ZodOptional<z.ZodEnum<{
|
|
135
|
-
local: "local";
|
|
136
|
-
global: "global";
|
|
137
|
-
}>>;
|
|
138
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
139
|
-
hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
|
|
140
|
-
on: z.ZodOptional<z.ZodObject<{
|
|
141
|
-
listenAt: z.ZodString;
|
|
142
|
-
type: z.ZodString;
|
|
143
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
144
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
injectAt: z.ZodString;
|
|
147
|
-
component: z.ZodString;
|
|
148
|
-
framework: z.ZodOptional<z.ZodEnum<{
|
|
149
|
-
auto: "auto";
|
|
150
|
-
Vue: "Vue";
|
|
151
|
-
React: "React";
|
|
152
|
-
}>>;
|
|
153
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
155
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
157
|
-
}, z.core.$strip>]>>;
|
|
158
|
-
}, z.core.$strip>>]>>;
|
|
159
|
-
listeners: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
160
|
-
listenAt: z.ZodString;
|
|
161
|
-
type: z.ZodString;
|
|
162
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
163
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
164
|
-
name: z.ZodOptional<z.ZodString>;
|
|
165
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
167
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
169
|
-
}, z.core.$strip>]>>;
|
|
170
|
-
}, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
171
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
-
match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
173
|
-
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
175
|
-
}, z.core.$strip>]>>;
|
|
176
|
-
listenAt: z.ZodString;
|
|
177
|
-
type: z.ZodString;
|
|
178
|
-
callback: z.ZodCustom<EventListener, EventListener>;
|
|
179
|
-
activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
|
|
180
|
-
}, z.core.$strip>>]>>;
|
|
181
|
-
}, z.core.$strict>;
|
|
182
|
-
export declare function validateManifest(data: unknown, file: string): z.infer<typeof InjectionManifestSchema>;
|
|
183
|
-
export declare function validateModuleMeta(data: unknown, file: string): z.infer<typeof InjectionModuleSchema>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ViteDevServer } from 'vite';
|
|
2
|
-
import { StructuralHmrPayload } from './types';
|
|
3
|
-
export declare function invalidateVirtualModule(server: ViteDevServer): void;
|
|
4
|
-
export declare function sendScanError(server: ViteDevServer, error: unknown): void;
|
|
5
|
-
export declare function triggerModuleHmr(server: ViteDevServer): void;
|
|
6
|
-
export declare function sendStructuralHmr(server: ViteDevServer, payload: StructuralHmrPayload): void;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
import { CliConfig, ResolvedConfig } from '../config/types';
|
|
3
|
-
export type MakooMonkeyPlugin = Plugin & {
|
|
4
|
-
__makoo: ResolvedConfig;
|
|
5
|
-
};
|
|
6
|
-
export type WatchTargets = {
|
|
7
|
-
files: string[];
|
|
8
|
-
dirs: string[];
|
|
9
|
-
};
|
|
10
|
-
export type MakooOptions = CliConfig & {
|
|
11
|
-
root?: string;
|
|
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,5 +0,0 @@
|
|
|
1
|
-
import { ScannerResult } from '../scanner/types';
|
|
2
|
-
import { StructuralChangeKind, WatchTargets } from './types';
|
|
3
|
-
export declare function getWatchTargets(scanResult: ScannerResult): WatchTargets;
|
|
4
|
-
export declare function isStructuralChange(changedFile: string, scanResult: ScannerResult): boolean;
|
|
5
|
-
export declare function classifyStructuralChange(changedFile: string, scanResult: ScannerResult): StructuralChangeKind | null;
|