astro-accelerator-utils 0.2.0 → 0.2.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.
@@ -1,13 +1,14 @@
1
+ /**
2
+ * @typedef { import("../../types/Site").Site } Site
3
+ */
1
4
  export class Factory {
2
5
  /**
3
- * @param {number} cacheMaxAge
4
- * @param {Intl.DateTimeFormatOptions} dateOptions
5
- * @param {string} siteUrl
6
+ * @param {Site} site
6
7
  */
7
- constructor(cacheMaxAge: number, dateOptions: Intl.DateTimeFormatOptions, siteUrl: string);
8
+ constructor(site: Site);
8
9
  cacheMaxAge: number;
9
10
  dateOptions: Intl.DateTimeFormatOptions;
10
- siteUrl: string;
11
+ siteUrl: any;
11
12
  get authors(): Authors;
12
13
  get cache(): Cache;
13
14
  get dateFormatter(): DateFormatter;
@@ -18,6 +19,7 @@ export class Factory {
18
19
  get taxonomy(): Taxonomy;
19
20
  get urlFormatter(): UrlFormatter;
20
21
  }
22
+ export type Site = import("../../types/Site").Site;
21
23
  import { Authors } from "./authors.mjs";
22
24
  import { Cache } from "./cache.mjs";
23
25
  import { DateFormatter } from "./dates.mjs";
@@ -8,16 +8,18 @@ import { Posts } from './posts.mjs';
8
8
  import { Taxonomy } from './taxonomy.mjs';
9
9
  import { UrlFormatter } from './urls.mjs';
10
10
 
11
+ /**
12
+ * @typedef { import("../../types/Site").Site } Site
13
+ */
14
+
11
15
  export class Factory {
12
16
  /**
13
- * @param {number} cacheMaxAge
14
- * @param {Intl.DateTimeFormatOptions} dateOptions
15
- * @param {string} siteUrl
17
+ * @param {Site} site
16
18
  */
17
- constructor(cacheMaxAge, dateOptions, siteUrl) {
18
- this.cacheMaxAge = cacheMaxAge;
19
- this.dateOptions = dateOptions;
20
- this.siteUrl = siteUrl;
19
+ constructor(site) {
20
+ this.cacheMaxAge = site.cacheMaxAge;
21
+ this.dateOptions = site.dateOptions;
22
+ this.siteUrl = site.siteUrl;
21
23
  }
22
24
 
23
25
  get authors() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",