@saltcorn/plugins-loader 1.1.0-beta.10 → 1.1.0-beta.12

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": "@saltcorn/plugins-loader",
3
- "version": "1.1.0-beta.10",
3
+ "version": "1.1.0-beta.12",
4
4
  "description": "Saltcorn plugin loader",
5
5
  "homepage": "https://saltcorn.com",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "env-paths": "^2.2.0",
13
13
  "npm-registry-fetch": "17.1.0",
14
- "@saltcorn/data": "1.1.0-beta.10"
14
+ "@saltcorn/data": "1.1.0-beta.12"
15
15
  },
16
16
  "author": "Christian Hugo",
17
17
  "license": "MIT",
@@ -125,15 +125,21 @@ class PluginInstaller {
125
125
  // but without a valid node modules folder
126
126
  module = await this.loadMainFile(pckJSON);
127
127
  } catch (e) {
128
- getState().log(
129
- 2,
130
- `Error loading plugin ${this.plugin.name}. Removing and trying again.`
131
- );
132
128
  if (force) {
129
+ getState().log(
130
+ 2,
131
+ `Error loading plugin ${this.plugin.name}. Removing and trying again.`
132
+ );
133
133
  await this.remove();
134
134
  pckJSON = null;
135
135
  await installer();
136
- }
136
+ } else
137
+ getState().log(
138
+ 2,
139
+ `Error loading plugin ${this.plugin.name}. Trying again with reload flag. ` +
140
+ "A server restart may be required."
141
+ );
142
+
137
143
  module = await this.loadMainFile(pckJSON, true);
138
144
  loadedWithReload = true;
139
145
  }
@@ -83,7 +83,7 @@ const isEngineSatisfied = (scEngine, scVersion) => {
83
83
  getState().log(4, `invalid saltcorn version: ${scVersion}`);
84
84
  return true;
85
85
  }
86
- return semver.satisfies(safeScVersion, scEngine);
86
+ return semver.satisfies(safeScVersion, scEngine, { includePrerelease: true });
87
87
  };
88
88
 
89
89
  /**