astro-accelerator-utils 0.2.1 → 0.2.3

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/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Factory } from "./lib/v1/_factory.mjs";
1
+ import { Accelerator } from "./lib/v1/accelerator.mjs";
2
2
  import * as PostFiltering from "./lib/postFiltering.mjs";
3
3
  import * as PostOrdering from "./lib/postOrdering.mjs";
4
- export { Factory, PostFiltering, PostOrdering };
4
+ export { Accelerator, PostFiltering, PostOrdering };
package/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { Factory } from './lib/v1/_factory.mjs';
1
+ import { Accelerator } from './lib/v1/accelerator.mjs';
2
2
 
3
3
  import * as PostFiltering from './lib/postFiltering.mjs';
4
4
  import * as PostOrdering from './lib/postOrdering.mjs';
5
5
 
6
6
  export {
7
- Factory,
7
+ Accelerator,
8
8
  PostFiltering,
9
9
  PostOrdering
10
10
  };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @typedef { import("../../types/Site").Site } Site
3
3
  */
4
- export class Factory {
4
+ export class Accelerator {
5
5
  /**
6
6
  * @param {Site} site
7
7
  */
@@ -12,7 +12,7 @@ import { UrlFormatter } from './urls.mjs';
12
12
  * @typedef { import("../../types/Site").Site } Site
13
13
  */
14
14
 
15
- export class Factory {
15
+ export class Accelerator {
16
16
  /**
17
17
  * @param {Site} site
18
18
  */
@@ -27,11 +27,11 @@ export class Factory {
27
27
  }
28
28
 
29
29
  get cache() {
30
- return new Cache(this.cacheMaxAge);
30
+ return new Cache(this.site.cacheMaxAge);
31
31
  }
32
32
 
33
33
  get dateFormatter() {
34
- return new DateFormatter(this.dateOptions)
34
+ return new DateFormatter(this.site.dateOptions)
35
35
  }
36
36
 
37
37
  get markdown() {
@@ -55,6 +55,6 @@ export class Factory {
55
55
  }
56
56
 
57
57
  get urlFormatter() {
58
- return new UrlFormatter(this.siteUrl)
58
+ return new UrlFormatter(this.site.siteUrl)
59
59
  }
60
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",