@statsig/statsig-node-core 0.23.2-rc.2610072038 → 0.23.2-rc.2610231715
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/index.js +0 -15
- package/package.json +10 -14
- package/statsig-generated.d.ts +3 -0
- package/statsig-generated.js +1 -0
package/index.js
CHANGED
|
@@ -24,7 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Statsig = void 0;
|
|
27
|
-
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
28
27
|
const console_capture_1 = require("./console_capture");
|
|
29
28
|
const error_boundary_1 = require("./error_boundary");
|
|
30
29
|
const statsig_generated_1 = require("./statsig-generated");
|
|
@@ -40,20 +39,6 @@ statsig_generated_1.StatsigUser.prototype[inspectSym] = function () {
|
|
|
40
39
|
statsig_generated_1.ParameterStore.prototype[inspectSym] = function () {
|
|
41
40
|
return this.toJSON();
|
|
42
41
|
};
|
|
43
|
-
function createProxyAgent(options) {
|
|
44
|
-
const proxy = options === null || options === void 0 ? void 0 : options.proxyConfig;
|
|
45
|
-
if ((proxy === null || proxy === void 0 ? void 0 : proxy.proxyHost) && (proxy === null || proxy === void 0 ? void 0 : proxy.proxyProtocol)) {
|
|
46
|
-
const protocol = proxy.proxyProtocol;
|
|
47
|
-
const host = proxy.proxyHost;
|
|
48
|
-
const port = proxy.proxyPort ? `:${proxy.proxyPort}` : '';
|
|
49
|
-
const auth = proxy.proxyAuth ? `${proxy.proxyAuth}@` : '';
|
|
50
|
-
const proxyUrl = `${protocol}://${auth}${host}${port}`;
|
|
51
|
-
if (protocol === 'http' || protocol === 'https') {
|
|
52
|
-
return new https_proxy_agent_1.HttpsProxyAgent(proxyUrl);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return undefined; // node-fetch agent parameter takes in undefined type instead of null
|
|
56
|
-
}
|
|
57
42
|
class Statsig extends statsig_generated_1.StatsigNapiInternal {
|
|
58
43
|
static shared() {
|
|
59
44
|
if (!Statsig.hasShared()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/statsig-node-core",
|
|
3
|
-
"version": "0.23.2-rc.
|
|
3
|
+
"version": "0.23.2-rc.2610231715",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest --colors"
|
|
@@ -10,11 +10,7 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"description": "",
|
|
12
12
|
"repository": "https://github.com/statsig-io/statsig-server-core.git",
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@octokit/core": "^6",
|
|
15
|
-
"https-proxy-agent": "^7.0.6",
|
|
16
|
-
"node-fetch": "2.7.0"
|
|
17
|
-
},
|
|
13
|
+
"dependencies": {},
|
|
18
14
|
"devDependencies": {
|
|
19
15
|
"@babel/helpers": "7.26.10",
|
|
20
16
|
"@napi-rs/cli": "3.0.0-alpha.65",
|
|
@@ -60,13 +56,13 @@
|
|
|
60
56
|
}
|
|
61
57
|
},
|
|
62
58
|
"optionalDependencies": {
|
|
63
|
-
"@statsig/statsig-node-core-linux-x64-musl": "0.23.2-rc.
|
|
64
|
-
"@statsig/statsig-node-core-linux-x64-gnu": "0.23.2-rc.
|
|
65
|
-
"@statsig/statsig-node-core-win32-x64-msvc": "0.23.2-rc.
|
|
66
|
-
"@statsig/statsig-node-core-darwin-x64": "0.23.2-rc.
|
|
67
|
-
"@statsig/statsig-node-core-win32-ia32-msvc": "0.23.2-rc.
|
|
68
|
-
"@statsig/statsig-node-core-linux-arm64-musl": "0.23.2-rc.
|
|
69
|
-
"@statsig/statsig-node-core-linux-arm64-gnu": "0.23.2-rc.
|
|
70
|
-
"@statsig/statsig-node-core-darwin-arm64": "0.23.2-rc.
|
|
59
|
+
"@statsig/statsig-node-core-linux-x64-musl": "0.23.2-rc.2610231715",
|
|
60
|
+
"@statsig/statsig-node-core-linux-x64-gnu": "0.23.2-rc.2610231715",
|
|
61
|
+
"@statsig/statsig-node-core-win32-x64-msvc": "0.23.2-rc.2610231715",
|
|
62
|
+
"@statsig/statsig-node-core-darwin-x64": "0.23.2-rc.2610231715",
|
|
63
|
+
"@statsig/statsig-node-core-win32-ia32-msvc": "0.23.2-rc.2610231715",
|
|
64
|
+
"@statsig/statsig-node-core-linux-arm64-musl": "0.23.2-rc.2610231715",
|
|
65
|
+
"@statsig/statsig-node-core-linux-arm64-gnu": "0.23.2-rc.2610231715",
|
|
66
|
+
"@statsig/statsig-node-core-darwin-arm64": "0.23.2-rc.2610231715"
|
|
71
67
|
}
|
|
72
68
|
}
|
package/statsig-generated.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export declare class StatsigUser {
|
|
|
94
94
|
|
|
95
95
|
export declare function __internal__testDataStore(store: DataStore, path: string, value: string): Promise<[DataStoreResponse | undefined | null, boolean]>
|
|
96
96
|
|
|
97
|
+
export declare function __internal__testDataStoreFeature(store: DataStore): Promise<[boolean, boolean, boolean | undefined | null, boolean]>
|
|
98
|
+
|
|
97
99
|
export declare function __internal__testObservabilityClient(client: ObservabilityClient, action: string, metricName: string, value: number, tags?: Record<string, string> | undefined | null): Promise<void>
|
|
98
100
|
|
|
99
101
|
export declare function __internal__testOutputLogger(logger: OutputLoggerProvider, action: string, tag?: string | undefined | null, message?: string | undefined | null): Promise<void>
|
|
@@ -132,6 +134,7 @@ export interface DataStore {
|
|
|
132
134
|
set?: (key: string, value: string, time?: number) => Promise<void>
|
|
133
135
|
setBytes?: (key: string, value: ArrayBuffer | Uint8Array, time?: number) => Promise<void>
|
|
134
136
|
supportPollingUpdatesFor?: (key: string) => Promise<boolean>
|
|
137
|
+
supportsFeature?: (feature: 'config_specs' | 'id_list_snapshot' | 'id_list_snapshot_write') => Promise<boolean>
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
export interface DataStoreBytesResponse {
|
package/statsig-generated.js
CHANGED
|
@@ -369,6 +369,7 @@ module.exports.ParameterStore = nativeBinding.ParameterStore
|
|
|
369
369
|
module.exports.StatsigNapiInternal = nativeBinding.StatsigNapiInternal
|
|
370
370
|
module.exports.StatsigUser = nativeBinding.StatsigUser
|
|
371
371
|
module.exports.__internal__testDataStore = nativeBinding.__internal__testDataStore
|
|
372
|
+
module.exports.__internal__testDataStoreFeature = nativeBinding.__internal__testDataStoreFeature
|
|
372
373
|
module.exports.__internal__testObservabilityClient = nativeBinding.__internal__testObservabilityClient
|
|
373
374
|
module.exports.__internal__testOutputLogger = nativeBinding.__internal__testOutputLogger
|
|
374
375
|
module.exports.__internal__testPersistentStorage = nativeBinding.__internal__testPersistentStorage
|