Repository navigation
feat(app)!: scaffold data apps from published SDK examples - #187
Conversation
Use the pinned @altertable/data-app-examples 0.78.0 package as the canonical starter at build time instead of maintaining its source, guides, and tools in the CLI repository. Keep only the frozen registry resolution locally. Generate the development fixture from the same payload shipped in releases. Prepare app identity with public manifest tooling and extract directory/file scope statically before granting lakehouse access. Keep compiler and template packages outside the runtime bundle so scaffolding remains offline. Execute operation checks through the public SDK client and preserve app source during package upgrades. Verify template fidelity, frozen installs, published-package upgrades, registered-query boundaries, browser states, npm consumption, and native CLI previews. BREAKING CHANGE: Local app dev and lint require a shared literal app.ts instead of app.json. Existing projects must adapt their own declaration, operations, and local server to SDK 0.78; package upgrade preserves source and does not perform that source migration.
|
Reviewed e0835e5. The local full non-Docker gate passes: static checks, 880 CLI unit tests, 157 black-box tests, six desktop/phone browser tests and extracted npm-consumer smoke. I also compiled the Linux x64 binary and passed its native scaffold/install/lint/build/directory-preview/file-preview smoke outside the checkout. The phone dark-theme screenshot looks contained and usable. Approval is pending the red required gate: Repository and integration passes those app/package checks, then |
Avoid importing the SDK manifest compiler and reading starter templates for every source CLI invocation. Load and memoize the payload on demand, and pass it explicitly to the pure version and peer helpers. This removes the startup overhead that caused the five-second lakehouse integration test to time out in CI. Keep the original test deadline and the embedded npm/native payload contract.
albert20260301
left a comment
There was a problem hiding this comment.
Reviewed the 13-file delta through 4550f41: scaffold tools now load only during app execution, with a cached source payload and an equivalent embedded loader in packaged builds. Local type/lint/format checks, all 72 app tests, extracted npm-consumer smoke and a fresh Linux x64 native end-to-end app smoke pass.
Required CI is now green, including the previously timed-out mock integration flow, minimum-Bun compatibility and all four native compile jobs. This resolves the verification blocker in my earlier comment. The earlier full local gate and desktop/phone browser checks cover the unchanged starter integration. Existing app.json projects still require the documented source migration; upgrade preserves their source and identity.
|
|
||
| function appLiteral(value: string): string { | ||
| return ( | ||
| "'" + |
There was a problem hiding this comment.
Codex found that
could we match the starter’s formatter here? For an org like
O'Brien, it prefers double quotes, so the generatedapp.tsfails its firstapp lint.
Choose double quotes when they require fewer escapes, preserving the starter formatter preference for single quotes on ties. This keeps names such as O'Brien valid and formatted on the first app lint. Exercise generated projects with apostrophes, mixed quotation marks, and backslashes through the real formatter, and run the frozen-install/lint workflow with an apostrophe-named organization.
🤖 I have created a release *beep* *boop* --- ## [1.16.0](v1.15.1...v1.16.0) (2026-11-23) ### ⚠ BREAKING CHANGES * **app:** Local app dev and lint require a shared literal app.ts instead of app.json. Existing projects must adapt their own declaration, operations, and local server to SDK 0.78; package upgrade preserves source and does not perform that migration. ### Features * **app:** adopt data-app SDK 0.79.0 ([#191](#191)) ([5455194](5455194)) * **app:** scaffold data apps from published SDK examples ([#187](#187)) ([97fa08b](97fa08b)) ### Bug Fixes * **cli:** preserve query results and tolerate invalid profile expiries ([#192](#192)) ([ad550d5](ad550d5)) * **cli:** restore query output and simplify request handling ([#189](#189)) ([2895b25](2895b25)) * **config:** store Windows secrets in Credential Manager ([#182](#182)) ([8403a07](8403a07)) ### Miscellaneous Chores * release 1.16.0 ([#188](#188)) ([1de319d](1de319d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: altertable-release[bot] <345426372+altertable-release[bot]@users.noreply.github.com>
|
Released in CLI 1.16.0, now available on npm. The published bundle matches the verified release build containing these app setup/upgrade changes and subsequent #189/#191 fixes. Its extracted consumer scaffold/install/lint/build/preview smoke passes. Dependency upgrades preserve app source; breaking SDK source migrations still require app-author changes. |
What
Scaffold apps from the pinned
@altertable/data-app-examples@0.78.0package and remove the locally maintained starter. The CLI keeps its frozen lockfile, prepares app identity, and embeds the canonical example in npm/native builds soapp createremains offline. Setup generates the development fixture from that same payload. Template tools load on demand during app execution to keep unrelated source CLI commands fast.Align file preview, static scope verification, and operation checks with SDK 0.78.0. Source, guides, and component behavior belong to the SDK; the CLI owns distribution and consumer integration tests.
Why
The existing SDK 0.74.0 scaffold uses different declaration, server, and operation contracts. Consuming the published examples package supplies the current starter without maintaining another copy.
Compatibility
Breaking: directory dev and lint now require a shared literal
app.tsdeclaration. Existingapp.jsonprojects need a source migration retaining their identity, queries, and UI.app upgradepreserves source and updates dependencies and the lockfile only.The example uses fictional inline SQL and creates no lakehouse objects. Integration tests mock the external lakehouse HTTP boundary; published SDK packages, the Bun server, and operation clients are real.
Checklist
CHANGELOG.mdupdated