adaptic-backend 1.0.330 → 1.0.333

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptic-backend",
3
- "version": "1.0.330",
3
+ "version": "1.0.333",
4
4
  "description": "Backend executable CRUD functions with dynamic variables construction, and type definitions for the Adaptic AI platform.",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",
package/server.cjs CHANGED
@@ -137,7 +137,9 @@ const startServer = async () => {
137
137
  else {
138
138
  // For regular JWT tokens, verify as before
139
139
  try {
140
- user = jsonwebtoken_1.default.verify(token, process.env.JWT_SECRET);
140
+ // Use a default secret for development if JWT_SECRET is not set
141
+ const secretKey = process.env.JWT_SECRET || 'development_secret_key_for_local_testing_only';
142
+ user = jsonwebtoken_1.default.verify(token, secretKey);
141
143
  }
142
144
  catch (e) {
143
145
  console.error('JWT verification failed:', e);
@@ -179,7 +181,9 @@ const startServer = async () => {
179
181
  else {
180
182
  // For regular JWT tokens, verify as before
181
183
  try {
182
- user = jsonwebtoken_1.default.verify(token, process.env.JWT_SECRET);
184
+ // Use a default secret for development if JWT_SECRET is not set
185
+ const secretKey = process.env.JWT_SECRET || 'development_secret_key_for_local_testing_only';
186
+ user = jsonwebtoken_1.default.verify(token, secretKey);
183
187
  }
184
188
  catch (e) {
185
189
  console.error('JWT verification failed:', e);