MCPcopy Create free account
hub / github.com/deepnote/deepnote / stripBlocksFromFile

Function stripBlocksFromFile

packages/cli/scripts/generate-skill-schema.ts:76–92  ·  view source on GitHub ↗
(schema: any)

Source from the content-addressed store, hash-verified

74
75// biome-ignore lint/suspicious/noExplicitAny: walking arbitrary JSON schema structure
76function stripBlocksFromFile(schema: any) {
77 // Navigate to project.properties.notebooks.items.properties.blocks and replace
78 // the items with a $ref comment
79 try {
80 const projectProps = schema.properties?.project?.properties
81 if (!projectProps?.notebooks?.items?.properties?.blocks) {
82 return
83 }
84 projectProps.notebooks.items.properties.blocks = {
85 type: 'array',
86 description: 'Array of DeepnoteBlock objects (see DeepnoteBlock type above)',
87 items: {},
88 }
89 } catch {
90 // If structure doesn't match, leave as-is
91 }
92}
93
94run()
95 .then(() => {

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected