Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/presentation-preset-runtime-profiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@croco/presentation-preset": patch
---

Presentation runtime claims are now backed by generated profile contracts and catalog validation.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ Runtime columns: Node는 장기 실행 서버/CLI, Lambda는 서버리스 함수
| `@croco/features-posthog` | Integration | `packages/features-posthog` | README, tests |
| `@croco/integrations-posthog` | Integration | `packages/integrations-posthog` | tests |
| `@croco/meta-vite` | Presentation | `packages/meta-vite` | README, tests |
| `@croco/presentation-preset` | Presentation | `packages/presentation-preset` | tests |
| `@croco/presentation-preset` | Presentation | `packages/presentation-preset` | README, tests |
| `@croco/openapi-spec` | Protocol | `packages/openapi-spec` | tests |
| `@croco/protocols-core` | Protocol | `packages/protocols-core` | tests |
| `@croco/protocols-graphql` | Protocol | `packages/protocols-graphql` | tests |
Expand Down
1 change: 0 additions & 1 deletion docs/package-docs-baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"migration-runner",
"notifications-core",
"openapi-spec",
"presentation-preset",
"preset-cloudflare",
"preset-lambda",
"preset-node",
Expand Down
3 changes: 1 addition & 2 deletions docs/package-docs-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| ------------------------------ | ----: |
| Public packages | 102 |
| Private packages skipped | 2 |
| Missing package README | 22 |
| Missing package README | 21 |
| Missing generated API docs | 75 |
| Missing package test directory | 0 |
| Extension matrix packages | 40 |
Expand All @@ -28,7 +28,6 @@ New public packages must not add missing README, API docs, or test coverage unle
- `@croco/migration-runner` (`packages/migration-runner`) — legacy baseline
- `@croco/notifications-core` (`packages/notifications-core`) — legacy baseline
- `@croco/openapi-spec` (`packages/openapi-spec`) — legacy baseline
- `@croco/presentation-preset` (`packages/presentation-preset`) — legacy baseline
- `@croco/preset-cloudflare` (`packages/preset-cloudflare`) — legacy baseline
- `@croco/preset-lambda` (`packages/preset-lambda`) — legacy baseline
- `@croco/preset-node` (`packages/preset-node`) — legacy baseline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,25 @@ Presentation packages move from alpha to beta only after all package-specific cr

No presentation package should be promoted in `docs/package-catalog.json` unless its gate evidence is named
in the relevant package README, package tests, generated-app smoke, and this page.

## Presentation Preset Evidence

`@croco/presentation-preset` keeps the current generated runtime profile contract in
`packages/presentation-preset/runtime-profiles.json`. The package test command validates each
profile's target metadata, output entries, artifacts, contract format, generated smoke case, and
the runtime claims currently listed in `docs/package-catalog.json`.

| Profile | Runtime | Generated smoke case |
| ------------------- | -------------------- | ----------------------------- |
| `node-server` | `node` | `production-app-starter` |
| `lambda-function` | `lambda` | `graphql-lambda-api` |
| `cloudflare-worker` | `cloudflare-workers` | `meta-vite-fullstack-workers` |
| `browser-vite-spa` | `browser` | `meta-vite-web` |

Verification commands:

```bash
pnpm --filter @croco/presentation-preset test
pnpm create-croco-app:smoke
pnpm docs:catalog:check
```
37 changes: 37 additions & 0 deletions packages/presentation-preset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# @croco/presentation-preset

`@croco/presentation-preset` records the generated output contracts that back the Presentation
runtime claims in `docs/package-catalog.json`.

## Supported Runtime Profiles

The source of truth is `runtime-profiles.json`. Each profile names the runtime claim, target
metadata, output artifacts, entry descriptors, package test evidence, and generated-app smoke
case that proves the claim.

| Profile | Catalog runtime | Generated smoke evidence |
| ------------------- | -------------------- | ------------------------------------------------------------------------------------- |
| `node-server` | `node` | `CROCO_GENERATED_SMOKE_CASES=production-app-starter pnpm create-croco-app:smoke` |
| `lambda-function` | `lambda` | `CROCO_GENERATED_SMOKE_CASES=graphql-lambda-api pnpm create-croco-app:smoke` |
| `cloudflare-worker` | `cloudflare-workers` | `CROCO_GENERATED_SMOKE_CASES=meta-vite-fullstack-workers pnpm create-croco-app:smoke` |
| `browser-vite-spa` | `browser` | `CROCO_GENERATED_SMOKE_CASES=meta-vite-web pnpm create-croco-app:smoke` |

## Verification

Run the package-level contract check:

```bash
pnpm --filter @croco/presentation-preset test
```

Run the generated-app smoke matrix when a profile, generated output shape, or runtime claim
changes:

```bash
pnpm create-croco-app:smoke
pnpm docs:catalog:check
```

