profoundjs 6.3.0 → 6.5.0

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/index.js CHANGED
@@ -3,10 +3,10 @@
3
3
  const fs = require("fs");
4
4
  const path = require("path");
5
5
 
6
- var loaded = false;
7
- var exists = false;
6
+ let loaded = false;
7
+ let exists = false;
8
8
  try {
9
- var stat = fs.statSync(__dirname + "/profound.js");
9
+ const stat = fs.statSync(path.join(__dirname, "/profound.js"));
10
10
  if (stat && stat.isFile()) exists = true;
11
11
  }
12
12
  catch (err) {
@@ -19,9 +19,9 @@ else {
19
19
  loaded = module.constructor._originalResolveFilename != null;
20
20
  module.constructor._originalResolveFilename = module.constructor._originalResolveFilename || module.constructor._resolveFilename;
21
21
  module.constructor._resolveFilename = function(request, paths) {
22
- var filename;
23
- var parts = request.split(".");
24
- var extension = parts.pop();
22
+ let filename;
23
+ const parts = request.split(".");
24
+ const extension = parts.pop();
25
25
  if (extension === "jse") {
26
26
  filename = module.constructor._originalResolveFilename("./profound.jse", paths);
27
27
  if (path.sep !== "/") {
@@ -34,11 +34,13 @@ else {
34
34
  }
35
35
  return filename;
36
36
  };
37
- var jse = JSON.parse(fs.readFileSync(__dirname + "/profound.jse", "utf8"));
37
+ const jse = JSON.parse(fs.readFileSync(path.join(__dirname, "/profound.jse"), "utf8"));
38
38
  process.require = require;
39
- var loader = new require("pjsloader")();
39
+ // eslint-disable-next-line n/no-new-require
40
+ const loader = new require("pjsloader")();
41
+ // eslint-disable-next-line n/no-deprecated-api
40
42
  require.extensions[".jse"] = function(module, filename) {
41
- var name = filename;
43
+ let name = filename;
42
44
  if (name.substr(0, __dirname.length) === __dirname) name = name.substr(__dirname.length + 1);
43
45
  if (path.sep !== "/") {
44
46
  while (name.includes(path.sep)) name = name.replace(path.sep, "/");
@@ -48,7 +50,7 @@ else {
48
50
 
49
51
  // Require any of the children, but only the 1st time
50
52
  if (!loaded) {
51
- for (var x in jse) {
53
+ for (const x in jse) {
52
54
  if (x.startsWith("shipped-plugins")) {
53
55
  profound.utils.addPlugin(require(x));
54
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profoundjs",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "min-profoundui-version": "6.20.0",
5
5
  "description": "Profound.js Framework and Server",
6
6
  "keywords": [
@@ -107,6 +107,7 @@
107
107
  "prompts": "^2.3.2",
108
108
  "randomatic": "^3.1.1",
109
109
  "request": "^2.88.0",
110
+ "rotating-file-stream": "^3.1.0",
110
111
  "semver": "^7.3.8",
111
112
  "soap": "^0.45.0",
112
113
  "ssh2": "^1.11.0",