masterrecord 0.3.53 → 0.3.54
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/context.js +4 -1
- package/package.json +1 -1
package/context.js
CHANGED
|
@@ -664,7 +664,10 @@ class context {
|
|
|
664
664
|
env(rootFolderLocationOrConfig) {
|
|
665
665
|
try {
|
|
666
666
|
// Determine environment: prefer explicit 'master' env var, then NODE_ENV
|
|
667
|
-
|
|
667
|
+
// Schema-only CLI commands (add-migration, enable-migrations) may run without
|
|
668
|
+
// an environment set — allow fallback to 'development' for those.
|
|
669
|
+
const envType = this.__environment || process.env.NODE_ENV
|
|
670
|
+
|| (process.env.MASTERRECORD_SCHEMA_ONLY === '1' ? 'development' : null);
|
|
668
671
|
if (!envType) {
|
|
669
672
|
throw new ConfigurationError(
|
|
670
673
|
"No environment specified. Set the 'master' or 'NODE_ENV' environment variable (e.g., master=production or NODE_ENV=development)."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "masterrecord",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.54",
|
|
4
4
|
"description": "An Object-relational mapping for the Master framework. Master Record connects classes to relational database tables to establish a database with almost zero-configuration ",
|
|
5
5
|
"main": "MasterRecord.js",
|
|
6
6
|
"bin": {
|