`pnpm docs:catalog:check` fails when `docs/package-catalog.json` claims a
`@croco/presentation-preset` runtime that lacks generated profile evidence in
`runtime-profiles.json`.
3 changes: 2 additions & 1 deletion packages/presentation-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"./runtime-profiles.json": "./dist/runtime-profiles.json"
},
"access": "public"
},
Expand Down
134 changes: 134 additions & 0 deletions packages/presentation-preset/runtime-profiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"schemaVersion": 1,
"validationCommand": "pnpm --filter @croco/presentation-preset test",
"profiles": [
{
"name": "node-server",
"runtime": "node",
"packageTestName": "validates the node-server generated runtime profile",
"generatedAppSmokeCase": "production-app-starter",
"generatedAppSmokeCommand": "CROCO_GENERATED_SMOKE_CASES=production-app-starter pnpm create-croco-app:smoke",
"target": {
"target": "node",
"requiredEnvVars": [],
"runtime": {
"nodeVersion": ">=20"
},
"output": {
"presetName": "presentation-preset/node-server",
"buildTime": "2026-01-01T00:00:00.000Z",
"format": "dual",
"artifacts": [
{ "path": "apps/api-server/dist/index.mjs", "format": "esm", "type": "code" },
{ "path": "apps/api-server/dist/index.cjs", "format": "cjs", "type": "code" },
{ "path": "apps/api-server/dist/index.d.ts", "format": "neutral", "type": "types" },
{ "path": "contract-graph.snapshot.json", "format": "neutral", "type": "asset" },
{ "path": "openapi.json", "format": "neutral", "type": "asset" }
],
"entries": [
{
"exportName": ".",
"main": "apps/api-server/dist/index.mjs",
"cjs": "apps/api-server/dist/index.cjs",
"types": "apps/api-server/dist/index.d.ts"
}
]
}
}
},
{
"name": "lambda-function",
"runtime": "lambda",
"packageTestName": "validates the lambda-function generated runtime profile",
"generatedAppSmokeCase": "graphql-lambda-api",
"generatedAppSmokeCommand": "CROCO_GENERATED_SMOKE_CASES=graphql-lambda-api pnpm create-croco-app:smoke",
"target": {
"target": "lambda",
"requiredEnvVars": [],
"runtime": {
"nodeVersion": ">=20",
"memory": 512,
"timeout": 30
},
"output": {
"presetName": "presentation-preset/lambda-function",
"buildTime": "2026-01-01T00:00:00.000Z",
"format": "dual",
"artifacts": [
{ "path": "apps/api-server/dist/lambda.mjs", "format": "esm", "type": "code" },
{ "path": "apps/api-server/dist/lambda.cjs", "format": "cjs", "type": "code" },
{ "path": "apps/api-server/dist/lambda.d.ts", "format": "neutral", "type": "types" },
{ "path": "apps/api-server/template.yaml", "format": "neutral", "type": "config" },
{ "path": "contract-graph.snapshot.json", "format": "neutral", "type": "asset" }
],
"entries": [
{
"exportName": "./lambda",
"main": "apps/api-server/dist/lambda.mjs",
"cjs": "apps/api-server/dist/lambda.cjs",
"types": "apps/api-server/dist/lambda.d.ts"
}
]
}
}
},
{
"name": "cloudflare-worker",
"runtime": "cloudflare-workers",
"packageTestName": "validates the cloudflare-worker generated runtime profile",
"generatedAppSmokeCase": "meta-vite-fullstack-workers",
"generatedAppSmokeCommand": "CROCO_GENERATED_SMOKE_CASES=meta-vite-fullstack-workers pnpm create-croco-app:smoke",
"target": {
"target": "cloudflare-workers",
"requiredEnvVars": [],
"output": {
"presetName": "presentation-preset/cloudflare-worker",
"buildTime": "2026-01-01T00:00:00.000Z",
"format": "esm",
"artifacts": [
{ "path": "ssr-worker/dist/index.mjs", "format": "esm", "type": "code" },
{ "path": "ssr-worker/dist/index.d.ts", "format": "neutral", "type": "types" },
{ "path": "ssr-worker/wrangler.toml", "format": "neutral", "type": "config" },
{ "path": "ssr-worker/dist/client/manifest.json", "format": "neutral", "type": "asset" }
],
"entries": [
{
"exportName": "./worker",
"main": "ssr-worker/dist/index.mjs",
"types": "ssr-worker/dist/index.d.ts"
}
]
}
}
},
{
"name": "browser-vite-spa",
"runtime": "browser",
"packageTestName": "validates the browser-vite-spa generated runtime profile",
"generatedAppSmokeCase": "meta-vite-web",
"generatedAppSmokeCommand": "CROCO_GENERATED_SMOKE_CASES=meta-vite-web pnpm create-croco-app:smoke",
"target": {
"target": "browser",
"requiredEnvVars": [],
"output": {
"presetName": "presentation-preset/browser-vite-spa",
"buildTime": "2026-01-01T00:00:00.000Z",
"format": "esm",
"artifacts": [
{ "path": "apps/web/dist/index.html", "format": "neutral", "type": "asset" },
{ "path": "apps/web/dist/assets/main.js", "format": "esm", "type": "code" },
{ "path": "apps/web/dist/assets/main.css", "format": "neutral", "type": "asset" },
{ "path": "apps/web/src/vite-env.d.ts", "format": "neutral", "type": "types" }
],
"entries": [
{
"exportName": "./browser",
"main": "apps/web/dist/assets/main.js",
"types": "apps/web/src/vite-env.d.ts"
}
]
}
}
}
]
}
Loading
Loading