@objectstack/client 3.0.2 → 3.0.4

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
- > @objectstack/client@3.0.2 build /home/runner/work/spec/spec/packages/client
2
+ > @objectstack/client@3.0.4 build /home/runner/work/spec/spec/packages/client
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 38.90 KB
14
- ESM dist/index.mjs.map 78.68 KB
15
- ESM ⚡️ Build success in 44ms
16
13
  CJS dist/index.js 40.06 KB
17
14
  CJS dist/index.js.map 78.74 KB
18
- CJS ⚡️ Build success in 45ms
15
+ CJS ⚡️ Build success in 47ms
16
+ ESM dist/index.mjs 38.90 KB
17
+ ESM dist/index.mjs.map 78.68 KB
18
+ ESM ⚡️ Build success in 47ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 4794ms
20
+ DTS ⚡️ Build success in 4873ms
21
21
  DTS dist/index.d.mts 22.83 KB
22
22
  DTS dist/index.d.ts 22.83 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @objectstack/client
2
2
 
3
+ ## 3.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d738987]
8
+ - @objectstack/spec@3.0.4
9
+ - @objectstack/core@3.0.4
10
+
11
+ ## 3.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - c7267f6: Patch release for maintenance updates and improvements.
16
+ - Updated dependencies [c7267f6]
17
+ - @objectstack/spec@3.0.3
18
+ - @objectstack/core@3.0.3
19
+
3
20
  ## 3.0.2
4
21
 
5
22
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/client",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Official Client SDK for ObjectStack Protocol",
6
6
  "main": "dist/index.js",
@@ -13,20 +13,20 @@
13
13
  }
14
14
  },
