Skip to content

Commit 2a0463a

Browse files
committed
chore(coda): regenerate artifacts and fix block registry audit false positive
1 parent b2f290a commit 2a0463a

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎apps/docs/content/docs/integrations/coda.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ Update a Coda page: rename it, change its subtitle, icon, cover, or visibility,
14561456
| `docId` | string | Yes | ID of the doc \(e.g., "AbCDeFGH"\) |
14571457
| `pageId` | string | Yes | ID or name of the page \(IDs are recommended, e.g., "canvas-IjkLmnO"; names containing "/" are not supported\) |
14581458
| `name` | string | No | New name of the page |
1459-
| `subtitle` | string | No | New subtitle of the page |
1459+
| `subtitle` | string | No | New subtitle of the page \(an empty value leaves the subtitle unchanged\) |
14601460
| `iconName` | string | No | Name of the page icon \(e.g., "rocket"\) |
14611461
| `imageUrl` | string | No | URL of a cover image for the page |
14621462
| `isHidden` | boolean | No | Whether the page is hidden \(requires a paid Coda plan; ignored for pages that cannot be hidden\) |

‎apps/sim/lib/copilot/generated/docs-manifest.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export const DOCS_MANIFEST: readonly string[] = [
109109
'integrations/cloudformation.mdx',
110110
'integrations/cloudtrail.mdx',
111111
'integrations/cloudwatch.mdx',
112+
'integrations/coda.mdx',
112113
'integrations/codepipeline.mdx',
113114
'integrations/confluence.mdx',
114115
'integrations/context_dev.mdx',

‎apps/sim/scripts/check-block-registry.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ type IdMap = Record<string, Set<string>>
3939
/**
4040
* Extracts subblock IDs from the `subBlocks: [ ... ]` section of a block
4141
* definition. Only grabs the top-level `id:` of each subblock object —
42-
* ignores nested IDs inside `options`, `columns`, etc.
42+
* ignores nested IDs inside `options`, `columns`, etc. Callers pass the source
43+
* starting at the block's own definition, because a file can declare an untyped
44+
* legacy block before the typed block derived from it. A derived `subBlocks`
45+
* expression (not an array literal) yields no IDs rather than borrowing a later
46+
* bracket.
4347
*/
4448
function extractSubBlockIds(source: string): string[] {
45-
const startIdx = source.indexOf('subBlocks:')
46-
if (startIdx === -1) return []
49+
const literal = /subBlocks:(\s*)(.)/.exec(source)
50+
if (!literal || literal[2] !== '[') return []
4751

48-
const bracketStart = source.indexOf('[', startIdx)
49-
if (bracketStart === -1) return []
52+
const bracketStart = literal.index + literal[0].length - 1
5053

5154
const ids: string[] = []
5255
let braceDepth = 0
@@ -134,7 +137,7 @@ function getPreviousIds(): PreviousIdsResult {
134137
if (!typeMatch) continue
135138
const blockType = typeMatch[1]
136139

137-
const ids = extractSubBlockIds(content)
140+
const ids = extractSubBlockIds(content.slice(typeMatch.index ?? 0))
138141
if (ids.length === 0) continue
139142

140143
map[blockType] = new Set(ids)

‎apps/sim/tools/generated/tool-metadata.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)