Conversation
|
Claude finished @ryanbonial's task in 1m 32s —— View job ReviewBug: In
The test covering this case ( Fix — explicitly spread all variables so missing optional keys are still present (with // createAppCliConfig.ts
export function createAppCliConfig(options: GenerateCliConfigOptions): string {
return processTemplate({
template: defaultAppTemplate,
variables: {
dataset: options.dataset,
entry: options.entry,
organizationId: options.organizationId,
projectId: options.projectId,
},
})
}Missing negative test coverage in The schema tests only verify valid inputs. There are no tests confirming invalid resource shapes are rejected (e.g., an empty object test('rejects unknown resource shapes', () => {
expect(() =>
cliConfigSchema.parse({
app: { resources: { bad: {} } },
}),
).toThrow()
}) |
📦 Bundle Stats —
|
| Metric | Value | vs main (7b98e0b) |
|---|---|---|
| Internal (raw) | 2.1 KB | - |
| Internal (gzip) | 799 B | - |
| Bundled (raw) | 10.96 MB | +8.9 KB, +0.1% |
| Bundled (gzip) | 2.06 MB | +1.3 KB, +0.1% |
| Import time | 827ms | -14ms, -1.7% |
bin:sanity
| Metric | Value | vs main (7b98e0b) |
|---|---|---|
| Internal (raw) | 975 B | - |
| Internal (gzip) | 460 B | - |
| Bundled (raw) | 9.84 MB | - |
| Bundled (gzip) | 1.77 MB | - |
| Import time | 2.00s | -1ms, -0.0% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (7b98e0be)
| Metric | Value | vs main (7b98e0b) |
|---|---|---|
| Internal (raw) | 92.7 KB | +346 B, +0.4% |
| Internal (gzip) | 21.7 KB | +54 B, +0.2% |
| Bundled (raw) | 21.53 MB | +334 B, +0.0% |
| Bundled (gzip) | 3.41 MB | +63 B, +0.0% |
| Import time | 795ms | +4ms, +0.4% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (7b98e0be)
| Metric | Value | vs main (7b98e0b) |
|---|---|---|
| Internal (raw) | 976 B | - |
| Internal (gzip) | 507 B | - |
| Bundled (raw) | 50.7 KB | - |
| Bundled (gzip) | 12.6 KB | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
Coverage Delta
Comparing 3 changed files against main @ Overall Coverage
|
Description
This PR adds CLI config support for named app resources and updates app scaffolding to generate those resources by default.
It introduces
app.resourcesto the CLI config types and schema, exports the related resource types from@sanity/cli-core, and updatescreateAppCliConfig()/bootstrapLocalTemplate()so newly scaffolded apps emit aresources.defaultentry with the selectedprojectIdanddataset. This creates a shared config foundation for the later SDK v3 runtime work.What to review
app.resourcestype surface in@sanity/cli-coresanity.cli.tsfiles now include:app.resources.default.projectIdapp.resources.default.dataset@sanity/cli-coreare the right public API for follow-up workTesting
app.resourcesvariantsprojectId/datasetvalues to flow through the template processorpnpm test packages/@sanity/cli-core/src/config/cli/__tests__/schemas.test.ts packages/@sanity/cli/src/actions/init/__tests__/createAppCliConfig.test.ts