feature: add sync links command (#8775)

This commit is contained in:
Harminder Virk
2024-08-27 13:43:54 +05:30
committed by GitHub
parent 965c3c99db
commit 98b4c76ece
4 changed files with 230 additions and 170 deletions

View File

@@ -142,6 +142,26 @@ function buildLocalCommands(cli, isLocalProject) {
})
),
})
.command({
command: "db:sync-links",
desc: "Sync database schema with the links defined by your application and Medusa core",
builder: (builder) => {
builder.option("execute-all", {
type: "boolean",
describe: "Skip prompts and execute all (including unsafe) actions",
})
builder.option("execute-safe", {
type: "boolean",
describe: "Skip prompts and execute only safe actions",
})
},
handler: handlerP(
getCommandHandler("db/sync-links", (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
return cmd(args)
})
),
})
.command({
command: `telemetry`,
describe: `Enable or disable collection of anonymous usage data.`,