@m2msentinel/sdk 1.2.2 → 1.2.5

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,14 +1,18 @@
1
1
  {
2
2
  "name": "m2m-sentinel-sdk",
3
- "version": "1.2.2",
3
+ "version": "1.2.5",
4
4
  "description": "Source-distributed TypeScript client for M2M Sentinel Base capability intelligence API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
7
7
  "private": true,
8
+ "engines": {
9
+ "node": ">=18"
10
+ },
8
11
  "scripts": {
9
- "build": "tsc"
12
+ "build": "tsc --noEmit"
10
13
  },
11
14
  "devDependencies": {
15
+ "@types/node": "^22.7.5",
12
16
  "typescript": "^5.0.0"
13
17
  }
14
18
  }
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "CommonJS",
5
+ "moduleResolution": "Node",
6
+ "lib": ["ES2020", "DOM"],
7
+ "types": ["node"],
8
+ "strict": true,
9
+ "noEmit": true,
10
+ "skipLibCheck": true
11
+ },
12
+ "include": ["*.ts"]
13
+ }
@@ -318,7 +318,7 @@ export class X402SignerClient {
318
318
 
319
319
  async fetchWithAutoPayment(path: string, options: any = {}): Promise<any> {
320
320
  const url = path.startsWith('http') ? path : `${this.baseUrl}/${path.replace(/^\/+/, '')}`;
321
- const headers = { 'Accept': 'application/json', 'User-Agent': '@m2msentinel/sdk-ts/1.2.2', ...(options.headers || {}) };
321
+ const headers = { 'Accept': 'application/json', 'User-Agent': '@m2msentinel/sdk-ts/1.2.5', ...(options.headers || {}) };
322
322
 
323
323
  let res = await fetch(url, { method: options.method || 'GET', headers, body: options.body });
324
324
  if (res.status !== 402) {
package/x402_signer.js CHANGED
@@ -271,7 +271,7 @@ class X402SignerClient {
271
271
  path: url.pathname + url.search,
272
272
  method: options.method || 'GET',
273
273
  headers: {
274
- 'User-Agent': 'M2M-Sentinel-X402Signer/1.2.2',
274
+ 'User-Agent': 'M2M-Sentinel-X402Signer/1.2.5',
275
275
  'Accept': 'application/json',
276
276
  ...(options.headers || {})
277
277
  },