veryfront 0.1.169 → 0.1.170

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,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -11,4 +11,5 @@ export declare function rewriteNodeExternalImports(code: string, projectDir: str
11
11
  export declare function rewriteCompiledBinaryVeryfrontImports(code: string): string;
12
12
  export declare function rewriteCompiledBinaryUserDependencyImports(code: string, userDeps: Map<string, string>): string;
13
13
  export declare function rewriteDenoNpmDependencyImports(code: string, projectDir: string, fs: FileSystem, userDeps: Map<string, string>): Promise<string>;
14
+ export declare function rewriteDenoNodeBuiltinImports(code: string): string;
14
15
  //# sourceMappingURL=loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/routing/api/module-loader/loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AA4KjE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAejE;AAgBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAyBtF;AAuaD,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAUxF;AAED,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,UAAU,EACd,aAAa,EAAE,cAAc,UAAU,EAAE,aAAa,GACrD,OAAO,CAAC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CAAC,GAAG,MAAM,EAAE,CAUxF;AAED,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,UAAU,EACd,aAAa,EAAE,cAAc,UAAU,EAAE,aAAa,GACrD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoBxB;AAED,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAW9C;AAED,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,EACd,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,OAAO,CAAC,MAAM,CAAC,CA6EjB;AAED,wBAAgB,qCAAqC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB1E;AAED,wBAAgB,0CAA0C,CACxD,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,MAAM,CAoDR;AAED,wBAAsB,+BAA+B,CACnD,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,EACd,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC5B,OAAO,CAAC,MAAM,CAAC,CA0BjB;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBlE"}
@@ -668,6 +668,15 @@ export async function rewriteDenoNpmDependencyImports(code, projectDir, fs, user
668
668
  }
669
669
  return transformed;
670
670
  }
671
+ export function rewriteDenoNodeBuiltinImports(code) {
672
+ let transformed = code;
673
+ for (const mod of NODE_BUILTINS) {
674
+ const escaped = mod.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
675
+ transformed = transformed.replace(new RegExp(`from\\s+["']${escaped}["']`, "g"), `from "node:${mod}"`);
676
+ transformed = transformed.replace(new RegExp(`import\\s*\\(\\s*["']${escaped}["']\\s*\\)`, "g"), `import("node:${mod}")`);
677
+ }
678
+ return transformed;
679
+ }
671
680
  async function rewriteExternalImports(code, projectDir, fs, userDeps = new Map()) {
672
681
  let transformed = code;
673
682
  if (isNode) {
@@ -680,13 +689,7 @@ async function rewriteExternalImports(code, projectDir, fs, userDeps = new Map()
680
689
  }
681
690
  if (isDeno) {
682
691
  transformed = rewriteNpmImports(transformed);
683
- // Rewrite bare Node.js built-in imports to node: prefix for Deno compatibility.
684
- // npm packages often use require('fs') / from "fs" without the node: prefix.
685
- for (const mod of NODE_BUILTINS) {
686
- const escaped = mod.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
687
- transformed = transformed.replace(new RegExp(`from\\s+["']${escaped}["']`, "g"), `from "node:${mod}"`);
688
- transformed = transformed.replace(new RegExp(`import\\s*\\(\\s*["']${escaped}["']\\s*\\)`, "g"), `import("node:${mod}")`);
689
- }
692
+ transformed = rewriteDenoNodeBuiltinImports(transformed);
690
693
  // Rewrite user-installed npm dependencies.
691
694
  // In non-compiled Deno: use npm: specifiers (resolved by Deno's npm support).
692
695
  // In compiled binaries: use the createRequire-based `require` shim (already
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.169";
1
+ export declare const VERSION = "0.1.170";
2
2
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.169";
3
+ export const VERSION = "0.1.170";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.169",
3
+ "version": "0.1.170",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -913,6 +913,24 @@ export async function rewriteDenoNpmDependencyImports(
913
913
  return transformed;
914
914
  }
915
915
 
916
+ export function rewriteDenoNodeBuiltinImports(code: string): string {
917
+ let transformed = code;
918
+
919
+ for (const mod of NODE_BUILTINS) {
920
+ const escaped = mod.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
921
+ transformed = transformed.replace(
922
+ new RegExp(`from\\s+["']${escaped}["']`, "g"),
923
+ `from "node:${mod}"`,
924
+ );
925
+ transformed = transformed.replace(
926
+ new RegExp(`import\\s*\\(\\s*["']${escaped}["']\\s*\\)`, "g"),
927
+ `import("node:${mod}")`,
928
+ );
929
+ }
930
+
931
+ return transformed;
932
+ }
933
+
916
934
  async function rewriteExternalImports(
917
935
  code: string,
918
936
  projectDir: string,
@@ -931,20 +949,7 @@ async function rewriteExternalImports(
931
949
 
932
950
  if (isDeno) {
933
951
  transformed = rewriteNpmImports(transformed);
934
-
935
- // Rewrite bare Node.js built-in imports to node: prefix for Deno compatibility.
936
- // npm packages often use require('fs') / from "fs" without the node: prefix.
937
- for (const mod of NODE_BUILTINS) {
938
- const escaped = mod.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
939
- transformed = transformed.replace(
940
- new RegExp(`from\\s+["']${escaped}["']`, "g"),
941
- `from "node:${mod}"`,
942
- );
943
- transformed = transformed.replace(
944
- new RegExp(`import\\s*\\(\\s*["']${escaped}["']\\s*\\)`, "g"),
945
- `import("node:${mod}")`,
946
- );
947
- }
952
+ transformed = rewriteDenoNodeBuiltinImports(transformed);
948
953
 
949
954
  // Rewrite user-installed npm dependencies.
950
955
  // In non-compiled Deno: use npm: specifiers (resolved by Deno's npm support).
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.169";
3
+ export const VERSION = "0.1.170";