@apps-in-toss/web-framework 0.0.0-dev.1742896938983 → 0.0.0-dev.1742971068713

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/cli/index.js CHANGED
@@ -10055,11 +10055,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
10055
10055
  return resolved2;
10056
10056
  }(resolved, base, preserveSymlinks);
10057
10057
  }
10058
- function fileURLToPath6(id) {
10058
+ function fileURLToPath8(id) {
10059
10059
  return "string" != typeof id || id.startsWith("file://") ? normalizeSlash((0, external_node_url_namespaceObject.fileURLToPath)(id)) : normalizeSlash(id);
10060
10060
  }
10061
10061
  function pathToFileURL(id) {
10062
- return (0, external_node_url_namespaceObject.pathToFileURL)(fileURLToPath6(id)).toString();
10062
+ return (0, external_node_url_namespaceObject.pathToFileURL)(fileURLToPath8(id)).toString();
10063
10063
  }
10064
10064
  const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]), DEFAULT_EXTENSIONS = [".mjs", ".cjs", ".js", ".json"], NOT_FOUND_ERRORS = /* @__PURE__ */ new Set(["ERR_MODULE_NOT_FOUND", "ERR_UNSUPPORTED_DIR_IMPORT", "MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED"]);
10065
10065
  function _tryModuleResolve(id, url, conditions) {
@@ -10072,11 +10072,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
10072
10072
  function _resolve(id, options = {}) {
10073
10073
  if ("string" != typeof id) {
10074
10074
  if (!(id instanceof URL)) throw new TypeError("input must be a `string` or `URL`");
10075
- id = fileURLToPath6(id);
10075
+ id = fileURLToPath8(id);
10076
10076
  }
10077
10077
  if (/(node|data|http|https):/.test(id)) return id;
10078
10078
  if (BUILTIN_MODULES.has(id)) return "node:" + id;
10079
- if (id.startsWith("file://") && (id = fileURLToPath6(id)), isAbsolute(id)) try {
10079
+ if (id.startsWith("file://") && (id = fileURLToPath8(id)), isAbsolute(id)) try {
10080
10080
  if ((0, external_node_fs_namespaceObject.statSync)(id).isFile()) return pathToFileURL(id);
10081
10081
  } catch (error) {
10082
10082
  if ("ENOENT" !== error?.code) throw error;
@@ -10106,7 +10106,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
10106
10106
  return _resolve(id, options);
10107
10107
  }
10108
10108
  function resolvePathSync(id, options) {
10109
- return fileURLToPath6(resolveSync(id, options));
10109
+ return fileURLToPath8(resolveSync(id, options));
10110
10110
  }
10111
10111
  const ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m, COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
10112
10112
  function hasESMSyntax(code, opts = {}) {
@@ -54191,6 +54191,7 @@ var loadConfig = async () => {
54191
54191
  init_esm_shims();
54192
54192
  import fs8 from "fs";
54193
54193
  import path20 from "path";
54194
+ import { fileURLToPath as fileURLToPath6 } from "url";
54194
54195
  import { transform as transform2 } from "@babel/core";
54195
54196
 
54196
54197
  // ../../.yarn/cache/uuidv7-npm-1.0.2-36affe4cb7-882187a3b6.zip/node_modules/uuidv7/dist/index.js
@@ -93786,8 +93787,12 @@ async function compileHbc({ outdir, filePath }) {
93786
93787
  const bindary = await findHermesBinary();
93787
93788
  const bedrockPath = path18.join(packageRoot, ".bedrock");
93788
93789
  await fs6.promises.access(bedrockPath).catch(() => fs6.promises.mkdir(bedrockPath, { recursive: true }));
93789
- const binaryPath = path18.join(bedrockPath, "hermesc");
93790
- await fs6.promises.copyFile(bindary, binaryPath);
93790
+ const binaryPath = path18.join(bedrockPath, getHermesOSExe());
93791
+ try {
93792
+ await fs6.promises.access(binaryPath);
93793
+ } catch (error) {
93794
+ await fs6.promises.copyFile(bindary, binaryPath);
93795
+ }
93791
93796
  const outfile = path18.resolve(outdir, filePath.replace(new RegExp(`${path18.extname(filePath)}$`), ".hbc"));
93792
93797
  await execa2(binaryPath, ["-w", "-emit-binary", "-out", outfile, filePath]);
93793
93798
  return { outfile };
@@ -93961,7 +93966,7 @@ async function babelBuild({
93961
93966
  deploymentId
93962
93967
  }) {
93963
93968
  const packageRoot = getPackageRoot();
93964
- const prebuilt = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod/${platform3}`).replace("file://", "");
93969
+ const prebuilt = fileURLToPath6(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod/${platform3}`));
93965
93970
  const bundle = await fs8.promises.readFile(prebuilt, "utf-8");
93966
93971
  const result = await transform2(bundle, {
93967
93972
  plugins: [
@@ -94028,7 +94033,7 @@ async function runPrebuildToBuild(cwd, config) {
94028
94033
  }
94029
94034
  }))
94030
94035
  );
94031
- const prodJsonFile = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod.json`).replace("file://", "");
94036
+ const prodJsonFile = fileURLToPath6(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod.json`));
94032
94037
  const prodJson = await fs8.promises.readFile(prodJsonFile, "utf-8");
94033
94038
  const prod = JSON.parse(prodJson);
94034
94039
  const prodIos = prod.find((p) => p.platform === "ios");
@@ -94563,6 +94568,7 @@ var serve = (options, listeningListener) => {
94563
94568
  init_esm_shims();
94564
94569
  import fs9 from "fs";
94565
94570
  import path21 from "path";
94571
+ import { fileURLToPath as fileURLToPath7 } from "url";
94566
94572
  import { transform as transform3 } from "@babel/core";
94567
94573
 
94568
94574
  // ../../.yarn/cache/hono-npm-4.7.4-9bd547bbac-b189c5b755.zip/node_modules/hono/dist/index.js
@@ -96191,7 +96197,7 @@ var createApp = ({ appName, web, permissions, webViewProps }) => {
96191
96197
  });
96192
96198
  app.get("/index.bundle", async (c5) => {
96193
96199
  const platform3 = c5.req.query("platform");
96194
- const prebuilt = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/dev/${platform3}`).replace("file://", "");
96200
+ const prebuilt = fileURLToPath7(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/dev/${platform3}`));
96195
96201
  const bundle = await fs9.promises.readFile(prebuilt, "utf-8");
96196
96202
  c5.header("Surrogate-Control", "no-store");
96197
96203
  c5.header("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate");