@static-pages/core 3.0.3 → 4.0.0

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/cjs/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- export declare type Data = Record<string, unknown>;
2
- export declare type Controller = (data: Data) => undefined | Data | Data[] | Promise<undefined | Data | Data[]>;
3
- export declare type Route = {
4
- from: Iterable<Data> | AsyncIterable<Data>;
5
- to: (data: Data) => void | Promise<void>;
6
- controller?: Controller;
7
- };
8
- export declare const staticPages: (routes: Route | Route[]) => Promise<void>;
1
+ export declare namespace staticPages {
2
+ type Data = Record<string, unknown>;
3
+ type Controller = (data: staticPages.Data) => undefined | staticPages.Data | staticPages.Data[] | Promise<undefined | staticPages.Data | staticPages.Data[]>;
4
+ type Route = {
5
+ from: Iterable<staticPages.Data> | AsyncIterable<staticPages.Data>;
6
+ to: (data: staticPages.Data) => void | Promise<void>;
7
+ controller?: staticPages.Controller;
8
+ };
9
+ }
10
+ export declare const staticPages: (routes: staticPages.Route | staticPages.Route[]) => Promise<void>;
9
11
  export default staticPages;
package/esm/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
- export declare type Data = Record<string, unknown>;
2
- export declare type Controller = (data: Data) => undefined | Data | Data[] | Promise<undefined | Data | Data[]>;
3
- export declare type Route = {
4
- from: Iterable<Data> | AsyncIterable<Data>;
5
- to: (data: Data) => void | Promise<void>;
6
- controller?: Controller;
7
- };
8
- export declare const staticPages: (routes: Route | Route[]) => Promise<void>;
1
+ export declare namespace staticPages {
2
+ type Data = Record<string, unknown>;
3
+ type Controller = (data: staticPages.Data) => undefined | staticPages.Data | staticPages.Data[] | Promise<undefined | staticPages.Data | staticPages.Data[]>;
4
+ type Route = {
5
+ from: Iterable<staticPages.Data> | AsyncIterable<staticPages.Data>;
6
+ to: (data: staticPages.Data) => void | Promise<void>;
7
+ controller?: staticPages.Controller;
8
+ };
9
+ }
10
+ export declare const staticPages: (routes: staticPages.Route | staticPages.Route[]) => Promise<void>;
9
11
  export default staticPages;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@static-pages/core",
3
- "version": "3.0.3",
3
+ "version": "4.0.0",
4
4
  "description": "General purpose static pages renderer.",
5
5
  "type": "module",
6
6
  "main": "cjs/index.js",
7
7
  "module": "esm/index.js",
8
- "types": "esm/index.d.js",
8
+ "types": "esm/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "require": "./cjs/index.js",