veryfront 0.1.1017 → 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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Write a thin `deno.json` to the scaffolded project directory. Relies on
3
- * `nodeModulesDir: "auto"` so Deno reads dependencies from the
4
- * sibling `package.json` and materializes `node_modules/` on first task run.
3
+ * exact-version `npm:` specs so task execution stays hosted by Deno without
4
+ * drifting to a newer CLI than the scaffolded dependencies.
5
5
  *
6
6
  * Throws if `deno.json` already exists at the destination — no template
7
7
  * ships one today, so an existing file means something unexpected.
@@ -1 +1 @@
1
- {"version":3,"file":"deno-config-generator.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/deno-config-generator.ts"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxE"}
1
+ {"version":3,"file":"deno-config-generator.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/deno-config-generator.ts"],"names":[],"mappings":"AAeA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxE"}
@@ -1,17 +1,19 @@
1
+ import { VERSION } from "../../utils/index.js";
1
2
  import { join } from "../../../src/platform/compat/path/index.js";
2
3
  import { createFileSystem } from "../../../src/platform/index.js";
4
+ const VERYFRONT_DENO_SPEC = `npm:veryfront@${VERSION}`;
3
5
  const DENO_CONFIG = {
4
6
  nodeModulesDir: "auto",
5
7
  tasks: {
6
- dev: "deno run -A npm:veryfront@latest dev",
7
- build: "deno run -A npm:veryfront@latest build",
8
- preview: "deno run -A npm:veryfront@latest preview",
8
+ dev: `deno run -A ${VERYFRONT_DENO_SPEC} dev`,
9
+ build: `deno run -A ${VERYFRONT_DENO_SPEC} build`,
10
+ preview: `deno run -A ${VERYFRONT_DENO_SPEC} preview`,
9
11
  },
10
12
  };
11
13
  /**
12
14
  * Write a thin `deno.json` to the scaffolded project directory. Relies on
13
- * `nodeModulesDir: "auto"` so Deno reads dependencies from the
14
- * sibling `package.json` and materializes `node_modules/` on first task run.
15
+ * exact-version `npm:` specs so task execution stays hosted by Deno without
16
+ * drifting to a newer CLI than the scaffolded dependencies.
15
17
  *
16
18
  * Throws if `deno.json` already exists at the destination — no template
17
19
  * ships one today, so an existing file means something unexpected.
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.1017",
3
+ "version": "0.1.1019",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/plugin-loader.ts"],"names":[],"mappings":"AA4FA;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBpE;AAwBD;;;;;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"}
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 tempPath = await dntShim.Deno.makeTempFile({ prefix: "vf_tw_plugin_", suffix: ".mjs" });
86
- await dntShim.Deno.writeTextFile(tempPath, code);
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(`file://${tempPath}`);
97
+ return await import(toFileUrl(tempPath).href);
90
98
  }
91
99
  finally {
92
- await dntShim.Deno.remove(tempPath).catch((error) => {
93
- logger.error("Failed to clean up temp plugin file", {
94
- path: tempPath,
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
  });
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.1017";
2
+ export declare const VERSION = "0.1.1019";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.1017";
4
+ export const VERSION = "0.1.1019";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.1017",
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.1017"
329
+ "@veryfront/ext-bundler-esbuild": "0.1.1019"
330
330
  },
331
331
  "devDependencies": {
332
332
  "@types/node": "20.9.0"