@getstrata/starter 2.2.15 → 2.2.17

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/cli.js CHANGED
@@ -3131,9 +3131,9 @@ function renderPackageJson(projectName, options = {}) {
3131
3131
  "@getstrata/cli": "workspace:*",
3132
3132
  "@getstrata/core": "workspace:*"
3133
3133
  } : {
3134
- "@getstrata/bootstrap": "^2.2.15",
3135
- "@getstrata/cli": "^2.2.15",
3136
- "@getstrata/core": "^2.2.15"
3134
+ "@getstrata/bootstrap": "^2.2.17",
3135
+ "@getstrata/cli": "^2.2.17",
3136
+ "@getstrata/core": "^2.2.17"
3137
3137
  };
3138
3138
  coreDeps.eta = "^4.6.0";
3139
3139
  if (options.layers?.database === "mysql") {
@@ -4253,13 +4253,15 @@ function dropTables(layers) {
4253
4253
  return ordered;
4254
4254
  }
4255
4255
  function renderFreshTs(layers) {
4256
- return `${ensureImport(layers)}import { freshDatabase } from "@getstrata/core/database/migrations";
4256
+ return `${ensureImport(layers)}import { isProductionEnv } from "@getstrata/core/runtime/appEnv";
4257
+ import { freshDatabase } from "@getstrata/core/database/migrations";
4257
4258
  import { closeDatabase } from "../bootstrap/database.ts";
4258
4259
  import { loadStarterMigrations, withMigrationDatabase } from "./migrationRuntime.ts";
4259
4260
 
4260
4261
  export async function fresh() {
4262
+ if (isProductionEnv()) throw new Error("migrate:fresh is only available in development/test environments.");
4261
4263
  ${ensureCall(layers)} await withMigrationDatabase(async (db) => {
4262
- await freshDatabase(db, await loadStarterMigrations());
4264
+ await freshDatabase(db, await loadStarterMigrations(), { destructive: true });
4263
4265
  });
4264
4266
  }
4265
4267
 
@@ -12,9 +12,9 @@
12
12
  "check": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
15
- "@getstrata/bootstrap": "^2.2.15",
16
- "@getstrata/cli": "^2.2.15",
17
- "@getstrata/core": "^2.2.15",
15
+ "@getstrata/bootstrap": "^2.2.17",
16
+ "@getstrata/cli": "^2.2.17",
17
+ "@getstrata/core": "^2.2.17",
18
18
  "eta": "^4.6.0"
19
19
  },
20
20
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/starter",
3
- "version": "2.2.15",
3
+ "version": "2.2.17",
4
4
  "description": "Interactive create-strata wizard. Choose each layer; one database engine.",
5
5
  "type": "module",
6
6
  "license": "MIT",