@strav/flag 0.1.0 → 0.1.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 CHANGED
@@ -1,20 +1,20 @@
1
- # @stravigor/flag
1
+ # @strav/flag
2
2
 
3
- Feature flags for the [Strav](https://www.npmjs.com/package/@stravigor/core) framework. Define, scope, and toggle features with database persistence, in-memory drivers, and per-user/team targeting.
3
+ Feature flags for the [Strav](https://www.npmjs.com/package/@strav/core) framework. Define, scope, and toggle features with database persistence, in-memory drivers, and per-user/team targeting.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun add @stravigor/flag
8
+ bun add @strav/flag
9
9
  bun strav install flag
10
10
  ```
11
11
 
12
- Requires `@stravigor/core` as a peer dependency.
12
+ Requires `@strav/core` as a peer dependency.
13
13
 
14
14
  ## Setup
15
15
 
16
16
  ```ts
17
- import { FlagProvider } from '@stravigor/flag'
17
+ import { FlagProvider } from '@strav/flag'
18
18
 
19
19
  app.use(new FlagProvider())
20
20
  ```
@@ -22,7 +22,7 @@ app.use(new FlagProvider())
22
22
  ## Usage
23
23
 
24
24
  ```ts
25
- import { flag } from '@stravigor/flag'
25
+ import { flag } from '@strav/flag'
26
26
 
27
27
  // Check if a feature is active
28
28
  if (await flag.active('dark-mode')) {
@@ -41,7 +41,7 @@ const limit = await flag.value('upload-limit', 10)
41
41
  ## Middleware
42
42
 
43
43
  ```ts
44
- import { ensureFeature } from '@stravigor/flag'
44
+ import { ensureFeature } from '@strav/flag'
45
45
 
46
46
  router.get('/beta', ensureFeature('beta-dashboard'), betaHandler)
47
47
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/flag",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Feature flags for the Strav framework",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  import type { Command } from 'commander'
2
2
  import chalk from 'chalk'
3
- import { bootstrap, shutdown } from '@stravigor/cli'
3
+ import { bootstrap, shutdown } from '@strav/cli'
4
4
  import FlagManager from '../flag_manager.ts'
5
5
 
6
6
  export function register(program: Command): void {
package/src/errors.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { StravError } from '@stravigor/kernel'
1
+ import { StravError } from '@strav/kernel'
2
2
 
3
3
  export class FlagError extends StravError {}
4
4
 
@@ -1,5 +1,5 @@
1
- import { inject, Configuration, Emitter, ConfigurationError } from '@stravigor/kernel'
2
- import { Database } from '@stravigor/database'
1
+ import { inject, Configuration, Emitter, ConfigurationError } from '@strav/kernel'
2
+ import { Database } from '@strav/database'
3
3
  import type {
4
4
  FlagConfig,
5
5
  DriverConfig,
@@ -1,5 +1,5 @@
1
- import { ServiceProvider } from '@stravigor/kernel'
2
- import type { Application } from '@stravigor/kernel'
1
+ import { ServiceProvider } from '@strav/kernel'
2
+ import type { Application } from '@strav/kernel'
3
3
  import FlagManager from './flag_manager.ts'
4
4
 
5
5
  export interface FlagProviderOptions {
package/src/helpers.ts CHANGED
@@ -7,7 +7,7 @@ import type { Scopeable, FeatureResolver, FeatureClassConstructor, DriverConfig
7
7
  * Flag helper — the primary convenience API.
8
8
  *
9
9
  * @example
10
- * import { flag } from '@stravigor/flag'
10
+ * import { flag } from '@strav/flag'
11
11
  *
12
12
  * flag.define('new-checkout', (scope) => scope.startsWith('User:'))
13
13
  *
@@ -1,4 +1,4 @@
1
- import type { Middleware } from '@stravigor/http'
1
+ import type { Middleware } from '@strav/http'
2
2
  import FlagManager from '../flag_manager.ts'
3
3
  import type { Scopeable } from '../types.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- import { env } from '@stravigor/kernel'
1
+ import { env } from '@strav/kernel'
2
2
 
3
3
  export default {
4
4
  /** The default feature flag storage driver. */