Skip to content

Commit 738dac3

Browse files
committed
fix: update copyright information from Reflag ApS to Bucket ApS
- Changed copyright statements in LICENSE and various README files to reflect the new ownership by Bucket ApS. - Updated references in the browser and node SDKs to ensure consistency with the new branding. - Adjusted example files and documentation to align with the updated copyright information.
1 parent 8348f07 commit 738dac3

13 files changed

Lines changed: 218 additions & 298 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Reflag ApS
3+
Copyright (c) 2022 Bucket ApS
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

packages/browser-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,4 +385,4 @@ If you are including the Reflag tracking SDK with a `<script>`-tag from `jsdeliv
385385
## License
386386

387387
> MIT License
388-
> Copyright (c) 2025 Reflag ApS
388+
> Copyright (c) 2025 Bucket ApS

packages/browser-sdk/example/typescript/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const reflag = new ReflagClient({
2121
document
2222
.getElementById("startHuddle")
2323
?.addEventListener("click", () => reflag.track(flagKey));
24+
2425
document.getElementById("giveFeedback")?.addEventListener("click", (event) =>
2526
reflag.requestFeedback({
2627
flagKey,

packages/browser-sdk/src/flag/flagCache.ts

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,35 @@ interface cacheEntry {
1111
flags: FetchedFlags;
1212
}
1313

14-
// Parse and validate an API feature response
15-
export function parseAPIFeaturesResponse(
16-
featuresInput: any,
17-
): FetchedFlags | undefined {
18-
if (!isObject(featuresInput)) {
14+
// Parse and validate an API flag response
15+
export function parseAPIFlagsResponse(input: any): FetchedFlags | undefined {
16+
if (!isObject(input)) {
1917
return;
2018
}
2119

2220
const flags: FetchedFlags = {};
23-
for (const key in featuresInput) {
24-
const feature = featuresInput[key];
21+
for (const key in input) {
22+
const flag = input[key];
2523

2624
if (
27-
typeof feature.isEnabled !== "boolean" ||
28-
feature.key !== key ||
29-
typeof feature.targetingVersion !== "number" ||
30-
(feature.config && typeof feature.config !== "object") ||
31-
(feature.missingContextFields &&
32-
!Array.isArray(feature.missingContextFields)) ||
33-
(feature.ruleEvaluationResults &&
34-
!Array.isArray(feature.ruleEvaluationResults))
25+
typeof flag.isEnabled !== "boolean" ||
26+
flag.key !== key ||
27+
typeof flag.targetingVersion !== "number" ||
28+
(flag.config && typeof flag.config !== "object") ||
29+
(flag.missingContextFields &&
30+
!Array.isArray(flag.missingContextFields)) ||
31+
(flag.ruleEvaluationResults && !Array.isArray(flag.ruleEvaluationResults))
3532
) {
3633
return;
3734
}
3835

3936
flags[key] = {
40-
isEnabled: feature.isEnabled,
41-
targetingVersion: feature.targetingVersion,
37+
isEnabled: flag.isEnabled,
38+
targetingVersion: flag.targetingVersion,
4239
key,
43-
config: feature.config,
44-
missingContextFields: feature.missingContextFields,
45-
ruleEvaluationResults: feature.ruleEvaluationResults,
40+
config: flag.config,
41+
missingContextFields: flag.missingContextFields,
42+
ruleEvaluationResults: flag.ruleEvaluationResults,
4643
};
4744
}
4845

@@ -144,7 +141,7 @@ function validateCacheData(cacheDataInput: any) {
144141
if (
145142
typeof cacheEntry.expireAt !== "number" ||
146143
typeof cacheEntry.staleAt !== "number" ||
147-
(cacheEntry.flags && !parseAPIFeaturesResponse(cacheEntry.flags))
144+
(cacheEntry.flags && !parseAPIFlagsResponse(cacheEntry.flags))
148145
) {
149146
return;
150147
}

packages/browser-sdk/src/flag/flags.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HttpClient } from "../httpClient";
33
import { Logger, loggerWithPrefix } from "../logger";
44
import RateLimiter from "../rateLimiter";
55

6-
import { FlagCache, isObject, parseAPIFeaturesResponse } from "./flagCache";
6+
import { FlagCache, isObject, parseAPIFlagsResponse } from "./flagCache";
77

88
/**
99
* Represents a flag value.
@@ -126,7 +126,7 @@ export function validateFlagsResponse(response: any) {
126126
return;
127127
}
128128

129-
const flags = parseAPIFeaturesResponse(response.features);
129+
const flags = parseAPIFlagsResponse(response.features);
130130

131131
if (!flags) {
132132
return;

packages/browser-sdk/test/init.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe("init", () => {
4040

4141
server.use(
4242
http.get(
43-
"https://example.com/features/evaluated",
43+
"https://example.com/flags/evaluated",
4444
({ request }: { request: StrictRequest<DefaultBodyType> }) => {
4545
usedSpecialHost = true;
4646
return getFlags({ request });

packages/cli/README.md

Lines changed: 37 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Reflag CLI
22

33
Command-line interface for interacting with Reflag services. The CLI allows you to manage apps,
4-
features, authentication, and generate TypeScript types for your Reflag features. With this tool,
4+
flags, authentication, and generate TypeScript types for your Reflag flags. With this tool,
55
you can streamline your feature flagging workflow directly from your terminal.
66

77
## Usage
@@ -17,7 +17,7 @@ yarn add --dev @reflag/cli
1717
```
1818

