@supacloud/compiler 0.28.0 → 0.30.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/LICENSE +202 -661
- package/NOTICE +8 -13
- package/README.md +1 -1
- package/dist/api-source.d.ts +11 -0
- package/dist/cli.js +1122 -667
- package/dist/diagnostics.d.ts +61 -0
- package/dist/diagnostics.js +333 -0
- package/dist/fixes.d.ts +3 -0
- package/dist/http-provider-migration.d.ts +6 -0
- package/dist/index.js +1040 -659
- package/dist/inspect.d.ts +6 -0
- package/dist/reactive-analysis.d.ts +4 -0
- package/dist/types.d.ts +8 -0
- package/package.json +9 -4
package/dist/inspect.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ export interface ContextPack {
|
|
|
17
17
|
executionPlans: ExecutionPlan[];
|
|
18
18
|
routeContracts: ReturnType<typeof inspectRouteContracts>;
|
|
19
19
|
diagnostics: Diagnostic[];
|
|
20
|
+
conventions: {
|
|
21
|
+
singleResult: "async-await";
|
|
22
|
+
eventComposition: "rxjs";
|
|
23
|
+
angularHost: "@supacloud/app/angular";
|
|
24
|
+
cancellation: "explicit-owner-signal";
|
|
25
|
+
};
|
|
20
26
|
relatedModules: {
|
|
21
27
|
importedBy: string[];
|
|
22
28
|
imports: string[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as ts from "@typescript/typescript6";
|
|
2
|
+
import type { Diagnostic } from "./types";
|
|
3
|
+
/** Checks statically identifiable callbacks, not arbitrary side effects or a whole-program call graph. */
|
|
4
|
+
export declare function scanReactiveSource(input: ts.SourceFile, file: string): Diagnostic[];
|
package/dist/types.d.ts
CHANGED
|
@@ -72,6 +72,10 @@ export interface Diagnostic {
|
|
|
72
72
|
message: string;
|
|
73
73
|
file?: string;
|
|
74
74
|
line?: number;
|
|
75
|
+
/** Zero-based source columns and optional end position for editor consumers. */
|
|
76
|
+
column?: number;
|
|
77
|
+
endLine?: number;
|
|
78
|
+
endColumn?: number;
|
|
75
79
|
/** Actionable Angular Ivy-style remediation hint. */
|
|
76
80
|
suggestion?: string;
|
|
77
81
|
/** Standardized compiler diagnostic code (e.g. SC1001) modeled after Angular ngtsc error codes. */
|
|
@@ -164,6 +168,8 @@ export interface ProviderNode {
|
|
|
164
168
|
providedIn?: "root";
|
|
165
169
|
/** Class implements OnDestroy interface or onDestroy method. */
|
|
166
170
|
hasOnDestroy?: boolean;
|
|
171
|
+
/** Class exposes an application startup hook. */
|
|
172
|
+
hasOnInit?: boolean;
|
|
167
173
|
exported: boolean;
|
|
168
174
|
file: string;
|
|
169
175
|
line: number;
|
|
@@ -245,6 +251,8 @@ export interface ControllerNode {
|
|
|
245
251
|
deps: string[];
|
|
246
252
|
/** Class implements OnDestroy interface or onDestroy method. */
|
|
247
253
|
hasOnDestroy?: boolean;
|
|
254
|
+
/** Class exposes an application startup hook. */
|
|
255
|
+
hasOnInit?: boolean;
|
|
248
256
|
/** Parameter tokens marked @Optional(). */
|
|
249
257
|
optionalDeps?: string[];
|
|
250
258
|
selfDeps?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Static compiler for @supacloud/app metadata: builds the application graph from AST, validates it, and generates reflection-free factory code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"import": "./dist/index.js",
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./diagnostics": {
|
|
19
|
+
"types": "./dist/diagnostics.d.ts",
|
|
20
|
+
"import": "./dist/diagnostics.js",
|
|
21
|
+
"default": "./dist/diagnostics.js"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
"files": [
|
|
@@ -25,7 +30,7 @@
|
|
|
25
30
|
],
|
|
26
31
|
"scripts": {
|
|
27
32
|
"build": "bun run clean && bun run build:js && bun run build:types",
|
|
28
|
-
"build:js": "bun build src/index.ts src/cli.ts src/delivery-bundle-worker.ts --outdir dist --target node --conditions=supacloud-source --external @typescript/typescript6 --external graphql --external '@graphql-codegen/*'",
|
|
33
|
+
"build:js": "bun build src/index.ts src/diagnostics.ts src/cli.ts src/delivery-bundle-worker.ts --outdir dist --target node --conditions=supacloud-source --external @typescript/typescript6 --external graphql --external '@graphql-codegen/*'",
|
|
29
34
|
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
|
30
35
|
"clean": "rm -rf dist",
|
|
31
36
|
"prepublishOnly": "bun run build && bun run test:package",
|
|
@@ -42,14 +47,14 @@
|
|
|
42
47
|
"codegen",
|
|
43
48
|
"elysia"
|
|
44
49
|
],
|
|
45
|
-
"license": "
|
|
50
|
+
"license": "Apache-2.0",
|
|
46
51
|
"repository": {
|
|
47
52
|
"type": "git",
|
|
48
53
|
"url": "https://github.com/vibeunion/supacloud.git",
|
|
49
54
|
"directory": "packages/compiler"
|
|
50
55
|
},
|
|
51
56
|
"dependencies": {
|
|
52
|
-
"@supacloud/delivery": "0.
|
|
57
|
+
"@supacloud/delivery": "0.4.0",
|
|
53
58
|
"typebox": "1.3.34",
|
|
54
59
|
"@graphql-codegen/core": "^6.2.0",
|
|
55
60
|
"@graphql-codegen/typed-document-node": "^7.1.0",
|