@factorypure/devdb 0.1.1 → 0.1.2
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/bin/devdb.js +3 -1
- package/package.json +1 -1
package/bin/devdb.js
CHANGED
|
@@ -21,7 +21,7 @@ const KEEP_GOLDENS = 2
|
|
|
21
21
|
const MYSQL_BIN = process.env.DEVDB_MYSQL_BIN ?? '/opt/homebrew/opt/mysql@8.4/bin'
|
|
22
22
|
const NAME_PATTERN = /^[a-z0-9][a-z0-9._-]{0,40}$/i
|
|
23
23
|
|
|
24
|
-
const HELP = `devdb - local copies of the prod database (refreshed
|
|
24
|
+
const HELP = `devdb - local copies of the prod database (refreshed weekly on Mondays by fpjobs dev-db-snapshot)
|
|
25
25
|
|
|
26
26
|
devdb pull [--env FILE] [--force] download the latest snapshot and load it into a new golden copy
|
|
27
27
|
(--env: create the DB_USER/DB_PASSWORD app user from that .env;
|
|
@@ -407,6 +407,8 @@ const commands = {
|
|
|
407
407
|
} finally {
|
|
408
408
|
await stopServer(loader)
|
|
409
409
|
}
|
|
410
|
+
// --force reloads an existing stamp; clones are APFS copies, so replacing the golden doesn't touch them
|
|
411
|
+
fs.rmSync(path.join(GOLDENS, stamp), { recursive: true, force: true })
|
|
410
412
|
fs.renameSync(loadingDir, path.join(GOLDENS, stamp))
|
|
411
413
|
fs.rmSync(dumpDir, { recursive: true, force: true })
|
|
412
414
|
|