@assistant-ui/x-generative-compiler 0.0.17 → 0.0.18
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/dist/compile.d.ts +7 -8
- package/dist/compile.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/package.js +1 -1
- package/package.json +9 -8
package/dist/compile.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Target } from "./constants.js";
|
|
2
2
|
//#region src/compile.d.ts
|
|
3
|
-
type ToolType = "frontend" | "backend" | "human" | "provider";
|
|
4
|
-
interface CompileOptions {
|
|
3
|
+
export type ToolType = "frontend" | "backend" | "human" | "provider";
|
|
4
|
+
export interface CompileOptions {
|
|
5
5
|
/** Which build target to emit. */
|
|
6
6
|
target: Target;
|
|
7
7
|
/** Source filename, used for error messages and source maps. */
|
|
@@ -27,22 +27,21 @@ interface CompileOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
backendless?: boolean;
|
|
29
29
|
}
|
|
30
|
-
interface CompileResult {
|
|
30
|
+
export interface CompileResult {
|
|
31
31
|
code: string;
|
|
32
32
|
map?: object | null;
|
|
33
33
|
}
|
|
34
34
|
/** Thrown when a `"use generative"` file violates an authoring constraint. */
|
|
35
|
-
declare class GenerativeCompileError extends Error {
|
|
35
|
+
export declare class GenerativeCompileError extends Error {
|
|
36
36
|
constructor(message: string, filename?: string);
|
|
37
37
|
}
|
|
38
38
|
/** Whether a source string opts into generative compilation via the directive. */
|
|
39
|
-
declare function isGenerativeModule(code: string): boolean;
|
|
40
|
-
declare const isGenerativeSource: (filename: string, source: string) => boolean;
|
|
39
|
+
export declare function isGenerativeModule(code: string): boolean;
|
|
40
|
+
export declare const isGenerativeSource: (filename: string, source: string) => boolean;
|
|
41
41
|
/**
|
|
42
42
|
* Rewrites a `"use generative"` module for a single build target, keeping only the
|
|
43
43
|
* regions that target needs and pruning the imports the dropped regions used.
|
|
44
44
|
*/
|
|
45
|
-
declare function compileGenerative(code: string, options: CompileOptions): CompileResult;
|
|
45
|
+
export declare function compileGenerative(code: string, options: CompileOptions): CompileResult;
|
|
46
46
|
//#endregion
|
|
47
|
-
export { CompileOptions, CompileResult, GenerativeCompileError, ToolType, compileGenerative, isGenerativeModule, isGenerativeSource };
|
|
48
47
|
//# sourceMappingURL=compile.d.ts.map
|
package/dist/compile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","names":[],"sources":["../src/compile.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"compile.d.ts","names":[],"sources":["../src/compile.ts"],"mappings":";;YA2BY;iBA2CK;;EAEf,QAAQ;;EAER;;EAEA;;;;;;;;;EASA;;;;;;;;;EASA;;iBAGe;EACf;EACA;;;qBAIW,+BAA+B;EAC9B,YAAA,iBAAiB;;;wBASf,mBAAmB;qBAgCtB,qBAAsB,kBAAkB;;;;;wBAkHrC,kBACd,cACA,SAAS,iBACR"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
//#region src/constants.d.ts
|
|
2
2
|
/** The directive a module uses to opt into generative compilation. */
|
|
3
|
-
declare const DIRECTIVE = "use generative";
|
|
3
|
+
export declare const DIRECTIVE = "use generative";
|
|
4
4
|
/** Build target a generative module is compiled for. */
|
|
5
|
-
type Target = "client" | "server";
|
|
5
|
+
export type Target = "client" | "server";
|
|
6
6
|
//#endregion
|
|
7
|
-
export { DIRECTIVE, Target };
|
|
8
7
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":";;qBACa;;YAGD"}
|
package/dist/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/x-generative-compiler",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.18",
|
|
5
5
|
"description": "Internal: the framework-agnostic \"use generative\" compiler that splits a colocated tool (schema + server-only execute + client-only render) into per-target builds. Shared by @assistant-ui/next and @assistant-ui/vite.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"assistant-ui",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
],
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/generator": "^8.0.
|
|
33
|
-
"@babel/parser": "^8.0.
|
|
34
|
-
"@babel/traverse": "^8.0.
|
|
35
|
-
"@babel/types": "^8.0.
|
|
32
|
+
"@babel/generator": "^8.0.5",
|
|
33
|
+
"@babel/parser": "^8.0.5",
|
|
34
|
+
"@babel/traverse": "^8.0.5",
|
|
35
|
+
"@babel/types": "^8.0.5",
|
|
36
36
|
"semver": "^7.8.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
39
|
+
"@assistant-ui/x-buildutils": "0.0.28",
|
|
40
40
|
"@types/babel__generator": "^7.27.0",
|
|
41
41
|
"@types/babel__traverse": "^7.28.0",
|
|
42
|
-
"@types/node": "^26.
|
|
42
|
+
"@types/node": "^26.5.1",
|
|
43
43
|
"@types/semver": "^7.8.0",
|
|
44
|
-
"vitest": "^
|
|
44
|
+
"vitest": "^5.0.1"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "aui-build",
|
|
61
61
|
"test": "vitest run",
|
|
62
|
+
"typecheck": "tsc --noEmit",
|
|
62
63
|
"test:watch": "vitest"
|
|
63
64
|
}
|
|
64
65
|
}
|