@spoosh/plugin-throttle 0.1.5 → 0.1.7

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Request throttling plugin for Spoosh - limits request frequency.
4
4
 
5
- **[Documentation](https://spoosh.dev/docs/plugins/throttle)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
5
+ **[Documentation](https://spoosh.dev/docs/react/plugins/throttle)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
6
6
 
7
7
  ## Installation
8
8
 
@@ -21,7 +21,7 @@ const client = new Spoosh<ApiSchema, Error>("/api").use([
21
21
  throttlePlugin(),
22
22
  ]);
23
23
 
24
- const { data } = useRead((api) => api.expensive.$get(), { throttle: 1000 });
24
+ const { data } = useRead((api) => api("expensive").GET(), { throttle: 1000 });
25
25
  ```
26
26
 
27
27
  ## Options
package/dist/index.d.mts CHANGED
@@ -15,7 +15,7 @@ type ThrottleWriteResult = object;
15
15
  * Limits how frequently a query can be executed, returning cached data
16
16
  * if the throttle window hasn't elapsed.
17
17
  *
18
- * @see {@link https://spoosh.dev/docs/plugins/throttle | Throttle Plugin Documentation}
18
+ * @see {@link https://spoosh.dev/docs/react/plugins/throttle | Throttle Plugin Documentation}
19
19
  *
20
20
  * @example
21
21
  * ```ts
@@ -28,7 +28,7 @@ type ThrottleWriteResult = object;
28
28
  * ]);
29
29
  *
30
30
  * // Throttle to max once per second
31
- * useRead((api) => api.posts.$get(), {
31
+ * useRead((api) => api("posts").GET(), {
32
32
  * throttle: 1000,
33
33
  * });
34
34
  * ```
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ type ThrottleWriteResult = object;
15
15
  * Limits how frequently a query can be executed, returning cached data
16
16
  * if the throttle window hasn't elapsed.
17
17
  *
18
- * @see {@link https://spoosh.dev/docs/plugins/throttle | Throttle Plugin Documentation}
18
+ * @see {@link https://spoosh.dev/docs/react/plugins/throttle | Throttle Plugin Documentation}
19
19
  *
20
20
  * @example
21
21
  * ```ts
@@ -28,7 +28,7 @@ type ThrottleWriteResult = object;
28
28
  * ]);
29
29
  *
30
30
  * // Throttle to max once per second
31
- * useRead((api) => api.posts.$get(), {
31
+ * useRead((api) => api("posts").GET(), {
32
32
  * throttle: 1000,
33
33
  * });
34
34
  * ```
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-throttle",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Request throttling plugin for Spoosh - limits request frequency",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/nxnom/spoosh.git",
8
+ "url": "git+https://github.com/spooshdev/spoosh.git",
9
9
  "directory": "packages/plugin-throttle"
10
10
  },
11
11
  "bugs": {
12
- "url": "https://github.com/nxnom/spoosh/issues"
12
+ "url": "https://github.com/spooshdev/spoosh/issues"
13
13
  },
14
- "homepage": "https://spoosh.dev/react/docs/plugins/throttle",
14
+ "homepage": "https://spoosh.dev/docs/react/plugins/throttle",
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
@@ -36,7 +36,7 @@
36
36
  "@spoosh/core": ">=0.4.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@spoosh/core": "0.4.2",
39
+ "@spoosh/core": "0.10.0",
40
40
  "@spoosh/test-utils": "0.1.5"
41
41
  },
42
42
  "scripts": {