@dotcms/client 26.9.9-1 → 26.9.9-1-next.2669
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/CLAUDE.md +12 -9
- package/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +2 -2
package/CLAUDE.md
CHANGED
|
@@ -18,7 +18,7 @@ nx run sdk-client:build # ESM/CJS dual package build
|
|
|
18
18
|
nx run sdk-client:build:js # Specialized esbuild for editor integration
|
|
19
19
|
|
|
20
20
|
# Run tests
|
|
21
|
-
nx run sdk-client:test # Run
|
|
21
|
+
nx run sdk-client:test # Run Vitest tests
|
|
22
22
|
nx run sdk-client:test:ci # Run tests with CI configuration and coverage
|
|
23
23
|
|
|
24
24
|
# Code quality
|
|
@@ -31,7 +31,10 @@ nx run sdk-client:publish --args.ver=1.0.0 --args.tag=latest
|
|
|
31
31
|
### Testing Commands
|
|
32
32
|
```bash
|
|
33
33
|
# Run specific test file
|
|
34
|
-
nx test sdk-client --
|
|
34
|
+
nx test sdk-client -- src/lib/client/content/content-api.spec.ts
|
|
35
|
+
|
|
36
|
+
# Run tests matching a name
|
|
37
|
+
nx test sdk-client -- -t "specific test name"
|
|
35
38
|
|
|
36
39
|
# Run tests in watch mode
|
|
37
40
|
nx test sdk-client --watch
|
|
@@ -60,7 +63,7 @@ libs/sdk/client/
|
|
|
60
63
|
├── project.json # Nx project configuration
|
|
61
64
|
├── package.json # NPM package configuration
|
|
62
65
|
├── tsconfig.json # TypeScript configuration
|
|
63
|
-
└──
|
|
66
|
+
└── vite.config.mts # Vitest testing configuration
|
|
64
67
|
```
|
|
65
68
|
|
|
66
69
|
### Key Components
|
|
@@ -136,8 +139,8 @@ const query = await client.content
|
|
|
136
139
|
|
|
137
140
|
### Testing Standards
|
|
138
141
|
|
|
139
|
-
####
|
|
140
|
-
- **Framework**:
|
|
142
|
+
#### Vitest Configuration
|
|
143
|
+
- **Framework**: Vitest with TypeScript support, `globals: true`, jsdom environment
|
|
141
144
|
- **Coverage**: Outputs to `../../../coverage/libs/sdk/client`
|
|
142
145
|
- **File patterns**: `**/*.spec.ts` and `**/*.test.ts`
|
|
143
146
|
- **CI mode**: Supports CI configuration with coverage reporting
|
|
@@ -158,8 +161,8 @@ describe('DotCMSClient', () => {
|
|
|
158
161
|
});
|
|
159
162
|
|
|
160
163
|
// Mock external dependencies
|
|
161
|
-
|
|
162
|
-
dotFetch:
|
|
164
|
+
vi.mock('../utils/fetch', () => ({
|
|
165
|
+
dotFetch: vi.fn()
|
|
163
166
|
}));
|
|
164
167
|
```
|
|
165
168
|
|
|
@@ -186,7 +189,7 @@ export { DotCMSClientImpl } from './lib/client/client-impl';
|
|
|
186
189
|
- **package.json**: NPM package metadata with proper exports field
|
|
187
190
|
- **tsconfig.json**: TypeScript configuration with strict mode
|
|
188
191
|
- **tsconfig.lib.json**: Library-specific TypeScript settings
|
|
189
|
-
- **
|
|
192
|
+
- **vite.config.mts**: Vitest testing configuration (generated by `tools/generate-vite-configs.mjs`)
|
|
190
193
|
|
|
191
194
|
## Development Workflow
|
|
192
195
|
|
|
@@ -245,7 +248,7 @@ This client SDK serves as the foundation for:
|
|
|
245
248
|
- ✅ Use Nx commands for all build/test operations
|
|
246
249
|
- ✅ Follow client-builder pattern for new APIs
|
|
247
250
|
- ✅ Maintain TypeScript strict mode compliance
|
|
248
|
-
- ✅ Write comprehensive
|
|
251
|
+
- ✅ Write comprehensive Vitest tests for new features
|
|
249
252
|
- ✅ Use proper export patterns for dual package support
|
|
250
253
|
- ✅ Test both ESM and CJS builds
|
|
251
254
|
- ✅ Verify editor integration when making core changes
|
package/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ var consola = require('consola');
|
|
|
4
4
|
var types = require('@dotcms/types');
|
|
5
5
|
var internal = require('./internal.cjs.js');
|
|
6
6
|
|
|
7
|
-
const SDK_VERSION = "26.
|
|
7
|
+
const SDK_VERSION = "26.9.9-1-next.2669";
|
|
8
8
|
|
|
9
9
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
10
10
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { consola } from 'consola';
|
|
|
2
2
|
import { BaseHttpClient, DISTANCE_FUNCTIONS, DotHttpError, DotErrorAISearch, DotErrorContent, DotErrorNavigation, UVE_MODE, DotErrorPage } from '@dotcms/types';
|
|
3
3
|
import { graphqlToPageEntity } from './internal.esm.js';
|
|
4
4
|
|
|
5
|
-
const SDK_VERSION = "26.
|
|
5
|
+
const SDK_VERSION = "26.9.9-1-next.2669";
|
|
6
6
|
|
|
7
7
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
8
8
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/client",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.9.9-1-next.2669",
|
|
4
4
|
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"consola": "^3.4.2"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@dotcms/types": "
|
|
13
|
+
"@dotcms/types": "26.9.9-1-next.2669"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"dotCMS",
|