@stacksjs/buddy 0.70.189 → 0.70.190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/seed.js +2 -1
- package/package.json +1 -1
package/dist/commands/seed.js
CHANGED
|
@@ -7,13 +7,14 @@ export function seed(buddy) {
|
|
|
7
7
|
project: "Target a specific project",
|
|
8
8
|
verbose: "Enable verbose output"
|
|
9
9
|
};
|
|
10
|
-
buddy.command("seed", descriptions.seed).alias("db:seed").option("-p, --project [project]", descriptions.project, { default: !1 }).option("--only [models]", "Comma-separated list of models to seed", { default: "" }).option("--except [models]", "Comma-separated list of models to skip", { default: "" }).option("--include-defaults", "Also seed the framework's built-in models", { default: !1 }).option("--allow-protected", "Seed auth/oauth models even on a non-fresh DB (will invalidate live tokens)", { default: !1 }).option("--fresh", "Truncate tables before seeding", { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
|
|
10
|
+
buddy.command("seed", descriptions.seed).alias("db:seed").option("-p, --project [project]", descriptions.project, { default: !1 }).option("--only [models]", "Comma-separated list of models to seed", { default: "" }).option("--except [models]", "Comma-separated list of models to skip", { default: "" }).option("--include-defaults", "Also seed the framework's built-in models", { default: !1 }).option("--allow-protected", "Seed auth/oauth models even on a non-fresh DB (will invalidate live tokens)", { default: !1 }).option("--fresh", "Truncate tables before seeding", { default: !1 }).option("--append", "Add rows to tables that already have some, instead of skipping them", { default: !1 }).option("--verbose", descriptions.verbose, { default: !1 }).action(async (options) => {
|
|
11
11
|
log.debug("Running `buddy seed` ...", options);
|
|
12
12
|
const perf = await intro("buddy seed"), { injectGlobalAutoImports } = await import("@stacksjs/server");
|
|
13
13
|
await injectGlobalAutoImports();
|
|
14
14
|
const { seed: seedDatabase } = await import("@stacksjs/database"), list = (value) => value ? value.split(",").map((entry) => entry.trim()).filter(Boolean) : void 0, summary = await seedDatabase({
|
|
15
15
|
verbose: options.verbose,
|
|
16
16
|
fresh: options.fresh,
|
|
17
|
+
append: options.append,
|
|
17
18
|
only: list(options.only),
|
|
18
19
|
except: list(options.except),
|
|
19
20
|
includeDefaults: options.includeDefaults,
|