@dimina-kit/compiler 0.0.2-dev.20260711141929 → 0.0.2-dev.20260716163758
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/compile-core.browser.js +16256 -15627
- package/dist/compile-core.node-chunks/{chunk-LUD2P6RM.js → chunk-3MOLMQLJ.js} +1 -1
- package/dist/compile-core.node-chunks/{chunk-QJ34C5KK.js → chunk-O5CWW2ZX.js} +7 -6
- package/dist/compile-core.node-chunks/{logic-compiler-2SQFOFEO.js → logic-compiler-4BUMLGSW.js} +2 -2
- package/dist/compile-core.node-chunks/{style-compiler-ZEJ3XLTS.js → style-compiler-4F5PSTLH.js} +1 -1
- package/dist/compile-core.node-chunks/{view-compiler-WQNV7H5G.js → view-compiler-HHZZFMFQ.js} +2 -2
- package/dist/compile-core.node.js +4 -4
- package/dist/pool.node-chunks/{chunk-PDHO4Y56.js → chunk-LVUKEB4F.js} +4 -4
- package/dist/pool.node-chunks/{chunk-7FGOYOXU.js → chunk-QLBB5HQB.js} +7 -6
- package/dist/pool.node-chunks/{chunk-C7GEIDCP.js → chunk-S7VHZTMY.js} +1 -1
- package/dist/pool.node-chunks/{logic-compiler-BODAINZQ.js → logic-compiler-PK5DY6DB.js} +2 -2
- package/dist/pool.node-chunks/{style-compiler-TUNDVSR5.js → style-compiler-X4EGM6MY.js} +1 -1
- package/dist/pool.node-chunks/{view-compiler-HOFFL63K.js → view-compiler-4GBP7IAT.js} +2 -2
- package/dist/pool.node.js +2 -2
- package/dist/stage-worker.browser.js +3195 -2566
- package/dist/stage-worker.node.js +2 -2
- package/package.json +2 -1
- package/scripts/build-compiler.js +2 -0
- package/scripts/test-crypto-shim.js +58 -0
- package/scripts/test-pool-scopehash.js +40 -33
- package/src/pool.js +9 -8
- package/src/shims/crypto.js +101 -0
- package/src/stage-worker.js +13 -12
|
@@ -60,6 +60,7 @@ var fs = {
|
|
|
60
60
|
var fs_default = fs;
|
|
61
61
|
|
|
62
62
|
// ../../dimina/fe/packages/compiler/src/common/utils.js
|
|
63
|
+
import crypto from "node:crypto";
|
|
63
64
|
import path from "node:path";
|
|
64
65
|
import process from "node:process";
|
|
65
66
|
function hasCompileInfo(modulePath, list, preList) {
|
|
@@ -99,7 +100,7 @@ function collectAssets(workPath, pagePath, src, targetPath, appId) {
|
|
|
99
100
|
try {
|
|
100
101
|
const ext = `.${src.split(".").pop()}`;
|
|
101
102
|
const dirPath = absolutePath.split(path.sep).slice(0, -1).join("/");
|
|
102
|
-
const prefix = uuid();
|
|
103
|
+
const prefix = uuid(dirPath);
|
|
103
104
|
const targetStatic = `${targetPath}/main/static`;
|
|
104
105
|
if (!fs_default.existsSync(targetStatic)) {
|
|
105
106
|
fs_default.mkdirSync(targetStatic, { recursive: true });
|
|
@@ -137,8 +138,8 @@ function transformRpx(styleText) {
|
|
|
137
138
|
return `${Number(pixel)}rem`;
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
|
-
function uuid() {
|
|
141
|
-
return
|
|
141
|
+
function uuid(str) {
|
|
142
|
+
return crypto.createHash("sha256").update(str).digest().readBigUInt64BE(0).toString(36);
|
|
142
143
|
}
|
|
143
144
|
var tagWhiteList = [
|
|
144
145
|
"page",
|
|
@@ -643,7 +644,7 @@ function storeComponentConfig(pageJsonContent, pageFilePath) {
|
|
|
643
644
|
return acc;
|
|
644
645
|
}, {});
|
|
645
646
|
configInfo.componentInfo[moduleId] = {
|
|
646
|
-
id: uuid(),
|
|
647
|
+
id: uuid(moduleId),
|
|
647
648
|
path: moduleId,
|
|
648
649
|
component: isComponent,
|
|
649
650
|
usingComponents: cComponents
|
|
@@ -722,7 +723,7 @@ function getPages() {
|
|
|
722
723
|
const pageComponents = pageInfo[path5]?.usingComponents || {};
|
|
723
724
|
const mergedComponents = { ...globalComponents, ...pageComponents };
|
|
724
725
|
return {
|
|
725
|
-
id: uuid(),
|
|
726
|
+
id: uuid(path5),
|
|
726
727
|
path: path5,
|
|
727
728
|
usingComponents: mergedComponents
|
|
728
729
|
};
|
|
@@ -738,7 +739,7 @@ function getPages() {
|
|
|
738
739
|
const pageComponents = pageInfo[fullPath]?.usingComponents || {};
|
|
739
740
|
const mergedComponents = { ...globalComponents, ...pageComponents };
|
|
740
741
|
return {
|
|
741
|
-
id: uuid(),
|
|
742
|
+
id: uuid(fullPath),
|
|
742
743
|
path: fullPath,
|
|
743
744
|
usingComponents: mergedComponents
|
|
744
745
|
};
|
package/dist/compile-core.node-chunks/{logic-compiler-2SQFOFEO.js → logic-compiler-4BUMLGSW.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWxMemberName,
|
|
3
3
|
warnUnsupportedWxApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3MOLMQLJ.js";
|
|
5
5
|
import {
|
|
6
6
|
isMainThread,
|
|
7
7
|
parentPort
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
hasCompileInfo,
|
|
20
20
|
resetStoreInfo,
|
|
21
21
|
resolveAppAlias
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O5CWW2ZX.js";
|
|
23
23
|
|
|
24
24
|
// ../../dimina/fe/packages/compiler/src/core/logic-compiler.js
|
|
25
25
|
import { resolve, sep } from "node:path";
|
package/dist/compile-core.node-chunks/{view-compiler-WQNV7H5G.js → view-compiler-HHZZFMFQ.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkTemplateCompatibility
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3MOLMQLJ.js";
|
|
4
4
|
import {
|
|
5
5
|
isMainThread,
|
|
6
6
|
parentPort
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resetStoreInfo,
|
|
21
21
|
tagWhiteList,
|
|
22
22
|
transformRpx
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-O5CWW2ZX.js";
|
|
24
24
|
|
|
25
25
|
// ../../dimina/fe/packages/compiler/src/core/view-compiler.js
|
|
26
26
|
import path from "node:path";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
resetStoreInfo,
|
|
17
17
|
setFs,
|
|
18
18
|
storeInfo
|
|
19
|
-
} from "./compile-core.node-chunks/chunk-
|
|
19
|
+
} from "./compile-core.node-chunks/chunk-O5CWW2ZX.js";
|
|
20
20
|
|
|
21
21
|
// ../../dimina/fe/packages/compiler/src/common/publish.js
|
|
22
22
|
function createDist() {
|
|
@@ -254,9 +254,9 @@ var NpmBuilder = class {
|
|
|
254
254
|
|
|
255
255
|
// src/compile-core.js
|
|
256
256
|
var STAGE_IMPORTERS = {
|
|
257
|
-
logic: () => import("./compile-core.node-chunks/logic-compiler-
|
|
258
|
-
view: () => import("./compile-core.node-chunks/view-compiler-
|
|
259
|
-
style: () => import("./compile-core.node-chunks/style-compiler-
|
|
257
|
+
logic: () => import("./compile-core.node-chunks/logic-compiler-4BUMLGSW.js"),
|
|
258
|
+
view: () => import("./compile-core.node-chunks/view-compiler-HHZZFMFQ.js"),
|
|
259
|
+
style: () => import("./compile-core.node-chunks/style-compiler-4F5PSTLH.js")
|
|
260
260
|
};
|
|
261
261
|
var stageLoads = /* @__PURE__ */ new Map();
|
|
262
262
|
var stageModules = /* @__PURE__ */ new Map();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getViewScriptExts,
|
|
13
13
|
getWorkPath,
|
|
14
14
|
storeInfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QLBB5HQB.js";
|
|
16
16
|
|
|
17
17
|
// ../../dimina/fe/packages/compiler/src/common/publish.js
|
|
18
18
|
import path from "node:path";
|
|
@@ -318,9 +318,9 @@ var NpmBuilder = class {
|
|
|
318
318
|
|
|
319
319
|
// src/compile-core.js
|
|
320
320
|
var STAGE_IMPORTERS = {
|
|
321
|
-
logic: () => import("./logic-compiler-
|
|
322
|
-
view: () => import("./view-compiler-
|
|
323
|
-
style: () => import("./style-compiler-
|
|
321
|
+
logic: () => import("./logic-compiler-PK5DY6DB.js"),
|
|
322
|
+
view: () => import("./view-compiler-4GBP7IAT.js"),
|
|
323
|
+
style: () => import("./style-compiler-X4EGM6MY.js")
|
|
324
324
|
};
|
|
325
325
|
var stageLoads = /* @__PURE__ */ new Map();
|
|
326
326
|
var stageModules = /* @__PURE__ */ new Map();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// ../../dimina/fe/packages/compiler/src/common/utils.js
|
|
2
|
+
import crypto from "node:crypto";
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import process from "node:process";
|
|
@@ -39,7 +40,7 @@ function collectAssets(workPath, pagePath, src, targetPath, appId) {
|
|
|
39
40
|
try {
|
|
40
41
|
const ext = `.${src.split(".").pop()}`;
|
|
41
42
|
const dirPath = absolutePath.split(path.sep).slice(0, -1).join("/");
|
|
42
|
-
const prefix = uuid();
|
|
43
|
+
const prefix = uuid(dirPath);
|
|
43
44
|
const targetStatic = `${targetPath}/main/static`;
|
|
44
45
|
if (!fs.existsSync(targetStatic)) {
|
|
45
46
|
fs.mkdirSync(targetStatic, { recursive: true });
|
|
@@ -77,8 +78,8 @@ function transformRpx(styleText) {
|
|
|
77
78
|
return `${Number(pixel)}rem`;
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
function uuid() {
|
|
81
|
-
return
|
|
81
|
+
function uuid(str) {
|
|
82
|
+
return crypto.createHash("sha256").update(str).digest().readBigUInt64BE(0).toString(36);
|
|
82
83
|
}
|
|
83
84
|
var tagWhiteList = [
|
|
84
85
|
"page",
|
|
@@ -585,7 +586,7 @@ function storeComponentConfig(pageJsonContent, pageFilePath) {
|
|
|
585
586
|
return acc;
|
|
586
587
|
}, {});
|
|
587
588
|
configInfo.componentInfo[moduleId] = {
|
|
588
|
-
id: uuid(),
|
|
589
|
+
id: uuid(moduleId),
|
|
589
590
|
path: moduleId,
|
|
590
591
|
component: isComponent,
|
|
591
592
|
usingComponents: cComponents
|
|
@@ -664,7 +665,7 @@ function getPages() {
|
|
|
664
665
|
const pageComponents = pageInfo[path5]?.usingComponents || {};
|
|
665
666
|
const mergedComponents = { ...globalComponents, ...pageComponents };
|
|
666
667
|
return {
|
|
667
|
-
id: uuid(),
|
|
668
|
+
id: uuid(path5),
|
|
668
669
|
path: path5,
|
|
669
670
|
usingComponents: mergedComponents
|
|
670
671
|
};
|
|
@@ -680,7 +681,7 @@ function getPages() {
|
|
|
680
681
|
const pageComponents = pageInfo[fullPath]?.usingComponents || {};
|
|
681
682
|
const mergedComponents = { ...globalComponents, ...pageComponents };
|
|
682
683
|
return {
|
|
683
|
-
id: uuid(),
|
|
684
|
+
id: uuid(fullPath),
|
|
684
685
|
path: fullPath,
|
|
685
686
|
usingComponents: mergedComponents
|
|
686
687
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getWxMemberName,
|
|
3
3
|
warnUnsupportedWxApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S7VHZTMY.js";
|
|
5
5
|
import {
|
|
6
6
|
isMainThread,
|
|
7
7
|
parentPort
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
hasCompileInfo,
|
|
19
19
|
resetStoreInfo,
|
|
20
20
|
resolveAppAlias
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QLBB5HQB.js";
|
|
22
22
|
|
|
23
23
|
// ../../dimina/fe/packages/compiler/src/core/logic-compiler.js
|
|
24
24
|
import fs from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkTemplateCompatibility
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S7VHZTMY.js";
|
|
4
4
|
import {
|
|
5
5
|
isMainThread,
|
|
6
6
|
parentPort
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resetStoreInfo,
|
|
20
20
|
tagWhiteList,
|
|
21
21
|
transformRpx
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QLBB5HQB.js";
|
|
23
23
|
|
|
24
24
|
// ../../dimina/fe/packages/compiler/src/core/view-compiler.js
|
|
25
25
|
import fs from "node:fs";
|
package/dist/pool.node.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
publishToDist,
|
|
4
4
|
resetCompilerState,
|
|
5
5
|
setupCompile
|
|
6
|
-
} from "./pool.node-chunks/chunk-
|
|
6
|
+
} from "./pool.node-chunks/chunk-LVUKEB4F.js";
|
|
7
7
|
import {
|
|
8
8
|
getAppConfigInfo,
|
|
9
9
|
getAppId,
|
|
10
10
|
getAppName
|
|
11
|
-
} from "./pool.node-chunks/chunk-
|
|
11
|
+
} from "./pool.node-chunks/chunk-QLBB5HQB.js";
|
|
12
12
|
|
|
13
13
|
// src/pool-node.js
|
|
14
14
|
import { createRequire } from "node:module";
|