@statezero/core 0.2.16 → 0.2.18

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.
Files changed (136) hide show
  1. package/LICENSE +116 -116
  2. package/dist/adaptors/vue/composables.js +4 -4
  3. package/dist/cli/commands/syncActions.js +189 -189
  4. package/dist/cli/commands/syncModels.js +391 -391
  5. package/dist/core/eventReceivers.d.ts +1 -2
  6. package/dist/core/eventReceivers.js +16 -16
  7. package/dist/filtering/localFiltering.js +2 -1
  8. package/dist/flavours/django/f.js +1 -1
  9. package/dist/flavours/django/model.js +1 -1
  10. package/dist/flavours/django/operationFactory.d.ts +1 -1
  11. package/dist/flavours/django/operationFactory.js +1 -1
  12. package/dist/syncEngine/metrics/metricOptCalcs.js +1 -1
  13. package/dist/syncEngine/registries/metricRegistry.d.ts +1 -1
  14. package/dist/syncEngine/registries/metricRegistry.js +3 -3
  15. package/dist/syncEngine/stores/metricStore.d.ts +1 -1
  16. package/dist/syncEngine/stores/metricStore.js +1 -1
  17. package/dist/syncEngine/stores/operation.d.ts +1 -1
  18. package/dist/syncEngine/stores/operation.js +1 -1
  19. package/dist/syncEngine/stores/reactivity.d.ts +3 -3
  20. package/dist/syncEngine/stores/utils.js +1 -1
  21. package/dist/syncEngine/sync.d.ts +2 -1
  22. package/dist/syncEngine/sync.js +10 -9
  23. package/package.json +128 -126
  24. package/readme.md +210 -210
  25. package/dist/actions/backend1/django_app/calculate-hash.d.ts +0 -57
  26. package/dist/actions/backend1/django_app/calculate-hash.js +0 -80
  27. package/dist/actions/backend1/django_app/get-current-username.d.ts +0 -29
  28. package/dist/actions/backend1/django_app/get-current-username.js +0 -65
  29. package/dist/actions/backend1/django_app/get-server-status.d.ts +0 -38
  30. package/dist/actions/backend1/django_app/get-server-status.js +0 -68
  31. package/dist/actions/backend1/django_app/get-user-info.d.ts +0 -44
  32. package/dist/actions/backend1/django_app/get-user-info.js +0 -70
  33. package/dist/actions/backend1/django_app/index.d.ts +0 -6
  34. package/dist/actions/backend1/django_app/index.js +0 -6
  35. package/dist/actions/backend1/django_app/process-data.d.ts +0 -51
  36. package/dist/actions/backend1/django_app/process-data.js +0 -78
  37. package/dist/actions/backend1/django_app/send-notification.d.ts +0 -55
  38. package/dist/actions/backend1/django_app/send-notification.js +0 -81
  39. package/dist/actions/backend1/index.d.ts +0 -1
  40. package/dist/actions/backend1/index.js +0 -1
  41. package/dist/actions/default/django_app/calculate-hash.d.ts +0 -57
  42. package/dist/actions/default/django_app/calculate-hash.js +0 -80
  43. package/dist/actions/default/django_app/get-current-username.d.ts +0 -29
  44. package/dist/actions/default/django_app/get-current-username.js +0 -65
  45. package/dist/actions/default/django_app/get-server-status.d.ts +0 -38
  46. package/dist/actions/default/django_app/get-server-status.js +0 -68
  47. package/dist/actions/default/django_app/get-user-info.d.ts +0 -44
  48. package/dist/actions/default/django_app/get-user-info.js +0 -70
  49. package/dist/actions/default/django_app/index.d.ts +0 -6
  50. package/dist/actions/default/django_app/index.js +0 -6
  51. package/dist/actions/default/django_app/process-data.d.ts +0 -51
  52. package/dist/actions/default/django_app/process-data.js +0 -78
  53. package/dist/actions/default/django_app/send-notification.d.ts +0 -55
  54. package/dist/actions/default/django_app/send-notification.js +0 -81
  55. package/dist/actions/default/index.d.ts +0 -1
  56. package/dist/actions/default/index.js +0 -1
  57. package/dist/actions/index.d.ts +0 -1
  58. package/dist/actions/index.js +0 -5
  59. package/dist/models/backend1/django_app/comprehensivemodel.d.ts +0 -47
  60. package/dist/models/backend1/django_app/comprehensivemodel.js +0 -71
  61. package/dist/models/backend1/django_app/custompkmodel.d.ts +0 -44
  62. package/dist/models/backend1/django_app/custompkmodel.js +0 -69
  63. package/dist/models/backend1/django_app/dailyrate.d.ts +0 -47
  64. package/dist/models/backend1/django_app/dailyrate.js +0 -71
  65. package/dist/models/backend1/django_app/deepmodellevel1.d.ts +0 -47
  66. package/dist/models/backend1/django_app/deepmodellevel1.js +0 -72
  67. package/dist/models/backend1/django_app/deepmodellevel2.d.ts +0 -47
  68. package/dist/models/backend1/django_app/deepmodellevel2.js +0 -71
  69. package/dist/models/backend1/django_app/deepmodellevel3.d.ts +0 -44
  70. package/dist/models/backend1/django_app/deepmodellevel3.js +0 -69
  71. package/dist/models/backend1/django_app/dummymodel.d.ts +0 -47
  72. package/dist/models/backend1/django_app/dummymodel.js +0 -71
  73. package/dist/models/backend1/django_app/dummyrelatedmodel.d.ts +0 -44
  74. package/dist/models/backend1/django_app/dummyrelatedmodel.js +0 -69
  75. package/dist/models/backend1/django_app/filetest.d.ts +0 -44
  76. package/dist/models/backend1/django_app/filetest.js +0 -69
  77. package/dist/models/backend1/django_app/index.d.ts +0 -16
  78. package/dist/models/backend1/django_app/index.js +0 -16
  79. package/dist/models/backend1/django_app/modelwithcustompkrelation.d.ts +0 -47
  80. package/dist/models/backend1/django_app/modelwithcustompkrelation.js +0 -71
  81. package/dist/models/backend1/django_app/namefiltercustompkmodel.d.ts +0 -44
  82. package/dist/models/backend1/django_app/namefiltercustompkmodel.js +0 -69
  83. package/dist/models/backend1/django_app/order.d.ts +0 -47
  84. package/dist/models/backend1/django_app/order.js +0 -71
  85. package/dist/models/backend1/django_app/orderitem.d.ts +0 -47
  86. package/dist/models/backend1/django_app/orderitem.js +0 -72
  87. package/dist/models/backend1/django_app/product.d.ts +0 -47
  88. package/dist/models/backend1/django_app/product.js +0 -71
  89. package/dist/models/backend1/django_app/productcategory.d.ts +0 -44
  90. package/dist/models/backend1/django_app/productcategory.js +0 -69
  91. package/dist/models/backend1/django_app/rateplan.d.ts +0 -44
  92. package/dist/models/backend1/django_app/rateplan.js +0 -69
  93. package/dist/models/backend1/fileobject.d.ts +0 -4
  94. package/dist/models/backend1/fileobject.js +0 -9
  95. package/dist/models/backend1/index.d.ts +0 -2
  96. package/dist/models/backend1/index.js +0 -2
  97. package/dist/models/default/django_app/comprehensivemodel.d.ts +0 -47
  98. package/dist/models/default/django_app/comprehensivemodel.js +0 -71
  99. package/dist/models/default/django_app/custompkmodel.d.ts +0 -44
  100. package/dist/models/default/django_app/custompkmodel.js +0 -69
  101. package/dist/models/default/django_app/dailyrate.d.ts +0 -47
  102. package/dist/models/default/django_app/dailyrate.js +0 -71
  103. package/dist/models/default/django_app/deepmodellevel1.d.ts +0 -47
  104. package/dist/models/default/django_app/deepmodellevel1.js +0 -72
  105. package/dist/models/default/django_app/deepmodellevel2.d.ts +0 -47
  106. package/dist/models/default/django_app/deepmodellevel2.js +0 -71
  107. package/dist/models/default/django_app/deepmodellevel3.d.ts +0 -44
  108. package/dist/models/default/django_app/deepmodellevel3.js +0 -69
  109. package/dist/models/default/django_app/dummymodel.d.ts +0 -47
  110. package/dist/models/default/django_app/dummymodel.js +0 -71
  111. package/dist/models/default/django_app/dummyrelatedmodel.d.ts +0 -44
  112. package/dist/models/default/django_app/dummyrelatedmodel.js +0 -69
  113. package/dist/models/default/django_app/filetest.d.ts +0 -44
  114. package/dist/models/default/django_app/filetest.js +0 -69
  115. package/dist/models/default/django_app/index.d.ts +0 -16
  116. package/dist/models/default/django_app/index.js +0 -16
  117. package/dist/models/default/django_app/modelwithcustompkrelation.d.ts +0 -47
  118. package/dist/models/default/django_app/modelwithcustompkrelation.js +0 -71
  119. package/dist/models/default/django_app/namefiltercustompkmodel.d.ts +0 -44
  120. package/dist/models/default/django_app/namefiltercustompkmodel.js +0 -69
  121. package/dist/models/default/django_app/order.d.ts +0 -47
  122. package/dist/models/default/django_app/order.js +0 -71
  123. package/dist/models/default/django_app/orderitem.d.ts +0 -47
  124. package/dist/models/default/django_app/orderitem.js +0 -72
  125. package/dist/models/default/django_app/product.d.ts +0 -47
  126. package/dist/models/default/django_app/product.js +0 -71
  127. package/dist/models/default/django_app/productcategory.d.ts +0 -44
  128. package/dist/models/default/django_app/productcategory.js +0 -69
  129. package/dist/models/default/django_app/rateplan.d.ts +0 -44
  130. package/dist/models/default/django_app/rateplan.js +0 -69
  131. package/dist/models/default/fileobject.d.ts +0 -4
  132. package/dist/models/default/fileobject.js +0 -9
  133. package/dist/models/default/index.d.ts +0 -2
  134. package/dist/models/default/index.js +0 -2
  135. package/dist/models/index.d.ts +0 -1
  136. package/dist/models/index.js +0 -5
