@modern-js/plugin-ssg 1.2.6 → 1.2.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @modern-js/plugin-ssg
2
2
 
3
+ ## 1.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - bebb39b6: chore: improve devDependencies and peerDependencies
8
+ - 132f7b53: feat: move config declarations to @modern-js/core
9
+ - Updated dependencies [132f7b53]
10
+ - @modern-js/utils@1.3.7
11
+
3
12
  ## 1.2.6
4
13
 
5
14
  ### Patch Changes
@@ -1 +0,0 @@
1
- import '@modern-js/core';
@@ -1,3 +0,0 @@
1
- "use strict";
2
-
3
- require("@modern-js/core");
@@ -1,5 +1,5 @@
1
1
  import { ServerRoute as ModernRoute } from '@modern-js/types';
2
2
  import { compile } from '../server/prerender';
3
- import { RouteOptions, SsgRoute } from '../types';
3
+ import { SSGRouteOptions, SsgRoute } from '../types';
4
4
  export declare function makeRender(ssgRoutes: SsgRoute[], render: ReturnType<typeof compile>, port: number): Promise<string>[];
5
- export declare function makeRoute(baseRoute: ModernRoute, route: string | RouteOptions, headers?: Record<string, any>): SsgRoute;
5
+ export declare function makeRoute(baseRoute: ModernRoute, route: string | SSGRouteOptions, headers?: Record<string, any>): SsgRoute;
@@ -1,5 +1,5 @@
1
1
  import { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import { EntryPoint, MultiEntryOptions, SSG, SsgRoute } from '../types';
2
+ import { SsgRoute, SSGConfig, EntryPoint, SSGMultiEntryOptions } from '../types';
3
3
  export declare function formatOutput(filename: string): string;
4
4
  export declare function formatPath(str: string): string;
5
5
  export declare function isDynamicUrl(url: string): boolean;
@@ -8,7 +8,7 @@ export declare function getOutput(route: SsgRoute, base: string, agreed?: boolea
8
8
  export declare const readJSONSpec: (dir: string) => ModernRoute[];
9
9
  export declare const writeJSONSpec: (dir: string, routes: ModernRoute[]) => void;
10
10
  export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
11
- export declare const standardOptions: (ssgOptions: SSG, entrypoints: EntryPoint[]) => false | MultiEntryOptions;
11
+ export declare const standardOptions: (ssgOptions: SSGConfig, entrypoints: EntryPoint[]) => false | SSGMultiEntryOptions;
12
12
  export declare const openRouteSSR: (routes: ModernRoute[]) => {
13
13
  isSSR: boolean;
14
14
  bundle: string;
@@ -1,5 +1,6 @@
1
- import { ServerRoute as ModernRoute } from '@modern-js/types';
2
- import '@modern-js/core';
1
+ import type { ServerRoute as ModernRoute } from '@modern-js/types';
2
+ import type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions } from '@modern-js/core';
3
+ export type { SSGConfig, SSGRouteOptions, SSGMultiEntryOptions, SSGSingleEntryOptions };
3
4
  export declare type AgreedRoute = {
4
5
  path: string;
5
6
  component: string;
@@ -17,24 +18,6 @@ export declare type SsgRoute = ModernRoute & {
17
18
  output: string;
18
19
  headers?: Record<string, string>;
19
20
  };
20
- export declare type RouteOptions = string | {
21
- url: string;
22
- output?: string;
23
- params?: Record<string, any>[];
24
- headers?: Record<string, any>;
25
- };
26
- export declare type SingleEntryOptions = boolean | {
27
- preventDefault?: string[];
28
- headers?: Record<string, any>;
29
- routes?: RouteOptions[];
30
- };
31
- export declare type MultiEntryOptions = Record<string, SingleEntryOptions>;
32
- export declare type SSG = boolean | SingleEntryOptions | MultiEntryOptions | ((entryName: string) => SingleEntryOptions);
33
21
  export declare type ExtendOutputConfig = {
34
- ssg: SSG;
35
- };
36
- declare module '@modern-js/core' {
37
- interface OutputConfig {
38
- ssg?: SSG;
39
- }
40
- }
22
+ ssg: SSGConfig;
23
+ };
package/jest.config.js CHANGED
@@ -2,7 +2,6 @@ const sharedConfig = require('@scripts/jest-config');
2
2
 
3
3
  /** @type {import('@jest/types').Config.InitialOptions} */
4
4
  module.exports = {
5
- // eslint-disable-next-line node/no-unsupported-features/es-syntax
6
5
  ...sharedConfig,
7
6
  rootDir: __dirname,
8
7
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.6",
14
+ "version": "1.2.7",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -55,15 +55,15 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@babel/runtime": "^7",
58
- "@modern-js/utils": "^1.3.5",
58
+ "@modern-js/utils": "^1.3.7",
59
59
  "node-mocks-http": "^1.10.1",
60
60
  "normalize-path": "^3.0.0",
61
61
  "portfinder": "^1.0.28",
62
62
  "react-router-dom": "^5.2.1"
63
63
  },
64
64
  "devDependencies": {
65
- "@modern-js/types": "^1.3.5",
66
- "@modern-js/prod-server": "^1.0.4",
65
+ "@modern-js/types": "^1.3.6",
66
+ "@modern-js/prod-server": "^1.0.6",
67
67
  "@types/jest": "^26",
68
68
  "@types/node": "^14",
69
69
  "@types/react": "^17",
@@ -71,7 +71,7 @@
71
71
  "@types/react-router": "^5.1.16",
72
72
  "@types/react-router-dom": "^5.1.8",
73
73
  "typescript": "^4",
74
- "@modern-js/core": "^1.5.0",
74
+ "@modern-js/core": "1.6.1",
75
75
  "@scripts/build": "0.0.0",
76
76
  "jest": "^27",
77
77
  "@scripts/jest-config": "0.0.0"