@makoojs/cli 0.4.1 → 0.5.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.
Files changed (61) hide show
  1. package/README.CN.md +48 -387
  2. package/README.md +48 -387
  3. package/dist/bin.js +594 -1141
  4. package/dist/cli/commands/build.d.ts +2 -0
  5. package/dist/cli/commands/dev/DevTerminal.d.ts +51 -0
  6. package/dist/cli/commands/dev/dev.d.ts +2 -0
  7. package/dist/cli/commands/preview.d.ts +2 -0
  8. package/dist/cli/injections/renderInjections.d.ts +2 -0
  9. package/dist/{shared → cli}/terminalColor.d.ts +2 -0
  10. package/dist/cli/version.d.ts +1 -0
  11. package/dist/config/defaults.d.ts +3 -24
  12. package/dist/config/errors.d.ts +3 -0
  13. package/dist/config/resolve.d.ts +6 -18
  14. package/dist/config/types.d.ts +8 -106
  15. package/dist/config/validation.d.ts +4 -7
  16. package/dist/index.cjs +89 -38
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +1008 -3255
  19. package/dist/session/DevSession.d.ts +14 -0
  20. package/dist/session/types.d.ts +47 -0
  21. package/dist/vite/makoo.d.ts +3 -0
  22. package/dist/vite/makooDev.d.ts +7 -0
  23. package/package.json +8 -13
  24. package/dist/command/_util.d.ts +0 -8
  25. package/dist/command/add.d.ts +0 -1
  26. package/dist/command/build.d.ts +0 -1
  27. package/dist/command/dev.d.ts +0 -1
  28. package/dist/command/inspect.d.ts +0 -35
  29. package/dist/config/config.d.ts +0 -3
  30. package/dist/error/MakooCliError.d.ts +0 -58
  31. package/dist/generator/generator.d.ts +0 -3
  32. package/dist/generator/render/import/importAdapter.d.ts +0 -3
  33. package/dist/generator/render/import/importComp.d.ts +0 -3
  34. package/dist/generator/render/import/importMakooRuntime.d.ts +0 -1
  35. package/dist/generator/render/import/importManifest.d.ts +0 -3
  36. package/dist/generator/render/import/importRuntimeSetup.d.ts +0 -1
  37. package/dist/generator/render/init/initMakooRuntime.d.ts +0 -4
  38. package/dist/generator/render/init/registerComp.d.ts +0 -3
  39. package/dist/generator/render/init/registerListener.d.ts +0 -4
  40. package/dist/generator/render/run/renderMakooStart.d.ts +0 -1
  41. package/dist/generator/render/util/match.d.ts +0 -1
  42. package/dist/generator/render/util/value.d.ts +0 -1
  43. package/dist/generator/types.d.ts +0 -27
  44. package/dist/manifest/index.cjs +0 -1
  45. package/dist/manifest/index.d.ts +0 -2
  46. package/dist/manifest/index.js +0 -7
  47. package/dist/scanner/collectDependenics.d.ts +0 -2
  48. package/dist/scanner/load/loadManifes.d.ts +0 -3
  49. package/dist/scanner/load/loadMeta.d.ts +0 -2
  50. package/dist/scanner/manifestBinding.d.ts +0 -14
  51. package/dist/scanner/scanner.d.ts +0 -3
  52. package/dist/scanner/types.d.ts +0 -50
  53. package/dist/scanner/util.d.ts +0 -2
  54. package/dist/scanner/validation.d.ts +0 -190
  55. package/dist/vitePlugin/hmrController.d.ts +0 -6
  56. package/dist/vitePlugin/makoo.d.ts +0 -3
  57. package/dist/vitePlugin/makooMonkey.d.ts +0 -3
  58. package/dist/vitePlugin/types.d.ts +0 -18
  59. package/dist/vitePlugin/virtualModule.d.ts +0 -2
  60. package/dist/vitePlugin/watchList.d.ts +0 -5
  61. /package/dist/{command → cli}/bin.d.ts +0 -0
