thinkwell 0.4.5 → 0.5.0-alpha.2
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 +3 -5
- package/bin/thinkwell +130 -174
- package/dist/agent.d.ts +82 -56
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +178 -174
- package/dist/agent.js.map +1 -1
- package/dist/cli/build.d.ts +15 -43
- package/dist/cli/build.d.ts.map +1 -1
- package/dist/cli/build.js +199 -1231
- package/dist/cli/build.js.map +1 -1
- package/dist/cli/bundle.d.ts +61 -0
- package/dist/cli/bundle.d.ts.map +1 -0
- package/dist/cli/bundle.js +1299 -0
- package/dist/cli/bundle.js.map +1 -0
- package/dist/cli/check.d.ts +19 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +248 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/commands.d.ts +30 -0
- package/dist/cli/commands.d.ts.map +1 -0
- package/dist/cli/commands.js +64 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/compiler-host.d.ts +109 -0
- package/dist/cli/compiler-host.d.ts.map +1 -0
- package/dist/cli/compiler-host.js +173 -0
- package/dist/cli/compiler-host.js.map +1 -0
- package/dist/cli/fmt.d.ts +13 -0
- package/dist/cli/fmt.d.ts.map +1 -0
- package/dist/cli/fmt.js +14 -0
- package/dist/cli/fmt.js.map +1 -0
- package/dist/cli/init-command.js +12 -12
- package/dist/cli/init-command.js.map +1 -1
- package/dist/cli/loader.d.ts +0 -21
- package/dist/cli/loader.d.ts.map +1 -1
- package/dist/cli/loader.js +1 -50
- package/dist/cli/loader.js.map +1 -1
- package/dist/cli/schema.d.ts +2 -0
- package/dist/cli/schema.d.ts.map +1 -1
- package/dist/cli/schema.js +11 -4
- package/dist/cli/schema.js.map +1 -1
- package/dist/cli/workspace.d.ts +82 -0
- package/dist/cli/workspace.d.ts.map +1 -0
- package/dist/cli/workspace.js +248 -0
- package/dist/cli/workspace.js.map +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/think-builder.d.ts +50 -2
- package/dist/think-builder.d.ts.map +1 -1
- package/dist/think-builder.js +137 -14
- package/dist/think-builder.js.map +1 -1
- package/dist/thought-event.d.ts +80 -0
- package/dist/thought-event.d.ts.map +1 -0
- package/dist/thought-event.js +2 -0
- package/dist/thought-event.js.map +1 -0
- package/dist/thought-stream.d.ts +45 -0
- package/dist/thought-stream.d.ts.map +1 -0
- package/dist/thought-stream.js +99 -0
- package/dist/thought-stream.js.map +1 -0
- package/dist-pkg/acp.cjs +37 -11
- package/dist-pkg/thinkwell.cjs +49 -18
- package/package.json +4 -9
- package/dist/cli/index.d.ts +0 -11
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -11
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/main-pkg.d.ts +0 -18
- package/dist/cli/main-pkg.d.ts.map +0 -1
- package/dist/cli/main.d.ts +0 -14
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -256
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/types-command.d.ts +0 -8
- package/dist/cli/types-command.d.ts.map +0 -1
- package/dist/cli/types-command.js +0 -110
- package/dist/cli/types-command.js.map +0 -1
package/dist/cli/build.d.ts
CHANGED
|
@@ -1,61 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Build command for
|
|
2
|
+
* Build command for tsc-based compilation with @JSONSchema transformation.
|
|
3
3
|
*
|
|
4
|
-
* This module provides the `thinkwell build` command that compiles
|
|
5
|
-
*
|
|
4
|
+
* This module provides the `thinkwell build` command that compiles a TypeScript
|
|
5
|
+
* project using the standard TypeScript compiler API with a custom CompilerHost.
|
|
6
|
+
* The CompilerHost intercepts file reads and applies @JSONSchema namespace
|
|
7
|
+
* injection in memory, so user source files are never modified on disk.
|
|
6
8
|
*
|
|
7
|
-
*
|
|
8
|
-
* 1. **Pre-bundle with esbuild** - Bundle user script + thinkwell packages into CJS
|
|
9
|
-
* 2. **Compile with pkg** - Create self-contained binary with Node.js runtime
|
|
9
|
+
* Output (.js, .d.ts, source maps) is written to the project's configured outDir.
|
|
10
10
|
*/
|
|
11
|
-
export type Target = "darwin-arm64" | "darwin-x64" | "linux-x64" | "linux-arm64" | "host";
|
|
12
11
|
export interface BuildOptions {
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
output?: string;
|
|
17
|
-
/** Target platforms (default: ["host"]) */
|
|
18
|
-
targets?: Target[];
|
|
19
|
-
/** Additional files to embed as assets */
|
|
20
|
-
include?: string[];
|
|
21
|
-
/** Packages to exclude from bundling (kept as external imports) */
|
|
22
|
-
external?: string[];
|
|
23
|
-
/** Show detailed build output */
|
|
12
|
+
/** Path to tsconfig.json (default: ./tsconfig.json) */
|
|
13
|
+
project?: string;
|
|
14
|
+
/** Show detailed output */
|
|
24
15
|
verbose?: boolean;
|
|
25
|
-
/** Suppress all
|
|
16
|
+
/** Suppress all output except errors */
|
|
26
17
|
quiet?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
dryRun?: boolean;
|
|
29
|
-
/** Minify the bundled output for smaller binaries */
|
|
30
|
-
minify?: boolean;
|
|
31
|
-
/** Watch for changes and rebuild automatically */
|
|
18
|
+
/** Watch for file changes and recompile */
|
|
32
19
|
watch?: boolean;
|
|
33
20
|
}
|
|
34
21
|
/**
|
|
35
22
|
* Configuration that can be specified in package.json under "thinkwell.build".
|
|
36
23
|
*/
|
|
37
24
|
export interface PackageJsonBuildConfig {
|
|
38
|
-
/**
|
|
39
|
-
output?: string;
|
|
40
|
-
/** Default target platforms */
|
|
41
|
-
targets?: Target[];
|
|
42
|
-
/** Default assets to include */
|
|
25
|
+
/** Glob patterns for files that should receive @JSONSchema transformation */
|
|
43
26
|
include?: string[];
|
|
44
|
-
/**
|
|
45
|
-
|
|
46
|
-
/** Default minification setting */
|
|
47
|
-
minify?: boolean;
|
|
27
|
+
/** Glob patterns for files that should NOT receive @JSONSchema transformation */
|
|
28
|
+
exclude?: string[];
|
|
48
29
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Parse and validate build options from command-line arguments.
|
|
51
|
-
*/
|
|
52
|
-
export declare function parseBuildArgs(args: string[]): BuildOptions;
|
|
53
|
-
/**
|
|
54
|
-
* Main build function.
|
|
55
|
-
*/
|
|
56
30
|
export declare function runBuild(options: BuildOptions): Promise<void>;
|
|
57
|
-
|
|
58
|
-
* Show help for the build command.
|
|
59
|
-
*/
|
|
31
|
+
export declare function parseBuildArgs(args: string[]): BuildOptions;
|
|
60
32
|
export declare function showBuildHelp(): void;
|
|
61
33
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/cli/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAcH,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAqGD,wBAAsB,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsFnE;AA8CD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,CAiC3D;AAMD,wBAAgB,aAAa,IAAI,IAAI,CA2CpC"}
|