minista 2.4.0 → 2.4.3

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/README.md CHANGED
@@ -31,7 +31,7 @@ $ npm init minista@latest
31
31
  ### Manual Setup
32
32
 
33
33
  ```bash
34
- $ npm install --save-dev minista react react-dom
34
+ $ npm install --save-dev minista react@17 react-dom@17
35
35
  ```
36
36
 
37
37
  ```bash
package/dist/download.js CHANGED
@@ -15,7 +15,7 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
15
15
  const html = await fs.readFile(entryPoint, "utf8");
16
16
  const parsedHtml = parseHtml(html);
17
17
  const imgTags = parsedHtml.getElementsByTagName("img");
18
- const sourseTags = parsedHtml.getElementsByTagName("sourse");
18
+ const sourceTags = parsedHtml.getElementsByTagName("source");
19
19
  if (imgTags.length > 0) {
20
20
  for (const item of imgTags) {
21
21
  const itemSrc = item.getAttribute("src");
@@ -34,8 +34,8 @@ async function downloadFiles(entryPoints, remoteUrl, remoteName, downloadOutDir,
34
34
  }
35
35
  }
36
36
  }
37
- if (sourseTags.length > 0) {
38
- for (const item of sourseTags) {
37
+ if (sourceTags.length > 0) {
38
+ for (const item of sourceTags) {
39
39
  const itemSrc = item.getAttribute("src");
40
40
  const itemSrcset = item.getAttribute("srcset");
41
41
  if (itemSrc && matchSrcUrls(itemSrc, remoteUrl)) {
package/dist/generate.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import fs from "fs-extra";
2
3
  import path from "path";
3
4
  import url from "url";
4
5
  import { systemConfig } from "./system.js";
@@ -71,6 +72,11 @@ async function generateTempAssets(config, viteConfig) {
71
72
  }
72
73
  async function generatePartialHydration(config, mdxConfig, viteConfig) {
73
74
  const moduleDir = systemConfig.temp.partialHydration.outDir + "/modules";
75
+ const moduleDirRelative = path.relative(".", moduleDir);
76
+ const moduleDirExists = fs.existsSync(moduleDirRelative);
77
+ if (!moduleDirExists) {
78
+ return;
79
+ }
74
80
  const moduleFilePaths = await getFilePaths(moduleDir, "txt");
75
81
  if (moduleFilePaths.length === 0) {
76
82
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minista",
3
3
  "description": "Next.js Like Development with 100% Static Generate",
4
- "version": "2.4.0",
4
+ "version": "2.4.3",
5
5
  "bin": {
6
6
  "minista": "./bin/minista.js"
7
7
  },
@@ -101,8 +101,8 @@
101
101
  "@types/js-beautify": "^1.13.3",
102
102
  "@types/mime-types": "^2.1.1",
103
103
  "@types/node": "^17.0.31",
104
- "@types/react": "^17.0.43",
105
- "@types/react-dom": "^17.0.14",
104
+ "@types/react": "^17.0.45",
105
+ "@types/react-dom": "^17.0.16",
106
106
  "@types/react-helmet": "^6.1.5",
107
107
  "@types/uuid": "^8.3.4",
108
108
  "react": "^17.0.2",