File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -516,10 +516,10 @@ In addition, you will need to update the registries:
516516 Ensure that your tool functions correctly by making test requests and verifying the responses.
517517
5185188 . ** Generate Documentation:**
519- Run the documentation generator (from ` apps/sim ` ) to create docs for your new tool :
519+ Regenerate every derived artifact, including your tool's docs page, from the repo root :
520520
521521 ``` bash
522- cd apps/sim && bun run generate-docs
522+ bun run generate
523523 ```
524524
525525### Naming Conventions
Original file line number Diff line number Diff line change @@ -44,13 +44,17 @@ if printf '%s\n' "$changed" | grep -qE '^scripts/'; then
4444fi
4545TURBO_SCM_BASE=" $base " bunx turbo run type-check --affected --output-logs=errors-only
4646
47- # A stale generated artifact would only fail CI's check:audits, so regenerate them all here. The
48- # diff is compared before and after, so uncommitted work in the tree never trips this.
49- before=$( git diff | git hash-object --stdin)
50- bun run generate > /dev/null
51- if [ " $( git diff | git hash-object --stdin) " != " $before " ]; then
52- echo " pre-push: generated artifacts were stale and have been regenerated:"
53- git diff --name-only
54- echo " pre-push: commit them and push again."
55- exit 1
47+ # A stale generated artifact would only fail CI's check:audits. Generators read the working tree,
48+ # so the result describes the pushed commit only when the tree is that commit; with uncommitted or
49+ # untracked files the check is left to CI rather than judging (or blocking) unrelated work.
50+ if git diff --quiet HEAD && [ -z " $( git ls-files --others --exclude-standard) " ]; then
51+ bun run generate > /dev/null
52+ if ! git diff --quiet; then
53+ echo " pre-push: generated artifacts were stale and have been regenerated:"
54+ git diff --name-only
55+ echo " pre-push: commit them and push again."
56+ exit 1
57+ fi
58+ else
59+ echo " pre-push: uncommitted changes; leaving generated-artifact freshness to CI"
5660fi
Original file line number Diff line number Diff line change 108108 "generate:sdk-fixture-catalog" : " bun run apps/sim/scripts/generate-sdk-fixture-catalog.ts" ,
109109 "check:sdk-fixture-catalog" : " bun run apps/sim/scripts/generate-sdk-fixture-catalog.ts --check" ,
110110 "check:sdk-names-frozen" : " bun run scripts/check-sdk-names-frozen.ts" ,
111+ "generate:docs" : " bun run scripts/generate-docs.ts" ,
112+ "check:docs" : " bun run scripts/generate-docs.ts --check" ,
111113 "generate:deployment-config" : " bun run scripts/generate-deployment-config.ts" ,
112114 "check:deployment-config" : " bun run scripts/generate-deployment-config.ts --check" ,
113115 "images:generate" : " bun run scripts/generate-image-manifest.ts" ,
114116 "images:check" : " bun run scripts/generate-image-manifest.ts --check" ,
115117 "check:integration-catalog" : " bun run scripts/check-integration-catalog.ts" ,
116- "generate:docs" : " bun run scripts/generate-docs.ts" ,
117- "check:docs" : " bun run scripts/generate-docs.ts --check" ,
118118 "mship-tools:generate" : " bun run scripts/sync-tool-catalog.ts" ,
119119 "mship-tools:check" : " bun run scripts/sync-tool-catalog.ts --check" ,
120120 "trace-spans-contract:generate" : " bun run scripts/sync-trace-spans-contract.ts" ,
Original file line number Diff line number Diff line change 88 *
99 * Generators run one at a time, in package.json order, because some read what an earlier one
1010 * wrote: `generate:cli-docs` reads the operation table `generate:cli-api` emits,
11+ * `generate:deployment-config` imports the integration metadata `generate:docs` writes,
1112 * `generate:docs-manifest` lists the pages `generate:cli-docs` and `generate:docs` write, and
1213 * `generate:sdk-fixture-catalog` projects through `generate:tool-metadata` and `generate:sdk-names`
1314 * output. Keep a new pair below the generators it reads.
You can’t perform that action at this time.
0 commit comments