You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b040184
Browse filesBrowse the repository at this point in the historyBrowse files
feat(blocks): sync a block edit to every resource that uses it
A block edit changes what many resources send to Vapi without changing
their files, so nothing in git said which resources still ran old text.
Push now records the block content each resource went up with in
resources/<org>/.vapi-blocks.json. "npm run sync-blocks" lists, across
every org, the resources whose blocks changed since they were last pushed,
and with --apply deploys them through apply, so the drift check still
refuses a resource that was edited in the dashboard.
Promotion plans those resources as "sync" entries for the destination org,
the promotion workflow runs on templates/**, and a shared block edit
selects every PR check.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@@ -645,7 +663,32 @@ export async function promotionPlanBuild(
645
663
warnings.push(
646
664
`${file.path}: credentialIds entry "${alias}" is left out in ${options.target} (binding policy "omit"). Calls there can use only the keys still on the list, so that provider would run on Vapi's own key.`,
647
665
);
666
+
continue;
648
667
}
668
+
// Same file text in both orgs. The target still needs a push when a
669
+
// block the file uses has changed since the target last received it:
670
+
// blocks are expanded with the target's own folder first, at push time.
671
+
letusage: BlockUsage;
672
+
try{
673
+
usage=blocksExpand(
674
+
extname(file.path)===".ts"
675
+
? parsed.data
676
+
: extname(file.path)===".md"
677
+
? markdownResourceParse(content)
678
+
: parseYaml(content),
679
+
targetLayers,
680
+
).usage;
681
+
}catch(error){
682
+
thrownewError(
683
+
`${file.path} can't be expanded for ${options.target}: ${errorinstanceofError ? error.message : error}`,
0 commit comments