veryfront 0.1.1018 → 0.1.1019
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/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/plugin-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/plugin-loader.ts"],"names":[],"mappings":"AA6FA;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBpE;AAgCD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA6D/E;AAED,wBAAsB,UAAU,CAC9B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAC/B,OAAO,CAAC,OAAO,CAAC,CAsClB"}
|
|
@@ -10,7 +10,8 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
10
10
|
import { serverLogger } from "../../utils/index.js";
|
|
11
11
|
import { getErrorBySlug, IMPORT_RESOLUTION_ERROR, NETWORK_ERROR, VeryfrontError, } from "../../errors/index.js";
|
|
12
12
|
import { getTailwindPluginBundleUrl } from "../../build/binary-plugin-includes.js";
|
|
13
|
-
import { isDeno } from "../../platform/compat/runtime.js";
|
|
13
|
+
import { getDenoRuntime, isDeno } from "../../platform/compat/runtime.js";
|
|
14
|
+
import { join, toFileUrl } from "../../platform/compat/path/index.js";
|
|
14
15
|
import { bareName, PACKAGE_SPEC_RE, TAILWIND_PLUGIN_ALLOWLIST, } from "./tailwind-plugin-allowlist.js";
|
|
15
16
|
const logger = serverLogger.component("tailwind");
|
|
16
17
|
/**
|
|
@@ -82,16 +83,23 @@ async function importBundledModule(code) {
|
|
|
82
83
|
const dataUrl = `data:text/javascript;base64,${encodeToBase64(code)}`;
|
|
83
84
|
return await import(dataUrl);
|
|
84
85
|
}
|
|
85
|
-
const
|
|
86
|
-
|
|
86
|
+
const deno = getDenoRuntime();
|
|
87
|
+
if (!deno) {
|
|
88
|
+
throw IMPORT_RESOLUTION_ERROR.create({
|
|
89
|
+
detail: "Deno runtime was expected while importing a Tailwind plugin module",
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const tempDir = await deno.makeTempDir({ prefix: "vf_tw_plugin_" });
|
|
93
|
+
const tempPath = join(tempDir, "plugin.mjs");
|
|
94
|
+
await deno.writeTextFile(tempPath, code);
|
|
87
95
|
logger.debug("Wrote plugin to temp file", { path: tempPath });
|
|
88
96
|
try {
|
|
89
|
-
return await import(
|
|
97
|
+
return await import(toFileUrl(tempPath).href);
|
|
90
98
|
}
|
|
91
99
|
finally {
|
|
92
|
-
await
|
|
93
|
-
logger.error("Failed to clean up temp plugin
|
|
94
|
-
path:
|
|
100
|
+
await deno.remove(tempDir, { recursive: true }).catch((error) => {
|
|
101
|
+
logger.error("Failed to clean up temp plugin directory", {
|
|
102
|
+
path: tempDir,
|
|
95
103
|
error: error instanceof Error ? error.message : String(error),
|
|
96
104
|
});
|
|
97
105
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1019",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
"@types/react": "19.2.14",
|
|
327
327
|
"@types/react-dom": "19.2.3",
|
|
328
328
|
"ws": "8.21.0",
|
|
329
|
-
"@veryfront/ext-bundler-esbuild": "0.1.
|
|
329
|
+
"@veryfront/ext-bundler-esbuild": "0.1.1019"
|
|
330
330
|
},
|
|
331
331
|
"devDependencies": {
|
|
332
332
|
"@types/node": "20.9.0"
|