1919
Then running the `new` command from your project's root directory,
20-
initializing the CLI, creating a feature, and generating the types all at once:
20+
initializing the CLI, creating a flag, and generating the types all at once:
2121

2222
```bash
2323
# npm
@@ -35,19 +35,19 @@ Instead of running `new` you can call each step individually.
3535
# Initialize Reflag in your project (if not already setup)
3636
npx reflag init
3737

38-
# Create a new feature
39-
npx reflag features create "My Feature"
38+
# Create a new flag
39+
npx reflag flags create "My new flag"
4040

41-
# Generate TypeScript types for your features
42-
npx reflag features types
41+
# Generate TypeScript types for your flags
42+
npx reflag flags types
4343
```
4444

4545
## Configuration
4646

4747
The CLI creates a `reflag.config.json` file in your project directory when you run `reflag init`.
4848
This file contains all the necessary settings for your Reflag integration.
4949

50-
### Configuration File Structure
50+
### Configuration file structure
5151

5252
Here's a comprehensive list of configuration options available in the `reflag.config.json` file:
5353

@@ -59,7 +59,7 @@ Here's a comprehensive list of configuration options available in the `reflag.co
5959
"appId": "ap123456789",
6060
"typesOutput": [
6161
{
62-
"path": "gen/features.d.ts",
62+
"path": "gen/flags.d.ts",
6363
"format": "react"
6464
}
6565
]
@@ -72,7 +72,7 @@ Here's a comprehensive list of configuration options available in the `reflag.co
7272
| `baseUrl` | Base URL for Reflag services. | "https://app.bucket.co" |
7373
| `apiUrl` | API URL for Reflag services (overrides baseUrl for API calls). | "https://app.bucket.co/api" |
7474
| `appId` | Your Reflag application ID. | Required |
75-
| `typesOutput` | Path(s) where TypeScript types will be generated. Can be a string or an array of objects with `path` and `format` properties. Available formats: `react` and `node`. | "gen/features.ts" with format "react" |
75+
| `typesOutput` | Path(s) where TypeScript types will be generated. Can be a string or an array of objects with `path` and `format` properties. Available formats: `react` and `node`. | "gen/flags.ts" with format "react" |
7676

7777
You can override these settings using command-line options for individual commands.
7878

@@ -91,26 +91,26 @@ Options:
9191

9292
- `--overwrite`: Overwrite existing configuration file if one exists.
9393
- `--app-id <id>`: Set the application ID.
94-
- `--key-format <format>`: Set the key format for features.
94+
- `--key-format <format>`: Set the key format for flags.
9595

