@meituan-nocode/vite-plugin-nocode-compiler 0.3.1-beta.15 → 0.3.1-beta.17
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/index.cjs +10 -2
- package/dist/index.js +10 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
var import_nocode_compiler_core = require("@meituan-nocode/nocode-compiler-core");
|
|
38
|
+
var fs = __toESM(require("fs"), 1);
|
|
38
39
|
|
|
39
40
|
// src/utils/index.ts
|
|
40
41
|
var import_path = require("path");
|
|
@@ -178,7 +179,7 @@ function readJsonBody(req) {
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
// package.json
|
|
181
|
-
var version = "0.3.1-beta.
|
|
182
|
+
var version = "0.3.1-beta.17";
|
|
182
183
|
|
|
183
184
|
// src/design-mode/types.ts
|
|
184
185
|
var SANDBOX_SCRIPT_PATH = "/sandbox-script.js";
|
|
@@ -542,7 +543,14 @@ function componentCompiler(options = {}) {
|
|
|
542
543
|
query
|
|
543
544
|
});
|
|
544
545
|
if (useJSXCompiler) {
|
|
545
|
-
|
|
546
|
+
let diskCode;
|
|
547
|
+
if (hasVirtualCode(id)) {
|
|
548
|
+
try {
|
|
549
|
+
diskCode = fs.readFileSync(filePath, "utf-8");
|
|
550
|
+
} catch {
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
return jsxCompiler.compile(code, filePath, pkgRegistry, diskCode) || code;
|
|
546
554
|
}
|
|
547
555
|
if (useVueCompiler) {
|
|
548
556
|
return vueCompiler.compile(code, filePath, pkgRegistry) || code;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import { DesignModeCompiler, detectCompileScenario, detectShadcnProject, generateBodyMetadata, injectBodyMetadata, JSXCompiler, MetricType, MonitorService, PackageVersionRegistry, preloadDependencyVersions, SHADCN_NPM_DEPS, VueCompiler } from "@meituan-nocode/nocode-compiler-core";
|
|
3
|
+
import * as fs from "fs";
|
|
3
4
|
|
|
4
5
|
// src/utils/index.ts
|
|
5
6
|
import { normalize, dirname, isAbsolute, join } from "path";
|
|
@@ -143,7 +144,7 @@ function readJsonBody(req) {
|
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
// package.json
|
|
146
|
-
var version = "0.3.1-beta.
|
|
147
|
+
var version = "0.3.1-beta.17";
|
|
147
148
|
|
|
148
149
|
// src/design-mode/types.ts
|
|
149
150
|
var SANDBOX_SCRIPT_PATH = "/sandbox-script.js";
|
|
@@ -507,7 +508,14 @@ function componentCompiler(options = {}) {
|
|
|
507
508
|
query
|
|
508
509
|
});
|
|
509
510
|
if (useJSXCompiler) {
|
|
510
|
-
|
|
511
|
+
let diskCode;
|
|
512
|
+
if (hasVirtualCode(id)) {
|
|
513
|
+
try {
|
|
514
|
+
diskCode = fs.readFileSync(filePath, "utf-8");
|
|
515
|
+
} catch {
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return jsxCompiler.compile(code, filePath, pkgRegistry, diskCode) || code;
|
|
511
519
|
}
|
|
512
520
|
if (useVueCompiler) {
|
|
513
521
|
return vueCompiler.compile(code, filePath, pkgRegistry) || code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meituan-nocode/vite-plugin-nocode-compiler",
|
|
3
|
-
"version": "0.3.1-beta.
|
|
3
|
+
"version": "0.3.1-beta.17",
|
|
4
4
|
"description": "Vite plugin for nocode compiler",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@meituan-nocode/nocode-compiler-core": "0.2.9-beta.
|
|
20
|
+
"@meituan-nocode/nocode-compiler-core": "0.2.9-beta.9",
|
|
21
21
|
"@meituan-nocode/nocode-design-mode-sandbox-script": "0.1.0-beta.3"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|