jinrai 1.1.4 → 1.1.5

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/lib/bin/bin.js CHANGED
@@ -330,7 +330,7 @@ const runBuild = async (options) => {
330
330
  task.next(`Export: (${templates.length})`);
331
331
  await mkdir(outputcashe, { recursive: true });
332
332
  console.log("dev");
333
- const exportConfig = { routes, proxy: config.proxy, meta: config.meta, lang };
333
+ const exportConfig = { routes, proxy: config.proxy, meta: config.meta, lang, cacheablePaths: config.cacheablePaths };
334
334
  await writeFile(path.join(outputcashe, "config.json"), JSON.stringify(exportConfig, null, 2));
335
335
  // await writeFile(
336
336
  // path.join(outputcashe, "index.html"),
@@ -10,5 +10,6 @@ export interface Config {
10
10
  dist?: string;
11
11
  proxy?: Record<string, string>;
12
12
  meta?: string;
13
+ cacheablePaths?: string[];
13
14
  }
14
15
  export declare const getUserConfig: (configName: string) => Promise<Config>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinrai",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "A powerful library that analyzes your modern web application and automatically generates a perfectly rendered, static snapshot of its pages. Experience unparalleled loading speed and SEO clarity without the complexity of traditional SSR setups. Simply point Jinrai at your SPA and witness divine speed.",
5
5
  "main": "lib/index.ts",
6
6
  "scripts": {
@@ -64,7 +64,7 @@
64
64
  "import": "./lib/src/front/url/adapter/rrd7.js"
65
65
  },
66
66
  "./config": {
67
- "types": "./lib/config/config.d.ts",
67
+ "types": "./lib/config.d.ts",
68
68
  "import": "./lib/config/config.js"
69
69
  },
70
70
  "./vite": {
@@ -44,7 +44,7 @@ export const runBuild = async (options: buildArgs) => {
44
44
 
45
45
  console.log("dev")
46
46
 
47
- const exportConfig = { routes, proxy: config.proxy, meta: config.meta, lang }
47
+ const exportConfig = { routes, proxy: config.proxy, meta: config.meta, lang, cacheablePaths: config.cacheablePaths }
48
48
 
49
49
  await writeFile(path.join(outputcashe, "config.json"), JSON.stringify(exportConfig, null, 2))
50
50
  // await writeFile(
@@ -1,7 +1,5 @@
1
1
  import type { Config } from "./userConfig"
2
2
 
3
- export const defineConfig = (config: Config) => {
3
+ export const defineConfig = (config: Config): Config => {
4
4
  return config
5
5
  }
6
-
7
-
@@ -15,6 +15,7 @@ export interface Config {
15
15
  dist?: string
16
16
  proxy?: Record<string, string>
17
17
  meta?: string
18
+ cacheablePaths?: string[]
18
19
  }
19
20
 
20
21
  export const getUserConfig = async (configName: string): Promise<Config> => {
@@ -9,7 +9,8 @@ describe("test custom component", async () => {
9
9
 
10
10
  it("parse custom.html", async () => {
11
11
  const html = await readFile("./tests/parse/content/custom.html", "utf-8")
12
- // expect(JSON.stringify(parsr.parse(html))).toEqual("")
12
+ const result = parsr.parse(html)
13
+ // expect(JSON.stringify(result)).toEqual("")
13
14
 
14
15
  expect(parsr.parse(html)).toEqual(custom)
15
16
  })