96-
### `reflag new [featureName]`
96+
### `reflag new [flagName]`
9797

98-
All-in-one command to get started quickly. This command combines `init`, feature creation,
98+
All-in-one command to get started quickly. This command combines `init`, flag creation,
9999
and type generation in a single step. Use this for the fastest way to get up and running with Reflag.
100100

101101
```bash
102-
npx reflag new "My Feature" [--app-id ap123456789] [--key my-feature] [--key-format custom] [--out gen/features.ts] [--format react]
102+
npx reflag new "My flag" [--app-id ap123456789] [--key my-flag] [--key-format custom] [--out gen/flags.ts] [--format react]
103103
```
104104

105105
Options:
106106

107-
- `--key`: Specific key for the feature.
107+
- `--key`: Specific key for the flag.
108108
- `--app-id`: App ID to use.
109-
- `--key-format`: Format for feature keys (custom, snake, camel, etc.).
109+
- `--key-format`: Format for flag keys (custom, snake, camel, etc.).
110110
- `--out`: Path to generate TypeScript types.
111111
- `--format`: Format of the generated types (react or node).
112112

113-
If you prefer more control over each step, you can use the individual commands (`init`, `features create`, `features types`) instead.
113+
If you prefer more control over each step, you can use the individual commands (`init`, `flags create`, `flags types`) instead.
114114

115115
### `reflag login`
116116