15
15
  "dependencies": {
16
- "@objectstack/core": "3.0.2",
17
- "@objectstack/spec": "3.0.2"
16
+ "@objectstack/core": "3.0.4",
17
+ "@objectstack/spec": "3.0.4"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@hono/node-server": "^1.2.0",
21
21
  "msw": "^2.12.9",
22
22
  "typescript": "^5.0.0",
23
23
  "vitest": "^4.0.18",
24
- "@objectstack/driver-memory": "3.0.2",
25
- "@objectstack/hono": "3.0.2",
26
- "@objectstack/objectql": "3.0.2",
27
- "@objectstack/plugin-hono-server": "3.0.2",
28
- "@objectstack/plugin-msw": "3.0.2",
29
- "@objectstack/runtime": "3.0.2"
24
+ "@objectstack/driver-memory": "3.0.4",
25
+ "@objectstack/hono": "3.0.4",
26
+ "@objectstack/objectql": "3.0.4",
27
+ "@objectstack/plugin-hono-server": "3.0.4",
28
+ "@objectstack/plugin-msw": "3.0.4",
29
+ "@objectstack/runtime": "3.0.4"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup --config ../../tsup.config.ts",
@@ -1,206 +0,0 @@
1
- # @objectstack/client - Quick Reference
2
-
3
- This quick reference provides an overview of the compliance verification work and how to use it.
4
-
5
- ## 📚 Documentation Index
6
-
7
- ### Compliance & Verification
8
-
9
- 1. **[CLIENT_SPEC_COMPLIANCE.md](./CLIENT_SPEC_COMPLIANCE.md)** (English)
10
- - Complete protocol compliance matrix
11
- - Method-by-method verification for all 95+ API methods
12
- - Architecture and implementation notes
13
- - 358 lines of detailed analysis
14
-
15
- 2. **[CLIENT_SPEC_COMPLIANCE_CN.md](./CLIENT_SPEC_COMPLIANCE_CN.md)** (中文)
16
- - Chinese language compliance report
17
- - Summary of key findings
18
- - Recommendations for next steps
19
- - 383 lines
20
-
21
- ### Testing
22
-
23
- 3. **[CLIENT_SERVER_INTEGRATION_TESTS.md](./CLIENT_SERVER_INTEGRATION_TESTS.md)**
24
- - Comprehensive test specification for 17 test suites
25
- - Detailed test cases with code examples
26
- - Mock server setup guide
27
- - CI/CD configuration examples
28
- - 932 lines of test specifications
29
-
30
- 4. **[tests/integration/README.md](./tests/integration/README.md)**
31
- - How to run integration tests
32
- - Environment variables
33
- - Test structure overview
34
-
35
- ### Usage
36
-
37
- 5. **[README.md](./README.md)**
38
- - Updated with protocol coverage information
39
- - Complete namespace examples
40
- - Testing instructions
41
- - Error handling guide
42
-
43
- ## ✅ Compliance Status
44
-
45
- ```
46
- ✅ 13/13 API Namespaces Implemented (100%)
47
- ✅ 4/4 Core Services (discovery, meta, data, auth)
48
- ✅ 9/9 Optional Services (packages, ui, workflow, analytics, automation, i18n, notifications, realtime, ai)
49
- ✅ 95+ Protocol Methods
50
- ✅ Batch Operations
51
- ✅ ETag Caching
52
- ✅ Error Handling
53
- ```
54
-
55
- ## 🧪 Running Tests
56
-
57
- ### Unit Tests (Existing)
58
-
59
- ```bash
60
- cd packages/client
61
- pnpm test
62
- ```
63
-
64
- Runs existing unit tests:
65
- - `src/client.test.ts` - Mock-based unit tests
66
- - `src/client.hono.test.ts` - Hono server integration
67
- - `src/client.msw.test.ts` - MSW-based tests
68
-
69
- ### Integration Tests (New)
70
-
71
- **Note:** Integration tests require a running ObjectStack server. The server is provided by a separate repository and must be set up independently.
72
-
73
- ```bash
74
- # Start test server (in the ObjectStack server repository)
75
- # Follow that project's documentation for test server setup
76
- # Example: cd /path/to/objectstack-server && pnpm dev:test
77
-
78
- # Run integration tests (in this repository)
79
- cd packages/client
80
- pnpm test:integration
81
- ```
82
-
83
- Currently available:
84
- - `tests/integration/01-discovery.test.ts` - Discovery and connection tests
85
-
86
- **To be implemented:** Tests 02-17 (see CLIENT_SERVER_INTEGRATION_TESTS.md)
87
-
88
- ## 📋 API Namespace Reference
89
-
90
- Quick reference to all 13 implemented namespaces:
91
-
92
- | Namespace | Client API | Example |
93
- |-----------|-----------|---------|
94
- | **Discovery** | `client.connect()` | `await client.connect()` |
95
- | **Metadata** | `client.meta.*` | `await client.meta.getItem('object', 'contact')` |
96
- | **Data** | `client.data.*` | `await client.data.find('contact', { filters: { status: 'active' } })` |
97
- | **Auth** | `client.auth.*` | `await client.auth.login({ email, password })` |
98
- | **Packages** | `client.packages.*` | `await client.packages.list()` |
99
- | **Views** | `client.views.*` | `await client.views.list('contact')` |
100
- | **Workflow** | `client.workflow.*` | `await client.workflow.transition({ object, recordId, transition })` |
101
- | **Analytics** | `client.analytics.*` | `await client.analytics.meta('sales')` |
102
- | **Automation** | `client.automation.*` | `await client.automation.trigger('name', payload)` |
103
- | **i18n** | `client.i18n.*` | `await client.i18n.getTranslations('zh-CN')` |
104
- | **Notifications** | `client.notifications.*` | `await client.notifications.list({ unreadOnly: true })` |
105
- | **Realtime** | `client.realtime.*` | `await client.realtime.subscribe({ channel, event })` |
106
- | **AI** | `client.ai.*` | `await client.ai.nlq({ query: 'show active contacts' })` |
107
- | **Storage** | `client.storage.*` | `await client.storage.upload(fileData, 'user')` |
108
-
109
- ## 🎯 Next Steps for Developers
110
-
111
- ### Immediate (High Priority)
112
-
113
- 1. **Implement Remaining Integration Tests**
114
- - Copy `tests/integration/01-discovery.test.ts` as a template
115
- - Implement tests 02-17 per specifications in CLIENT_SERVER_INTEGRATION_TESTS.md
116
- - Focus on core services first (auth, metadata, data)
117
-
118
- 2. **Set Up Test Server**
119
- - Create lightweight test server configuration
120
- - Seed test database with sample data
121
- - Enable all core and optional services
122
-
123
- 3. **CI/CD Integration**
124
- - Create `.github/workflows/client-integration-tests.yml`
125
- - Automate test server startup
126
- - Run integration tests on PR and push
127
-
128
- ### Medium Priority
129
-
130
- 4. **Error Scenario Testing**
131
- - Network failures
132
- - 4xx client errors
133
- - 5xx server errors
134
- - Timeout handling
135
-
136
- 5. **Performance Benchmarks**
137
- - Request latency measurements
138
- - Batch operation efficiency
139
- - Cache hit rates
140
-
141
- 6. **Documentation Improvements**
142
- - Add more code examples
143
- - Create migration guide from v1
144
- - Add troubleshooting section
145
-
146
- ### Long Term
147
-
148
- 7. **End-to-End Tests**
149
- - Browser-based tests with Playwright
150
- - Full user flow testing
151
- - Multi-browser support
152
-
153
- 8. **Monitoring**
154
- - Client-side telemetry
155
- - Performance monitoring
156
- - Error tracking integration
157
-
158
- ## 📖 Reading Order
159
-
160
- For new developers reviewing this work:
161
-
162
- 1. Start with **README.md** - Understand basic usage
163
- 2. Read **CLIENT_SPEC_COMPLIANCE.md** (or CN version) - Understand what's implemented
164
- 3. Review **CLIENT_SERVER_INTEGRATION_TESTS.md** - Understand testing strategy
165
- 4. Explore **tests/integration/** - See example tests
166
- 5. Review spec definitions in `../spec/src/api/` - Understand the source of truth
167
-
168
- ## 🔗 Related Documentation
169
-
170
- - [Spec Protocol Map](../spec/PROTOCOL_MAP.md) - Complete protocol reference
171
- - [REST API Plugin](../spec/REST_API_PLUGIN.md) - API implementation details
172
- - [Dispatcher Protocol](../spec/src/api/dispatcher.zod.ts) - Route-to-service mapping
173
- - [Protocol Schemas](../spec/src/api/protocol.zod.ts) - Request/response schemas
174
-
175
- ## 🤝 Contributing
176
-
177
- When adding new features:
178
-
179
- 1. ✅ Check if it requires new protocol methods in `@objectstack/spec`
180
- 2. ✅ Update CLIENT_SPEC_COMPLIANCE.md if adding new methods
181
- 3. ✅ Add integration tests in `tests/integration/`
182
- 4. ✅ Update README.md with usage examples
183
- 5. ✅ Ensure all tests pass before submitting PR
184
-
185
- ## ❓ FAQ
186
-
187
- **Q: Why two separate test suites (unit and integration)?**
188
- A: Unit tests (`src/*.test.ts`) use mocks and run quickly. Integration tests (`tests/integration/*.test.ts`) require a real server and test end-to-end communication.
189
-
190
- **Q: Do I need to implement all 17 integration test suites?**
191
- A: Not immediately. Start with core services (discovery, auth, metadata, data). Others can be added incrementally.
192
-
193
- **Q: Can I run integration tests without a server?**
194
- A: Not yet. You need a running ObjectStack server. We plan to add a mock server option in the future.
195
-
196
- **Q: Is the client compatible with older server versions?**
197
- A: The client implements the latest protocol. Check the discovery response for API version compatibility.
198
-
199
- **Q: Where can I find the protocol definitions?**
200
- A: In `@objectstack/spec` package, primarily in `src/api/protocol.zod.ts` and `src/api/dispatcher.zod.ts`.
201
-
202
- ---
203
-
204
- **Last Updated:** 2026-02-09
205
- **Status:** ✅ Documentation Complete - Ready for Implementation
206
- **Maintainer:** ObjectStack Team