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
9 changes: 2 additions & 7 deletions codegen/smith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'

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

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

// Generate the blueprint with undocumented endpoints, resources, parameters,
// and properties already omitted, so the codegen only sees the public API.
const blueprint = await createBlueprint({ ...types }, { omitUndocumented: true })

Metalsmith(rootDir)
.source('./content')
.destination('../')
.clean(false)
.metadata({ blueprint })
.use(blueprint({ types, omitUndocumented: true }))
.use(routes)
.use(
layouts({
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"devDependencies": {
"@prettier/plugin-php": "^0.24.0",
"@seamapi/blueprint": "^0.61.0",
"@seamapi/smith": "^0.5.2",
"@seamapi/blueprint": "^1.0.0",
"@seamapi/smith": "^1.0.0",
"@seamapi/types": "1.975.0",
"change-case": "^5.4.4",
"prettier": "^3.0.0"
Expand Down
Loading