@@ -128,45 +128,45 @@ Log out from your Reflag account, removing stored credentials.
128128
npx reflag logout
129129
```
130130

131-
### `reflag features`
131+
### `reflag flags`
132132

133-
Manage your Reflag features with the following subcommands.
133+
Manage your Reflag flags with the following subcommands.
134134

135-
#### `reflag features create [featureName]`
135+
#### `reflag flags create [flagName]`
136136

137-
Create a new feature in your Reflag app.
138-
The command guides you through the feature creation process with interactive prompts if options are not provided.
137+
Create a new flag in your Reflag app.
138+
The command guides you through the flag creation process with interactive prompts if options are not provided.
139139

140140
```bash
141-
npx reflag features create "My Feature" [--app-id ap123456789] [--key my-feature] [--key-format custom]
141+
npx reflag flags create "My flag" [--app-id ap123456789] [--key my-flag] [--key-format custom]
142142
```
143143

144144
Options:
145145

146-
- `--key`: Specific key for the feature.
146+
- `--key`: Specific key for the flag.
147147
- `--app-id`: App ID to use.
148-
- `--key-format`: Format for feature keys.
148+
- `--key-format`: Format for flag keys.
149149

150-
#### `reflag features list`
150+
#### `reflag flags list`
151151

152-
List all features for the current app.
153-
This helps you visualize what features are available and their current configurations.
152+
List all flag for the current app.
153+
This helps you visualize what flags are available and their current configurations.
154154

155155
```bash
156-
npx reflag features list [--app-id ap123456789]
156+
npx reflag flags list [--app-id ap123456789]
157157
```
158158

159159
Options:
160160

161161
- `--app-id`: App ID to use.
162162

163-
#### `reflag features types`
163+
#### `reflag flags types`
164164

165-
Generate TypeScript types for your features.
166-
This ensures type safety when using Reflag features in your TypeScript/JavaScript applications.
165+
Generate TypeScript types for your flags.
166+
This ensures type safety when using Reflag flags in your TypeScript/JavaScript applications.
167167

168168
```bash
169-
npx reflag features types [--app-id ap123456789] [--out gen/features.ts] [--format react]
169+
npx reflag flags types [--app-id ap123456789] [--out gen/flags.ts] [--format react]
170170
```
171171

172172
Options:
@@ -175,61 +175,6 @@ Options:
175175
- `--out`: Path to generate TypeScript types.
176176
- `--format`: Format of the generated types (react or node).
177177

178-
### `reflag companies`
179-
180-
Commands for managing companies.
181-
182-
#### `reflag companies list`
183-
184-
List all companies in your app.
185-
186-
```bash
187-
npx reflag companies list [--filter <text>] [--app-id ap123456789]
188-
```
189-
190-
Options:
191-
192-
- `--filter`: Filter companies by name or ID.
193-
- `--app-id`: App ID to use.
194-
195-
The command outputs a table with the following columns:
196-
197-
- `id`: Company ID.
198-
- `name`: Company name (shows "(unnamed)" if not set).
199-
- `users`: Number of users in the company.
200-
- `lastSeen`: Date when the company was last active.
201-
202-
### `reflag companies features access`
203-
204-
Grant or revoke access to specific features for companies, segments, and users.
205-
If no feature key is provided, you'll be prompted to select one from a list.
206-
207-
```bash
208-
npx reflag companies features access [--app-id ap123456789] [featureKey] [--enable|--disable] [--companies <id...>] [--segments <id...>] [--users <id...>]
209-
```
210-
211-
Arguments:
212-
213-
- `featureKey`: Key of the feature to grant/revoke access to (optional, interactive selection if omitted).
214-
215-
Options:
216-
217-
- `--enable`: Enable the feature for the specified targets.
218-
- `--disable`: Disable the feature for the specified targets.
219-
- `--users`: User IDs to target. Can be specified multiple times.
220-
- `--companies`: Company IDs to target. Can be specified multiple times.
221-
- `--segments`: Segment IDs to target. Can be specified multiple times.
222-
- `--app-id`: App ID to use.
223-
224-
At least one target (companies, segments, or users) must be specified. You must also specify either `--enable` or `--disable`, but not both.
225-
226-
Example:
227-
228-
```bash
229-
# Enable feature for multiple companies and users
230-
npx reflag companies features access my-feature --enable --companies comp_123 --companies comp_456 --users user_789
231-
```
232-
233178
### `reflag apps`
234179

235180
Commands for managing Reflag apps.
@@ -246,7 +191,7 @@ These options can be used with any command:
246191

247192
## AI-Assisted Development
248193

249-
Reflag provides powerful AI-assisted development capabilities through rules and Model Context Protocol (MCP). These features help your AI development tools better understand your features and provide more accurate assistance.
194+
Reflag provides powerful AI-assisted development capabilities through rules and Model Context Protocol (MCP). These features help your AI development tools better understand your flags and provide more accurate assistance.
250195

251196
### Reflag Rules (Recommended)
252197

@@ -267,7 +212,7 @@ This command will add rules to your project that provide AI tools with context a
267212

268213
## Model Context Protocol
269214

270-
The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your feature flags, their states, and their relationships within your codebase. This creates a seamless bridge between your feature management workflow and AI-powered development tools. The MCP server is hosted by Reflag, so it's very easy to get started.
215+
The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your flags, their states, and their relationships within your codebase. This creates a seamless bridge between your feature management workflow and AI-powered development tools. The MCP server is hosted by Reflag, so it's very easy to get started.
271216

272217
_\*\*Note: The Reflag `mcp` CLI command was previously used for a \_local_ server. However, in recent versions of the Reflag CLI, the `mcp` command has been repurposed to help you connect to the new remote MCP server.\*\*\_
273218

@@ -321,11 +266,11 @@ Example CI workflow:
321266
```yaml
322267
# GitHub Actions example
323268
- name: Generate types
324-
run: npx reflag features types --api-key ${{ secrets.REFLAG_API_KEY }}
269+
run: npx reflag flags types --api-key ${{ secrets.REFLAG_API_KEY }}
325270

326271
# GitHub Actions example (using environment):
327272
- name: Generate types (environment)
328-
run: npx reflag features types
273+
run: npx reflag flags types
329274
env:
330275
REFLAG_API_KEY: ${{ secrets.REFLAG_CI_API_KEY }}
331276
```
@@ -351,4 +296,4 @@ yarn format
351296
## License
352297

353298
> MIT License
354-
> Copyright (c) 2025 Reflag ApS
299+
> Copyright (c) 2025 Bucket ApS

0 commit comments

Comments
 (0)