@@ -0,0 +1,14 @@
1
+ import { NormalizedHotChannelClient } from 'vite';
2
+ import { RuntimeInjection, RuntimeNotice, 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
+ updateInjection(client: NormalizedHotChannelClient, payload: RuntimeInjection): void;
10
+ applyNotice(client: NormalizedHotChannelClient, payload: RuntimeNotice): void;
11
+ disconnect(client: NormalizedHotChannelClient): void;
12
+ isEmpty(): boolean;
13
+ getRuntimeSnapshots(): RuntimeSnapshot[];
14
+ }
@@ -0,0 +1,47 @@
1
+ import { ComponentStatus, ListenerStatus, ObservationNotice } from '../../../../../core';
2
+ export type RuntimeOpen = {
3
+ runtimeId: number;
4
+ };
5
+ export type SerializedMakooError = {
6
+ code: string;
7
+ message: string;
8
+ cause?: string;
9
+ };
10
+ export type AttachedListenerSnapshot = {
11
+ name: string;
12
+ status: ListenerStatus;
13
+ };
14
+ export type InjectionSnapshot = {
15
+ name: string;
16
+ kind: 'component';
17
+ status: ComponentStatus;
18
+ lastError?: SerializedMakooError;
19
+ attachedListeners: AttachedListenerSnapshot[];
20
+ } | {
21
+ name: string;
22
+ kind: 'standalone-listener';
23
+ status: ListenerStatus;
24
+ lastError?: SerializedMakooError;
25
+ };
26
+ export type SerializedDiagnostic = {
27
+ type: 'diagnostic';
28
+ name?: string;
29
+ error: SerializedMakooError;
30
+ };
31
+ export type SerializedObservationNotice = Exclude<ObservationNotice, {
32
+ type: 'diagnostic';
33
+ }> | SerializedDiagnostic;
34
+ export type RuntimeInjection = {
35
+ runtimeId: number;
36
+ injection: InjectionSnapshot;
37
+ };
38
+ export type RuntimeNotice = {
39
+ runtimeId: number;
40
+ notice: SerializedObservationNotice;
41
+ };
42
+ export type RuntimeSnapshot = {
43
+ clientId: number;
44
+ runtimeId: number;
45
+ injections: InjectionSnapshot[];
46
+ diagnostics: SerializedDiagnostic[];
47
+ };
@@ -0,0 +1,3 @@
1
+ import { Plugin } from 'vite';
2
+ import { MakooConfig } from '../config/types';
3
+ export declare function makoo(options: MakooConfig): Plugin[];
@@ -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.4.1",
3
+ "version": "0.5.1",
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
- "jiti": "^2.6.1",
47
- "picomatch": "^4.0.4",
48
- "vite-plugin-monkey": "^7.1.9",
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
- "@types/picomatch": "^4.0.3",
53
- "cac": "^7.0.0",
54
- "@makoojs/core": "0.3.1"
48
+ "@makoojs/core": "0.5.0",
49
+ "vite": "^8.2.2"
55
50
  },
56
51
  "peerDependencies": {
57
52
  "@makoojs/core": "*",
58
- "vite": ">=7"
53
+ "vite": "^8.2.2"
59
54
  }
60
55
  }
