@shijiu/jsview 1.9.869 → 1.9.872
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
package/tools/jsview-common.js
CHANGED
|
@@ -257,7 +257,7 @@ function symlinkSync(workDir, targetPath, toPath)
|
|
|
257
257
|
|
|
258
258
|
const desc = ' ' + path.relative(workDir, toPath) + ' -< ' + path.relative(workDir, relativePath);
|
|
259
259
|
console.info(desc);
|
|
260
|
-
fs.symlinkSync(relativePath, toPath, '
|
|
260
|
+
fs.symlinkSync(relativePath, toPath, 'junction');
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
function isSymlinkSync(filePath)
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
const crypto = require('crypto');
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
7
|
+
const url = require('url')
|
|
7
8
|
const {
|
|
8
9
|
checkNodeVersion,
|
|
9
10
|
getOptions,
|
|
@@ -13,7 +14,8 @@ const {
|
|
|
13
14
|
// npm run build 时检查jsview-dom是否处于Debug模式。
|
|
14
15
|
async function checkDomDebugDisabled(options) {
|
|
15
16
|
const jsviewDomFilePath = path.resolve(options.jsviewDomDir, 'index.mjs');
|
|
16
|
-
const
|
|
17
|
+
const jsviewDomUrl = url.pathToFileURL(jsviewDomFilePath);
|
|
18
|
+
const { getCodeDebugConfig } = await import(jsviewDomUrl);
|
|
17
19
|
const domCodeDebug = getCodeDebugConfig();
|
|
18
20
|
if (domCodeDebug.enableDebug !== false) {
|
|
19
21
|
console.error();
|
|
@@ -81,14 +83,15 @@ async function prepareMainAppData(options, fileMd5)
|
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
// 获取AppData信息
|
|
84
|
-
const
|
|
85
|
-
if (!fs.existsSync(
|
|
86
|
-
console.error('JsView Error: Failed to open app config file from ' +
|
|
86
|
+
const appConfigFilePath = path.resolve(options.appConfigDir, 'app.config.mjs');
|
|
87
|
+
if (!fs.existsSync(appConfigFilePath)) {
|
|
88
|
+
console.error('JsView Error: Failed to open app config file from ' + appConfigFilePath);
|
|
87
89
|
process.exit(1);
|
|
88
90
|
}
|
|
89
91
|
// const appConfigText = fs.readFileSync(appConfigFile);
|
|
90
92
|
// const appDataOriginJson = JSON.parse(appConfigText);
|
|
91
|
-
const
|
|
93
|
+
const appConfigFileUrl = url.pathToFileURL(appConfigFilePath);
|
|
94
|
+
const appDataOriginJson = await import(appConfigFileUrl);
|
|
92
95
|
|
|
93
96
|
// 组装AppData
|
|
94
97
|
let targetAppData = {};
|
|
@@ -22,8 +22,8 @@ async function getExtraOptions(argv)
|
|
|
22
22
|
options.androidPackage = argv.unparsed[0];
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
const { default: jsviewTargetRevision } = await import(
|
|
25
|
+
const jsviewDomRevisionFileUrl = url.pathToFileURL(options.jsviewDomRevisionFile);
|
|
26
|
+
const { default: jsviewTargetRevision } = await import(jsviewDomRevisionFileUrl);
|
|
27
27
|
options.jsviewCoreRevision = jsviewTargetRevision.CoreRevision;
|
|
28
28
|
options.jsviewEngineUrl = jsviewTargetRevision.JseUrl;
|
|
29
29
|
|