@supacloud/compiler 0.8.0 → 0.9.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.md +63 -1
- package/dist/cli.js +606 -44
- package/dist/feature.d.ts +8 -0
- package/dist/fixes.d.ts +13 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +573 -83
- package/dist/inspect.d.ts +17 -1
- package/dist/traits.d.ts +1 -1
- package/dist/types.d.ts +68 -0
- package/package.json +2 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Diagnostic, FeatureSpecNode, ModuleNode } from "./types";
|
|
2
|
+
/** Validate the declaration itself and its bindings within the owning module. */
|
|
3
|
+
export declare function validateFeatureSpec(spec: FeatureSpecNode, module?: ModuleNode): Diagnostic[];
|
|
4
|
+
/**
|
|
5
|
+
* Generate an editable feature slice scaffold, never a fake business implementation.
|
|
6
|
+
* execute() fails closed until the application's persistence logic is supplied.
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateFeatureSource(spec: FeatureSpecNode): string;
|
package/dist/fixes.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DiagnosticFix } from "./types";
|
|
2
|
+
export interface ApplyDiagnosticFixOptions {
|
|
3
|
+
rootDir?: string;
|
|
4
|
+
/** Preview by default; set false to write. */
|
|
5
|
+
dryRun?: boolean;
|
|
6
|
+
permission?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AppliedDiagnosticFix {
|
|
9
|
+
file: string;
|
|
10
|
+
changed: boolean;
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function applyDiagnosticFix(fix: DiagnosticFix, options?: ApplyDiagnosticFixOptions): Promise<AppliedDiagnosticFix>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { analyzeProject } from "./analyze";
|
|
2
|
+
export { generateFeatureSource, validateFeatureSpec } from "./feature";
|
|
3
|
+
export { applyDiagnosticFix } from "./fixes";
|
|
4
|
+
export type { AppliedDiagnosticFix, ApplyDiagnosticFixOptions } from "./fixes";
|
|
2
5
|
export { checkProject, compileProject } from "./compile";
|
|
3
6
|
export { watchProject } from "./watch";
|
|
4
|
-
export { doctorProject, explainGraph, formatGraph, exportGraphDot, exportGraphMermaid } from "./inspect";
|
|
7
|
+
export { createContextPack, doctorProject, explainGraph, formatGraph, exportGraphDot, exportGraphMermaid, } from "./inspect";
|
|
5
8
|
export { createIncrementalCompiler } from "./incremental";
|
|
6
9
|
export { createDependencyGraphCache } from "./incremental";
|
|
7
10
|
export { ModuleDependencyGraph } from "./incremental";
|
|
@@ -12,7 +15,7 @@ export { TraitCompiler } from "./traits";
|
|
|
12
15
|
export type { TraitCompilation, TraitHandler, TraitKind, TraitRecord } from "./traits";
|
|
13
16
|
export { generateApplication, renderApplication } from "./generate";
|
|
14
17
|
export type { GenerateOptions, RenderedArtifacts } from "./generate";
|
|
15
|
-
export type { DoctorResult } from "./inspect";
|
|
18
|
+
export type { ContextPack, DoctorResult } from "./inspect";
|
|
16
19
|
export { validateGraph, COMPILER_DIAGNOSTIC_CODES } from "./validate";
|
|
17
20
|
export { scanGeneratedArtifacts, scanProductionSource } from "./type-safety";
|
|
18
21
|
export type { TypeSafetyScanOptions } from "./type-safety";
|
|
@@ -20,4 +23,4 @@ export { DEFAULT_SUPACLOUD_CONFIG, compileOptionsFromConfig, defineSupacloudConf
|
|
|
20
23
|
export type { SupaCloudConfig } from "./config";
|
|
21
24
|
export { camelName } from "./util";
|
|
22
25
|
export { ANGULAR_ENTERPRISE_RULES, CLEAN_ARCHITECTURE_RULES, MODULAR_MONOLITH_RULES, MODULE_BOUNDARY_PROFILES, getModuleBoundaryPreset, getModuleBoundaryProfile, resolveModuleBoundaries, } from "./profiles";
|
|
23
|
-
export type { ApplicationGraph, AspectRefNode, CachedModuleEntry, CheckProjectResult, CommandExecutionCapabilities, CommandNode, CompileOptions, CompileResult, CompileStats, ControllerNode, DependencyGraphCache, DependencyGraphIndex, Diagnostic, ModuleBoundaryPresetName, ModuleBoundaryProfile, ModuleBoundaryRule, ModuleNode, JobNode, ProviderKind, ProviderNode, QueryNode, RouteNode, Scope, TokenKind, TypeSafetyOptions, ValidateOptions, WatchEvent, WatchHandle, WatchOptions, } from "./types";
|
|
26
|
+
export type { ApplicationGraph, AspectRefNode, CachedModuleEntry, CheckProjectResult, CommandExecutionCapabilities, CommandNode, CompileOptions, CompileResult, CompileStats, ControllerNode, DependencyGraphCache, DependencyGraphIndex, Diagnostic, DiagnosticFix, ModuleBoundaryPresetName, ModuleBoundaryProfile, ModuleBoundaryRule, ModuleNode, JobNode, ProviderKind, ProviderNode, QueryNode, RouteNode, Scope, TokenKind, TypeSafetyOptions, ValidateOptions, WatchEvent, WatchHandle, WatchOptions, FeatureSpecNode, FeatureTransitionNode, } from "./types";
|