@thepassle/app-tools 0.9.9 → 0.9.10

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,5 +1,5 @@
1
1
  /**
2
- * @returns {import('../index').Plugin}
2
+ * @returns {import('../index.js').Plugin}
3
3
  */
4
4
  export function abortPlugin() {
5
5
  let requestId;
@@ -2,7 +2,7 @@ const TEN_MINUTES = 1000 * 60 * 10;
2
2
 
3
3
  /**
4
4
  * @param {{maxAge?: number}} options
5
- * @returns {import('../index').Plugin}
5
+ * @returns {import('../index.js').Plugin}
6
6
  */
7
7
  export function cachePlugin({maxAge = TEN_MINUTES} = {}) {
8
8
  let requestId;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @param {number} ms
3
- * @returns {import('../index').Plugin}
3
+ * @returns {import('../index.js').Plugin}
4
4
  */
5
5
  export const delayPlugin = (ms) => ({
6
6
  name: 'delay',
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @param {string} jsonPrefix
3
- * @returns {import('../index').Plugin}
3
+ * @returns {import('../index.js').Plugin}
4
4
  */
5
5
  export function jsonPrefixPlugin(jsonPrefix) {
6
6
  let responseType;
@@ -2,7 +2,7 @@
2
2
  * @param {{
3
3
  * collapsed?: boolean
4
4
  * }} options
5
- * @returns {import('../index').Plugin}
5
+ * @returns {import('../index.js').Plugin}
6
6
  */
7
7
  export function loggerPlugin({collapsed = true} = {}) {
8
8
  let m;
@@ -2,7 +2,7 @@ import { setAbortableTimeout } from '../../utils/async.js';
2
2
 
3
3
  /**
4
4
  * @param {Response | (() => Response) | (() => Promise<Response>)} response
5
- * @returns {import('../index').Plugin}
5
+ * @returns {import('../index.js').Plugin}
6
6
  */
7
7
  export function mock(response) {
8
8
  return {
@@ -8,7 +8,7 @@ function getCookie(name, _document = document) {
8
8
  * xsrfCookieName?: string,
9
9
  * xsrfHeaderName?: string,
10
10
  * }} options
11
- * @returns {import('../index').Plugin}
11
+ * @returns {import('../index.js').Plugin}
12
12
  */
13
13
  export function xsrfPlugin({
14
14
  xsrfCookieName = 'XSRF-TOKEN',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thepassle/app-tools",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @returns {import('../index').Plugin}
2
+ * @returns {import('../index.js').Plugin}
3
3
  */
4
- export function abortPlugin(): import('../index').Plugin;
5
- export const abort: import("../types").Plugin;
4
+ export function abortPlugin(): import('../index.js').Plugin;
5
+ export const abort: import("../types.js").Plugin;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @param {{maxAge?: number}} options
3
- * @returns {import('../index').Plugin}
3
+ * @returns {import('../index.js').Plugin}
4
4
  */
5
5
  export function cachePlugin({ maxAge }?: {
6
6
  maxAge?: number;
7
- }): import('../index').Plugin;
8
- export const cache: import("../types").Plugin;
7
+ }): import('../index.js').Plugin;
8
+ export const cache: import("../types.js").Plugin;
@@ -1,2 +1,2 @@
1
- export function delayPlugin(ms: number): import('../index').Plugin;
2
- export const delay: import("../types").Plugin;
1
+ export function delayPlugin(ms: number): import('../index.js').Plugin;
2
+ export const delay: import("../types.js").Plugin;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @param {string} jsonPrefix
3
- * @returns {import('../index').Plugin}
3
+ * @returns {import('../index.js').Plugin}
4
4
  */
5
- export function jsonPrefixPlugin(jsonPrefix: string): import('../index').Plugin;
6
- export const jsonPrefix: import("../types").Plugin;
5
+ export function jsonPrefixPlugin(jsonPrefix: string): import('../index.js').Plugin;
6
+ export const jsonPrefix: import("../types.js").Plugin;
@@ -2,9 +2,9 @@
2
2
  * @param {{
3
3
  * collapsed?: boolean
4
4
  * }} options
5
- * @returns {import('../index').Plugin}
5
+ * @returns {import('../index.js').Plugin}
6
6
  */
7
7
  export function loggerPlugin({ collapsed }?: {
8
8
  collapsed?: boolean;
9
- }): import('../index').Plugin;
10
- export const logger: import("../types").Plugin;
9
+ }): import('../index.js').Plugin;
10
+ export const logger: import("../types.js").Plugin;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @param {Response | (() => Response) | (() => Promise<Response>)} response
3
- * @returns {import('../index').Plugin}
3
+ * @returns {import('../index.js').Plugin}
4
4
  */
5
- export function mock(response: Response | (() => Response) | (() => Promise<Response>)): import('../index').Plugin;
5
+ export function mock(response: Response | (() => Response) | (() => Promise<Response>)): import('../index.js').Plugin;
@@ -3,10 +3,10 @@
3
3
  * xsrfCookieName?: string,
4
4
  * xsrfHeaderName?: string,
5
5
  * }} options
6
- * @returns {import('../index').Plugin}
6
+ * @returns {import('../index.js').Plugin}
7
7
  */
8
8
  export function xsrfPlugin({ xsrfCookieName, xsrfHeaderName }?: {
9
9
  xsrfCookieName?: string;
10
10
  xsrfHeaderName?: string;
11
- }): import('../index').Plugin;
12
- export const xsrf: import("../types").Plugin;
11
+ }): import('../index.js').Plugin;
12
+ export const xsrf: import("../types.js").Plugin;