@cedarjs/prerender 1.0.0-canary.13053 → 1.0.0-canary.13055

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,4 +1,4 @@
1
- import fs from "fs";
1
+ import fs from "node:fs";
2
2
  import mime from "mime-types";
3
3
  function convertToDataUrl(assetPath) {
4
4
  try {
@@ -1,4 +1,4 @@
1
- import fs from "fs";
1
+ import fs from "node:fs";
2
2
  import mime from "mime-types";
3
3
  function convertToDataUrl(assetPath) {
4
4
  try {
@@ -31,11 +31,11 @@ __export(utils_exports, {
31
31
  convertToDataUrl: () => convertToDataUrl
32
32
  });
33
33
  module.exports = __toCommonJS(utils_exports);
34
- var import_fs = __toESM(require("fs"), 1);
34
+ var import_node_fs = __toESM(require("node:fs"), 1);
35
35
  var import_mime_types = __toESM(require("mime-types"), 1);
36
36
  function convertToDataUrl(assetPath) {
37
37
  try {
38
- const base64AssetContents = import_fs.default.readFileSync(assetPath, "base64");
38
+ const base64AssetContents = import_node_fs.default.readFileSync(assetPath, "base64");
39
39
  const mimeType = import_mime_types.default.lookup(assetPath);
40
40
  return `data:${mimeType};base64,${base64AssetContents}`;
41
41
  } catch {
@@ -32,11 +32,11 @@ __export(utils_exports, {
32
32
  dedent: () => dedent
33
33
  });
34
34
  module.exports = __toCommonJS(utils_exports);
35
- var import_fs = __toESM(require("fs"), 1);
35
+ var import_node_fs = __toESM(require("node:fs"), 1);
36
36
  var import_mime_types = __toESM(require("mime-types"), 1);
37
37
  function convertToDataUrl(assetPath) {
38
38
  try {
39
- const base64AssetContents = import_fs.default.readFileSync(assetPath, "base64");
39
+ const base64AssetContents = import_node_fs.default.readFileSync(assetPath, "base64");
40
40
  const mimeType = import_mime_types.default.lookup(assetPath);
41
41
  return `data:${mimeType};base64,${base64AssetContents}`;
42
42
  } catch {
@@ -35,7 +35,7 @@ __export(internal_exports, {
35
35
  writeToDist: () => writeToDist
36
36
  });
37
37
  module.exports = __toCommonJS(internal_exports);
38
- var import_fs = __toESM(require("fs"), 1);
38
+ var import_node_fs = __toESM(require("node:fs"), 1);
39
39
  var import_path = __toESM(require("path"), 1);
40
40
  var import_fetch = require("@whatwg-node/fetch");
41
41
  var import_typescript = require("typescript");
@@ -43,7 +43,7 @@ var import_project_config = require("@cedarjs/project-config");
43
43
  const INDEX_FILE = import_path.default.join((0, import_project_config.getPaths)().web.dist, "index.html");
44
44
  const DEFAULT_INDEX = import_path.default.join((0, import_project_config.getPaths)().web.dist, "200.html");
45
45
  const getRootHtmlPath = () => {
46
- if (import_fs.default.existsSync(DEFAULT_INDEX)) {
46
+ if (import_node_fs.default.existsSync(DEFAULT_INDEX)) {
47
47
  return DEFAULT_INDEX;
48
48
  } else {
49
49
  return INDEX_FILE;
@@ -72,25 +72,25 @@ const registerShims = (routerPath) => {
72
72
  };
73
73
  const writeToDist = (outputHtmlPath, renderOutput) => {
74
74
  const dirName = import_path.default.dirname(outputHtmlPath);
75
- const exist = import_fs.default.existsSync(dirName);
75
+ const exist = import_node_fs.default.existsSync(dirName);
76
76
  if (!exist) {
77
- import_fs.default.mkdirSync(dirName, { recursive: true });
77
+ import_node_fs.default.mkdirSync(dirName, { recursive: true });
78
78
  }
79
- import_fs.default.writeFileSync(outputHtmlPath, renderOutput);
79
+ import_node_fs.default.writeFileSync(outputHtmlPath, renderOutput);
80
80
  };
81
81
  const parseTypeScriptConfigFiles = () => {
82
82
  const rwPaths = (0, import_project_config.getPaths)();
83
83
  const parseConfigFile = (basePath) => {
84
84
  let configPath = import_path.default.join(basePath, "tsconfig.json");
85
- if (!import_fs.default.existsSync(configPath)) {
85
+ if (!import_node_fs.default.existsSync(configPath)) {
86
86
  configPath = import_path.default.join(basePath, "jsconfig.json");
87
- if (!import_fs.default.existsSync(configPath)) {
87
+ if (!import_node_fs.default.existsSync(configPath)) {
88
88
  return null;
89
89
  }
90
90
  }
91
91
  return (0, import_typescript.parseConfigFileTextToJson)(
92
92
  configPath,
93
- import_fs.default.readFileSync(configPath, "utf-8")
93
+ import_node_fs.default.readFileSync(configPath, "utf-8")
94
94
  );
95
95
  };
96
96
  const apiConfig = parseConfigFile(rwPaths.api.base);
package/dist/internal.js CHANGED
@@ -1,4 +1,4 @@
1
- import fs from "fs";
1
+ import fs from "node:fs";
2
2
  import path from "path";
3
3
  import { fetch } from "@whatwg-node/fetch";
4
4
  import { parseConfigFileTextToJson } from "typescript";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/prerender",
3
- "version": "1.0.0-canary.13053+a2d2ae402",
3
+ "version": "1.0.0-canary.13055+995fcd57f",
4
4
  "description": "CedarJS prerender",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,12 +71,12 @@
71
71
  "@babel/generator": "7.28.5",
72
72
  "@babel/parser": "7.28.5",
73
73
  "@babel/traverse": "7.28.5",
74
- "@cedarjs/babel-config": "1.0.0-canary.13053",
75
- "@cedarjs/project-config": "1.0.0-canary.13053",
76
- "@cedarjs/router": "1.0.0-canary.13053",
77
- "@cedarjs/structure": "1.0.0-canary.13053",
78
- "@cedarjs/vite": "1.0.0-canary.13053",
79
- "@cedarjs/web": "1.0.0-canary.13053",
74
+ "@cedarjs/babel-config": "1.0.0-canary.13055",
75
+ "@cedarjs/project-config": "1.0.0-canary.13055",
76
+ "@cedarjs/router": "1.0.0-canary.13055",
77
+ "@cedarjs/structure": "1.0.0-canary.13055",
78
+ "@cedarjs/vite": "1.0.0-canary.13055",
79
+ "@cedarjs/web": "1.0.0-canary.13055",
80
80
  "@rollup/plugin-alias": "5.1.1",
81
81
  "@rollup/plugin-commonjs": "28.0.9",
82
82
  "@rollup/plugin-node-resolve": "16.0.3",
@@ -95,7 +95,7 @@
95
95
  "vite-node": "3.2.4"
96
96
  },
97
97
  "devDependencies": {
98
- "@cedarjs/framework-tools": "1.0.0-canary.13053",
98
+ "@cedarjs/framework-tools": "1.0.0-canary.13055",
99
99
  "@types/mime-types": "2.1.4",
100
100
  "@types/react": "^18.2.55",
101
101
  "babel-plugin-tester": "11.0.4",
@@ -116,5 +116,5 @@
116
116
  "react": "react",
117
117
  "react-dom": "react-dom"
118
118
  },
119
- "gitHead": "a2d2ae402ab934d33b5824a5444d0c865a9e3624"
119
+ "gitHead": "995fcd57f9697590e8ae7e1b3ae7f5119bd1fa44"
120
120
  }