@lastshotlabs/snapshot 0.1.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.
@@ -0,0 +1,18 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ interface SnapshotSyncOptions {
4
+ /** URL of the bunshot backend. Falls back to VITE_API_URL env var. */
5
+ apiUrl?: string;
6
+ /**
7
+ * Path to a local OpenAPI JSON file. Takes precedence over apiUrl.
8
+ * When provided, the dev server watches this file for changes and re-runs sync automatically.
9
+ * Note: API URL polling is not supported in the Vite plugin — for live schema updates
10
+ * from a running API, use `snapshot sync --watch` from the CLI instead.
11
+ */
12
+ file?: string;
13
+ /** Generate Zod validators alongside mutation hooks. */
14
+ zod?: boolean;
15
+ }
16
+ declare function snapshotSync(opts?: SnapshotSyncOptions): Plugin;
17
+
18
+ export { type SnapshotSyncOptions, snapshotSync };
package/dist/vite.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ interface SnapshotSyncOptions {
4
+ /** URL of the bunshot backend. Falls back to VITE_API_URL env var. */
5
+ apiUrl?: string;
6
+ /**
7
+ * Path to a local OpenAPI JSON file. Takes precedence over apiUrl.
8
+ * When provided, the dev server watches this file for changes and re-runs sync automatically.
9
+ * Note: API URL polling is not supported in the Vite plugin — for live schema updates
10
+ * from a running API, use `snapshot sync --watch` from the CLI instead.
11
+ */
12
+ file?: string;
13
+ /** Generate Zod validators alongside mutation hooks. */
14
+ zod?: boolean;
15
+ }
16
+ declare function snapshotSync(opts?: SnapshotSyncOptions): Plugin;
17
+
18
+ export { type SnapshotSyncOptions, snapshotSync };