@dr-sentry/sdk 1.0.0 → 1.0.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.
- package/README.md +2 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/esm/cache.d.ts +1 -1
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/client.js +4 -4
- package/dist/esm/file-loader.d.ts +1 -1
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +7 -7
- package/dist/esm/local-evaluator.d.ts +1 -1
- package/dist/esm/package.json +1 -0
- package/dist/esm/streaming.d.ts +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Official Node.js/TypeScript SDK for integrating with the DeploySentry platform.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @dr-sentry/sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { DeploySentryClient } from '@
|
|
14
|
+
import { DeploySentryClient } from '@dr-sentry/sdk';
|
|
15
15
|
|
|
16
16
|
const client = new DeploySentryClient({
|
|
17
17
|
apiKey: 'ds_live_xxx',
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @dr-sentry/sdk – Official Node.js/TypeScript SDK for DeploySentry.
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```ts
|
|
6
|
-
* import { DeploySentryClient } from '@
|
|
6
|
+
* import { DeploySentryClient } from '@dr-sentry/sdk';
|
|
7
7
|
*
|
|
8
8
|
* const client = new DeploySentryClient({
|
|
9
9
|
* apiKey: 'ds_live_xxx',
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* @
|
|
3
|
+
* @dr-sentry/sdk – Official Node.js/TypeScript SDK for DeploySentry.
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```ts
|
|
7
|
-
* import { DeploySentryClient } from '@
|
|
7
|
+
* import { DeploySentryClient } from '@dr-sentry/sdk';
|
|
8
8
|
*
|
|
9
9
|
* const client = new DeploySentryClient({
|
|
10
10
|
* apiKey: 'ds_live_xxx',
|
package/dist/esm/cache.d.ts
CHANGED
package/dist/esm/client.d.ts
CHANGED
package/dist/esm/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FlagCache } from './cache';
|
|
2
|
-
import { FlagStreamClient } from './streaming';
|
|
3
|
-
import { loadFlagConfig } from './file-loader';
|
|
4
|
-
import { evaluateLocal } from './local-evaluator';
|
|
1
|
+
import { FlagCache } from './cache.js';
|
|
2
|
+
import { FlagStreamClient } from './streaming.js';
|
|
3
|
+
import { loadFlagConfig } from './file-loader.js';
|
|
4
|
+
import { evaluateLocal } from './local-evaluator.js';
|
|
5
5
|
const DEFAULT_BASE_URL = 'https://api.dr-sentry.com';
|
|
6
6
|
const DEFAULT_CACHE_TIMEOUT_MS = 60_000;
|
|
7
7
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @dr-sentry/sdk – Official Node.js/TypeScript SDK for DeploySentry.
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```ts
|
|
6
|
-
* import { DeploySentryClient } from '@
|
|
6
|
+
* import { DeploySentryClient } from '@dr-sentry/sdk';
|
|
7
7
|
*
|
|
8
8
|
* const client = new DeploySentryClient({
|
|
9
9
|
* apiKey: 'ds_live_xxx',
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
*
|
|
21
21
|
* @packageDocumentation
|
|
22
22
|
*/
|
|
23
|
-
export { DeploySentryClient } from './client';
|
|
24
|
-
export { FlagCache } from './cache';
|
|
25
|
-
export { FlagStreamClient } from './streaming';
|
|
26
|
-
export { loadFlagConfig } from './file-loader';
|
|
27
|
-
export { evaluateLocal } from './local-evaluator';
|
|
28
|
-
export type { ClientOptions, EvaluationContext, EvaluationResult, Flag, FlagCategory, FlagMetadata, FlagConfig, FlagConfigFlag, FlagConfigRule, FlagConfigEnvironment, ApiError, } from './types';
|
|
23
|
+
export { DeploySentryClient } from './client.js';
|
|
24
|
+
export { FlagCache } from './cache.js';
|
|
25
|
+
export { FlagStreamClient } from './streaming.js';
|
|
26
|
+
export { loadFlagConfig } from './file-loader.js';
|
|
27
|
+
export { evaluateLocal } from './local-evaluator.js';
|
|
28
|
+
export type { ClientOptions, EvaluationContext, EvaluationResult, Flag, FlagCategory, FlagMetadata, FlagConfig, FlagConfigFlag, FlagConfigRule, FlagConfigEnvironment, ApiError, } from './types.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @dr-sentry/sdk – Official Node.js/TypeScript SDK for DeploySentry.
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```ts
|
|
6
|
-
* import { DeploySentryClient } from '@
|
|
6
|
+
* import { DeploySentryClient } from '@dr-sentry/sdk';
|
|
7
7
|
*
|
|
8
8
|
* const client = new DeploySentryClient({
|
|
9
9
|
* apiKey: 'ds_live_xxx',
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* @packageDocumentation
|
|
22
22
|
*/
|
|
23
|
-
export { DeploySentryClient } from './client';
|
|
24
|
-
export { FlagCache } from './cache';
|
|
25
|
-
export { FlagStreamClient } from './streaming';
|
|
26
|
-
export { loadFlagConfig } from './file-loader';
|
|
27
|
-
export { evaluateLocal } from './local-evaluator';
|
|
23
|
+
export { DeploySentryClient } from './client.js';
|
|
24
|
+
export { FlagCache } from './cache.js';
|
|
25
|
+
export { FlagStreamClient } from './streaming.js';
|
|
26
|
+
export { loadFlagConfig } from './file-loader.js';
|
|
27
|
+
export { evaluateLocal } from './local-evaluator.js';
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EvaluationContext, FlagConfig } from './types';
|
|
1
|
+
import type { EvaluationContext, FlagConfig } from './types.js';
|
|
2
2
|
export declare function evaluateLocal(config: FlagConfig, environment: string, key: string, context?: EvaluationContext): {
|
|
3
3
|
value: string;
|
|
4
4
|
reason: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/dist/esm/streaming.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dr-sentry/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Official Node.js SDK for the DeploySentry platform – feature flag evaluation with rich metadata",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "npm run build:esm && npm run build:cjs && npm run build:cjs-package-json",
|
|
24
|
+
"build": "npm run build:esm && npm run build:cjs && npm run build:cjs-package-json && npm run fix-esm-imports",
|
|
25
25
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
26
|
+
"fix-esm-imports": "node -e \"const fs=require('fs'),path=require('path'),dir='dist/esm';fs.readdirSync(dir).filter(f=>f.endsWith('.js')||f.endsWith('.d.ts')).forEach(f=>{const p=path.join(dir,f);let s=fs.readFileSync(p,'utf8');s=s.replace(/(from\\s+['\\\"])(\\.\\/.+?)(?=['\\\"])/g,(m,pre,spec)=>spec.endsWith('.js')?m:pre+spec+'.js');fs.writeFileSync(p,s)})\"",
|
|
26
27
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
27
|
-
"build:cjs-package-json": "node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}))\"",
|
|
28
|
+
"build:cjs-package-json": "node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}));require('fs').writeFileSync('dist/esm/package.json', JSON.stringify({type:'module'}))\"",
|
|
28
29
|
"clean": "rm -rf dist",
|
|
29
30
|
"test": "jest",
|
|
30
31
|
"lint": "eslint src/",
|