@static-pages/core 7.0.0-beta.0 → 7.0.0-beta.1

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/package.json CHANGED
@@ -1,30 +1,36 @@
1
1
  {
2
2
  "name": "@static-pages/core",
3
- "version": "7.0.0-beta.0",
3
+ "version": "7.0.0-beta.1",
4
4
  "description": "General purpose static pages renderer.",
5
5
  "type": "module",
6
- "main": "cjs/index.js",
7
- "module": "esm/index.js",
8
- "types": "esm/index.d.ts",
6
+ "main": "./cjs/index.js",
7
+ "module": "./esm/index.js",
8
+ "types": "./esm/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "import": "./esm/index.js",
11
12
  "require": "./cjs/index.js",
12
- "default": "./esm/index.js"
13
- }
13
+ "types": "./types/index.d.ts"
14
+ },
15
+ "./package.json": "./package.json"
14
16
  },
15
17
  "engines": {
16
18
  "node": ">=16.0.0",
17
19
  "deno": ">=1.0.0"
18
20
  },
19
21
  "scripts": {
20
- "prepack": "npm run build && npm run test",
22
+ "preversion": "npm run build && npm run test",
21
23
  "postversion": "git push && git push --tags",
22
- "clean": "rimraf esm cjs coverage",
23
- "build": "npm run build:esm && npm run build:cjs",
24
- "build:esm": "tsc",
24
+ "clean": "rimraf esm cjs types coverage",
25
+ "prewatch:esm": "npm run build:esm",
25
26
  "watch:esm": "tsc --watch",
26
- "build:cjs": "tsc --outDir cjs --module commonjs && echo { \"type\": \"commonjs\" }>cjs/package.json",
27
- "watch:cjs": "npm run build:cjs && tsc --outDir cjs --module commonjs --watch",
27
+ "prewatch:cjs": "npm run build:cjs",
28
+ "watch:cjs": "tsc --outDir cjs --module commonjs --moduleResolution node --watch",
29
+ "build": "npm run build:esm && npm run build:cjs && npm run build:types",
30
+ "build:esm": "tsc",
31
+ "build:cjs": "tsc --outDir cjs --module commonjs --moduleResolution node",
32
+ "postbuild:cjs": "echo { \"type\": \"commonjs\" }>cjs/package.json",
33
+ "build:types": "tsc --outDir types --declaration --emitDeclarationOnly",
28
34
  "lint": "eslint",
29
35
  "test": "mocha",
30
36
  "coverage": "c8 -r text -r text-summary -r lcov --include \"esm/*\" npm test"
package/esm/index.d.ts DELETED
@@ -1,13 +0,0 @@
1
- export interface Route<F = unknown, T = unknown> {
2
- from: Iterable<F> | AsyncIterable<F>;
3
- to(data: T): void | Promise<void>;
4
- controller?(data: F): undefined | T | Iterable<T> | AsyncIterable<T> | Promise<undefined | T | Iterable<T> | AsyncIterable<T>>;
5
- }
6
- export declare function staticPages<F1, T1>(...route: [Route<F1, T1>]): Promise<void>;
7
- export declare function staticPages<F1, T1, F2, T2>(...route: [Route<F1, T1>, Route<F2, T2>]): Promise<void>;
8
- export declare function staticPages<F1, T1, F2, T2, F3, T3>(...route: [Route<F1, T1>, Route<F2, T2>, Route<F3, T3>]): Promise<void>;
9
- export declare function staticPages<F1, T1, F2, T2, F3, T3, F4, T4>(...route: [Route<F1, T1>, Route<F2, T2>, Route<F3, T3>, Route<F4, T4>]): Promise<void>;
10
- export declare function staticPages<F1, T1, F2, T2, F3, T3, F4, T4, F5, T5>(...route: [Route<F1, T1>, Route<F2, T2>, Route<F3, T3>, Route<F4, T4>, Route<F5, T5>]): Promise<void>;
11
- export declare function staticPages<F1, T1, F2, T2, F3, T3, F4, T4, F5, T5, F6, T6>(...route: [Route<F1, T1>, Route<F2, T2>, Route<F3, T3>, Route<F4, T4>, Route<F5, T5>, Route<F6, T6>]): Promise<void>;
12
- export declare function staticPages(...routes: Route[]): Promise<void>;
13
- export default staticPages;
File without changes