@lark-base-open/base-database-toolchain 1.2.0 → 1.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.1] - 2026-11-25
4
+
5
+ ### Fixed
6
+
7
+ - Accept SDK 0.9.x server and shared entries in the audited shared dependency range, while retaining SDK 0.8.x support.
8
+
9
+ ## [1.3.0] - 2026-11-25
10
+
11
+ ### Added
12
+
13
+ - Support server-only builds and project dependency and lockfile checks through the JSON subprocess interface.
14
+ - Expose shared project layout, source archive input rules and caller-supplied dependency validation as package exports.
15
+ - Validate Function schemas, SQL and Mutation parameters, and descriptions during subprocess contract generation.
16
+ - Report optional build-stage timings on stderr while preserving JSON results on stdout.
17
+
18
+ ### Changed
19
+
20
+ - Share eligible SDK and Zod dependencies across server Functions to reduce duplicated build output.
21
+ - Reuse static validation within each server build and invalidate cached results when source dependencies change.
22
+
23
+ ### Fixed
24
+
25
+ - Use forward slashes in Page inspection source locations on Windows.
26
+ - Emit pending source-change events before replying to a development snapshot request.
27
+ - Generate Durable declarations compatible with both ESM and CommonJS SDK imports.
28
+ - Reload generated Durable modules after a rebuild so local execution uses the updated code.
29
+
3
30
  ## [1.2.0] - 2026-11-24
4
31
 
5
32
  ### Added
package/README.md CHANGED
@@ -44,7 +44,7 @@ Run `base-database-toolchain` with one JSON object on stdin. It exits after one
44
44
  }
45
45
  ```
46
46
 
47
- Supported operations: `contracts`, `verify-contracts`, `build`, `durable-dev`. `inputMode`, `runtimeOnly`, `legacyBuild` and `durableDev` select project compatibility options. Page builds remain the caller's responsibility.
47
+ Supported operations: `contracts`, `verify-contracts`, `build`, `build-server`, `durable-dev`, `validate-locks`, `validate-dependencies` and `inspect-page`. `validate-dependencies` requires the caller-provided `dependencyPolicy`; `build-server` skips Page builds. `inputMode`, `runtimeOnly`, `legacyBuild` and `durableDev` select project compatibility options. Page builds remain the caller's responsibility.
48
48
 
49
49
  For SQL batch clients, supply an authenticated, consistently discovered `batchSnapshot` with the siteToken, environment, versionId, skillHash and per-Function detail. The toolchain binds it to the actual project token, `runtimeProfile` (default online), and current local SQL source hashes. Verification reuses that bound observation; edited declarations lose the cached capability until a new discovery. An execution view is provenance, not a future lock. An older SDK can still generate single-call clients and returns a `BATCH_SDK_UNSUPPORTED` warning; no batch types are synthesized.
50
50
 
@@ -81,3 +81,9 @@ The backend snapshot excludes generated contract projections and observes source
81
81
  The response echoes `requestId` with the current `fingerprint`. A matching snapshot alone does not authorize publication; the caller must also check its own reviewed publication inputs. Stop with `{"protocolVersion":1,"command":"stop"}`, stdin EOF or SIGINT/SIGTERM. The worker closes its Vite server before exiting. Each input line is limited to 64 KiB.
82
82
 
83
83
  Node hosts can import `startVite`, `watchSnapshot`, `changedFiles`, `snapshotFingerprint` and `runViteIPCWorker` from `@lark-base-open/base-database-toolchain/development`. The IPC worker uses Node child-process messages; `base-database-dev` retains the newline-delimited JSON interface. Both use the same server and snapshot implementation. Hosts remain responsible for authentication, deployment and process supervision.
84
+
85
+ ## Build diagnostics
86
+
87
+ Set `SCB_BUILD_STAGE_TIMING=1` to report server typecheck, bundling, manifest and verification durations. The JSON compiler subprocess keeps its result on stdout and sends timing records to stderr. Timing is disabled by default and does not change artifact contents.
88
+
89
+ Successful static source checks are reused only within the current server build. Fresh file hashes invalidate edited dependencies. Set `SCB_STATIC_VALIDATION_CACHE=0` to disable this reuse when diagnosing a build.
@@ -10,7 +10,19 @@ try {
10
10
  chunks.push(chunk);
11
11
  }
12
12
  const request = JSON.parse(Buffer.concat(chunks).toString('utf8'));
13
- process.stdout.write(JSON.stringify(await runCompiler(request)) + '\n');
13
+ // Builder timing diagnostics share the CLI process. Keep the subprocess
14
+ // protocol on stdout and route progress to stderr while compiling.
15
+ const write = process.stdout.write;
16
+ let result;
17
+ try {
18
+ process.stdout.write = process.stderr.write.bind(process.stderr);
19
+ result = await runCompiler(request);
20
+ } finally {
21
+ process.stdout.write = write;
22
+ }
23
+ process.stdout.write(
24
+ JSON.stringify(result ?? { ok: true, operation: request.operation }) + '\n',
25
+ );
14
26
  } catch (error) {
15
27
  process.stderr.write(
16
28
  JSON.stringify({
@@ -25,6 +25,10 @@ export declare function functionInventory(directory: any, requiredFiles?: any[])
25
25
  export declare function ids(root: any, server: any): string[];
26
26
  export declare function durableIds(root: any, server: any): string[];
27
27
  export declare function run(command: any, args: any, cwd: any): void;
28
+ export declare function isSupportedSharedVersion(packageName: any, version: any): boolean;
29
+ export declare function verifySharedModules(manifest: any): void;
30
+ export declare function startBuildStage(lane: any, stage: any): (success: any, details?: {}) => void;
31
+ export declare function measureBuildStage(lane: any, stage: any, operation: any): any;
28
32
  export declare function buildProject(root: any, options?: {}): Promise<{
29
33
  ok: boolean;
30
34
  functions: number;