@gaganref/confect-core 10.3.1-fork.9 → 10.3.1-fork.90
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/ActionCall.d.ts +18 -0
- package/dist/ActionCall.d.ts.map +1 -0
- package/dist/ActionCall.js +21 -0
- package/dist/ActionCall.js.map +1 -0
- package/dist/App.d.ts +38 -93
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +30 -38
- package/dist/App.js.map +1 -1
- package/dist/Auth.d.ts +33 -9
- package/dist/Auth.d.ts.map +1 -1
- package/dist/Auth.js +17 -2
- package/dist/Auth.js.map +1 -1
- package/dist/Callback.d.ts +7 -2
- package/dist/Callback.d.ts.map +1 -1
- package/dist/Callback.js +11 -6
- package/dist/Callback.js.map +1 -1
- package/dist/CommitTs.d.ts +18 -0
- package/dist/CommitTs.d.ts.map +1 -0
- package/dist/CommitTs.js +20 -0
- package/dist/CommitTs.js.map +1 -0
- package/dist/Component.d.ts +106 -2
- package/dist/Component.d.ts.map +1 -1
- package/dist/Component.js +44 -18
- package/dist/Component.js.map +1 -1
- package/dist/FunctionSpec.d.ts +361 -2
- package/dist/FunctionSpec.d.ts.map +1 -1
- package/dist/FunctionSpec.js +68 -3
- package/dist/FunctionSpec.js.map +1 -1
- package/dist/GenericId.js +2 -2
- package/dist/GroupSpec.js +1 -1
- package/dist/Http.d.ts +4 -8
- package/dist/Http.d.ts.map +1 -1
- package/dist/Http.js +15 -22
- package/dist/Http.js.map +1 -1
- package/dist/ManifestSection.d.ts +101 -0
- package/dist/ManifestSection.d.ts.map +1 -0
- package/dist/ManifestSection.js +7 -0
- package/dist/ManifestSection.js.map +1 -0
- package/dist/Mount.d.ts +200 -0
- package/dist/Mount.d.ts.map +1 -0
- package/dist/Mount.js +116 -0
- package/dist/Mount.js.map +1 -0
- package/dist/PaginationError.js +1 -1
- package/dist/Profile.d.ts +95 -0
- package/dist/Profile.d.ts.map +1 -0
- package/dist/Profile.js +15 -0
- package/dist/Profile.js.map +1 -0
- package/dist/Ref.d.ts +4 -3
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +13 -19
- package/dist/Ref.js.map +1 -1
- package/dist/RefInternal.d.ts +3 -0
- package/dist/RefInternal.d.ts.map +1 -0
- package/dist/RefInternal.js +16 -0
- package/dist/RefInternal.js.map +1 -0
- package/dist/SchemaToValidator.d.ts +20 -6
- package/dist/SchemaToValidator.d.ts.map +1 -1
- package/dist/SchemaToValidator.js +45 -14
- package/dist/SchemaToValidator.js.map +1 -1
- package/dist/SystemFields.js +3 -3
- package/dist/Table.d.ts +48 -9
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +41 -13
- package/dist/Table.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/internal/annotations.d.ts +2 -0
- package/dist/internal/annotations.d.ts.map +1 -0
- package/dist/internal/annotations.js +6 -0
- package/dist/internal/annotations.js.map +1 -0
- package/dist/internal/scalarDocs.d.ts +5 -0
- package/dist/internal/scalarDocs.d.ts.map +1 -0
- package/dist/internal/scalarDocs.js +43 -0
- package/dist/internal/scalarDocs.js.map +1 -0
- package/package.json +3 -3
- package/src/ActionCall.ts +25 -0
- package/src/App.ts +45 -136
- package/src/Auth.ts +54 -11
- package/src/Callback.ts +17 -4
- package/src/CommitTs.ts +26 -0
- package/src/Component.ts +204 -11
- package/src/FunctionSpec.ts +562 -5
- package/src/Http.ts +15 -37
- package/src/ManifestSection.ts +108 -0
- package/src/Mount.ts +401 -0
- package/src/Profile.ts +141 -0
- package/src/Ref.ts +19 -26
- package/src/RefInternal.ts +26 -0
- package/src/SchemaToValidator.ts +97 -22
- package/src/Table.ts +157 -23
- package/src/index.ts +5 -0
- package/src/internal/annotations.ts +1 -0
- package/src/internal/scalarDocs.ts +72 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import type * as Effect from "effect/Effect";
|
|
3
|
+
import type * as Schema from "effect/Schema";
|
|
4
|
+
import * as FunctionSpec from "./FunctionSpec.js";
|
|
5
|
+
import * as MiddlewareSpec from "./MiddlewareSpec.js";
|
|
6
|
+
import type * as Ref from "./Ref.js";
|
|
7
|
+
export interface Call {
|
|
8
|
+
<Target extends Ref.AnyQuery | Ref.AnyMutation>(target: Target, ...args: Ref.OptionalArgs<NoInfer<Target>>): Effect.Effect<Ref.Returns<Target>, Ref.Error<Target> | Schema.SchemaError>;
|
|
9
|
+
}
|
|
10
|
+
declare const ActionCall_base: Context.ServiceClass<ActionCall, "@confect/core/ActionCall", Call>;
|
|
11
|
+
export declare class ActionCall extends ActionCall_base {
|
|
12
|
+
}
|
|
13
|
+
declare const Middleware_base: MiddlewareSpec.MiddlewareSpec<Middleware, "@confect/core/ActionCall/Middleware", ActionCall, never, never, "action", never>;
|
|
14
|
+
export declare class Middleware extends Middleware_base {
|
|
15
|
+
}
|
|
16
|
+
export declare const profile: FunctionSpec.Extended<import("./Profile.js").NoFields, typeof Middleware, [{}]>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ActionCall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionCall.d.ts","sourceRoot":"","sources":["../src/ActionCall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,IAAI;IACnB,CAAC,MAAM,SAAS,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAC5C,MAAM,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GACzC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;CAC/E;;AAED,qBAAa,UAAW,SAAQ,eAE/B;CAAG;;AACJ,qBAAa,UAAW,SAAQ,eAK9B;CAAG;AAEL,eAAO,MAAM,OAAO,iFAAsD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { MiddlewareSpec } from "./MiddlewareSpec.js";
|
|
3
|
+
import { extend } from "./FunctionSpec.js";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
//#region src/ActionCall.ts
|
|
6
|
+
var ActionCall_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
ActionCall: () => ActionCall,
|
|
8
|
+
Middleware: () => Middleware,
|
|
9
|
+
profile: () => profile
|
|
10
|
+
});
|
|
11
|
+
var ActionCall = class extends Context.Service()("@confect/core/ActionCall") {};
|
|
12
|
+
var Middleware = class extends MiddlewareSpec()("@confect/core/ActionCall/Middleware", { functionTypes: {
|
|
13
|
+
query: false,
|
|
14
|
+
mutation: false,
|
|
15
|
+
action: true
|
|
16
|
+
} }) {};
|
|
17
|
+
const profile = extend()({ middleware: [Middleware] });
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ActionCall, ActionCall_exports, Middleware, profile };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=ActionCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionCall.js","names":["MiddlewareSpec.MiddlewareSpec","FunctionSpec.extend"],"sources":["../src/ActionCall.ts"],"sourcesContent":["import * as Context from \"effect/Context\";\nimport type * as Effect from \"effect/Effect\";\nimport type * as Schema from \"effect/Schema\";\nimport * as FunctionSpec from \"./FunctionSpec.js\";\nimport * as MiddlewareSpec from \"./MiddlewareSpec.js\";\nimport type * as Ref from \"./Ref.js\";\n\nexport interface Call {\n <Target extends Ref.AnyQuery | Ref.AnyMutation>(\n target: Target,\n ...args: Ref.OptionalArgs<NoInfer<Target>>\n ): Effect.Effect<Ref.Returns<Target>, Ref.Error<Target> | Schema.SchemaError>;\n}\n\nexport class ActionCall extends Context.Service<ActionCall, Call>()(\n \"@confect/core/ActionCall\",\n) {}\nexport class Middleware extends MiddlewareSpec.MiddlewareSpec<\n Middleware,\n { provides: ActionCall }\n>()(\"@confect/core/ActionCall/Middleware\", {\n functionTypes: { query: false, mutation: false, action: true },\n}) {}\n\nexport const profile = FunctionSpec.extend()({ middleware: [Middleware] });\n"],"mappings":";;;;;;;;;;AAcA,IAAa,aAAb,cAAgC,QAAQ,QAA0B,CAAC,CACjE,0BACF,CAAC,CAAC,CAAC;AACH,IAAa,aAAb,cAAgCA,eAG9B,CAAC,CAAC,uCAAuC,EACzC,eAAe;CAAE,OAAO;CAAO,UAAU;CAAO,QAAQ;AAAK,EAC/D,CAAC,CAAC,CAAC,CAAC;AAEJ,MAAa,UAAUC,OAAoB,CAAC,CAAC,EAAE,YAAY,CAAC,UAAU,EAAE,CAAC"}
|
package/dist/App.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { ComponentDefinition
|
|
2
|
-
import type { Infer, Validator } from "convex/values";
|
|
1
|
+
import type { ComponentDefinition } from "convex/server";
|
|
3
2
|
import type * as HttpApi from "effect/http-api/HttpApi";
|
|
4
3
|
import type * as Env from "./Env.js";
|
|
4
|
+
import type * as ManifestSection from "./ManifestSection.js";
|
|
5
|
+
import type * as MiddlewareSpec from "./MiddlewareSpec.js";
|
|
6
|
+
import * as Mount from "./Mount.js";
|
|
5
7
|
declare const TypeId = "~@confect/core/App";
|
|
6
|
-
declare const MountTypeId = "~@confect/core/App/Mount";
|
|
7
8
|
/**
|
|
8
9
|
* The default export of a Convex component's `convex.config` module.
|
|
9
10
|
*/
|
|
@@ -13,113 +14,56 @@ export type HttpPrefix = `/${string}`;
|
|
|
13
14
|
* Any `HttpApi`, with its identifier and groups erased.
|
|
14
15
|
*/
|
|
15
16
|
export type Api = HttpApi.HttpApi<string, any>;
|
|
16
|
-
type EnvOf<D extends Definition> = D["__env"];
|
|
17
|
-
type IsOptional<V> = V extends Validator<any, "optional", any> ? true : false;
|
|
18
|
-
type RequiredKeys<E extends EnvDefinition> = {
|
|
19
|
-
[K in keyof E]: IsOptional<E[K]> extends true ? never : K;
|
|
20
|
-
}[keyof E];
|
|
21
|
-
type SlotValue<V extends Validator<any, any, any>> = Extract<Infer<V>, string>;
|
|
22
|
-
/**
|
|
23
|
-
* What one component env slot accepts: a constant, or an entry whose Convex
|
|
24
|
-
* value fits. A required slot takes only a required entry.
|
|
25
|
-
*/
|
|
26
|
-
type Slot<V extends Validator<any, any, any>> = IsOptional<V> extends true ? SlotValue<V> | undefined | Env.Entry<string, any, SlotValue<V>, boolean> : SlotValue<V> | Env.Entry<string, any, SlotValue<V>, false>;
|
|
27
|
-
export type Bindings<E extends EnvDefinition> = {
|
|
28
|
-
readonly [K in RequiredKeys<E>]: Slot<E[K]>;
|
|
29
|
-
} & {
|
|
30
|
-
readonly [K in Exclude<keyof E, RequiredKeys<E>>]?: Slot<E[K]>;
|
|
31
|
-
};
|
|
32
|
-
type HttpOptions = {
|
|
33
|
-
readonly httpPrefix?: never;
|
|
34
|
-
readonly api?: never;
|
|
35
|
-
} | {
|
|
36
|
-
readonly httpPrefix: HttpPrefix;
|
|
37
|
-
readonly api?: Api;
|
|
38
|
-
};
|
|
39
|
-
export type Options<D extends Definition> = HttpOptions & ([RequiredKeys<EnvOf<D>>] extends [never] ? {
|
|
40
|
-
readonly env?: Bindings<EnvOf<D>>;
|
|
41
|
-
} : {
|
|
42
|
-
readonly env: Bindings<EnvOf<D>>;
|
|
43
|
-
});
|
|
44
|
-
type Exact<D extends Definition, O> = {
|
|
45
|
-
readonly [K in Exclude<keyof O, "env" | "httpPrefix" | "api">]: never;
|
|
46
|
-
} & (O extends {
|
|
47
|
-
readonly env: infer B;
|
|
48
|
-
} ? {
|
|
49
|
-
readonly env: {
|
|
50
|
-
readonly [K in Exclude<keyof B, keyof EnvOf<D>>]: never;
|
|
51
|
-
};
|
|
52
|
-
} : unknown);
|
|
53
|
-
export interface MountData {
|
|
54
|
-
readonly definition: Definition;
|
|
55
|
-
readonly httpPrefix: HttpPrefix | undefined;
|
|
56
|
-
readonly api: Api | undefined;
|
|
57
|
-
readonly env: Readonly<Record<string, string | Env.AnyEntry | undefined>>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A mounted Convex component. `O` keeps the options as written, so {@link make}
|
|
61
|
-
* can see which backends the bound entries come from.
|
|
62
|
-
*/
|
|
63
|
-
export interface Mount<out D extends Definition, out O> extends MountData {
|
|
64
|
-
readonly [MountTypeId]: {
|
|
65
|
-
readonly definition: D;
|
|
66
|
-
readonly options: O;
|
|
67
|
-
};
|
|
68
|
-
readonly httpPrefix: O extends {
|
|
69
|
-
readonly httpPrefix: infer P extends HttpPrefix;
|
|
70
|
-
} ? P : undefined;
|
|
71
|
-
}
|
|
72
|
-
export type AnyMount = Mount<Definition, unknown>;
|
|
73
|
-
/**
|
|
74
|
-
* Mount a Convex component: the default export of its `convex.config` module,
|
|
75
|
-
* official or Confect-authored. `env` is typed against the component's own
|
|
76
|
-
* `defineComponent({ env })` declaration, so a missing required binding, an
|
|
77
|
-
* optional entry in a required slot, a wrong literal and an unknown slot fail
|
|
78
|
-
* to typecheck. `api` is the component's `HttpApi`, for route checks.
|
|
79
|
-
*/
|
|
80
|
-
export declare function mount<const D extends Definition>(definition: D & ([RequiredKeys<EnvOf<D>>] extends [never] ? unknown : "App.mount: this component declares required env; pass { env }")): Mount<D, {}>;
|
|
81
|
-
export declare function mount<const D extends Definition, const O extends Options<D>>(definition: D, options: O & Exact<NoInfer<D>, NoInfer<O>>): Mount<D, O>;
|
|
82
17
|
type OwnerOf<V> = V extends Env.Entry<infer N, any, any, any> ? N : never;
|
|
83
|
-
type Owners<M> = M extends Mount<
|
|
84
|
-
readonly env: infer B;
|
|
85
|
-
} ? {
|
|
18
|
+
type Owners<M> = M extends Mount.Mount<any, any, Mount.Declared<any, infer B>> ? {
|
|
86
19
|
[K in keyof B]: OwnerOf<B[K]>;
|
|
87
|
-
}[keyof B] : never
|
|
20
|
+
}[keyof B] : never;
|
|
88
21
|
type OwnedBy<N extends string, M> = {
|
|
89
22
|
readonly [K in keyof M]: [Exclude<Owners<M[K]>, N>] extends [never] ? unknown : {
|
|
90
23
|
readonly foreignEnvBackend: Exclude<Owners<M[K]>, N>;
|
|
91
24
|
};
|
|
92
25
|
};
|
|
93
26
|
export type Kind = "app" | "component";
|
|
94
|
-
export interface App<E extends Env.Any, M extends
|
|
27
|
+
export interface App<E extends Env.Any, M extends ReadonlyArray<Mount.Any>, K extends Kind = Kind> {
|
|
95
28
|
readonly [TypeId]: typeof TypeId;
|
|
96
29
|
readonly kind: K;
|
|
97
30
|
readonly env: E;
|
|
31
|
+
readonly components: ReadonlyArray<Definition>;
|
|
98
32
|
readonly mounts: M;
|
|
33
|
+
readonly requiresMiddleware: ReadonlyArray<MiddlewareSpec.AnyMiddlewareSpec>;
|
|
34
|
+
readonly manifestSections: ReadonlyArray<ManifestSection.Entry>;
|
|
99
35
|
}
|
|
100
|
-
export type Any = App<Env.Any,
|
|
36
|
+
export type Any = App<Env.Any, ReadonlyArray<Mount.Any>>;
|
|
101
37
|
/**
|
|
102
|
-
* Declare a backend, in `confect/app.ts`: its env
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* Codegen
|
|
106
|
-
*
|
|
38
|
+
* Declare a backend, in `confect/app.ts`: its env, the `convex.config`
|
|
39
|
+
* definitions of the Convex components it mounts, its mounts and its manifest
|
|
40
|
+
* sections. Set `kind: "component"` when declaring a component; the default is
|
|
41
|
+
* `"app"`. Codegen rejects a kind that differs from its target, and writes
|
|
42
|
+
* `convex/convex.config.ts` with one `app.use` per mount, in list order, using
|
|
43
|
+
* the definition whose `defineComponent` name is the mount's component name. A
|
|
44
|
+
* mount that binds another backend's env entry fails to typecheck.
|
|
45
|
+
*
|
|
46
|
+
* `manifestSections` is the only place codegen learns a backend's sections.
|
|
47
|
+
* Each section describes every registered function of an app, whatever builder
|
|
48
|
+
* made it, and writes its `_generated` file for an app or a component, even one
|
|
49
|
+
* with no functions.
|
|
107
50
|
*
|
|
108
51
|
* ```ts
|
|
52
|
+
* import email from "@acme/email/convex.config";
|
|
53
|
+
* import workpool from "@convex-dev/workpool/convex.config";
|
|
54
|
+
*
|
|
109
55
|
* export default App.make({
|
|
110
56
|
* env,
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* httpPrefix: "/email",
|
|
114
|
-
* env: { FROM: env.EMAIL_FROM, KEY: env.RESEND_API_KEY },
|
|
115
|
-
* }),
|
|
116
|
-
* importsPool: App.mount(workpool),
|
|
117
|
-
* },
|
|
57
|
+
* components: [email, workpool],
|
|
58
|
+
* mounts: [BulkEmail, TransactionalEmail, ImportsPool],
|
|
118
59
|
* });
|
|
119
60
|
* ```
|
|
120
61
|
*/
|
|
121
|
-
export declare const make: <const E extends Env.Any, const M extends
|
|
62
|
+
export declare const make: <const E extends Env.Any, const M extends ReadonlyArray<Mount.Any> = [], const K extends Kind = "app">(options: {
|
|
122
63
|
readonly env: E;
|
|
64
|
+
readonly requiresMiddleware?: ReadonlyArray<MiddlewareSpec.AnyMiddlewareSpec>;
|
|
65
|
+
readonly manifestSections?: ReadonlyArray<ManifestSection.Entry>;
|
|
66
|
+
readonly components?: ReadonlyArray<Definition>;
|
|
123
67
|
readonly mounts?: M & OwnedBy<NoInfer<Env.Name<E>>, NoInfer<M>>;
|
|
124
68
|
} & ([K] extends ["app"] ? {
|
|
125
69
|
readonly kind?: K;
|
|
@@ -127,13 +71,14 @@ export declare const make: <const E extends Env.Any, const M extends Readonly<Re
|
|
|
127
71
|
readonly kind: K;
|
|
128
72
|
})) => App<E, M, K>;
|
|
129
73
|
export declare const isApp: (u: unknown) => u is Any;
|
|
130
|
-
export declare const isMount: (u: unknown) => u is AnyMount;
|
|
131
74
|
export declare const env: <A extends Any>(app: A) => A["env"];
|
|
132
75
|
/**
|
|
133
|
-
*
|
|
76
|
+
* The `convex.config` definitions the backend lists, in list order.
|
|
77
|
+
*/
|
|
78
|
+
export declare const components: (app: Any) => ReadonlyArray<Definition>;
|
|
79
|
+
/**
|
|
80
|
+
* What each mount was declared with, in list order.
|
|
134
81
|
*/
|
|
135
|
-
export declare const mounts: (app: Any) => ReadonlyArray<
|
|
136
|
-
readonly name: string;
|
|
137
|
-
}>;
|
|
82
|
+
export declare const mounts: (app: Any) => ReadonlyArray<Mount.Data>;
|
|
138
83
|
export {};
|
|
139
84
|
//# sourceMappingURL=App.d.ts.map
|
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,KAAK,OAAO,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,KAAK,eAAe,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC,QAAA,MAAM,MAAM,uBAAuB,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEvD,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AAI,CAAC,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,KACvE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAQZ,CAAC;AAEH,eAAO,MAAM,KAAK,MAAO,OAAO,KAAG,CAAC,IAAI,GAIM,CAAC;AAE/C,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,GAAG,OAAO,CAAC,KAAG,CAAC,CAAC,KAAK,CAAY,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,UAAU,QAAS,GAAG,KAAG,aAAa,CAAC,UAAU,CAC9C,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,MAAM,QAAS,GAAG,KAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAC9B,CAAC"}
|
package/dist/App.js
CHANGED
|
@@ -1,45 +1,37 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { data } from "./Mount.js";
|
|
2
3
|
import * as Predicate from "effect/Predicate";
|
|
3
4
|
//#region src/App.ts
|
|
4
5
|
var App_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
components: () => components,
|
|
5
7
|
env: () => env,
|
|
6
8
|
isApp: () => isApp,
|
|
7
|
-
isMount: () => isMount,
|
|
8
9
|
make: () => make,
|
|
9
|
-
mount: () => mount,
|
|
10
10
|
mounts: () => mounts
|
|
11
11
|
});
|
|
12
12
|
const TypeId = "~@confect/core/App";
|
|
13
|
-
const MountTypeId = "~@confect/core/App/Mount";
|
|
14
|
-
function mount(definition, options) {
|
|
15
|
-
return {
|
|
16
|
-
[MountTypeId]: {
|
|
17
|
-
definition,
|
|
18
|
-
options
|
|
19
|
-
},
|
|
20
|
-
definition,
|
|
21
|
-
httpPrefix: options?.httpPrefix,
|
|
22
|
-
api: options?.api,
|
|
23
|
-
env: options?.env ?? {}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
13
|
/**
|
|
27
|
-
* Declare a backend, in `confect/app.ts`: its env
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Codegen
|
|
31
|
-
*
|
|
14
|
+
* Declare a backend, in `confect/app.ts`: its env, the `convex.config`
|
|
15
|
+
* definitions of the Convex components it mounts, its mounts and its manifest
|
|
16
|
+
* sections. Set `kind: "component"` when declaring a component; the default is
|
|
17
|
+
* `"app"`. Codegen rejects a kind that differs from its target, and writes
|
|
18
|
+
* `convex/convex.config.ts` with one `app.use` per mount, in list order, using
|
|
19
|
+
* the definition whose `defineComponent` name is the mount's component name. A
|
|
20
|
+
* mount that binds another backend's env entry fails to typecheck.
|
|
21
|
+
*
|
|
22
|
+
* `manifestSections` is the only place codegen learns a backend's sections.
|
|
23
|
+
* Each section describes every registered function of an app, whatever builder
|
|
24
|
+
* made it, and writes its `_generated` file for an app or a component, even one
|
|
25
|
+
* with no functions.
|
|
32
26
|
*
|
|
33
27
|
* ```ts
|
|
28
|
+
* import email from "@acme/email/convex.config";
|
|
29
|
+
* import workpool from "@convex-dev/workpool/convex.config";
|
|
30
|
+
*
|
|
34
31
|
* export default App.make({
|
|
35
32
|
* env,
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* httpPrefix: "/email",
|
|
39
|
-
* env: { FROM: env.EMAIL_FROM, KEY: env.RESEND_API_KEY },
|
|
40
|
-
* }),
|
|
41
|
-
* importsPool: App.mount(workpool),
|
|
42
|
-
* },
|
|
33
|
+
* components: [email, workpool],
|
|
34
|
+
* mounts: [BulkEmail, TransactionalEmail, ImportsPool],
|
|
43
35
|
* });
|
|
44
36
|
* ```
|
|
45
37
|
*/
|
|
@@ -47,22 +39,22 @@ const make = (options) => ({
|
|
|
47
39
|
[TypeId]: TypeId,
|
|
48
40
|
kind: options.kind ?? "app",
|
|
49
41
|
env: options.env,
|
|
50
|
-
|
|
42
|
+
components: options.components ?? [],
|
|
43
|
+
mounts: options.mounts ?? [],
|
|
44
|
+
requiresMiddleware: options.requiresMiddleware ?? [],
|
|
45
|
+
manifestSections: options.manifestSections ?? []
|
|
51
46
|
});
|
|
52
47
|
const isApp = (u) => Predicate.hasProperty(u, TypeId) && u[TypeId] === TypeId && Predicate.hasProperty(u, "kind") && (u.kind === "app" || u.kind === "component");
|
|
53
|
-
const isMount = (u) => Predicate.hasProperty(u, MountTypeId);
|
|
54
48
|
const env = (app) => app.env;
|
|
55
49
|
/**
|
|
56
|
-
*
|
|
50
|
+
* The `convex.config` definitions the backend lists, in list order.
|
|
51
|
+
*/
|
|
52
|
+
const components = (app) => app.components;
|
|
53
|
+
/**
|
|
54
|
+
* What each mount was declared with, in list order.
|
|
57
55
|
*/
|
|
58
|
-
const mounts = (app) =>
|
|
59
|
-
name,
|
|
60
|
-
definition: installed.definition,
|
|
61
|
-
httpPrefix: installed.httpPrefix,
|
|
62
|
-
api: installed.api,
|
|
63
|
-
env: installed.env
|
|
64
|
-
}));
|
|
56
|
+
const mounts = (app) => app.mounts.map(data);
|
|
65
57
|
//#endregion
|
|
66
|
-
export { App_exports, env, isApp,
|
|
58
|
+
export { App_exports, components, env, isApp, make, mounts };
|
|
67
59
|
|
|
68
60
|
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","names":[],"sources":["../src/App.ts"],"sourcesContent":["import type { ComponentDefinition
|
|
1
|
+
{"version":3,"file":"App.js","names":["Mount.data"],"sources":["../src/App.ts"],"sourcesContent":["import type { ComponentDefinition } from \"convex/server\";\nimport type * as HttpApi from \"effect/http-api/HttpApi\";\nimport * as Predicate from \"effect/Predicate\";\nimport type * as Env from \"./Env.js\";\nimport type * as ManifestSection from \"./ManifestSection.js\";\nimport type * as MiddlewareSpec from \"./MiddlewareSpec.js\";\nimport * as Mount from \"./Mount.js\";\n\nconst TypeId = \"~@confect/core/App\";\n\n/**\n * The default export of a Convex component's `convex.config` module.\n */\nexport type Definition = ComponentDefinition<any, any>;\n\nexport type HttpPrefix = `/${string}`;\n\n/**\n * Any `HttpApi`, with its identifier and groups erased.\n */\nexport type Api = HttpApi.HttpApi<string, any>;\n\ntype OwnerOf<V> = V extends Env.Entry<infer N, any, any, any> ? N : never;\n\ntype Owners<M> =\n M extends Mount.Mount<any, any, Mount.Declared<any, infer B>>\n ? { [K in keyof B]: OwnerOf<B[K]> }[keyof B]\n : never;\n\ntype OwnedBy<N extends string, M> = {\n readonly [K in keyof M]: [Exclude<Owners<M[K]>, N>] extends [never]\n ? unknown\n : { readonly foreignEnvBackend: Exclude<Owners<M[K]>, N> };\n};\n\nexport type Kind = \"app\" | \"component\";\n\nexport interface App<\n E extends Env.Any,\n M extends ReadonlyArray<Mount.Any>,\n K extends Kind = Kind,\n> {\n readonly [TypeId]: typeof TypeId;\n readonly kind: K;\n readonly env: E;\n readonly components: ReadonlyArray<Definition>;\n readonly mounts: M;\n readonly requiresMiddleware: ReadonlyArray<MiddlewareSpec.AnyMiddlewareSpec>;\n readonly manifestSections: ReadonlyArray<ManifestSection.Entry>;\n}\n\nexport type Any = App<Env.Any, ReadonlyArray<Mount.Any>>;\n\n/**\n * Declare a backend, in `confect/app.ts`: its env, the `convex.config`\n * definitions of the Convex components it mounts, its mounts and its manifest\n * sections. Set `kind: \"component\"` when declaring a component; the default is\n * `\"app\"`. Codegen rejects a kind that differs from its target, and writes\n * `convex/convex.config.ts` with one `app.use` per mount, in list order, using\n * the definition whose `defineComponent` name is the mount's component name. A\n * mount that binds another backend's env entry fails to typecheck.\n *\n * `manifestSections` is the only place codegen learns a backend's sections.\n * Each section describes every registered function of an app, whatever builder\n * made it, and writes its `_generated` file for an app or a component, even one\n * with no functions.\n *\n * ```ts\n * import email from \"@acme/email/convex.config\";\n * import workpool from \"@convex-dev/workpool/convex.config\";\n *\n * export default App.make({\n * env,\n * components: [email, workpool],\n * mounts: [BulkEmail, TransactionalEmail, ImportsPool],\n * });\n * ```\n */\nexport const make = <\n const E extends Env.Any,\n const M extends ReadonlyArray<Mount.Any> = [],\n const K extends Kind = \"app\",\n>(\n options: {\n readonly env: E;\n readonly requiresMiddleware?: ReadonlyArray<MiddlewareSpec.AnyMiddlewareSpec>;\n readonly manifestSections?: ReadonlyArray<ManifestSection.Entry>;\n readonly components?: ReadonlyArray<Definition>;\n readonly mounts?: M & OwnedBy<NoInfer<Env.Name<E>>, NoInfer<M>>;\n } & ([K] extends [\"app\"] ? { readonly kind?: K } : { readonly kind: K }),\n): App<E, M, K> => ({\n [TypeId]: TypeId,\n kind: options.kind ?? (\"app\" as K),\n env: options.env,\n components: options.components ?? [],\n mounts: options.mounts ?? ([] as unknown as M),\n requiresMiddleware: options.requiresMiddleware ?? [],\n manifestSections: options.manifestSections ?? [],\n});\n\nexport const isApp = (u: unknown): u is Any =>\n Predicate.hasProperty(u, TypeId) &&\n u[TypeId] === TypeId &&\n Predicate.hasProperty(u, \"kind\") &&\n (u.kind === \"app\" || u.kind === \"component\");\n\nexport const env = <A extends Any>(app: A): A[\"env\"] => app.env;\n\n/**\n * The `convex.config` definitions the backend lists, in list order.\n */\nexport const components = (app: Any): ReadonlyArray<Definition> =>\n app.components;\n\n/**\n * What each mount was declared with, in list order.\n */\nexport const mounts = (app: Any): ReadonlyArray<Mount.Data> =>\n app.mounts.map(Mount.data);\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEf,MAAa,QAKX,aAOkB;EACjB,SAAS;CACV,MAAM,QAAQ,QAAS;CACvB,KAAK,QAAQ;CACb,YAAY,QAAQ,cAAc,CAAC;CACnC,QAAQ,QAAQ,UAAW,CAAC;CAC5B,oBAAoB,QAAQ,sBAAsB,CAAC;CACnD,kBAAkB,QAAQ,oBAAoB,CAAC;AACjD;AAEA,MAAa,SAAS,MACpB,UAAU,YAAY,GAAG,MAAM,KAC/B,EAAE,YAAY,UACd,UAAU,YAAY,GAAG,MAAM,MAC9B,EAAE,SAAS,SAAS,EAAE,SAAS;AAElC,MAAa,OAAsB,QAAqB,IAAI;;;;AAK5D,MAAa,cAAc,QACzB,IAAI;;;;AAKN,MAAa,UAAU,QACrB,IAAI,OAAO,IAAIA,IAAU"}
|
package/dist/Auth.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { AuthProvider } from "convex/server";
|
|
2
2
|
import type * as App from "./App.js";
|
|
3
|
+
import type * as Env from "./Env.js";
|
|
4
|
+
import * as Mount from "./Mount.js";
|
|
3
5
|
import type { TypeError } from "./Types.js";
|
|
4
6
|
declare const TypeId = "~@confect/core/Auth";
|
|
7
|
+
declare const CloudUrlTypeId = "~@confect/core/Auth/CloudUrl";
|
|
5
8
|
declare const SiteUrlTypeId = "~@confect/core/Auth/SiteUrl";
|
|
6
9
|
/**
|
|
7
10
|
* The deployment's site URL (`CONVEX_SITE_URL`) plus a path, resolved when
|
|
@@ -11,15 +14,38 @@ export interface SiteUrl {
|
|
|
11
14
|
readonly [SiteUrlTypeId]: typeof SiteUrlTypeId;
|
|
12
15
|
readonly path: string;
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The deployment's cloud URL (`CONVEX_CLOUD_URL`) plus a path.
|
|
19
|
+
*/
|
|
20
|
+
export interface CloudUrl {
|
|
21
|
+
readonly [CloudUrlTypeId]: typeof CloudUrlTypeId;
|
|
22
|
+
readonly path: string;
|
|
23
|
+
}
|
|
24
|
+
type Url = string | SiteUrl | CloudUrl | Env.Entry<string, string, string, false>;
|
|
25
|
+
type WithUrls<P> = P extends unknown ? {
|
|
26
|
+
[K in keyof P]: K extends "domain" | "issuer" | "jwks" | "applicationID" ? Url : P[K];
|
|
17
27
|
} : never;
|
|
18
28
|
/**
|
|
19
|
-
* Convex's
|
|
20
|
-
|
|
29
|
+
* Convex's provider list with deployment URLs and required, public env strings.
|
|
30
|
+
*/
|
|
31
|
+
export type Provider = WithUrls<AuthProvider> & {
|
|
32
|
+
/**
|
|
33
|
+
* Application-defined token family, copied to the runtime provider data.
|
|
34
|
+
*/
|
|
35
|
+
readonly family?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Application-defined issuer name, for example a trusted service.
|
|
38
|
+
*/
|
|
39
|
+
readonly name?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The cloud URL, or a path under it, resolved when Convex loads auth config.
|
|
43
|
+
*/
|
|
44
|
+
export declare const cloudUrl: (path?: `/${string}` | "") => CloudUrl;
|
|
45
|
+
/**
|
|
46
|
+
* The path of a cloud URL placeholder, or `undefined` for another value.
|
|
21
47
|
*/
|
|
22
|
-
export
|
|
48
|
+
export declare const cloudUrlPath: (u: unknown) => string | undefined;
|
|
23
49
|
export interface Auth<A extends App.Any> {
|
|
24
50
|
readonly [TypeId]: typeof TypeId;
|
|
25
51
|
readonly app: A;
|
|
@@ -31,9 +57,7 @@ export type Any = Auth<App.Any>;
|
|
|
31
57
|
* component's HTTP routes.
|
|
32
58
|
*/
|
|
33
59
|
export declare function siteUrl(path?: `/${string}`): SiteUrl;
|
|
34
|
-
export declare function siteUrl(mount: {
|
|
35
|
-
readonly httpPrefix: App.HttpPrefix;
|
|
36
|
-
}, path?: `/${string}`): SiteUrl;
|
|
60
|
+
export declare function siteUrl(mount: Mount.Mount<any, string, Mount.Declared<App.HttpPrefix>>, path?: `/${string}`): SiteUrl;
|
|
37
61
|
export type AppOnlyError = TypeError<"Auth.make accepts only app declarations; components receive identity through function arguments", never>;
|
|
38
62
|
type AppOnly<A extends App.Any> = [A["kind"]] extends ["app"] ? unknown : AppOnlyError;
|
|
39
63
|
/**
|
package/dist/Auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../src/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,E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AAS,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACzD,OAAO,GACP,YAAY,CAAC;AAEjB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,GAAG,CAAC,GAAG,OAC/B,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WACnB;IAAE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;CAAE,KACvD,IAAI,CAAC,CAAC,CAA8D,CAAC;AAExE,eAAO,MAAM,MAAM,MAAO,OAAO,KAAG,CAAC,IAAI,GACiB,CAAC;AAE3D,eAAO,MAAM,SAAS,SAAU,GAAG,KAAG,aAAa,CAAC,QAAQ,CAAmB,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,WAAW,MAAO,OAAO,KAAG,MAAM,GAAG,SAKnC,CAAC"}
|
package/dist/Auth.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { data } from "./Mount.js";
|
|
2
3
|
import * as Predicate from "effect/Predicate";
|
|
3
4
|
//#region src/Auth.ts
|
|
4
5
|
var Auth_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
cloudUrl: () => cloudUrl,
|
|
7
|
+
cloudUrlPath: () => cloudUrlPath,
|
|
5
8
|
isAuth: () => isAuth,
|
|
6
9
|
make: () => make,
|
|
7
10
|
providers: () => providers,
|
|
@@ -9,11 +12,23 @@ var Auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
9
12
|
siteUrlPath: () => siteUrlPath
|
|
10
13
|
});
|
|
11
14
|
const TypeId = "~@confect/core/Auth";
|
|
15
|
+
const CloudUrlTypeId = "~@confect/core/Auth/CloudUrl";
|
|
12
16
|
const SiteUrlTypeId = "~@confect/core/Auth/SiteUrl";
|
|
17
|
+
/**
|
|
18
|
+
* The cloud URL, or a path under it, resolved when Convex loads auth config.
|
|
19
|
+
*/
|
|
20
|
+
const cloudUrl = (path = "") => ({
|
|
21
|
+
[CloudUrlTypeId]: CloudUrlTypeId,
|
|
22
|
+
path
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* The path of a cloud URL placeholder, or `undefined` for another value.
|
|
26
|
+
*/
|
|
27
|
+
const cloudUrlPath = (u) => Predicate.hasProperty(u, CloudUrlTypeId) && Predicate.hasProperty(u, "path") && typeof u.path === "string" ? u.path : void 0;
|
|
13
28
|
function siteUrl(pathOrMount, path = "") {
|
|
14
29
|
return {
|
|
15
30
|
[SiteUrlTypeId]: SiteUrlTypeId,
|
|
16
|
-
path: typeof pathOrMount === "
|
|
31
|
+
path: typeof pathOrMount === "string" || pathOrMount === void 0 ? pathOrMount ?? "" : (data(pathOrMount).httpPrefix ?? "").replace(/\/+$/, "") + path
|
|
17
32
|
};
|
|
18
33
|
}
|
|
19
34
|
/**
|
|
@@ -41,6 +56,6 @@ const providers = (auth) => auth.providers;
|
|
|
41
56
|
*/
|
|
42
57
|
const siteUrlPath = (u) => Predicate.hasProperty(u, SiteUrlTypeId) && Predicate.hasProperty(u, "path") && typeof u.path === "string" ? u.path : void 0;
|
|
43
58
|
//#endregion
|
|
44
|
-
export { Auth_exports, isAuth, make, providers, siteUrl, siteUrlPath };
|
|
59
|
+
export { Auth_exports, cloudUrl, cloudUrlPath, isAuth, make, providers, siteUrl, siteUrlPath };
|
|
45
60
|
|
|
46
61
|
//# sourceMappingURL=Auth.js.map
|
package/dist/Auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.js","names":[],"sources":["../src/Auth.ts"],"sourcesContent":["import type { AuthProvider } from \"convex/server\";\nimport * as Predicate from \"effect/Predicate\";\nimport type * as App from \"./App.js\";\nimport type { TypeError } from \"./Types.js\";\n\nconst TypeId = \"~@confect/core/Auth\";\nconst SiteUrlTypeId = \"~@confect/core/Auth/SiteUrl\";\n\n/**\n * The deployment's site URL (`CONVEX_SITE_URL`) plus a path, resolved when\n * Convex loads `auth.config.ts`.\n */\nexport interface SiteUrl {\n readonly [SiteUrlTypeId]: typeof SiteUrlTypeId;\n readonly path: string;\n}\n\ntype Url
|
|
1
|
+
{"version":3,"file":"Auth.js","names":["Mount.data"],"sources":["../src/Auth.ts"],"sourcesContent":["import type { AuthProvider } from \"convex/server\";\nimport * as Predicate from \"effect/Predicate\";\nimport type * as App from \"./App.js\";\nimport type * as Env from \"./Env.js\";\nimport * as Mount from \"./Mount.js\";\nimport type { TypeError } from \"./Types.js\";\n\nconst TypeId = \"~@confect/core/Auth\";\nconst CloudUrlTypeId = \"~@confect/core/Auth/CloudUrl\";\nconst SiteUrlTypeId = \"~@confect/core/Auth/SiteUrl\";\n\n/**\n * The deployment's site URL (`CONVEX_SITE_URL`) plus a path, resolved when\n * Convex loads `auth.config.ts`.\n */\nexport interface SiteUrl {\n readonly [SiteUrlTypeId]: typeof SiteUrlTypeId;\n readonly path: string;\n}\n\n/**\n * The deployment's cloud URL (`CONVEX_CLOUD_URL`) plus a path.\n */\nexport interface CloudUrl {\n readonly [CloudUrlTypeId]: typeof CloudUrlTypeId;\n readonly path: string;\n}\n\ntype Url =\n | string\n | SiteUrl\n | CloudUrl\n | Env.Entry<string, string, string, false>;\n\ntype WithUrls<P> = P extends unknown\n ? {\n [K in keyof P]: K extends \"domain\" | \"issuer\" | \"jwks\" | \"applicationID\"\n ? Url\n : P[K];\n }\n : never;\n\n/**\n * Convex's provider list with deployment URLs and required, public env strings.\n */\nexport type Provider = WithUrls<AuthProvider> & {\n /**\n * Application-defined token family, copied to the runtime provider data.\n */\n readonly family?: string;\n /**\n * Application-defined issuer name, for example a trusted service.\n */\n readonly name?: string;\n};\n\n/**\n * The cloud URL, or a path under it, resolved when Convex loads auth config.\n */\nexport const cloudUrl = (path: `/${string}` | \"\" = \"\"): CloudUrl => ({\n [CloudUrlTypeId]: CloudUrlTypeId,\n path,\n});\n\n/**\n * The path of a cloud URL placeholder, or `undefined` for another value.\n */\nexport const cloudUrlPath = (u: unknown): string | undefined =>\n Predicate.hasProperty(u, CloudUrlTypeId) &&\n Predicate.hasProperty(u, \"path\") &&\n typeof u.path === \"string\"\n ? u.path\n : undefined;\n\nexport interface Auth<A extends App.Any> {\n readonly [TypeId]: typeof TypeId;\n readonly app: A;\n readonly providers: ReadonlyArray<Provider>;\n}\n\nexport type Any = Auth<App.Any>;\n\n/**\n * The site URL, or a path under it. Pass a mount to point at that mounted\n * component's HTTP routes.\n */\nexport function siteUrl(path?: `/${string}`): SiteUrl;\nexport function siteUrl(\n mount: Mount.Mount<any, string, Mount.Declared<App.HttpPrefix>>,\n path?: `/${string}`,\n): SiteUrl;\nexport function siteUrl(\n pathOrMount?: `/${string}` | Mount.Any,\n path: string = \"\",\n): SiteUrl {\n return {\n [SiteUrlTypeId]: SiteUrlTypeId,\n path:\n typeof pathOrMount === \"string\" || pathOrMount === undefined\n ? (pathOrMount ?? \"\")\n : (Mount.data(pathOrMount).httpPrefix ?? \"\").replace(/\\/+$/, \"\") + path,\n };\n}\n\nexport type AppOnlyError = TypeError<\n \"Auth.make accepts only app declarations; components receive identity through function arguments\",\n never\n>;\n\ntype AppOnly<A extends App.Any> = [A[\"kind\"]] extends [\"app\"]\n ? unknown\n : AppOnlyError;\n\n/**\n * Declare the identity providers whose tokens the backend accepts, in\n * `confect/auth.ts`. This is Convex's own provider list; codegen writes it to\n * `convex/auth.config.ts`.\n *\n * ```ts\n * export default Auth.make(app, {\n * providers: [\n * { domain: \"https://login.example.edu\", applicationID: \"tenant\" },\n * ],\n * });\n * ```\n */\nexport const make = <A extends App.Any>(\n app: A & AppOnly<NoInfer<A>>,\n options: { readonly providers: ReadonlyArray<Provider> },\n): Auth<A> => ({ [TypeId]: TypeId, app, providers: options.providers });\n\nexport const isAuth = (u: unknown): u is Any =>\n Predicate.hasProperty(u, TypeId) && u[TypeId] === TypeId;\n\nexport const providers = (auth: Any): ReadonlyArray<Provider> => auth.providers;\n\n/**\n * The path of a {@link SiteUrl}, or `undefined` for any other value.\n */\nexport const siteUrlPath = (u: unknown): string | undefined =>\n Predicate.hasProperty(u, SiteUrlTypeId) &&\n Predicate.hasProperty(u, \"path\") &&\n typeof u.path === \"string\"\n ? u.path\n : undefined;\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,SAAS;AACf,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;;;;AAkDtB,MAAa,YAAY,OAA0B,QAAkB;EAClE,iBAAiB;CAClB;AACF;;;;AAKA,MAAa,gBAAgB,MAC3B,UAAU,YAAY,GAAG,cAAc,KACvC,UAAU,YAAY,GAAG,MAAM,KAC/B,OAAO,EAAE,SAAS,WACd,EAAE,OACF,KAAA;AAmBN,SAAgB,QACd,aACA,OAAe,IACN;CACT,OAAO;GACJ,gBAAgB;EACjB,MACE,OAAO,gBAAgB,YAAY,gBAAgB,KAAA,IAC9C,eAAe,MACfA,KAAW,WAAW,CAAC,CAAC,cAAc,GAAA,CAAI,QAAQ,QAAQ,EAAE,IAAI;CACzE;AACF;;;;;;;;;;;;;;AAwBA,MAAa,QACX,KACA,aACa;EAAG,SAAS;CAAQ;CAAK,WAAW,QAAQ;AAAU;AAErE,MAAa,UAAU,MACrB,UAAU,YAAY,GAAG,MAAM,KAAK,EAAE,YAAY;AAEpD,MAAa,aAAa,SAAuC,KAAK;;;;AAKtE,MAAa,eAAe,MAC1B,UAAU,YAAY,GAAG,aAAa,KACtC,UAAU,YAAY,GAAG,MAAM,KAC/B,OAAO,EAAE,SAAS,WACd,EAAE,OACF,KAAA"}
|
package/dist/Callback.d.ts
CHANGED
|
@@ -66,9 +66,14 @@ export declare const action: <const Id_ extends Id, const ArgsFields_ extends Fu
|
|
|
66
66
|
}) => Contract<Id_, "action", ArgsFields_, Returns_, Error_>;
|
|
67
67
|
/**
|
|
68
68
|
* The schema of a handle for `contract`: a string on the wire, a runnable ref
|
|
69
|
-
* once decoded. Use it in a component's function args or tables.
|
|
69
|
+
* once decoded. Use it in a component's function args or tables. It lowers to
|
|
70
|
+
* Convex's `v.function` with the contract's encoded args and returns.
|
|
71
|
+
* `reservedArgument` opts mutation and action handles into context forwarding.
|
|
72
|
+
* The host target must reserve the same argument name.
|
|
70
73
|
*/
|
|
71
|
-
export declare const handle: <Contract_ extends Any>(contract: Contract_
|
|
74
|
+
export declare const handle: <Contract_ extends Any>(contract: Contract_, options?: {
|
|
75
|
+
readonly reservedArgument?: Contract_["functionType"] extends "query" ? never : string;
|
|
76
|
+
}) => Schema.Codec<Handle<Contract_>, string>;
|
|
72
77
|
type EncodedArgs<Ref_> = Ref_ extends {
|
|
73
78
|
readonly _tag: "Confect";
|
|
74
79
|
readonly args: {
|
package/dist/Callback.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callback.d.ts","sourceRoot":"","sources":["../src/Callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Callback.d.ts","sourceRoot":"","sources":["../src/Callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAGhC,OAAO,KAAK,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAE3E,eAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,QAAA,MAAM,YAAY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