-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server-actions): add bundle migration for server actions
GitOrigin-RevId: 8d01eddcf58a110e0ce9126f035282a6b346943a
- Loading branch information
1 parent
f1fe978
commit f22e49a
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
platform/wab/src/wab/server/bundle-migrations/239-add-server-queries.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { BundleMigrationType } from "@/wab/server/db/bundle-migration-utils"; | ||
import { BundledMigrationFn } from "@/wab/server/db/BundleMigrator"; | ||
|
||
export const migrate: BundledMigrationFn = async (bundle) => { | ||
for (const inst of Object.values(bundle.map)) { | ||
if (inst["__type"] === "CustomFunction") { | ||
inst["params"] = []; | ||
} else if (inst["__type"] === "Component") { | ||
inst["serverQueries"] = []; | ||
} | ||
} | ||
}; | ||
|
||
export const MIGRATION_TYPE: BundleMigrationType = "bundled"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters