vr-migrations 1.0.32 → 1.0.34

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/db.js CHANGED
@@ -20,7 +20,9 @@ async function initializeDatabase(config) {
20
20
  // Detect if we need SSL (Neon or production/staging)
21
21
  const isNeon = config.DATABASE_URL?.includes("neon.tech") ||
22
22
  config.DB_HOST?.includes("neon.tech");
23
- const isProduction = config.NODE_ENV === "production" || config.NODE_ENV === "staging";
23
+ const isProduction = config.NODE_ENV === "production" ||
24
+ config.NODE_ENV === "staging" ||
25
+ config.NODE_ENV === "dev";
24
26
  const shouldUseSSL = isNeon || isProduction;
25
27
  // Configure dialect options for SSL
26
28
  const dialectOptions = {};
@@ -30,6 +32,7 @@ async function initializeDatabase(config) {
30
32
  rejectUnauthorized: false,
31
33
  };
32
34
  console.log("🔒 SSL enabled for database connection");
35
+ console.log("connecting to DATABASE_URL:", process.env.DATABASE_URL);
33
36
  }
34
37
  _sequelize = new sequelize_1.Sequelize({
35
38
  dialect: "postgres",
@@ -41,7 +41,7 @@ const ALL_PERMISSIONS = [
41
41
 
42
42
  // System / Overrides
43
43
  "MANAGE_SECURITY_CLEARANCE",
44
- "OVERRIDE_DEVICE_LOCK"
44
+ "OVERRIDE_DEVICE_LOCK",
45
45
  ];
46
46
 
47
47
  module.exports = {
@@ -57,7 +57,7 @@ module.exports = {
57
57
  permissions: ALL_PERMISSIONS,
58
58
  isDefault: true,
59
59
  createdAt: now,
60
- updatedAt: now
60
+ updatedAt: now,
61
61
  },
62
62
  {
63
63
  id: "22222222-2222-2222-2222-222222222222",
@@ -67,38 +67,38 @@ module.exports = {
67
67
  permissions: ALL_PERMISSIONS,
68
68
  isDefault: true,
69
69
  createdAt: now,
70
- updatedAt: now
70
+ updatedAt: now,
71
71
  },
72
72
  {
73
73
  id: "33333333-3333-3333-3333-333333333333",
74
74
  role: "AGENT",
75
75
  description: "Agent clearance",
76
- level: 3,
76
+ level: 2,
77
77
  permissions: ALL_PERMISSIONS,
78
78
  isDefault: false,
79
79
  createdAt: now,
80
- updatedAt: now
80
+ updatedAt: now,
81
81
  },
82
82
  {
83
83
  id: "44444444-4444-4444-4444-444444444444",
84
84
  role: "ADMIN",
85
85
  description: "Admin clearance",
86
- level: 7,
86
+ level: 3,
87
87
  permissions: ALL_PERMISSIONS,
88
88
  isDefault: false,
89
89
  createdAt: now,
90
- updatedAt: now
90
+ updatedAt: now,
91
91
  },
92
92
  {
93
93
  id: "55555555-5555-5555-5555-555555555555",
94
94
  role: "SUPER_ADMIN",
95
95
  description: "Super admin clearance",
96
- level: 10,
96
+ level: 4,
97
97
  permissions: ALL_PERMISSIONS,
98
98
  isDefault: false,
99
99
  createdAt: now,
100
- updatedAt: now
101
- }
100
+ updatedAt: now,
101
+ },
102
102
  ]);
103
103
  },
104
104
 
@@ -109,8 +109,8 @@ module.exports = {
109
109
  "22222222-2222-2222-2222-222222222222",
110
110
  "33333333-3333-3333-3333-333333333333",
111
111
  "44444444-4444-4444-4444-444444444444",
112
- "55555555-5555-5555-5555-555555555555"
113
- ]
112
+ "55555555-5555-5555-5555-555555555555",
113
+ ],
114
114
  });
115
- }
115
+ },
116
116
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-migrations",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "Database migration and seeding package for VR applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",