@vllnt/convex-flags 0.1.0-canary.9d01801
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/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/client/index.d.ts +76 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +55 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/types.d.ts +19 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/component/_generated/api.d.ts +20 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +15 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +57 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +121 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +78 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +7 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/mutations.d.ts +19 -0
- package/dist/component/mutations.d.ts.map +1 -0
- package/dist/component/mutations.js +75 -0
- package/dist/component/mutations.js.map +1 -0
- package/dist/component/queries.d.ts +30 -0
- package/dist/component/queries.d.ts.map +1 -0
- package/dist/component/queries.js +52 -0
- package/dist/component/queries.js.map +1 -0
- package/dist/component/schema.d.ts +23 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +10 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/validators.d.ts +38 -0
- package/dist/component/validators.d.ts.map +1 -0
- package/dist/component/validators.js +24 -0
- package/dist/component/validators.js.map +1 -0
- package/dist/shared.d.ts +19 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +12 -0
- package/dist/shared.js.map +1 -0
- package/package.json +97 -0
- package/src/client/index.ts +117 -0
- package/src/client/types.ts +21 -0
- package/src/component/_generated/api.ts +36 -0
- package/src/component/_generated/component.ts +74 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +156 -0
- package/src/component/convex.config.ts +9 -0
- package/src/component/mutations.ts +89 -0
- package/src/component/queries.ts +55 -0
- package/src/component/schema.ts +10 -0
- package/src/component/validators.ts +26 -0
- package/src/shared.ts +21 -0
- package/src/test.ts +17 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated utilities for implementing server-side Convex query and mutation functions.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { actionGeneric, httpActionGeneric, queryGeneric, mutationGeneric, internalActionGeneric, internalMutationGeneric, internalQueryGeneric, } from "convex/server";
|
|
11
|
+
/**
|
|
12
|
+
* Define a query in this Convex app's public API.
|
|
13
|
+
*
|
|
14
|
+
* This function will be allowed to read your Convex database and will be accessible from the client.
|
|
15
|
+
*
|
|
16
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
17
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
18
|
+
*/
|
|
19
|
+
export const query = queryGeneric;
|
|
20
|
+
/**
|
|
21
|
+
* Define a query that is only accessible from other Convex functions (but not from the client).
|
|
22
|
+
*
|
|
23
|
+
* This function will be allowed to read from your Convex database. It will not be accessible from the client.
|
|
24
|
+
*
|
|
25
|
+
* @param func - The query function. It receives a {@link QueryCtx} as its first argument.
|
|
26
|
+
* @returns The wrapped query. Include this as an `export` to name it and make it accessible.
|
|
27
|
+
*/
|
|
28
|
+
export const internalQuery = internalQueryGeneric;
|
|
29
|
+
/**
|
|
30
|
+
* Define a mutation in this Convex app's public API.
|
|
31
|
+
*
|
|
32
|
+
* This function will be allowed to modify your Convex database and will be accessible from the client.
|
|
33
|
+
*
|
|
34
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
35
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
36
|
+
*/
|
|
37
|
+
export const mutation = mutationGeneric;
|
|
38
|
+
/**
|
|
39
|
+
* Define a mutation that is only accessible from other Convex functions (but not from the client).
|
|
40
|
+
*
|
|
41
|
+
* This function will be allowed to modify your Convex database. It will not be accessible from the client.
|
|
42
|
+
*
|
|
43
|
+
* @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
|
|
44
|
+
* @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
|
|
45
|
+
*/
|
|
46
|
+
export const internalMutation = internalMutationGeneric;
|
|
47
|
+
/**
|
|
48
|
+
* Define an action in this Convex app's public API.
|
|
49
|
+
*
|
|
50
|
+
* An action is a function which can execute any JavaScript code, including non-deterministic
|
|
51
|
+
* code and code with side-effects, like calling third-party services.
|
|
52
|
+
* They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
|
|
53
|
+
* They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
|
|
54
|
+
*
|
|
55
|
+
* @param func - The action. It receives an {@link ActionCtx} as its first argument.
|
|
56
|
+
* @returns The wrapped action. Include this as an `export` to name it and make it accessible.
|
|
57
|
+
*/
|
|
58
|
+
export const action = actionGeneric;
|
|
59
|
+
/**
|
|
60
|
+
* Define an action that is only accessible from other Convex functions (but not from the client).
|
|
61
|
+
*
|
|
62
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument.
|
|
63
|
+
* @returns The wrapped function. Include this as an `export` to name it and make it accessible.
|
|
64
|
+
*/
|
|
65
|
+
export const internalAction = internalActionGeneric;
|
|
66
|
+
/**
|
|
67
|
+
* Define an HTTP action.
|
|
68
|
+
*
|
|
69
|
+
* The wrapped function will be used to respond to HTTP requests received
|
|
70
|
+
* by a Convex deployment if the requests matches the path and method where
|
|
71
|
+
* this action is routed. Be sure to route your httpAction in `convex/http.js`.
|
|
72
|
+
*
|
|
73
|
+
* @param func - The function. It receives an {@link ActionCtx} as its first argument
|
|
74
|
+
* and a Fetch API `Request` object as its second.
|
|
75
|
+
* @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
|
|
76
|
+
*/
|
|
77
|
+
export const httpAction = httpActionGeneric;
|
|
78
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/component/_generated/server.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AAaH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAGvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAsC,YAAY,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GACxB,oBAAoB,CAAC;AAEvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAyC,eAAe,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,uBAAuB,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,MAAM,GAAuC,aAAa,CAAC;AAExE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GACzB,qBAAqB,CAAC;AAExB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAsB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convex.config.d.ts","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,sDAA2B,CAAC;AAM3C,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineComponent } from "convex/server";
|
|
2
|
+
const component = defineComponent("flags");
|
|
3
|
+
// Nest official child components here, e.g.:
|
|
4
|
+
// import sharded from "@convex-dev/sharded-counter/convex.config";
|
|
5
|
+
// component.use(sharded);
|
|
6
|
+
export default component;
|
|
7
|
+
//# sourceMappingURL=convex.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convex.config.js","sourceRoot":"","sources":["../../src/component/convex.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;AAE3C,6CAA6C;AAC7C,mEAAmE;AACnE,0BAA0B;AAE1B,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Create a flag, or update its value/description if the key already exists. */
|
|
2
|
+
export declare const define: import("convex/server").RegisteredMutation<"public", {
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
key: string;
|
|
5
|
+
value: boolean;
|
|
6
|
+
}, Promise<import("convex/values").GenericId<"flags">>>;
|
|
7
|
+
/** Turn a flag on (set its value to `true`). */
|
|
8
|
+
export declare const enable: import("convex/server").RegisteredMutation<"public", {
|
|
9
|
+
key: string;
|
|
10
|
+
}, Promise<null>>;
|
|
11
|
+
/** Turn a flag off (set its value to `false`). */
|
|
12
|
+
export declare const disable: import("convex/server").RegisteredMutation<"public", {
|
|
13
|
+
key: string;
|
|
14
|
+
}, Promise<null>>;
|
|
15
|
+
/** Permanently delete a flag. */
|
|
16
|
+
export declare const remove: import("convex/server").RegisteredMutation<"public", {
|
|
17
|
+
key: string;
|
|
18
|
+
}, Promise<null>>;
|
|
19
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/component/mutations.ts"],"names":[],"mappings":"AAeA,gFAAgF;AAChF,eAAO,MAAM,MAAM;;;;uDA0BjB,CAAC;AAcH,gDAAgD;AAChD,eAAO,MAAM,MAAM;;iBAOjB,CAAC;AAEH,kDAAkD;AAClD,eAAO,MAAM,OAAO;;iBAOlB,CAAC;AAEH,iCAAiC;AACjC,eAAO,MAAM,MAAM;;iBAWjB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { mutation } from "./_generated/server.js";
|
|
3
|
+
async function findByKey(ctx, key) {
|
|
4
|
+
return await ctx.db
|
|
5
|
+
.query("flags")
|
|
6
|
+
.withIndex("by_key", (q) => q.eq("key", key))
|
|
7
|
+
.unique();
|
|
8
|
+
}
|
|
9
|
+
/** Create a flag, or update its value/description if the key already exists. */
|
|
10
|
+
export const define = mutation({
|
|
11
|
+
args: {
|
|
12
|
+
key: v.string(),
|
|
13
|
+
value: v.boolean(),
|
|
14
|
+
description: v.optional(v.string()),
|
|
15
|
+
},
|
|
16
|
+
returns: v.id("flags"),
|
|
17
|
+
handler: async (ctx, args) => {
|
|
18
|
+
const now = Date.now();
|
|
19
|
+
const existing = await findByKey(ctx, args.key);
|
|
20
|
+
if (existing !== null) {
|
|
21
|
+
await ctx.db.patch(existing._id, {
|
|
22
|
+
value: args.value,
|
|
23
|
+
description: args.description,
|
|
24
|
+
updatedAt: now,
|
|
25
|
+
});
|
|
26
|
+
return existing._id;
|
|
27
|
+
}
|
|
28
|
+
return await ctx.db.insert("flags", {
|
|
29
|
+
key: args.key,
|
|
30
|
+
value: args.value,
|
|
31
|
+
description: args.description,
|
|
32
|
+
createdAt: now,
|
|
33
|
+
updatedAt: now,
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
async function setValue(ctx, key, value) {
|
|
38
|
+
const flag = await findByKey(ctx, key);
|
|
39
|
+
if (flag === null) {
|
|
40
|
+
throw new Error("FLAG_NOT_FOUND");
|
|
41
|
+
}
|
|
42
|
+
await ctx.db.patch(flag._id, { value, updatedAt: Date.now() });
|
|
43
|
+
}
|
|
44
|
+
/** Turn a flag on (set its value to `true`). */
|
|
45
|
+
export const enable = mutation({
|
|
46
|
+
args: { key: v.string() },
|
|
47
|
+
returns: v.null(),
|
|
48
|
+
handler: async (ctx, args) => {
|
|
49
|
+
await setValue(ctx, args.key, true);
|
|
50
|
+
return null;
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
/** Turn a flag off (set its value to `false`). */
|
|
54
|
+
export const disable = mutation({
|
|
55
|
+
args: { key: v.string() },
|
|
56
|
+
returns: v.null(),
|
|
57
|
+
handler: async (ctx, args) => {
|
|
58
|
+
await setValue(ctx, args.key, false);
|
|
59
|
+
return null;
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
/** Permanently delete a flag. */
|
|
63
|
+
export const remove = mutation({
|
|
64
|
+
args: { key: v.string() },
|
|
65
|
+
returns: v.null(),
|
|
66
|
+
handler: async (ctx, args) => {
|
|
67
|
+
const flag = await findByKey(ctx, args.key);
|
|
68
|
+
if (flag === null) {
|
|
69
|
+
throw new Error("FLAG_NOT_FOUND");
|
|
70
|
+
}
|
|
71
|
+
await ctx.db.delete(flag._id);
|
|
72
|
+
return null;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=mutations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../src/component/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIlD,KAAK,U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AM,GAAG,QAAQ,CAAC;IAC7B,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;IACjB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type FlagEvaluation } from "../shared.js";
|
|
2
|
+
/** Fetch a single flag definition by key. */
|
|
3
|
+
export declare const get: import("convex/server").RegisteredQuery<"public", {
|
|
4
|
+
key: string;
|
|
5
|
+
}, Promise<{
|
|
6
|
+
_id: import("convex/values").GenericId<"flags">;
|
|
7
|
+
_creationTime: number;
|
|
8
|
+
description?: string | undefined;
|
|
9
|
+
key: string;
|
|
10
|
+
value: boolean;
|
|
11
|
+
createdAt: number;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
} | null>>;
|
|
14
|
+
/** List every flag definition. */
|
|
15
|
+
export declare const list: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
16
|
+
_id: import("convex/values").GenericId<"flags">;
|
|
17
|
+
_creationTime: number;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
key: string;
|
|
20
|
+
value: boolean;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
updatedAt: number;
|
|
23
|
+
}[]>>;
|
|
24
|
+
/** Evaluate one flag, returning its value and the reason it was served. */
|
|
25
|
+
export declare const evaluate: import("convex/server").RegisteredQuery<"public", {
|
|
26
|
+
key: string;
|
|
27
|
+
}, Promise<FlagEvaluation>>;
|
|
28
|
+
/** Evaluate every flag at once — the bootstrap payload for a reactive client. */
|
|
29
|
+
export declare const all: import("convex/server").RegisteredQuery<"public", {}, Promise<Record<string, FlagEvaluation>>>;
|
|
30
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/component/queries.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhE,6CAA6C;AAC7C,eAAO,MAAM,GAAG;;;;;;;;;;UASd,CAAC;AAEH,kCAAkC;AAClC,eAAO,MAAM,IAAI;;;;;;;;KAMf,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,QAAQ;;2BAanB,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,GAAG,gGAWd,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { query } from "./_generated/server.js";
|
|
3
|
+
import { evaluation, flagDoc } from "./validators.js";
|
|
4
|
+
import { EVAL_REASON } from "../shared.js";
|
|
5
|
+
/** Fetch a single flag definition by key. */
|
|
6
|
+
export const get = query({
|
|
7
|
+
args: { key: v.string() },
|
|
8
|
+
returns: v.union(v.null(), flagDoc),
|
|
9
|
+
handler: async (ctx, args) => {
|
|
10
|
+
return await ctx.db
|
|
11
|
+
.query("flags")
|
|
12
|
+
.withIndex("by_key", (q) => q.eq("key", args.key))
|
|
13
|
+
.unique();
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
/** List every flag definition. */
|
|
17
|
+
export const list = query({
|
|
18
|
+
args: {},
|
|
19
|
+
returns: v.array(flagDoc),
|
|
20
|
+
handler: async (ctx) => {
|
|
21
|
+
return await ctx.db.query("flags").collect();
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
/** Evaluate one flag, returning its value and the reason it was served. */
|
|
25
|
+
export const evaluate = query({
|
|
26
|
+
args: { key: v.string() },
|
|
27
|
+
returns: evaluation,
|
|
28
|
+
handler: async (ctx, args) => {
|
|
29
|
+
const flag = await ctx.db
|
|
30
|
+
.query("flags")
|
|
31
|
+
.withIndex("by_key", (q) => q.eq("key", args.key))
|
|
32
|
+
.unique();
|
|
33
|
+
if (flag === null) {
|
|
34
|
+
return { value: false, reason: EVAL_REASON.unknown };
|
|
35
|
+
}
|
|
36
|
+
return { value: flag.value, reason: EVAL_REASON.flag };
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
/** Evaluate every flag at once — the bootstrap payload for a reactive client. */
|
|
40
|
+
export const all = query({
|
|
41
|
+
args: {},
|
|
42
|
+
returns: v.record(v.string(), evaluation),
|
|
43
|
+
handler: async (ctx) => {
|
|
44
|
+
const flags = await ctx.db.query("flags").collect();
|
|
45
|
+
const result = {};
|
|
46
|
+
for (const flag of flags) {
|
|
47
|
+
result[flag.key] = { value: flag.value, reason: EVAL_REASON.flag };
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/component/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAuB,MAAM,cAAc,CAAC;AAEhE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;IACvB,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,KAA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AAC;QACvD,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;CACF,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;IACvB,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC;IACzC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACrB,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;QACpD,MAAM,MAAM,GAAmC,EAAE,CAAC;QAClD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QACrE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandboxed tables — the component's own concern only. A flag is keyed by an
|
|
3
|
+
* opaque, host-chosen string; the component never models the host's domain.
|
|
4
|
+
*/
|
|
5
|
+
declare const _default: import("convex/server").SchemaDefinition<{
|
|
6
|
+
flags: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
key: string;
|
|
9
|
+
value: boolean;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
updatedAt: number;
|
|
12
|
+
}, {
|
|
13
|
+
key: import("convex/values").VString<string, "required">;
|
|
14
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
15
|
+
value: import("convex/values").VBoolean<boolean, "required">;
|
|
16
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
17
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
18
|
+
}, "required", "key" | "value" | "description" | "createdAt" | "updatedAt">, {
|
|
19
|
+
by_key: ["key", "_creationTime"];
|
|
20
|
+
}, {}, {}>;
|
|
21
|
+
}, true>;
|
|
22
|
+
export default _default;
|
|
23
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAGA;;;GAGG;;;;;;;;;;;;;;;;;;AACH,wBAEG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { flagFields } from "./validators.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sandboxed tables — the component's own concern only. A flag is keyed by an
|
|
5
|
+
* opaque, host-chosen string; the component never models the host's domain.
|
|
6
|
+
*/
|
|
7
|
+
export default defineSchema({
|
|
8
|
+
flags: defineTable(flagFields).index("by_key", ["key"]),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,eAAe,YAAY,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column validators for a stored flag document (excluding Convex system fields).
|
|
3
|
+
* Shared between the schema and the query return validators.
|
|
4
|
+
*/
|
|
5
|
+
export declare const flagFields: {
|
|
6
|
+
key: import("convex/values").VString<string, "required">;
|
|
7
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
8
|
+
value: import("convex/values").VBoolean<boolean, "required">;
|
|
9
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
10
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
11
|
+
};
|
|
12
|
+
/** Public shape of a flag document returned by queries. */
|
|
13
|
+
export declare const flagDoc: import("convex/values").VObject<{
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
key: string;
|
|
16
|
+
value: boolean;
|
|
17
|
+
_id: import("convex/values").GenericId<"flags">;
|
|
18
|
+
_creationTime: number;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
updatedAt: number;
|
|
21
|
+
}, {
|
|
22
|
+
key: import("convex/values").VString<string, "required">;
|
|
23
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
24
|
+
value: import("convex/values").VBoolean<boolean, "required">;
|
|
25
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
26
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
27
|
+
_id: import("convex/values").VId<import("convex/values").GenericId<"flags">, "required">;
|
|
28
|
+
_creationTime: import("convex/values").VFloat64<number, "required">;
|
|
29
|
+
}, "required", "key" | "value" | "description" | "_id" | "_creationTime" | "createdAt" | "updatedAt">;
|
|
30
|
+
/** Result of evaluating one flag: the boolean value plus a reason code. */
|
|
31
|
+
export declare const evaluation: import("convex/values").VObject<{
|
|
32
|
+
value: boolean;
|
|
33
|
+
reason: string;
|
|
34
|
+
}, {
|
|
35
|
+
value: import("convex/values").VBoolean<boolean, "required">;
|
|
36
|
+
reason: import("convex/values").VString<string, "required">;
|
|
37
|
+
}, "required", "value" | "reason">;
|
|
38
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;qGAIlB,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,UAAU;;;;;;kCAGrB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
/**
|
|
3
|
+
* Column validators for a stored flag document (excluding Convex system fields).
|
|
4
|
+
* Shared between the schema and the query return validators.
|
|
5
|
+
*/
|
|
6
|
+
export const flagFields = {
|
|
7
|
+
key: v.string(),
|
|
8
|
+
description: v.optional(v.string()),
|
|
9
|
+
value: v.boolean(),
|
|
10
|
+
createdAt: v.number(),
|
|
11
|
+
updatedAt: v.number(),
|
|
12
|
+
};
|
|
13
|
+
/** Public shape of a flag document returned by queries. */
|
|
14
|
+
export const flagDoc = v.object({
|
|
15
|
+
_id: v.id("flags"),
|
|
16
|
+
_creationTime: v.number(),
|
|
17
|
+
...flagFields,
|
|
18
|
+
});
|
|
19
|
+
/** Result of evaluating one flag: the boolean value plus a reason code. */
|
|
20
|
+
export const evaluation = v.object({
|
|
21
|
+
value: v.boolean(),
|
|
22
|
+
reason: v.string(),
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/component/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC;IAClB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,GAAG,UAAU;CACd,CAAC,CAAC;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC"}
|
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Shared constants + types used by both `client/` and `component/`. */
|
|
2
|
+
/**
|
|
3
|
+
* Why an evaluation returned the value it did. Stable string codes so hosts can
|
|
4
|
+
* branch on the reason without parsing prose.
|
|
5
|
+
*/
|
|
6
|
+
export declare const EVAL_REASON: {
|
|
7
|
+
/** A defined flag served its current value. */
|
|
8
|
+
readonly flag: "flag";
|
|
9
|
+
/** No flag exists for the key; the safe default (`false`) was served. */
|
|
10
|
+
readonly unknown: "unknown";
|
|
11
|
+
};
|
|
12
|
+
/** The set of evaluation reason codes. */
|
|
13
|
+
export type EvalReason = (typeof EVAL_REASON)[keyof typeof EVAL_REASON];
|
|
14
|
+
/** Result of evaluating a single flag. */
|
|
15
|
+
export interface FlagEvaluation {
|
|
16
|
+
value: boolean;
|
|
17
|
+
reason: EvalReason;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE;;;GAGG;AACH,eAAO,MAAM,WAAW;IACtB,+CAA+C;;IAE/C,yEAAyE;;CAEjE,CAAC;AAEX,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAExE,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB"}
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Shared constants + types used by both `client/` and `component/`. */
|
|
2
|
+
/**
|
|
3
|
+
* Why an evaluation returned the value it did. Stable string codes so hosts can
|
|
4
|
+
* branch on the reason without parsing prose.
|
|
5
|
+
*/
|
|
6
|
+
export const EVAL_REASON = {
|
|
7
|
+
/** A defined flag served its current value. */
|
|
8
|
+
flag: "flag",
|
|
9
|
+
/** No flag exists for the key; the safe default (`false`) was served. */
|
|
10
|
+
unknown: "unknown",
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,yEAAyE;IACzE,OAAO,EAAE,SAAS;CACV,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vllnt/convex-flags",
|
|
3
|
+
"version": "0.1.0-canary.9d01801",
|
|
4
|
+
"description": "Feature flags as a Convex component - backend-evaluated, reactive kill-switches",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"packageManager": "pnpm@9.15.4",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/client/index.d.ts",
|
|
16
|
+
"default": "./dist/client/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./test": "./src/test.ts",
|
|
19
|
+
"./_generated/component.js": {
|
|
20
|
+
"types": "./dist/component/_generated/component.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./_generated/component": {
|
|
23
|
+
"types": "./dist/component/_generated/component.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./convex.config": {
|
|
26
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
27
|
+
"default": "./dist/component/convex.config.js"
|
|
28
|
+
},
|
|
29
|
+
"./convex.config.js": {
|
|
30
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
31
|
+
"default": "./dist/component/convex.config.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"types": "./dist/client/index.d.ts",
|
|
35
|
+
"module": "./dist/client/index.js",
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc --project ./tsconfig.build.json",
|
|
38
|
+
"build:codegen": "pnpm convex codegen --component-dir ./src/component && pnpm build",
|
|
39
|
+
"build:clean": "rm -rf dist *.tsbuildinfo && pnpm build:codegen",
|
|
40
|
+
"typecheck": "tsc --noEmit",
|
|
41
|
+
"typecheck:ci": "tsc --noEmit --project tsconfig.ci.json",
|
|
42
|
+
"lint": "eslint .",
|
|
43
|
+
"test": "vitest run --passWithNoTests",
|
|
44
|
+
"test:watch": "vitest --typecheck --clearScreen false",
|
|
45
|
+
"test:coverage": "vitest run --coverage --coverage.reporter=text",
|
|
46
|
+
"generate:llms": "node scripts/generate-llms.mjs",
|
|
47
|
+
"preversion": "pnpm install --frozen-lockfile && pnpm build && pnpm test:coverage && pnpm typecheck && pnpm generate:llms",
|
|
48
|
+
"prepublishOnly": "npm whoami || npm login",
|
|
49
|
+
"alpha": "npm version prerelease --preid alpha && npm publish --tag alpha && git push --follow-tags",
|
|
50
|
+
"release": "npm version patch && npm publish && git push --follow-tags"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"convex": "^1.36.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@edge-runtime/vm": "^4.0.0",
|
|
58
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
59
|
+
"@vllnt/eslint-config": "^1.0.0",
|
|
60
|
+
"@vllnt/typescript": "^1.0.0",
|
|
61
|
+
"convex": "^1.36.1",
|
|
62
|
+
"convex-test": "^0.0.50",
|
|
63
|
+
"eslint": "^9.0.0",
|
|
64
|
+
"prettier": "^3.4.0",
|
|
65
|
+
"typescript": "^5.7.0",
|
|
66
|
+
"vite": "^7.3.5",
|
|
67
|
+
"vitest": "^3.0.0"
|
|
68
|
+
},
|
|
69
|
+
"homepage": "https://github.com/vllnt/convex-flags#readme",
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/vllnt/convex-flags/issues"
|
|
72
|
+
},
|
|
73
|
+
"author": {
|
|
74
|
+
"name": "bntvllnt",
|
|
75
|
+
"url": "https://bntvllnt.com"
|
|
76
|
+
},
|
|
77
|
+
"funding": {
|
|
78
|
+
"type": "github",
|
|
79
|
+
"url": "https://github.com/sponsors/bntvllnt"
|
|
80
|
+
},
|
|
81
|
+
"repository": {
|
|
82
|
+
"type": "git",
|
|
83
|
+
"url": "https://github.com/vllnt/convex-flags"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18"
|
|
87
|
+
},
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"access": "public"
|
|
90
|
+
},
|
|
91
|
+
"sideEffects": false,
|
|
92
|
+
"keywords": [
|
|
93
|
+
"convex",
|
|
94
|
+
"convex-component",
|
|
95
|
+
"flags"
|
|
96
|
+
]
|
|
97
|
+
}
|