Skip to content

Commit 1b80215

Browse files
razor-xclaude
andauthored
refactor(codegen): use smith omitUndocumented option (#452)
* refactor(codegen): use smith omitUndocumented option Update @seamapi/blueprint and @seamapi/smith to v1. Smith's blueprint plugin now forwards the `omitUndocumented` option, so replace the direct `createBlueprint` call with the standard plugin passing `omitUndocumented: true`. Generated output is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrQiAv7j9XMWD12S9ax9Bt * Apply suggestion from @razor-x --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent eeb77bf commit 1b80215

3 files changed

Lines changed: 22 additions & 27 deletions

File tree

codegen/smith.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { dirname } from 'node:path'
22
import { fileURLToPath } from 'node:url'
33

44
import layouts from '@metalsmith/layouts'
5-
import { createBlueprint } from '@seamapi/blueprint'
6-
import { getHandlebarsPartials } from '@seamapi/smith'
5+
import { blueprint, getHandlebarsPartials } from '@seamapi/smith'
76
import * as types from '@seamapi/types/connect'
87
import { deleteAsync } from 'del'
98
import Metalsmith from 'metalsmith'
@@ -16,15 +15,11 @@ await Promise.all([deleteAsync(['./src/Objects', './src/SeamClient.php'])])
1615

1716
const partials = await getHandlebarsPartials(`${rootDir}/layouts/partials`)
1817

19-
// Generate the blueprint with undocumented endpoints, resources, parameters,
20-
// and properties already omitted, so the codegen only sees the public API.
21-
const blueprint = await createBlueprint({ ...types }, { omitUndocumented: true })
22-
2318
Metalsmith(rootDir)
2419
.source('./content')
2520
.destination('../')
2621
.clean(false)
27-
.metadata({ blueprint })
22+
.use(blueprint({ types, omitUndocumented: true }))
2823
.use(routes)
2924
.use(
3025
layouts({

package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
},
1717
"devDependencies": {
1818
"@prettier/plugin-php": "^0.24.0",
19-
"@seamapi/blueprint": "^0.61.0",
20-
"@seamapi/smith": "^0.5.2",
19+
"@seamapi/blueprint": "^1.0.0",
20+
"@seamapi/smith": "^1.0.0",
2121
"@seamapi/types": "1.975.0",
2222
"change-case": "^5.4.4",
2323
"prettier": "^3.0.0"

0 commit comments

Comments
 (0)