@tryghost/cache-purge 1.0.4 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/cache-purge",
3
- "version": "1.0.4",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Ghost Foundation",
6
6
  "repository": {
@@ -22,15 +22,15 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@tryghost/signed-request": "^1.0.4"
25
+ "@tryghost/signed-request": "^2.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "25.9.5",
28
+ "@types/node": "25.9.9",
29
29
  "esbuild": "0.28.2",
30
30
  "typescript": "7.0.2"
31
31
  },
32
32
  "engines": {
33
- "node": ">=20.20.0"
33
+ "node": ">=22.12.0"
34
34
  },
35
35
  "nx": {
36
36
  "targets": {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as signedRequest from '@tryghost/signed-request';
2
- import type { Response, SignedRequestOptions } from '@tryghost/signed-request';
2
+ import type { ResponsePromise, SignedRequestOptions } from '@tryghost/signed-request';
3
3
 
4
4
  interface CachePurgeOptions extends Omit<SignedRequestOptions, 'protocol'> {
5
5
  /** Request protocol. Defaults to `https://` when omitted. */
@@ -16,7 +16,7 @@ function exec<T = unknown>(
16
16
  hmac: string,
17
17
  server: string,
18
18
  options: CachePurgeOptions,
19
- ): Promise<Response<T>> {
19
+ ): ResponsePromise<T> {
20
20
  if (!options.protocol) {
21
21
  options.protocol = 'https://';
22
22
  }
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Response, SignedRequestOptions } from '@tryghost/signed-request';
1
+ import type { ResponsePromise, SignedRequestOptions } from '@tryghost/signed-request';
2
2
  interface CachePurgeOptions extends Omit<SignedRequestOptions, 'protocol'> {
3
3
  /** Request protocol. Defaults to `https://` when omitted. */
4
4
  protocol?: string;
@@ -9,7 +9,7 @@ interface CachePurgeOptions extends Omit<SignedRequestOptions, 'protocol'> {
9
9
  /** Domain to purge. Used when no `id` is provided. */
10
10
  domain?: string;
11
11
  }
12
- declare function exec<T = unknown>(hmac: string, server: string, options: CachePurgeOptions): Promise<Response<T>>;
12
+ declare function exec<T = unknown>(hmac: string, server: string, options: CachePurgeOptions): ResponsePromise<T>;
13
13
  declare namespace exec {
14
14
  export { exec };
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAE/E,UAAU,iBAAkB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IACtE,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,IAAI,CAAC,CAAC,GAAG,OAAO,EACrB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GAC3B,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAetB;kBAnBQ,IAAI;;;SAuBJ,IAAI"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,UAAU,iBAAkB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IACtE,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,IAAI,CAAC,CAAC,GAAG,OAAO,EACrB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GAC3B,eAAe,CAAC,CAAC,CAAC,CAepB;kBAnBQ,IAAI;;;SAuBJ,IAAI"}