@@ -71,7 +71,7 @@ export class PusherEventReceiver {
71
71
  constructor(options: PusherReceiverOptions, configKey: string);
72
72
  configKey: string;
73
73
  connectionTimeoutId: NodeJS.Timeout;
74
- pusherClient: Pusher;
74
+ pusherClient: any;
75
75
  formatChannelName: (arg0: string) => string;
76
76
  namespaceResolver: NamespaceResolver;
77
77
  channels: Map<any, any>;
@@ -183,4 +183,3 @@ export type PusherReceiverOptions = {
183
183
  */
184
184
  namespaceResolver?: NamespaceResolver | undefined;
185
185
  };
186
- import Pusher from "pusher-js";
@@ -106,22 +106,22 @@ export class PusherEventReceiver {
106
106
  * @param {string} reason
107
107
  */
108
108
  _logConnectionError(reason) {
109
- console.error(`%c
110
- ████████████████████████████████████████████████████████████████
111
- █ █
112
- █ PUSHER CONNECTION FAILED for backend: "${this.configKey}" █
113
- █ █
114
- ████████████████████████████████████████████████████████████████
115
- %c
116
- Reason: ${reason}
117
-
118
- CRITICAL: Real-time updates from the server will NOT be received.
119
- This application will not reflect remote changes propagated via Pusher.
120
-
121
- Common causes:
122
- 1. Incorrect 'appKey' or 'cluster' in the configuration.
123
- 2. The 'authEndpoint' is unreachable or returning an error (check network tab).
124
- 3. Network connectivity issues (firewall, offline).
109
+ console.error(`%c
110
+ ████████████████████████████████████████████████████████████████
111
+ █ █
112
+ █ PUSHER CONNECTION FAILED for backend: "${this.configKey}" █
113
+ █ █
114
+ ████████████████████████████████████████████████████████████████
115
+ %c
116
+ Reason: ${reason}
117
+
118
+ CRITICAL: Real-time updates from the server will NOT be received.
119
+ This application will not reflect remote changes propagated via Pusher.
120
+
121
+ Common causes:
122
+ 1. Incorrect 'appKey' or 'cluster' in the configuration.
123
+ 2. The 'authEndpoint' is unreachable or returning an error (check network tab).
124
+ 3. Network connectivity issues (firewall, offline).
125
125
  4. Using an 'app_id' instead of the 'appKey'.`, "background-color: red; color: white; font-weight: bold; font-size: 16px; padding: 10px;", "color: red; font-size: 12px;");
126
126
  }
127
127
  /**
@@ -1,4 +1,5 @@
1
- import sift, { createEqualsOperation } from 'sift';
1
+ import sift from 'sift';
2
+ const { createEqualsOperation } = sift;
2
3
  import { configInstance } from '../config.js';
3
4
  import { DateTime } from 'luxon';
4
5
  import { ModelSerializer } from '../flavours/django/serializers.js';
@@ -1,4 +1,4 @@
1
- import { ValidationError } from './errors';
1
+ import { ValidationError } from './errors.js';
2
2
  import * as math from 'mathjs';
3
3
  // Create a math instance
4
4
  const mathInstance = math.create();
@@ -2,7 +2,7 @@ import { Manager } from "./manager.js";
2
2
  import { ValidationError } from "./errors.js";
3
3
  import { modelStoreRegistry } from "../../syncEngine/registries/modelStoreRegistry.js";
4
4
  import { isNil } from "lodash-es";
5
- import { QueryExecutor } from "./queryExecutor";
5
+ import { QueryExecutor } from "./queryExecutor.js";
6
6
  import { wrapReactiveModel } from "../../reactiveAdaptor.js";
7
7
  import { DateParsingHelpers } from "./dates.js";
8
8
  import { FileObject } from './files.js';
@@ -70,4 +70,4 @@ export class OperationFactory {
70
70
  */
71
71
  static createUpdateOrCreateOperation(queryset: QuerySet, lookup?: Object, defaults?: Object, operationId?: string): Operation;
72
72
  }
73
- import { Operation } from '../../syncEngine/stores/operation';
73
+ import { Operation } from '../../syncEngine/stores/operation.js';
@@ -1,4 +1,4 @@
1
- import { Operation, Type, Status } from '../../syncEngine/stores/operation';
1
+ import { Operation, Type, Status } from '../../syncEngine/stores/operation.js';
2
2
  import { v7 as uuid7 } from 'uuid';
3
3
  import { createTempPk } from './tempPk.js';
4
4
  import { getRequiredFields, pickRequiredFields, processQuery } from '../../filtering/localFiltering.js';
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _a, _MetricStrategyFactory_customStrategies, _MetricStrategyFactory_defaultStrategies, _MetricStrategyFactory_generateStrategyKey;
7
- import { Status, Type } from '../stores/operation';
7
+ import { Status, Type } from '../stores/operation.js';
8
8
  import { isNil } from 'lodash-es';
9
9
  /**
10
10
  * Base class for metric calculation strategies with operations
@@ -7,7 +7,7 @@ export class LiveMetric {
7
7
  queryset: any;
8
8
  metricType: any;
9
9
  field: any;
10
- get lqs(): import("./querysetStoreRegistry").LiveQueryset;
10
+ get lqs(): import("./querysetStoreRegistry.js").LiveQueryset;
11
11
  /**
12
12
  * Refresh the metric data from the database
13
13
  * Delegates to the underlying store's sync method
@@ -1,7 +1,7 @@
1
- import { MetricStore } from '../stores/metricStore';
1
+ import { MetricStore } from '../stores/metricStore.js';
2
2
  import { isNil, isEmpty } from 'lodash-es';
3
- import { querysetStoreRegistry } from './querysetStoreRegistry';
4
- import { QueryExecutor } from '../../flavours/django/queryExecutor';
3
+ import { querysetStoreRegistry } from './querysetStoreRegistry.js';
4
+ import { QueryExecutor } from '../../flavours/django/queryExecutor.js';
5
5
  import { wrapReactiveMetric } from '../../reactiveAdaptor.js';
6
6
  import hash from 'object-hash';
7
7
  /**
@@ -11,7 +11,7 @@ export class MetricStore {
11
11
  fetchFn: any;
12
12
  groundTruthValue: any;
13
13
  isSyncing: boolean;
14
- strategy: import("../metrics/metricOptCalcs").MetricCalculationStrategy;
14
+ strategy: import("../metrics/metricOptCalcs.js").MetricCalculationStrategy;
15
15
  operations: any[];
16
16
  confirmedOps: Set<any>;
17
17
  metricCache: Cache;
@@ -1,5 +1,5 @@
1
1
  import { Cache } from '../cache/cache.js';
2
- import { MetricStrategyFactory } from "../metrics/metricOptCalcs";
2
+ import { MetricStrategyFactory } from "../metrics/metricOptCalcs.js";
3
3
  import hash from 'object-hash';
4
4
  import { isNil, isEmpty, isEqual } from 'lodash-es';
5
5
  import { metricEventEmitter } from './reactivity.js';
@@ -1,4 +1,4 @@
1
- export const operationEvents: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
1
+ export const operationEvents: any;
2
2
  export namespace Status {
3
3
  let CREATED: string;
4
4
  let UPDATED: string;
@@ -13,7 +13,7 @@ var _Operation__instances, _Operation__frozenInstances;
13
13
  import { MAX, v7 as uuidv7 } from "uuid";
14
14
  import { isNil } from 'lodash-es';
15
15
  import mitt from 'mitt';
16
- import { tempPkMap } from "../../flavours/django/tempPk";
16
+ import { tempPkMap } from "../../flavours/django/tempPk.js";
17
17
  import { modelStoreRegistry } from "../registries/modelStoreRegistry.js";
18
18
  export const operationEvents = mitt();
19
19
  export const Status = {
@@ -1,3 +1,3 @@
1
- export const modelEventEmitter: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
2
- export const querysetEventEmitter: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
3
- export const metricEventEmitter: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
1
+ export const modelEventEmitter: any;
2
+ export const querysetEventEmitter: any;
3
+ export const metricEventEmitter: any;
@@ -1,5 +1,5 @@
1
1
  import { isNil, isEqual } from 'lodash-es';
2
- import { filter } from '../../filtering/localFiltering';
2
+ import { filter } from '../../filtering/localFiltering.js';
3
3
  /**
4
4
  * Guarantees an array of operations, is an array of operations. Handles
5
5
  * the basic failure case of a single operation.
@@ -22,7 +22,8 @@ export class SyncManager {
22
22
  debounceMs: number;
23
23
  maxWaitMs: number;
24
24
  batchStartTime: number | null;
25
- syncQueue: PQueue<import("p-queue/dist/priority-queue").default, import("p-queue").QueueAddOptions>;
25
+ /** @type {PQueue} */
26
+ syncQueue: PQueue;
26
27
  withTimeout(promise: any, ms: any): Promise<any>;
27
28
  /**
28
29
  * Initialize event handlers for all event receivers
@@ -1,13 +1,13 @@
1
- import { getAllEventReceivers } from "../core/eventReceivers";
2
- import { operationRegistry } from "./stores/operation";
3
- import { initializeAllEventReceivers } from "../config";
4
- import { getEventReceiver } from "../core/eventReceivers";
5
- import { querysetStoreRegistry, QuerysetStoreRegistry, } from "./registries/querysetStoreRegistry";
6
- import { modelStoreRegistry, ModelStoreRegistry, } from "./registries/modelStoreRegistry";
7
- import { metricRegistry, MetricRegistry } from "./registries/metricRegistry";
8
- import { getModelClass, getConfig } from "../config";
1
+ import { getAllEventReceivers } from "../core/eventReceivers.js";
2
+ import { operationRegistry } from "./stores/operation.js";
3
+ import { initializeAllEventReceivers } from "../config.js";
4
+ import { getEventReceiver } from "../core/eventReceivers.js";
5
+ import { querysetStoreRegistry, QuerysetStoreRegistry, } from "./registries/querysetStoreRegistry.js";
6
+ import { modelStoreRegistry, ModelStoreRegistry, } from "./registries/modelStoreRegistry.js";
7
+ import { metricRegistry, MetricRegistry } from "./registries/metricRegistry.js";
8
+ import { getModelClass, getConfig } from "../config.js";
9
9
  import { isNil } from "lodash-es";
10
- import { QuerysetStore } from "./stores/querysetStore";
10
+ import { QuerysetStore } from "./stores/querysetStore.js";
11
11
  import PQueue from "p-queue";
12
12
  export class EventPayload {
13
13
  constructor(data) {
@@ -96,6 +96,7 @@ export class SyncManager {
96
96
  this.maxWaitMs = 2000; // Maximum time to hold events
97
97
  this.batchStartTime = null;
98
98
  // SyncQueue
99
+ /** @type {PQueue} */
99
100
  this.syncQueue = new PQueue({ concurrency: 1 });
100
101
  }
101
102
  withTimeout(promise, ms) {
package/package.json CHANGED
@@ -1,126 +1,128 @@
1
- {
2
- "name": "@statezero/core",
3
- "version": "0.2.16",
4
- "type": "module",
5
- "module": "ESNext",
6
- "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",
7
- "main": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "bin": {
10
- "statezero": "dist/cli/index.js"
11
- },
12
- "exports": {
13
- ".": {
14
- "import": "./dist/index.js",
15
- "require": "./dist/index.js"
16
- },
17
- "./cli": {
18
- "import": "./dist/cli/index.js",
19
- "require": "./dist/cli/index.js"
20
- },
21
- "./react": {
22
- "import": "./dist/react-entry.js",
23
- "require": "./dist/react-entry.js"
24
- },
25
- "./vue": {
26
- "import": "./dist/vue-entry.js",
27
- "require": "./dist/vue-entry.js"
28
- }
29
- },
30
- "scripts": {
31
- "test": "vitest run --config=vitest.base.config.ts",
32
- "test:e2e": "vitest run --config=vitest.sequential.config.ts tests/e2e",
33
- "generate:test-apps": "ts-node scripts/generate-test-apps.js",
34
- "test:adaptors": "playwright test tests/adaptors",
35
- "test:coverage": "vitest run --coverage",
36
- "build": "tsc",
37
- "parse-queries": "node scripts/perfect-query-parser.js",
38
- "sync": "node src/cli/index.js sync",
39
- "sync:dev": "npx cross-env NODE_ENV=test npm run sync",
40
- "sync-models": "node src/cli/index.js sync-models",
41
- "sync-models:dev": "npx cross-env NODE_ENV=test npm run sync-models",
42
- "sync-actions": "node src/cli/index.js sync-actions",
43
- "sync-actions:dev": "npx cross-env NODE_ENV=test npm run sync-actions",
44
- "clean": "npx rimraf dist",
45
- "prepare": "npm run clean && npm run build",
46
- "prepublishOnly": "npm run clean && npm run build"
47
- },
48
- "keywords": [
49
- "typescript",
50
- "orm",
51
- "backend",
52
- "frontend",
53
- "database",
54
- "sql",
55
- "django",
56
- "sqlalchemy",
57
- "react",
58
- "vue",
59
- "svelte"
60
- ],
61
- "author": "Robert Herring <robert.herring@resipilot.com>",
62
- "license": "SEE LICENSE IN LICENSE",
63
- "repository": {
64
- "type": "git",
65
- "url": "git+https://github.com/state-zero/statezero-client.git"
66
- },
67
- "files": [
68
- "dist",
69
- "LICENSE",
70
- "README.md"
71
- ],
72
- "homepage": "https://www.statezero.dev",
73
- "dependencies": {
74
- "axios": "^1.7.9",
75
- "cli-progress": "^3.12.0",
76
- "cosmiconfig": "^9.0.0",
77
- "cosmiconfig-typescript-loader": "^6.1.0",
78
- "date-fns": "^4.1.0",
79
- "dotenv": "^16.4.7",
80
- "fs-extra": "^11.3.0",
81
- "graphlib": "^2.1.8",
82
- "handlebars": "^4.7.8",
83
- "idb": "^8.0.2",
84
- "inquirer": "^12.4.2",
85
- "lodash-es": "^4.17.21",
86
- "luxon": "^3.6.1",
87
- "mathjs": "^14.4.0",
88
- "mitt": "^3.0.1",
89
- "object-hash": "^3.0.0",
90
- "openapi-typescript": "^6.7.1",
91
- "p-queue": "^8.1.0",
92
- "pusher-js": "^8.4.0",
93
- "rfdc": "^1.4.1",
94
- "sift": "^17.1.3",
95
- "superjson": "^2.2.2",
96
- "uuid": "^11.1.0",
97
- "yargs": "^17.7.2",
98
- "zod": "^3.24.2"
99
- },
100
- "devDependencies": {
101
- "@playwright/test": "^1.50.1",
102
- "@types/cli-progress": "^3.11.6",
103
- "@types/lodash-es": "^4.17.12",
104
- "@types/node": "^22.13.1",
105
- "@types/react": "^18.3.18",
106
- "@types/yargs": "^17.0.32",
107
- "@vitest/coverage-v8": "^3.0.5",
108
- "fake-indexeddb": "^6.0.0",
109
- "fast-glob": "^3.3.3",
110
- "react": "^18.2.0",
111
- "rimraf": "^5.0.5",
112
- "ts-node": "^10.9.2",
113
- "typescript": "^5.7.3",
114
- "vitest": "^3.0.5",
115
- "vue": "^3.2.0"
116
- },
117
- "publishConfig": {
118
- "access": "public"
119
- },
120
- "bugs": {
121
- "url": "https://github.com/state-zero/statezero-client/issues"
122
- },
123
- "directories": {
124
- "test": "tests"
125
- }
126
- }
1
+ {
2
+ "name": "@statezero/core",
3
+ "version": "0.2.18",
4
+ "type": "module",
5
+ "module": "ESNext",
6
+ "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "bin": {
10
+ "statezero": "dist/cli/index.js"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.js"
16
+ },
17
+ "./cli": {
18
+ "import": "./dist/cli/index.js",
19
+ "require": "./dist/cli/index.js"
20
+ },
21
+ "./react": {
22
+ "import": "./dist/react-entry.js",
23
+ "require": "./dist/react-entry.js"
24
+ },
25
+ "./vue": {
26
+ "import": "./dist/vue-entry.js",
27
+ "require": "./dist/vue-entry.js"
28
+ },
29
+ "./dist/*": "./dist/*"
30
+ },
31
+ "scripts": {
32
+ "test": "vitest run --config=vitest.base.config.ts",
33
+ "test:esm": "node test/esm-import.mjs",
34
+ "test:e2e": "vitest run --config=vitest.sequential.config.ts tests/e2e",
35
+ "generate:test-apps": "ts-node scripts/generate-test-apps.js",
36
+ "test:adaptors": "playwright test tests/adaptors",
37
+ "test:coverage": "vitest run --coverage",
38
+ "build": "tsc",
39
+ "parse-queries": "node scripts/perfect-query-parser.js",
40
+ "sync": "node src/cli/index.js sync",
41
+ "sync:dev": "npx cross-env NODE_ENV=test npm run sync",
42
+ "sync-models": "node src/cli/index.js sync-models",
43
+ "sync-models:dev": "npx cross-env NODE_ENV=test npm run sync-models",
44
+ "sync-actions": "node src/cli/index.js sync-actions",
45
+ "sync-actions:dev": "npx cross-env NODE_ENV=test npm run sync-actions",
46
+ "clean": "npx rimraf dist",
47
+ "prepare": "npm run clean && npm run build",
48
+ "prepublishOnly": "npm run clean && npm run build"
49
+ },
50
+ "keywords": [
51
+ "typescript",
52
+ "orm",
53
+ "backend",
54
+ "frontend",
55
+ "database",
56
+ "sql",
57
+ "django",
58
+ "sqlalchemy",
59
+ "react",
60
+ "vue",
61
+ "svelte"
62
+ ],
63
+ "author": "Robert Herring <robert.herring@resipilot.com>",
64
+ "license": "SEE LICENSE IN LICENSE",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/state-zero/statezero-client.git"
68
+ },
69
+ "files": [
70
+ "dist",
71
+ "LICENSE",
72
+ "README.md"
73
+ ],
74
+ "homepage": "https://www.statezero.dev",
75
+ "dependencies": {
76
+ "axios": "^1.7.9",
77
+ "cli-progress": "^3.12.0",
78
+ "cosmiconfig": "^9.0.0",
79
+ "cosmiconfig-typescript-loader": "^6.1.0",
80
+ "date-fns": "^4.1.0",
81
+ "dotenv": "^16.4.7",
82
+ "fs-extra": "^11.3.0",
83
+ "graphlib": "^2.1.8",
84
+ "handlebars": "^4.7.8",
85
+ "idb": "^8.0.2",
86
+ "inquirer": "^12.4.2",
87
+ "lodash-es": "^4.17.21",
88
+ "luxon": "^3.6.1",
89
+ "mathjs": "^14.4.0",
90
+ "mitt": "^3.0.1",
91
+ "object-hash": "^3.0.0",
92
+ "openapi-typescript": "^6.7.1",
93
+ "p-queue": "^8.1.0",
94
+ "pusher-js": "^8.4.0",
95
+ "rfdc": "^1.4.1",
96
+ "sift": "^17.1.3",
97
+ "superjson": "^2.2.2",
98
+ "uuid": "^11.1.0",
99
+ "yargs": "^17.7.2",
100
+ "zod": "^3.24.2"
101
+ },
102
+ "devDependencies": {
103
+ "@playwright/test": "^1.50.1",
104
+ "@types/cli-progress": "^3.11.6",
105
+ "@types/lodash-es": "^4.17.12",
106
+ "@types/node": "^22.13.1",
107
+ "@types/react": "^18.3.18",
108
+ "@types/yargs": "^17.0.32",
109
+ "@vitest/coverage-v8": "^3.0.5",
110
+ "fake-indexeddb": "^6.0.0",
111
+ "fast-glob": "^3.3.3",
112
+ "react": "^18.2.0",
113
+ "rimraf": "^5.0.5",
114
+ "ts-node": "^10.9.2",
115
+ "typescript": "^5.7.3",
116
+ "vitest": "^3.0.5",
117
+ "vue": "^3.2.0"
118
+ },
119
+ "publishConfig": {
120
+ "access": "public"
121
+ },
122
+ "bugs": {
123
+ "url": "https://github.com/state-zero/statezero-client/issues"
124
+ },
125
+ "directories": {
126
+ "test": "tests"
127
+ }
128
+ }