@joystick.js/node-canary 0.0.0-canary.41 → 0.0.0-canary.42

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/app/index.js CHANGED
@@ -79,7 +79,6 @@ class App {
79
79
  }
80
80
  async loadDatabases(callback) {
81
81
  const settings = loadSettings();
82
- console.log("LOAD DBS", settings);
83
82
  const hasUsersDatabase = settings?.config?.databases?.some((database = {}) => {
84
83
  return !!database?.users;
85
84
  });
@@ -402,7 +401,7 @@ class App {
402
401
  });
403
402
  }
404
403
  initDevelopmentRoutes() {
405
- if (process.env.NODE_ENV === "development") {
404
+ if (["development", "test"].includes(process.env.NODE_ENV)) {
406
405
  this.express.app.get("/api/_joystick/sessions", async (req, res) => {
407
406
  const sessions = Array.from(this.sessions.entries())?.reduce((acc = {}, [key, value]) => {
408
407
  acc[key] = value;
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
  var getBuildPath_default = () => {
3
- if (process.env.NODE_ENV === "development" || fs.existsSync(".joystick/build")) {
3
+ if (["development", "test"].includes(process.env.NODE_ENV) || fs.existsSync(".joystick/build")) {
4
4
  return ".joystick/build/";
5
5
  }
6
6
  return "";
@@ -6,7 +6,7 @@ var getSSLCertificates_default = (ssl = null) => {
6
6
  const keyPath = process.env.IS_PUSH_DEPLOYED ? pushKeyPath : ssl?.key || null;
7
7
  const certExists = fs.existsSync(certPath);
8
8
  const keyExists = fs.existsSync(keyPath);
9
- if (process.env.NODE_ENV === "development" || !certExists || !keyExists) {
9
+ if (["development", "test"].includes(process.env.NODE_ENV) || !certExists || !keyExists) {
10
10
  return null;
11
11
  }
12
12
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joystick.js/node-canary",
3
- "version": "0.0.0-canary.41",
3
+ "version": "0.0.0-canary.42",
4
4
  "type": "module",
5
5
  "description": "A Node.js framework for building web apps.",
6
6
  "main": "./dist/index.js",