Skip to content

Commit 3855b44

Browse files
committed
prettier
1 parent ffecd3d commit 3855b44

2 files changed

Lines changed: 22 additions & 19 deletions

File tree

packages/node-sdk/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -557,17 +557,17 @@ a configuration file on disk or by passing options to the `ReflagClient`
557557
constructor. By default, the SDK searches for `reflag.config.json` in the
558558
current working directory.
559559

560-
| Option | Type | Description | Env Var |
561-
| ----------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
562-
| `secretKey` | string | The secret key used for authentication with Reflag's servers. | REFLAG_SECRET_KEY |
563-
| `logLevel` | string | The log level for the SDK (e.g., `"DEBUG"`, `"INFO"`, `"WARN"`, `"ERROR"`). Default: `INFO` | REFLAG_LOG_LEVEL |
564-
| `offline` | boolean | Operate in offline mode. Default: `false`, except in tests it will default to `true` based off of the `TEST` env. var. In offline mode the SDK does not fetch from Reflag and does not use `flagsFallbackProvider`. | REFLAG_OFFLINE |
565-
| `apiBaseUrl` | string | The base API URL for the Reflag servers. | REFLAG_API_BASE_URL |
566-
| `flagOverrides` | Record<string, boolean> | An object specifying flag overrides for testing or local development. See [examples/express/app.test.ts](https://github.com/reflagcom/javascript/tree/main/packages/node-sdk/examples/express/app.test.ts) for how to use `flagOverrides` in tests. | REFLAG_FLAGS_ENABLED, REFLAG_FLAGS_DISABLED |
567-
| `flagsFallbackProvider` | `FlagsFallbackProvider` | Optional provider used to load and save raw flag definitions for fallback startup when the initial live fetch fails. Available only through the constructor. Ignored in offline mode. | - |
568-
| `flagsSyncMode` | `"polling" \| "in-request" \| "push"` | Flag-definition sync mode. `polling` uses periodic background refresh, `in-request` refreshes stale flags during request handling, and `push` subscribes to live updates and refreshes with `waitForVersion`. Default: `"polling"`. | - |
569-
| `flagsPushUrl` | string | Push endpoint used when `flagsSyncMode: "push"`. Default: `https://pubsub.reflag.com/sse`. | - |
570-
| `configFile` | string | Load this config file from disk. Default: `reflag.config.json` | REFLAG_CONFIG_FILE |
560+
| Option | Type | Description | Env Var |
561+
| ----------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
562+
| `secretKey` | string | The secret key used for authentication with Reflag's servers. | REFLAG_SECRET_KEY |
563+
| `logLevel` | string | The log level for the SDK (e.g., `"DEBUG"`, `"INFO"`, `"WARN"`, `"ERROR"`). Default: `INFO` | REFLAG_LOG_LEVEL |
564+
| `offline` | boolean | Operate in offline mode. Default: `false`, except in tests it will default to `true` based off of the `TEST` env. var. In offline mode the SDK does not fetch from Reflag and does not use `flagsFallbackProvider`. | REFLAG_OFFLINE |
565+
| `apiBaseUrl` | string | The base API URL for the Reflag servers. | REFLAG_API_BASE_URL |
566+
| `flagOverrides` | Record<string, boolean> | An object specifying flag overrides for testing or local development. See [examples/express/app.test.ts](https://github.com/reflagcom/javascript/tree/main/packages/node-sdk/examples/express/app.test.ts) for how to use `flagOverrides` in tests. | REFLAG_FLAGS_ENABLED, REFLAG_FLAGS_DISABLED |
567+
| `flagsFallbackProvider` | `FlagsFallbackProvider` | Optional provider used to load and save raw flag definitions for fallback startup when the initial live fetch fails. Available only through the constructor. Ignored in offline mode. | - |
568+
| `flagsSyncMode` | `"polling" \| "in-request" \| "push"` | Flag-definition sync mode. `polling` uses periodic background refresh, `in-request` refreshes stale flags during request handling, and `push` subscribes to live updates and refreshes with `waitForVersion`. Default: `"polling"`. | - |
569+
| `flagsPushUrl` | string | Push endpoint used when `flagsSyncMode: "push"`. Default: `https://pubsub.reflag.com/sse`. | - |
570+
| `configFile` | string | Load this config file from disk. Default: `reflag.config.json` | REFLAG_CONFIG_FILE |
571571

572572
> [!NOTE]
573573
>

packages/node-sdk/test/client.test.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,15 +1050,18 @@ describe("ReflagClient", () => {
10501050
);
10511051
});
10521052

1053-
expect(fetchMock).toHaveBeenCalledWith("https://pubsub.reflag.com/sse", {
1054-
method: "GET",
1055-
headers: {
1056-
...expectedHeaders,
1057-
Accept: "text/event-stream",
1058-
"Cache-Control": "no-cache",
1053+
expect(fetchMock).toHaveBeenCalledWith(
1054+
"https://pubsub.reflag.com/sse",
1055+
{
1056+
method: "GET",
1057+
headers: {
1058+
...expectedHeaders,
1059+
Accept: "text/event-stream",
1060+
"Cache-Control": "no-cache",
1061+
},
1062+
signal: expect.any(AbortSignal),
10591063
},
1060-
signal: expect.any(AbortSignal),
1061-
});
1064+
);
10621065

10631066
client.destroy();
10641067
} finally {

0 commit comments

Comments
 (0)