@@ -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;
@@ -1 +0,0 @@
1
- export declare function addCommand(moduleName: string, framework: string): Promise<void>;
@@ -1 +0,0 @@
1
- export declare function buildCommand(): Promise<void>;
@@ -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 {};
@@ -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,3 +0,0 @@
1
- import { ScannerResult } from '../scanner/types';
2
- import { GeneratorResult } from './types';
3
- export declare function generate(sannerResult: ScannerResult): GeneratorResult;
@@ -1,3 +0,0 @@
1
- import { ResolvedInjectionModule } from '../../../config/types';
2
- import { RenderImportResult } from '../../types';
3
- export declare function renderImportAdapter(injections: ResolvedInjectionModule[]): RenderImportResult;
@@ -1,3 +0,0 @@
1
- import { ResolvedInjectionModule } from '../../../config/types';
2
- import { RenderImportCompResult } from '../../types';
3
- export declare function renderImportComp(injections: ResolvedInjectionModule[]): RenderImportCompResult;
@@ -1 +0,0 @@
1
- export declare function renderImportMakooRuntime(): string;
@@ -1,3 +0,0 @@
1
- import { ScannerManifestBindings } from '../../../scanner/types';
2
- import { RenderImportManifestResult } from '../../types';
3
- export declare function renderImportManifest(bindings: ScannerManifestBindings): RenderImportManifestResult;
@@ -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;
@@ -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;
@@ -1,2 +0,0 @@
1
- export { defineInjection, defineInjections } from '../config/config';
2
- export type { InjectionDefaults, InjectionFramework, InjectionListenerConfig, InjectionManifest, InjectionMatchConfig, InjectionModuleConfig, InjectionModuleListenerConfig } from '../config/types';
@@ -1,7 +0,0 @@
1
- //#region packages/cli/src/config/config.ts
2
- var e = (e) => e;
3
- function t(e) {
4
- return e;
5
- }
6
- //#endregion
7
- export { e as defineInjection, t as defineInjections };
@@ -1,2 +0,0 @@
1
- import { CollectDependenciesOption } from './types';
2
- export declare function collectDependencies(entryFile: string, options: CollectDependenciesOption): string[];
@@ -1,3 +0,0 @@
1
- import { ResolvedSourceConfig } from '../../config/types';
2
- import { LoadManifestResult } from '../types';
3
- export declare function loadManifest(source: ResolvedSourceConfig): Promise<LoadManifestResult | null>;
@@ -1,2 +0,0 @@
1
- import { LoadMetaResult } from '../types';
2
- export declare function loadMeta(root: string): Promise<LoadMetaResult | null>;
@@ -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 {};
@@ -1,3 +0,0 @@
1
- import { ResolvedConfig } from '../config/types';
2
- import { ScannerResult } from './types';
3
- export declare function scanner(config: ResolvedConfig): Promise<ScannerResult>;
@@ -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
- };
@@ -1,2 +0,0 @@
1
- import { ResolvedInjectionModule } from '../config/types';
2
- export declare function mergeMeta(source: ResolvedInjectionModule[], target: ResolvedInjectionModule[]): ResolvedInjectionModule[];
@@ -1,190 +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
- capture: z.ZodOptional<z.ZodBoolean>;
54
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
55
- }, z.core.$strip>;
56
- export declare const InjectionModuleSchema: z.ZodObject<{
57
- name: z.ZodOptional<z.ZodString>;
58
- injectAt: z.ZodString;
59
- component: z.ZodString;
60
- framework: z.ZodOptional<z.ZodEnum<{
61
- auto: "auto";
62
- Vue: "Vue";
63
- React: "React";
64
- }>>;
65
- enabled: z.ZodOptional<z.ZodBoolean>;
66
- match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
67
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
- }, z.core.$strip>]>>;
70
- alive: z.ZodOptional<z.ZodBoolean>;
71
- scope: z.ZodOptional<z.ZodEnum<{
72
- local: "local";
73
- global: "global";
74
- }>>;
75
- timeout: z.ZodOptional<z.ZodNumber>;
76
- hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
77
- on: z.ZodOptional<z.ZodObject<{
78
- listenAt: z.ZodString;
79
- type: z.ZodString;
80
- callback: z.ZodCustom<EventListener, EventListener>;
81
- capture: z.ZodOptional<z.ZodBoolean>;
82
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
83
- }, z.core.$strip>>;
84
- }, z.core.$strip>;
85
- export declare const InjectionListenerSchema: z.ZodObject<{
86
- listenAt: z.ZodString;
87
- type: z.ZodString;
88
- callback: z.ZodCustom<EventListener, EventListener>;
89
- capture: z.ZodOptional<z.ZodBoolean>;
90
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
91
- name: z.ZodOptional<z.ZodString>;
92
- enabled: z.ZodOptional<z.ZodBoolean>;
93
- match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
94
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
- }, z.core.$strip>]>>;
97
- }, z.core.$strip>;
98
- export declare const InjectionManifestSchema: z.ZodObject<{
99
- injectionDefaults: z.ZodOptional<z.ZodObject<{
100
- alive: z.ZodOptional<z.ZodBoolean>;
101
- scope: z.ZodOptional<z.ZodEnum<{
102
- local: "local";
103
- global: "global";
104
- }>>;
105
- timeout: z.ZodOptional<z.ZodNumber>;
106
- hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
107
- }, z.core.$strip>>;
108
- injections: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
109
- name: z.ZodOptional<z.ZodString>;
110
- injectAt: z.ZodString;
111
- component: z.ZodString;
112
- framework: z.ZodOptional<z.ZodEnum<{
113
- auto: "auto";
114
- Vue: "Vue";
115
- React: "React";
116
- }>>;
117
- enabled: z.ZodOptional<z.ZodBoolean>;
118
- match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
119
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
120
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
- }, z.core.$strip>]>>;
122
- alive: z.ZodOptional<z.ZodBoolean>;
123
- scope: z.ZodOptional<z.ZodEnum<{
124
- local: "local";
125
- global: "global";
126
- }>>;
127
- timeout: z.ZodOptional<z.ZodNumber>;
128
- hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
129
- on: z.ZodOptional<z.ZodObject<{
130
- listenAt: z.ZodString;
131
- type: z.ZodString;
132
- callback: z.ZodCustom<EventListener, EventListener>;
133
- capture: z.ZodOptional<z.ZodBoolean>;
134
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
135
- }, z.core.$strip>>;
136
- }, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
137
- alive: z.ZodOptional<z.ZodBoolean>;
138
- scope: z.ZodOptional<z.ZodEnum<{
139
- local: "local";
140
- global: "global";
141
- }>>;
142
- timeout: z.ZodOptional<z.ZodNumber>;
143
- hooks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodCustom<ObserveHook, ObserveHook>, z.ZodArray<z.ZodCustom<ObserveHook, ObserveHook>>]>>>;
144
- on: z.ZodOptional<z.ZodObject<{
145
- listenAt: z.ZodString;
146
- type: z.ZodString;
147
- callback: z.ZodCustom<EventListener, EventListener>;
148
- capture: z.ZodOptional<z.ZodBoolean>;
149
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
150
- }, z.core.$strip>>;
151
- injectAt: z.ZodString;
152
- component: z.ZodString;
153
- framework: z.ZodOptional<z.ZodEnum<{
154
- auto: "auto";
155
- Vue: "Vue";
156
- React: "React";
157
- }>>;
158
- enabled: z.ZodOptional<z.ZodBoolean>;
159
- match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
160
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
- }, z.core.$strip>]>>;
163
- }, z.core.$strip>>]>>;
164
- listeners: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
165
- listenAt: z.ZodString;
166
- type: z.ZodString;
167
- callback: z.ZodCustom<EventListener, EventListener>;
168
- capture: z.ZodOptional<z.ZodBoolean>;
169
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
170
- name: z.ZodOptional<z.ZodString>;
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
- }, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
177
- enabled: z.ZodOptional<z.ZodBoolean>;
178
- match: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
179
- include: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
- exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
181
- }, z.core.$strip>]>>;
182
- listenAt: z.ZodString;
183
- type: z.ZodString;
184
- callback: z.ZodCustom<EventListener, EventListener>;
185
- capture: z.ZodOptional<z.ZodBoolean>;
186
- activitySignal: z.ZodOptional<z.ZodCustom<() => ActivitySignalSource<boolean>, () => ActivitySignalSource<boolean>>>;
187
- }, z.core.$strip>>]>>;
188
- }, z.core.$strict>;
189
- export declare function validateManifest(data: unknown, file: string): z.infer<typeof InjectionManifestSchema>;
190
- 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,3 +0,0 @@
1
- import { Plugin } from 'vite';
2
- import { MakooOptions } from './types';
3
- export declare function makoo(options: MakooOptions): Plugin[];
@@ -1,3 +0,0 @@
1
- import { ResolvedConfig } from '../config/types';
2
- import { MakooMonkeyPlugin } from './types';
3
- export declare function makooMonkey(config: ResolvedConfig): MakooMonkeyPlugin;