node-datalith 0.1.2 → 0.2.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/lib/file.d.ts CHANGED
@@ -8,7 +8,7 @@ import { ImageSize } from "./image.js";
8
8
  export declare class File {
9
9
  private readonly resource;
10
10
  readonly etag: string;
11
- readonly date: Date;
11
+ readonly date: string;
12
12
  readonly contentType: string;
13
13
  readonly contentLength: number;
14
14
  readonly contentDisposition: string;
@@ -19,14 +19,14 @@ export declare class File {
19
19
  *
20
20
  * @param {TimeoutResponse} resource The response from `timeoutFetch`.
21
21
  * @param {string} etag The unique identifier for the file, typically used for caching.
22
- * @param {Date} date The date and time when the file was created.
22
+ * @param {Date} string The date and time when the file was created.
23
23
  * @param {string} contentType The MIME type of the file.
24
24
  * @param {number} contentLength The size of the file in bytes.
25
25
  * @param {string} contentDisposition The file name and the expected usage.
26
26
  * @param {ReadableStream} data The file content as a readable stream.
27
27
  * @param {imageSize} [imageSize] (Optional) The size of the image in pixels, or `null` if not applicable, or `undefined` if this file is not an image.
28
28
  */
29
- constructor(resource: TimeoutResponse, etag: string, date: Date, contentType: string, contentLength: number, contentDisposition: string, data: ReadableStream, imageSize?: (ImageSize | null) | undefined);
29
+ constructor(resource: TimeoutResponse, etag: string, date: string, contentType: string, contentLength: number, contentDisposition: string, data: ReadableStream, imageSize?: (ImageSize | null) | undefined);
30
30
  /**
31
31
  * If you want to cancel the data, use this function instead of `data.cancel()` or `data.getReader().cancel()`.
32
32
  */
package/lib/file.js CHANGED
@@ -17,7 +17,7 @@ export class File {
17
17
  *
18
18
  * @param {TimeoutResponse} resource The response from `timeoutFetch`.
19
19
  * @param {string} etag The unique identifier for the file, typically used for caching.
20
- * @param {Date} date The date and time when the file was created.
20
+ * @param {Date} string The date and time when the file was created.
21
21
  * @param {string} contentType The MIME type of the file.
22
22
  * @param {number} contentLength The size of the file in bytes.
23
23
  * @param {string} contentDisposition The file name and the expected usage.
package/lib/lib.js CHANGED
@@ -174,7 +174,7 @@ export class Datalith {
174
174
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
175
175
  const etag = response.headers.get("etag");
176
176
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
177
- const date = new Date(response.headers.get("date"));
177
+ const date = response.headers.get("date");
178
178
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179
179
  const contentType = response.headers.get("content-type");
180
180
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -225,7 +225,7 @@ export class Datalith {
225
225
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
226
226
  const etag = response.headers.get("etag");
227
227
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
228
- const date = new Date(response.headers.get("date"));
228
+ const date = response.headers.get("date");
229
229
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
230
230
  const contentType = response.headers.get("content-type");
231
231
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-datalith",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Datalith is a file management system powered by SQLite for metadata storage and the file system for file storage. This library can help you conmunicate with Datalith in Node.js.",
5
5
  "type": "module",
6
6
  "exports": "./lib/lib.js",