@hyphen/sdk 1.12.1 → 1.12.2
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/dist/index.cjs +4 -4
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/package.json +15 -13
package/dist/index.cjs
CHANGED
|
@@ -105,11 +105,11 @@ var import_axios = __toESM(require("axios"), 1);
|
|
|
105
105
|
var import_cacheable = require("cacheable");
|
|
106
106
|
var import_hookified = require("hookified");
|
|
107
107
|
var import_pino = __toESM(require("pino"), 1);
|
|
108
|
-
var ErrorMessages = /* @__PURE__ */ function(ErrorMessages2) {
|
|
108
|
+
var ErrorMessages = /* @__PURE__ */ (function(ErrorMessages2) {
|
|
109
109
|
ErrorMessages2["API_KEY_REQUIRED"] = "API key is required. Please provide it via options or set the HYPHEN_API_KEY environment variable.";
|
|
110
110
|
ErrorMessages2["PUBLIC_API_KEY_SHOULD_NOT_BE_USED"] = "The provided API key is a public API key. Please provide a valid non public API key for authentication.";
|
|
111
111
|
return ErrorMessages2;
|
|
112
|
-
}({});
|
|
112
|
+
})({});
|
|
113
113
|
var BaseService = class extends import_hookified.Hookified {
|
|
114
114
|
static {
|
|
115
115
|
__name(this, "BaseService");
|
|
@@ -696,7 +696,7 @@ var import_server_sdk = require("@openfeature/server-sdk");
|
|
|
696
696
|
var import_dotenv2 = __toESM(require("dotenv"), 1);
|
|
697
697
|
var import_hookified2 = require("hookified");
|
|
698
698
|
import_dotenv2.default.config();
|
|
699
|
-
var ToggleHooks = /* @__PURE__ */ function(ToggleHooks2) {
|
|
699
|
+
var ToggleHooks = /* @__PURE__ */ (function(ToggleHooks2) {
|
|
700
700
|
ToggleHooks2["beforeGetBoolean"] = "beforeGetBoolean";
|
|
701
701
|
ToggleHooks2["afterGetBoolean"] = "afterGetBoolean";
|
|
702
702
|
ToggleHooks2["beforeGetString"] = "beforeGetString";
|
|
@@ -706,7 +706,7 @@ var ToggleHooks = /* @__PURE__ */ function(ToggleHooks2) {
|
|
|
706
706
|
ToggleHooks2["beforeGetObject"] = "beforeGetObject";
|
|
707
707
|
ToggleHooks2["afterGetObject"] = "afterGetObject";
|
|
708
708
|
return ToggleHooks2;
|
|
709
|
-
}({});
|
|
709
|
+
})({});
|
|
710
710
|
var Toggle = class extends import_hookified2.Hookified {
|
|
711
711
|
static {
|
|
712
712
|
__name(this, "Toggle");
|
package/dist/index.d.cts
CHANGED
|
@@ -40,11 +40,11 @@ declare class BaseService extends Hookified {
|
|
|
40
40
|
error(message: string, ...args: any[]): void;
|
|
41
41
|
warn(message: string, ...args: any[]): void;
|
|
42
42
|
info(message: string, ...args: any[]): void;
|
|
43
|
-
get<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
44
|
-
post<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
45
|
-
put<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
46
|
-
delete<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
47
|
-
patch<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
43
|
+
get<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
44
|
+
post<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
45
|
+
put<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
46
|
+
delete<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
47
|
+
patch<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
48
48
|
createHeaders(apiKey?: string): Record<string, string>;
|
|
49
49
|
}
|
|
50
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -40,11 +40,11 @@ declare class BaseService extends Hookified {
|
|
|
40
40
|
error(message: string, ...args: any[]): void;
|
|
41
41
|
warn(message: string, ...args: any[]): void;
|
|
42
42
|
info(message: string, ...args: any[]): void;
|
|
43
|
-
get<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
44
|
-
post<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
45
|
-
put<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
46
|
-
delete<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
47
|
-
patch<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any>>;
|
|
43
|
+
get<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
44
|
+
post<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
45
|
+
put<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
46
|
+
delete<T>(url: string, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
47
|
+
patch<T>(url: string, data: any, config?: AxiosRequestConfig): Promise<axios.AxiosResponse<T, any, {}>>;
|
|
48
48
|
createHeaders(apiKey?: string): Record<string, string>;
|
|
49
49
|
}
|
|
50
50
|
|
package/dist/index.js
CHANGED
|
@@ -67,11 +67,11 @@ import axios from "axios";
|
|
|
67
67
|
import { Cacheable } from "cacheable";
|
|
68
68
|
import { Hookified } from "hookified";
|
|
69
69
|
import pino from "pino";
|
|
70
|
-
var ErrorMessages = /* @__PURE__ */ function(ErrorMessages2) {
|
|
70
|
+
var ErrorMessages = /* @__PURE__ */ (function(ErrorMessages2) {
|
|
71
71
|
ErrorMessages2["API_KEY_REQUIRED"] = "API key is required. Please provide it via options or set the HYPHEN_API_KEY environment variable.";
|
|
72
72
|
ErrorMessages2["PUBLIC_API_KEY_SHOULD_NOT_BE_USED"] = "The provided API key is a public API key. Please provide a valid non public API key for authentication.";
|
|
73
73
|
return ErrorMessages2;
|
|
74
|
-
}({});
|
|
74
|
+
})({});
|
|
75
75
|
var BaseService = class extends Hookified {
|
|
76
76
|
static {
|
|
77
77
|
__name(this, "BaseService");
|
|
@@ -658,7 +658,7 @@ import { OpenFeature } from "@openfeature/server-sdk";
|
|
|
658
658
|
import dotenv from "dotenv";
|
|
659
659
|
import { Hookified as Hookified2 } from "hookified";
|
|
660
660
|
dotenv.config();
|
|
661
|
-
var ToggleHooks = /* @__PURE__ */ function(ToggleHooks2) {
|
|
661
|
+
var ToggleHooks = /* @__PURE__ */ (function(ToggleHooks2) {
|
|
662
662
|
ToggleHooks2["beforeGetBoolean"] = "beforeGetBoolean";
|
|
663
663
|
ToggleHooks2["afterGetBoolean"] = "afterGetBoolean";
|
|
664
664
|
ToggleHooks2["beforeGetString"] = "beforeGetString";
|
|
@@ -668,7 +668,7 @@ var ToggleHooks = /* @__PURE__ */ function(ToggleHooks2) {
|
|
|
668
668
|
ToggleHooks2["beforeGetObject"] = "beforeGetObject";
|
|
669
669
|
ToggleHooks2["afterGetObject"] = "afterGetObject";
|
|
670
670
|
return ToggleHooks2;
|
|
671
|
-
}({});
|
|
671
|
+
})({});
|
|
672
672
|
var Toggle = class extends Hookified2 {
|
|
673
673
|
static {
|
|
674
674
|
__name(this, "Toggle");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyphen/sdk",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Hyphen SDK for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"test
|
|
16
|
+
"lint": "biome check --write --error-on-warnings",
|
|
17
|
+
"test": "pnpm lint && vitest run --coverage",
|
|
18
|
+
"test:ci": "biome check --error-on-warnings && vitest run --coverage",
|
|
18
19
|
"build": "rimraf ./dist && tsup src/index.ts --format esm,cjs --dts --clean",
|
|
19
20
|
"clean": "rimraf ./dist pnpm-lock.yaml node_modules coverage",
|
|
20
21
|
"prepublishOnly": "rimraf ./dist && tsup src/index.ts --format esm,cjs --dts --clean"
|
|
@@ -29,9 +30,9 @@
|
|
|
29
30
|
"author": "Team Hyphen <hello@hyphen.ai>",
|
|
30
31
|
"license": "MIT",
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@biomejs/biome": "^2.
|
|
33
|
-
"@swc/core": "^1.13.
|
|
34
|
-
"@types/node": "^24.
|
|
33
|
+
"@biomejs/biome": "^2.2.4",
|
|
34
|
+
"@swc/core": "^1.13.5",
|
|
35
|
+
"@types/node": "^24.3.1",
|
|
35
36
|
"@vitest/coverage-v8": "^3.2.4",
|
|
36
37
|
"rimraf": "^6.0.1",
|
|
37
38
|
"tsd": "^0.33.0",
|
|
@@ -44,13 +45,14 @@
|
|
|
44
45
|
"LICENSE"
|
|
45
46
|
],
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@faker-js/faker": "^
|
|
48
|
+
"@faker-js/faker": "^10.0.0",
|
|
48
49
|
"@hyphen/openfeature-server-provider": "^1.0.7",
|
|
49
|
-
"@openfeature/
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
50
|
+
"@openfeature/core": "^1.9.0",
|
|
51
|
+
"@openfeature/server-sdk": "^1.19.0",
|
|
52
|
+
"axios": "^1.12.1",
|
|
53
|
+
"cacheable": "^2.0.0",
|
|
54
|
+
"dotenv": "^17.2.2",
|
|
55
|
+
"hookified": "^1.12.0",
|
|
56
|
+
"pino": "^9.9.5"
|
|
55
57
|
}
|
|
56
58
|
}
|