eclipsa 0.1.9 → 0.1.11

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/vite/mod.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Bn as createRequestFetch, Fn as applyActionCsrfCookie, In as ensureActionCsrfToken, Jn as runHandleError, L as primeLocationState, Qn as withServerRequestContext, Rn as APP_HOOKS_ELEMENT_ID, Wn as markPublicError, bn as composeRouteMetadata, dn as ROUTE_DATA_REQUEST_HEADER, gn as ROUTE_PREFLIGHT_REQUEST_HEADER, hn as ROUTE_PREFLIGHT_ENDPOINT, pn as ROUTE_MANIFEST_ELEMENT_ID, qn as resolveReroute, un as ROUTE_DATA_ENDPOINT, vn as ROUTE_RPC_URL_HEADER, xn as renderRouteMetadataHead, zn as attachRequestFetch } from "../action-CArGTCnQ.mjs";
1
+ import { Bn as createRequestFetch, Fn as applyActionCsrfCookie, In as ensureActionCsrfToken, Jn as runHandleError, L as primeLocationState, Qn as withServerRequestContext, Rn as APP_HOOKS_ELEMENT_ID, Wn as markPublicError, bn as composeRouteMetadata, dn as ROUTE_DATA_REQUEST_HEADER, gn as ROUTE_PREFLIGHT_REQUEST_HEADER, hn as ROUTE_PREFLIGHT_ENDPOINT, pn as ROUTE_MANIFEST_ELEMENT_ID, qn as resolveReroute, un as ROUTE_DATA_ENDPOINT, vn as ROUTE_RPC_URL_HEADER, xn as renderRouteMetadataHead, zn as attachRequestFetch } from "../action-BcEktMN2.mjs";
2
2
  import { a as jsxDEV, t as Fragment } from "../jsx-dev-runtime-DpbWQ4Q0.mjs";
3
3
  import { t as RESUME_HMR_EVENT } from "../resume-hmr-qTpLc5o-.mjs";
4
4
  import { createServerModuleRunner, transformWithOxc } from "vite";
@@ -7,6 +7,7 @@ import * as fs from "node:fs/promises";
7
7
  import fg from "fast-glob";
8
8
  import * as path$1 from "node:path";
9
9
  import path from "node:path";
10
+ import { Buffer as Buffer$1 } from "node:buffer";
10
11
  import ts from "typescript";
11
12
  import { runRustAnalyzeCompiler, runRustCompiler } from "@eclipsa/optimizer";
12
13
  import { cwd } from "node:process";
@@ -447,6 +448,7 @@ const compileSSRModule = async (code, id) => {
447
448
  //#region vite/compiler.ts
448
449
  const SYMBOL_QUERY = "eclipsa-symbol";
449
450
  const SYMBOL_LANG_QUERY = "lang.js";
451
+ const SIMPLE_BUILD_SYMBOL_PATTERN = /^[A-Za-z0-9_-]+$/;
450
452
  const cache = /* @__PURE__ */ new Map();
451
453
  const servedSources = /* @__PURE__ */ new Map();
452
454
  const primeCompilerCache = async (filePath, source) => {
@@ -722,7 +724,8 @@ const loadSymbolModuleForSSR = async (id) => {
722
724
  return compileSSRModule(symbol.code, `${parsed.filePath}?${SYMBOL_QUERY}=${parsed.symbolId}`);
723
725
  };
724
726
  const createDevSymbolUrl = (root, filePath, symbolId) => createSymbolRequestId(createDevSourceUrl(root, filePath), symbolId);
725
- const createBuildSymbolUrl = (symbolId) => `/entries/symbol__${symbolId}.js`;
727
+ const createBuildSymbolEntryName = (symbolId) => SIMPLE_BUILD_SYMBOL_PATTERN.test(symbolId) ? `symbol__${symbolId}` : `symbol__b64_${Buffer$1.from(symbolId).toString("base64url")}`;
728
+ const createBuildSymbolUrl = (symbolId) => `/entries/${createBuildSymbolEntryName(symbolId)}.js`;
726
729
  const createBuildServerActionUrl = (actionId) => `../ssr/entries/action__${actionId}.mjs`;
727
730
  const createBuildServerLoaderUrl = (loaderId) => `../ssr/entries/loader__${loaderId}.mjs`;
728
731
  const ANALYZABLE_SOURCE_EXTENSIONS = new Set([
@@ -3230,7 +3233,7 @@ const createConfig = (options) => async (userConfig) => {
3230
3233
  const clientInput = Object.fromEntries([
3231
3234
  ["client_boot", path.join(root, "app/+client.dev.tsx")],
3232
3235
  ...hasAppHooks ? [["app_hooks", appHooksPath]] : [],
3233
- ...symbols.map((symbol) => [`symbol__${symbol.id}`, createSymbolRequestId(symbol.filePath, symbol.id)]),
3236
+ ...symbols.map((symbol) => [createBuildSymbolEntryName(symbol.id), createSymbolRequestId(symbol.filePath, symbol.id)]),
3234
3237
  ...routeModules.map((entry) => [entry.entryName, entry.filePath])
3235
3238
  ]);
3236
3239
  const ssrInput = Object.fromEntries([