@supacloud/compiler 0.40.1 → 0.42.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 +8 -0
- package/dist/analyze.d.ts +2 -2
- package/dist/cli.js +534 -15
- package/dist/config.d.ts +4 -1
- package/dist/effect-governance.d.ts +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +535 -15
- package/dist/migration-app-version.d.ts +1 -1
- package/dist/migration-elysia-version.d.ts +1 -1
- package/dist/types.d.ts +38 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,13 @@ response unions, caller decoders, binary/stream routes and GraphQL stay intact.
|
|
|
8
8
|
These errors do not prove write rollback and do not add automatic retries.
|
|
9
9
|
See [typed clients and recovery](../../docs/framework-composition.md).
|
|
10
10
|
|
|
11
|
+
For Elysia routes, the compiler governs Effect contracts by default:
|
|
12
|
+
`effect.dependencies` documents the runtime environment, `effect.errors`
|
|
13
|
+
documents safe HTTP mappings, and `effect.retry` requires explicit bounded
|
|
14
|
+
attempts. The default policy requires `requireRouteEffects`,
|
|
15
|
+
`requireErrorMappings` and `requireDependencies`. See
|
|
16
|
+
[Effect governance](../../docs/effect-governance.md).
|
|
17
|
+
|
|
11
18
|
## Unified Database Contracts
|
|
12
19
|
|
|
13
20
|
`supacloud-compiler database-contracts database-contracts.json` generates a shared
|
|
@@ -320,6 +327,7 @@ bunx supacloud-compiler dev
|
|
|
320
327
|
| OpenAPI 3.1 module | 开启 |
|
|
321
328
|
| permissions manifest | 开启 |
|
|
322
329
|
| module boundary preset | `modular-monolith` |
|
|
330
|
+
| Effect route governance | 三项严格检查均开启 |
|
|
323
331
|
| provider tree-shaking | 开启 |
|
|
324
332
|
|
|
325
333
|
需要覆盖默认值时,在项目根目录添加 `supacloud.config.ts`:
|
package/dist/analyze.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ApplicationGraph, DependencyGraphCache } from "./types";
|
|
1
|
+
import type { ApplicationGraph, DependencyGraphCache, EffectCompilerOptions } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Analyzes source code under rootDir via the native TypeScript Program API.
|
|
4
4
|
* Decorators are matched by name only (Module/Injectable/Inject/Command/Query/Controller/Get/...),
|
|
5
5
|
* without checking import origins, so this package does not need to depend on @supacloud/app.
|
|
6
6
|
*/
|
|
7
|
-
export declare function analyzeProject(rootDir: string, include?: string[], cache?: DependencyGraphCache, changedPaths?: string[]): Promise<ApplicationGraph>;
|
|
7
|
+
export declare function analyzeProject(rootDir: string, include?: string[], cache?: DependencyGraphCache, changedPaths?: string[], effectOptions?: EffectCompilerOptions): Promise<ApplicationGraph>;
|