chanjs 2.0.13 → 2.0.14

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.
Files changed (2) hide show
  1. package/global/global.js +5 -0
  2. package/package.json +1 -1
package/global/global.js CHANGED
@@ -2,7 +2,12 @@ import { pathToFileURL, fileURLToPath } from "url";
2
2
  import path from "path";
3
3
  const ROOT_PATH = process.cwd();
4
4
  const APP_PATH = path.join(ROOT_PATH, "app");
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
5
8
  const globals = {
9
+ __dirname,
10
+ __filename,
6
11
  ROOT_PATH,
7
12
  APP_PATH,
8
13
  CONFIG_PATH: path.join(ROOT_PATH, "config"),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "chanjs",
4
- "version": "2.0.13",
4
+ "version": "2.0.14",
5
5
  "description": "chanjs基于express5 纯js研发的轻量级mvc框架。",
6
6
  "main": "index.js",
7
7
  "module": "index.js",