@dosgato/templating 0.0.54 → 0.0.55

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.
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ import type { IncomingHttpHeaders } from 'http';
1
3
  import { ResourceProvider } from './provider.js';
2
4
  import { APIClient } from './render.js';
3
5
  /**
@@ -179,7 +181,7 @@ export declare abstract class Component<DataType extends ComponentData = any, Fe
179
181
  renderedAreas: Map<string, RenderedComponent[]>;
180
182
  hadError: boolean;
181
183
  autoLabel: string;
182
- reqHeaders: Headers;
184
+ reqHeaders: IncomingHttpHeaders;
183
185
  reqUrl: URL;
184
186
  /**
185
187
  * For logging errors during rendering without crashing the render. If your fetch, setContext,
@@ -249,7 +251,7 @@ export declare abstract class Page<DataType extends PageData = any, FetchedType
249
251
  * This method will be provided to page templates by the render server. You may call it
250
252
  * at any time during fetch, context, or render, to set an HTTP header on the response
251
253
  */
252
- addHeader: (key: string, value: string) => void;
254
+ addHeader: (key: string, value: string | undefined) => void;
253
255
  protected passError(e: Error, path: string): void;
254
256
  constructor(page: PageRecord<DataType>, editMode: boolean);
255
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.54",
3
+ "version": "0.0.55",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,6 +18,7 @@
18
18
  "txstate-utils": "^1.7.4"
19
19
  },
20
20
  "devDependencies": {
21
+ "@types/node": "^18.7.11",
21
22
  "eslint-config-standard-with-typescript": "^22.0.0",
22
23
  "typescript": "^4.4.2"
23
24
  },