@modern-js/plugin-ssg 2.58.2 → 2.58.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/dist/cjs/index.js CHANGED
@@ -35,11 +35,11 @@ module.exports = __toCommonJS(src_exports);
35
35
  var import_path = __toESM(require("path"));
36
36
  var import_utils = require("@modern-js/utils");
37
37
  var import_react_router_dom = require("react-router-dom");
38
- var import_util = require("./libs/util");
39
- var import_server = require("./server");
38
+ var import_make = require("./libs/make");
40
39
  var import_output = require("./libs/output");
41
40
  var import_replace = require("./libs/replace");
42
- var import_make = require("./libs/make");
41
+ var import_util = require("./libs/util");
42
+ var import_server = require("./server");
43
43
  const ssgPlugin = () => ({
44
44
  name: "@modern-js/plugin-ssg",
45
45
  pre: [
@@ -22,8 +22,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  var import_http = require("http");
25
- var import_portfinder = __toESM(require("portfinder"));
26
25
  var import_prod_server = require("@modern-js/prod-server");
26
+ var import_portfinder = __toESM(require("portfinder"));
27
27
  var import_consts = require("./consts");
28
28
  process.on("message", async (chunk) => {
29
29
  if (chunk === import_consts.CLOSE_SIGN) {
package/dist/esm/index.js CHANGED
@@ -5,11 +5,11 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
5
5
  import path from "path";
6
6
  import { filterRoutesForServer, logger } from "@modern-js/utils";
7
7
  import { generatePath } from "react-router-dom";
8
- import { flattenRoutes, formatOutput, isDynamicUrl, readJSONSpec, standardOptions, writeJSONSpec } from "./libs/util";
9
- import { createServer } from "./server";
8
+ import { makeRoute } from "./libs/make";
10
9
  import { writeHtmlFile } from "./libs/output";
11
10
  import { replaceRoute } from "./libs/replace";
12
- import { makeRoute } from "./libs/make";
11
+ import { flattenRoutes, formatOutput, isDynamicUrl, readJSONSpec, standardOptions, writeJSONSpec } from "./libs/util";
12
+ import { createServer } from "./server";
13
13
  var ssgPlugin = function() {
14
14
  return {
15
15
  name: "@modern-js/plugin-ssg",
@@ -1,7 +1,7 @@
1
1
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
2
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
3
3
  import path from "path";
4
- import { ROUTE_SPEC_FILE, fs, isSingleEntry, SERVER_BUNDLE_DIRECTORY } from "@modern-js/utils";
4
+ import { fs, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, isSingleEntry } from "@modern-js/utils";
5
5
  function formatOutput(filename) {
6
6
  var outputPath = path.extname(filename) ? filename : "".concat(filename, "/index.html");
7
7
  return outputPath;
@@ -2,8 +2,8 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
2
  import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
3
3
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
4
  import { request } from "http";
5
- import portfinder from "portfinder";
6
5
  import { createProdServer, loadServerPlugins } from "@modern-js/prod-server";
6
+ import portfinder from "portfinder";
7
7
  import { CLOSE_SIGN } from "./consts";
8
8
  process.on("message", function() {
9
9
  var _ref = _async_to_generator(function(chunk) {
@@ -1,11 +1,11 @@
1
1
  import path from "path";
2
2
  import { filterRoutesForServer, logger } from "@modern-js/utils";
3
3
  import { generatePath } from "react-router-dom";
4
- import { flattenRoutes, formatOutput, isDynamicUrl, readJSONSpec, standardOptions, writeJSONSpec } from "./libs/util";
5
- import { createServer } from "./server";
4
+ import { makeRoute } from "./libs/make";
6
5
  import { writeHtmlFile } from "./libs/output";
7
6
  import { replaceRoute } from "./libs/replace";
8
- import { makeRoute } from "./libs/make";
7
+ import { flattenRoutes, formatOutput, isDynamicUrl, readJSONSpec, standardOptions, writeJSONSpec } from "./libs/util";
8
+ import { createServer } from "./server";
9
9
  const ssgPlugin = () => ({
10
10
  name: "@modern-js/plugin-ssg",
11
11
  pre: [
@@ -1,5 +1,5 @@
1
1
  import path from "path";
2
- import { ROUTE_SPEC_FILE, fs, isSingleEntry, SERVER_BUNDLE_DIRECTORY } from "@modern-js/utils";
2
+ import { fs, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, isSingleEntry } from "@modern-js/utils";
3
3
  function formatOutput(filename) {
4
4
  const outputPath = path.extname(filename) ? filename : `${filename}/index.html`;
5
5
  return outputPath;
@@ -1,6 +1,6 @@
1
1
  import { request } from "http";
2
- import portfinder from "portfinder";
3
2
  import { createProdServer, loadServerPlugins } from "@modern-js/prod-server";
3
+ import portfinder from "portfinder";
4
4
  import { CLOSE_SIGN } from "./consts";
5
5
  process.on("message", async (chunk) => {
6
6
  if (chunk === CLOSE_SIGN) {
@@ -1,6 +1,6 @@
1
- import type { ServerRoute as ModernRoute } from '@modern-js/types';
2
1
  import type { ServerUserConfig } from '@modern-js/app-tools';
3
- import type { SsgRoute, SSGConfig, EntryPoint, SSGMultiEntryOptions, AgreedRoute } from '../types';
2
+ import type { ServerRoute as ModernRoute } from '@modern-js/types';
3
+ import type { AgreedRoute, EntryPoint, SSGConfig, SSGMultiEntryOptions, SsgRoute } from '../types';
4
4
  export declare function formatOutput(filename: string): string;
5
5
  export declare function formatPath(str: string): string;
6
6
  export declare function isDynamicUrl(url: string): boolean;
@@ -1,4 +1,4 @@
1
- import type { AppNormalizedConfig, PluginAPI, AppTools } from '@modern-js/app-tools';
1
+ import type { AppNormalizedConfig, AppTools, PluginAPI } from '@modern-js/app-tools';
2
2
  import type { ServerRoute as ModernRoute } from '@modern-js/types';
3
3
  import type { SsgRoute } from '../types';
4
4
  export declare const createServer: (api: PluginAPI<AppTools>, ssgRoutes: SsgRoute[], pageRoutes: ModernRoute[], apiRoutes: ModernRoute[], options: AppNormalizedConfig, appDirectory: string) => Promise<string[]>;
@@ -1,5 +1,5 @@
1
1
  import type { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions } from '@modern-js/types';
2
+ import type { SSGConfig, SSGMultiEntryOptions, SSGRouteOptions, SSGSingleEntryOptions } from '@modern-js/types';
3
3
  export type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions, };
4
4
  export type AgreedRoute = {
5
5
  path?: string;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.58.2",
18
+ "version": "2.58.3",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -63,8 +63,8 @@
63
63
  "node-mocks-http": "^1.11.0",
64
64
  "normalize-path": "3.0.0",
65
65
  "portfinder": "^1.0.28",
66
- "@modern-js/prod-server": "2.58.2",
67
- "@modern-js/utils": "2.58.2"
66
+ "@modern-js/prod-server": "2.58.3",
67
+ "@modern-js/utils": "2.58.3"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "react-router-dom": ">=5.1.2"
@@ -82,10 +82,10 @@
82
82
  "react-dom": "^18",
83
83
  "react-router-dom": "6.22.0",
84
84
  "typescript": "^5",
85
- "@modern-js/app-tools": "2.58.2",
86
- "@modern-js/types": "2.58.2",
87
- "@scripts/build": "2.58.2",
88
- "@scripts/jest-config": "2.58.2"
85
+ "@modern-js/app-tools": "2.58.3",
86
+ "@scripts/build": "2.58.3",
87
+ "@scripts/jest-config": "2.58.3",
88
+ "@modern-js/types": "2.58.3"
89
89
  },
90
90
  "sideEffects": false,
91
91
  "publishConfig": {