opensecureconf-client 2.2.0 โ†’ 2.2.1

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 (2) hide show
  1. package/README.md +429 -215
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,297 +1,511 @@
1
- # OpenSecureConf JavaScript/TypeScript Client
2
-
3
- JavaScript/TypeScript client library for [OpenSecureConf](https://github.com/yourusername/OpenSecureConf) - A secure, encrypted configuration management system with REST API.
1
+ # OpenSecureConf TypeScript/JavaScript Client
4
2
 
5
3
  [![npm version](https://badge.fury.io/js/opensecureconf-client.svg)](https://www.npmjs.com/package/opensecureconf-client)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ A comprehensive TypeScript/JavaScript client library for OpenSecureConf - Encrypted configuration management with cluster support and HTTPS/SSL.
7
8
 
8
- ## Features
9
+ ## ๐Ÿš€ Features
9
10
 
10
- - ๐Ÿ” **Encrypted Configuration Management** - Create, read, update, and delete encrypted configurations
11
- - ๐ŸŒ **REST API Client** - Full-featured client for OpenSecureConf REST API
12
- - ๐Ÿ“ฆ **TypeScript Support** - Written in TypeScript with full type definitions
13
- - ๐Ÿ”„ **Cluster Support** - Works with both REPLICA and FEDERATED cluster modes
11
+ - โœ… **Full TypeScript Support** - Complete type definitions
12
+ - ๐Ÿ”’ **HTTPS/SSL Support** - Production-ready with TLS
13
+ - ๐Ÿ” **Self-Signed Certificates** - Option for development environments
14
+ - ๐Ÿ“ฆ **Batch Operations** - Bulk create, read, delete
15
+ - ๐ŸŒ **Cluster Support** - Status and health check methods
14
16
  - โšก **Async/Await** - Modern promise-based API
15
- - ๐Ÿ›ก๏ธ **Error Handling** - Comprehensive error handling with custom error types
16
- - โฑ๏ธ **Timeout Control** - Configurable request timeouts
17
- - ๐Ÿงช **Well Tested** - Comprehensive test suite with Jest
17
+ - ๐Ÿ›ก๏ธ **Type-Safe** - Full TypeScript definitions
18
+ - ๐ŸŒ **Universal** - Works in Node.js and browsers
19
+ - ๐Ÿ”„ **Auto-Retry** - Built-in timeout and error handling
20
+ - ๐Ÿ“Š **Metrics** - Prometheus metrics support
18
21
 
19
- ## Installation
22
+ ## ๐Ÿ“ฆ Installation
20
23
 
24
+ ### NPM
21
25
  ```bash
22
26
  npm install opensecureconf-client
23
27
  ```
24
28
 
25
- ## Quick Start
29
+ ### Yarn
30
+ ```bash
31
+ yarn add opensecureconf-client
32
+ ```
26
33
 
27
- ### JavaScript (CommonJS)
34
+ ### PNPM
35
+ ```bash
36
+ pnpm add opensecureconf-client
37
+ ```
28
38
 
29
- ```javascript
30
- const { OpenSecureConfClient } = require('opensecureconf-client');
39
+ ## ๐ŸŽฏ Quick Start
40
+
41
+ ### Basic HTTP Usage
42
+
43
+ ```typescript
44
+ import OpenSecureConfClient from 'opensecureconf-client';
31
45
 
32
46
  const client = new OpenSecureConfClient({
33
47
  baseUrl: 'http://localhost:9000',
34
- userKey: 'my-secure-encryption-key',
35
- apiKey: 'your-api-key', // Optional
48
+ userKey: 'my-secret-key-12345',
49
+ apiKey: 'optional-api-key', // Optional
36
50
  });
37
51
 
38
- // Create a configuration
39
- await client.create('my-config', { setting: 'value' }, 'category');
52
+ // Create configuration
53
+ const config = await client.create('database', {
54
+ host: 'localhost',
55
+ port: 5432,
56
+ username: 'admin',
57
+ });
40
58
 
41
- // Read a configuration
42
- const config = await client.read('my-config');
43
- console.log(config.value); // { setting: 'value' }
59
+ // Read configuration
60
+ const retrieved = await client.read('database');
61
+ console.log(retrieved.value); // { host: 'localhost', port: 5432, ... }
62
+
63
+ // Update configuration
64
+ await client.update('database', {
65
+ host: 'db.example.com',
66
+ port: 5432,
67
+ });
68
+
69
+ // Delete configuration
70
+ await client.delete('database');
44
71
  ```
45
72
 
46
- ### TypeScript (ES Modules)
73
+ ### HTTPS with Valid Certificate (Production)
47
74
 
48
75
  ```typescript
49
- import OpenSecureConfClient from 'opensecureconf-client';
76
+ const client = new OpenSecureConfClient({
77
+ baseUrl: 'https://config.example.com',
78
+ userKey: 'my-secret-key-12345',
79
+ apiKey: 'production-api-key',
80
+ timeout: 60000, // 60 seconds
81
+ });
82
+
83
+ // All operations work the same
84
+ const config = await client.create('api_keys', {
85
+ stripe: 'sk_live_xxx',
86
+ aws: 'AKIA_xxx',
87
+ });
88
+ ```
89
+
90
+ ### HTTPS with Self-Signed Certificate (Development)
50
91
 
92
+ ```typescript
51
93
  const client = new OpenSecureConfClient({
52
- baseUrl: 'http://localhost:9000',
53
- userKey: 'my-secure-encryption-key',
94
+ baseUrl: 'https://localhost:9443',
95
+ userKey: 'my-secret-key-12345',
96
+ rejectUnauthorized: false, // โš ๏ธ Accept self-signed certs (dev only!)
54
97
  });
55
98
 
56
- const config = await client.read('my-config');
99
+ // Works with self-signed certificates
100
+ const info = await client.getInfo();
101
+ console.log(info.service); // OpenSecureConf API
57
102
  ```
58
103
 
59
- ## API Reference
104
+ ## ๐Ÿ“– API Reference
105
+
106
+ ### Constructor Options
107
+
108
+ ```typescript
109
+ interface OpenSecureConfOptions {
110
+ baseUrl: string; // API server URL (http:// or https://)
111
+ userKey: string; // Encryption key (min 8 chars)
112
+ apiKey?: string; // Optional API key for authentication
113
+ timeout?: number; // Request timeout in ms (default: 30000)
114
+ rejectUnauthorized?: boolean; // Reject invalid SSL certs (default: true)
115
+ }
116
+ ```
60
117
 
61
118
  ### Methods
62
119
 
63
- - `create(key, value, category?)` - Create new configuration
64
- - `read(key)` - Read configuration by key
65
- - `update(key, value, category?)` - Update configuration
66
- - `delete(key)` - Delete configuration
67
- - `list(category?)` - List all configurations
68
- - `getClusterStatus()` - Get cluster status
69
- - `healthCheck()` - Perform health check
70
- - `getMetrics()` - Get Prometheus metrics
71
- - `getInfo()` - Get API information
120
+ #### Configuration Operations
72
121
 
73
- ## Error Handling
122
+ ```typescript
123
+ // Create
124
+ await client.create(
125
+ key: string,
126
+ value: Record<string, any>,
127
+ category?: string
128
+ ): Promise<ConfigEntry>
129
+
130
+ // Read
131
+ await client.read(key: string): Promise<ConfigEntry>
132
+
133
+ // Update
134
+ await client.update(
135
+ key: string,
136
+ value: Record<string, any>,
137
+ category?: string
138
+ ): Promise<ConfigEntry>
139
+
140
+ // Delete
141
+ await client.delete(key: string): Promise<{ message: string }>
142
+
143
+ // List
144
+ await client.list(category?: string): Promise<ConfigEntry[]>
145
+
146
+ // Check existence
147
+ await client.exists(key: string): Promise<boolean>
148
+
149
+ // Count
150
+ await client.count(category?: string): Promise<number>
151
+ ```
152
+
153
+ #### Batch Operations
74
154
 
75
155
  ```typescript
76
- import { OpenSecureConfError } from 'opensecureconf-client';
156
+ // Bulk create
157
+ await client.bulkCreate(
158
+ configs: Array<{ key: string; value: Record<string, any>; category?: string }>,
159
+ ignoreErrors?: boolean
160
+ ): Promise<ConfigEntry[]>
161
+
162
+ // Bulk read
163
+ await client.bulkRead(
164
+ keys: string[],
165
+ ignoreErrors?: boolean
166
+ ): Promise<ConfigEntry[]>
167
+
168
+ // Bulk delete
169
+ await client.bulkDelete(
170
+ keys: string[],
171
+ ignoreErrors?: boolean
172
+ ): Promise<{ deleted: string[]; failed: Array<{ key: string; error: any }> }>
173
+ ```
77
174
 
78
- try {
79
- await client.read('non-existent-key');
80
- } catch (error) {
81
- if (error instanceof OpenSecureConfError) {
82
- console.error(`Error ${error.statusCode}: ${error.message}`);
83
- }
84
- }
175
+ #### Cluster & Health
176
+
177
+ ```typescript
178
+ // Get service info
179
+ await client.getInfo(): Promise<Record<string, any>>
180
+
181
+ // Cluster status
182
+ await client.getClusterStatus(): Promise<ClusterStatus>
183
+
184
+ // Health check
185
+ await client.healthCheck(): Promise<{ status: string; node_id: string }>
186
+
187
+ // Get metrics
188
+ await client.getMetrics(): Promise<string>
85
189
  ```
86
190
 
87
- ## Development
191
+ ## ๐Ÿ”’ HTTPS/SSL Configuration
88
192
 
89
- ```bash
90
- npm install # Install dependencies
91
- npm run build # Build for production
92
- npm test # Run tests
93
- npm run lint # Lint code
193
+ ### Production (Valid Certificates)
194
+
195
+ For production environments with valid SSL certificates from Let's Encrypt or a trusted CA:
196
+
197
+ ```typescript
198
+ const client = new OpenSecureConfClient({
199
+ baseUrl: 'https://config.example.com',
200
+ userKey: 'my-secret-key-12345',
201
+ apiKey: 'production-api-key',
202
+ // rejectUnauthorized: true (default)
203
+ });
94
204
  ```
95
205
 
96
- ## License
206
+ ### Development (Self-Signed Certificates)
97
207
 
98
- MIT ยฉ OpenSecureConf Contributors
99
- "
100
- tests/client.test.ts,"import { OpenSecureConfClient, OpenSecureConfError } from '../src/index';
208
+ For development with self-signed certificates:
101
209
 
102
- describe('OpenSecureConfClient', () => {
103
- let client: OpenSecureConfClient;
210
+ ```typescript
211
+ const client = new OpenSecureConfClient({
212
+ baseUrl: 'https://localhost:9443',
213
+ userKey: 'my-secret-key-12345',
214
+ rejectUnauthorized: false, // โš ๏ธ Only for development!
215
+ });
216
+ ```
104
217
 
105
- beforeEach(() => {
106
- client = new OpenSecureConfClient({
107
- baseUrl: 'http://localhost:9000',
108
- userKey: 'test-user-key-12345',
109
- apiKey: 'your-super-secret-api-key-here',
110
- });
111
- });
218
+ **โš ๏ธ Security Warning**: Never use `rejectUnauthorized: false` in production! This disables SSL certificate validation and makes your connection vulnerable to man-in-the-middle attacks.
112
219
 
113
- describe('constructor', () => {
114
- it('should create client with valid options', () => {
115
- expect(client).toBeInstanceOf(OpenSecureConfClient);
116
- });
220
+ ### Node.js HTTPS Agent
117
221
 
118
- it('should throw error if userKey is too short', () => {
119
- expect(() => {
120
- new OpenSecureConfClient({
121
- baseUrl: 'http://localhost:9000',
122
- userKey: 'short',
123
- });
124
- }).toThrow('userKey must be at least 8 characters long');
125
- });
126
- });
222
+ When running in Node.js, the client automatically creates an HTTPS agent with the appropriate SSL settings:
127
223
 
128
- describe('CRUD operations', () => {
129
- const testKey = 'test-config-key';
130
- const testValue = { setting: 'value', number: 42 };
224
+ ```typescript
225
+ // In Node.js, HTTPS agent is automatically configured
226
+ const client = new OpenSecureConfClient({
227
+ baseUrl: 'https://localhost:9443',
228
+ userKey: 'my-secret-key-12345',
229
+ rejectUnauthorized: false,
230
+ });
131
231
 
132
- it('should create a configuration', async () => {
133
- const result = await client.create(testKey, testValue, 'test-category');
134
- expect(result).toHaveProperty('key', testKey);
135
- expect(result).toHaveProperty('value');
136
- });
232
+ // Agent is used for all HTTPS requests automatically
233
+ await client.getInfo();
234
+ ```
137
235
 
138
- it('should read a configuration', async () => {
139
- const result = await client.read(testKey);
140
- expect(result).toHaveProperty('key', testKey);
141
- });
236
+ ### Browser Usage
142
237
 
143
- it('should list configurations', async () => {
144
- const result = await client.list();
145
- expect(Array.isArray(result)).toBe(true);
146
- });
238
+ In browser environments, the native `fetch` API handles HTTPS automatically. Certificate validation follows browser security policies:
147
239
 
148
- it('should delete a configuration', async () => {
149
- const result = await client.delete(testKey);
150
- expect(result).toHaveProperty('message');
151
- });
152
- });
240
+ ```typescript
241
+ // Works in browsers with valid certificates
242
+ const client = new OpenSecureConfClient({
243
+ baseUrl: 'https://config.example.com',
244
+ userKey: 'my-secret-key-12345',
153
245
  });
154
- "
155
- examples/basic-usage.js,"/**
156
- * Basic usage example for OpenSecureConf JavaScript Client
157
- */
246
+ ```
247
+
248
+ ## ๐Ÿ“š Usage Examples
158
249
 
159
- const { OpenSecureConfClient } = require('opensecureconf-client');
250
+ ### Complete Workflow
160
251
 
161
- async function main() {
162
- // Initialize the client
252
+ ```typescript
253
+ import OpenSecureConfClient, { OpenSecureConfError } from 'opensecureconf-client';
254
+
255
+ async function workflow() {
163
256
  const client = new OpenSecureConfClient({
164
- baseUrl: 'http://localhost:9000',
257
+ baseUrl: 'https://localhost:9443',
165
258
  userKey: 'my-secure-encryption-key',
166
- apiKey: 'your-super-secret-api-key-here', // Optional
259
+ apiKey: 'workflow-api-key',
260
+ rejectUnauthorized: false,
167
261
  });
168
262
 
169
263
  try {
170
- // Create a new configuration
171
- const created = await client.create(
172
- 'database-config',
173
- {
174
- host: 'localhost',
175
- port: 5432,
176
- database: 'myapp',
177
- ssl: true,
178
- },
179
- 'database'
180
- );
181
- console.log('Created:', created);
182
-
183
- // Read a configuration
184
- const config = await client.read('database-config');
185
- console.log('Read:', config);
186
-
187
- // List all configurations
188
- const all = await client.list();
189
- console.log('All configs:', all.length);
190
-
191
- // Delete a configuration
192
- await client.delete('database-config');
193
- console.log('Deleted successfully');
264
+ // 1. Health check
265
+ const health = await client.healthCheck();
266
+ console.log(`Status: ${health.status}`);
267
+
268
+ // 2. Create configurations
269
+ await client.create('database', {
270
+ host: 'postgres.local',
271
+ port: 5432,
272
+ });
273
+
274
+ // 3. Batch create
275
+ await client.bulkCreate([
276
+ { key: 'redis', value: { host: 'redis.local', port: 6379 } },
277
+ { key: 'cache', value: { ttl: 3600, maxSize: 1000 } },
278
+ ], true);
279
+
280
+ // 4. List all
281
+ const configs = await client.list();
282
+ console.log(`Total: ${configs.length} configurations`);
283
+
284
+ // 5. Update
285
+ await client.update('database', {
286
+ host: 'postgres.local',
287
+ port: 5432,
288
+ ssl: true,
289
+ });
290
+
291
+ // 6. Cleanup
292
+ await client.bulkDelete(['database', 'redis', 'cache'], true);
194
293
 
195
294
  } catch (error) {
196
- if (error.name === 'OpenSecureConfError') {
197
- console.error('API Error:', error.statusCode, error.message);
198
- } else {
199
- console.error('Error:', error);
295
+ if (error instanceof OpenSecureConfError) {
296
+ console.error(`Error ${error.statusCode}: ${error.message}`);
200
297
  }
201
298
  }
202
299
  }
300
+ ```
301
+
302
+ ### Error Handling
303
+
304
+ ```typescript
305
+ try {
306
+ const config = await client.read('nonexistent');
307
+ } catch (error) {
308
+ if (error instanceof OpenSecureConfError) {
309
+ switch (error.statusCode) {
310
+ case 401:
311
+ console.error('Authentication failed');
312
+ break;
313
+ case 404:
314
+ console.error('Configuration not found');
315
+ break;
316
+ case 408:
317
+ console.error('Request timeout');
318
+ break;
319
+ default:
320
+ console.error(`API error: ${error.message}`);
321
+ }
322
+ }
323
+ }
324
+ ```
203
325
 
204
- main();
205
- "
206
- examples/advanced-usage.ts,"/**
207
- * Advanced usage example with TypeScript
208
- */
326
+ ### Cluster Operations
209
327
 
328
+ ```typescript
329
+ // Check cluster status
330
+ const status = await client.getClusterStatus();
331
+ if (status.enabled) {
332
+ console.log(`Mode: ${status.mode}`);
333
+ console.log(`Nodes: ${status.healthy_nodes}/${status.total_nodes}`);
334
+ }
335
+
336
+ // Get Prometheus metrics
337
+ const metrics = await client.getMetrics();
338
+ console.log(metrics);
339
+ ```
340
+
341
+ ## ๐Ÿ› ๏ธ Advanced Usage
342
+
343
+ ### Custom Timeout
344
+
345
+ ```typescript
346
+ const client = new OpenSecureConfClient({
347
+ baseUrl: 'https://config.example.com',
348
+ userKey: 'my-secret-key-12345',
349
+ timeout: 5000, // 5 seconds
350
+ });
351
+ ```
352
+
353
+ ### Category Filtering
354
+
355
+ ```typescript
356
+ // Create with category
357
+ await client.create('db', { host: 'localhost' }, 'production');
358
+ await client.create('cache', { ttl: 3600 }, 'production');
359
+
360
+ // List by category
361
+ const prodConfigs = await client.list('production');
362
+ console.log(prodConfigs); // Only production configs
363
+
364
+ // Count by category
365
+ const count = await client.count('production');
366
+ console.log(`Production configs: ${count}`);
367
+ ```
368
+
369
+ ### Batch Operations with Error Handling
370
+
371
+ ```typescript
372
+ const result = await client.bulkDelete(
373
+ ['config1', 'config2', 'config3'],
374
+ true // ignoreErrors
375
+ );
376
+
377
+ console.log(`Deleted: ${result.deleted.length}`);
378
+ console.log(`Failed: ${result.failed.length}`);
379
+
380
+ for (const failure of result.failed) {
381
+ console.error(`Failed to delete ${failure.key}: ${failure.error}`);
382
+ }
383
+ ```
384
+
385
+ ## ๐Ÿ” TypeScript Support
386
+
387
+ Full TypeScript definitions included:
388
+
389
+ ```typescript
210
390
  import OpenSecureConfClient, {
391
+ OpenSecureConfOptions,
211
392
  ConfigEntry,
393
+ ClusterStatus,
212
394
  OpenSecureConfError,
213
395
  } from 'opensecureconf-client';
214
396
 
215
- interface DatabaseConfig {
216
- host: string;
217
- port: number;
218
- database: string;
219
- ssl: boolean;
220
- }
397
+ // All types are fully typed
398
+ const options: OpenSecureConfOptions = {
399
+ baseUrl: 'https://localhost:9443',
400
+ userKey: 'my-key',
401
+ rejectUnauthorized: false,
402
+ };
221
403
 
222
- class ConfigManager {
223
- private client: OpenSecureConfClient;
404
+ const client = new OpenSecureConfClient(options);
224
405
 
225
- constructor(baseUrl: string, userKey: string, apiKey?: string) {
226
- this.client = new OpenSecureConfClient({
227
- baseUrl,
228
- userKey,
229
- apiKey,
230
- });
231
- }
406
+ // Return types are inferred
407
+ const config: ConfigEntry = await client.read('key');
408
+ const status: ClusterStatus = await client.getClusterStatus();
409
+ ```
232
410
 
233
- async getDatabaseConfig(key: string): Promise<DatabaseConfig> {
234
- const config = await this.client.read(key);
235
- return config.value as DatabaseConfig;
236
- }
411
+ ## ๐Ÿ” Security Best Practices
237
412
 
238
- async setDatabaseConfig(key: string, config: DatabaseConfig): Promise<void> {
239
- await this.client.create(key, config as Record<string, any>, 'database');
240
- }
413
+ ### โœ… Do's
241
414
 
242
- async withRetry<T>(
243
- operation: () => Promise<T>,
244
- maxRetries: number = 3
245
- ): Promise<T> {
246
- let lastError: Error | undefined;
247
-
248
- for (let i = 0; i < maxRetries; i++) {
249
- try {
250
- return await operation();
251
- } catch (error) {
252
- lastError = error as Error;
253
-
254
- if (error instanceof OpenSecureConfError) {
255
- if (error.statusCode >= 400 && error.statusCode < 500) {
256
- throw error;
257
- }
258
- }
259
-
260
- if (i < maxRetries - 1) {
261
- await new Promise(resolve => setTimeout(resolve, Math.pow(2, i) * 1000));
262
- }
263
- }
264
- }
415
+ - Use HTTPS in production (`https://`)
416
+ - Use valid SSL certificates (Let's Encrypt, trusted CA)
417
+ - Set strong user keys (16+ characters)
418
+ - Enable API key authentication
419
+ - Use environment variables for secrets
420
+ - Set appropriate timeouts
265
421
 
266
- throw lastError;
267
- }
268
- }
422
+ ### โŒ Don'ts
269
423
 
270
- async function main() {
271
- const manager = new ConfigManager(
272
- 'http://localhost:9000',
273
- 'my-secure-encryption-key',
274
- 'your-super-secret-api-key-here'
275
- );
424
+ - **Never** use `rejectUnauthorized: false` in production
425
+ - **Never** hardcode credentials in source code
426
+ - **Never** commit secrets to version control
427
+ - **Never** use short encryption keys (<8 chars)
428
+ - **Never** expose API endpoints without authentication
276
429
 
277
- try {
278
- await manager.setDatabaseConfig('prod-db', {
279
- host: 'db.example.com',
280
- port: 5432,
281
- database: 'production',
282
- ssl: true,
283
- });
430
+ ### Environment Variables
284
431
 
285
- const dbConfig = await manager.getDatabaseConfig('prod-db');
286
- console.log('Database config:', dbConfig);
432
+ ```typescript
433
+ const client = new OpenSecureConfClient({
434
+ baseUrl: process.env.OSC_BASE_URL!,
435
+ userKey: process.env.OSC_USER_KEY!,
436
+ apiKey: process.env.OSC_API_KEY,
437
+ rejectUnauthorized: process.env.NODE_ENV === 'production',
438
+ });
439
+ ```
287
440
 
288
- } catch (error) {
289
- if (error instanceof OpenSecureConfError) {
290
- console.error(`API Error [${error.statusCode}]:`, error.detail);
291
- } else {
292
- console.error('Error:', error);
293
- }
294
- }
295
- }
441
+ ## ๐ŸŒ Browser vs Node.js
442
+
443
+ ### Node.js
444
+
445
+ ```typescript
446
+ // Automatic HTTPS agent setup
447
+ // Supports rejectUnauthorized option
448
+ // Full control over SSL/TLS
449
+ ```
450
+
451
+ ### Browser
452
+
453
+ ```typescript
454
+ // Uses native fetch API
455
+ // SSL validation by browser
456
+ // rejectUnauthorized ignored (browser controls SSL)
457
+ // Works with CORS-enabled servers
458
+ ```
459
+
460
+ ## ๐Ÿ“Š Error Codes
461
+
462
+ | Status Code | Error Type | Description |
463
+ |-------------|------------|-------------|
464
+ | 0 | Network Error | Connection failed |
465
+ | 400 | Bad Request | Invalid parameters |
466
+ | 401 | Authentication | Invalid user key |
467
+ | 403 | Forbidden | Invalid API key |
468
+ | 404 | Not Found | Configuration not found |
469
+ | 408 | Timeout | Request timeout |
470
+ | 429 | Rate Limit | Too many requests |
471
+ | 500+ | Server Error | Internal server error |
472
+
473
+ ## ๐Ÿ”— Links
474
+
475
+ - **GitHub**: [OpenSecureConf](https://github.com/lordraw77/OpenSecureConf)
476
+ - **Docker Hub**: [lordraw/open-secureconfiguration](https://hub.docker.com/r/lordraw/open-secureconfiguration)
477
+ - **PyPI Client**: [opensecureconf-client](https://pypi.org/project/opensecureconf-client/)
478
+ - **Documentation**: [GitHub README](https://github.com/lordraw77/OpenSecureConf/blob/main/README.md)
479
+
480
+ ## ๐Ÿ“„ License
481
+
482
+ MIT License - see [LICENSE](LICENSE)
483
+
484
+ ## ๐Ÿ™ Contributing
485
+
486
+ Contributions are welcome! Please open an issue or submit a pull request.
487
+
488
+ ## ๐Ÿ“ Changelog
489
+
490
+ ### v1.1.0
491
+ - โœจ Added HTTPS/SSL support
492
+ - โœจ Added `rejectUnauthorized` option
493
+ - โœจ Auto HTTPS agent for Node.js
494
+ - โœจ Batch operations (bulkCreate, bulkRead, bulkDelete)
495
+ - โœจ Utility methods (exists, count)
496
+ - ๐Ÿ› Enhanced SSL error messages
497
+ - ๐Ÿ“š Improved documentation
498
+
499
+ ### v1.0.0
500
+ - ๐ŸŽ‰ Initial release
501
+ - โœ… Basic CRUD operations
502
+ - โœ… Cluster support
503
+ - โœ… TypeScript definitions
504
+
505
+ ---
506
+
507
+ **OpenSecureConf TypeScript Client** - Secure configuration management made simple.
296
508
 
297
- main();
509
+ **Version**: 2.2.1
510
+ **Author**: lordraw77
511
+ **Support**: [GitHub Issues](https://github.com/lordraw77/OpenSecureConf/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opensecureconf-client",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "JavaScript/TypeScript client for OpenSecureConf - Encrypted configuration management REST API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",