@deessejs/functions 0.0.38 → 0.0.40
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/context/define.js +9 -11
- package/dist/extensions/rpc.d.ts +1 -0
- package/dist/extensions/rpc.js +2 -0
- package/package.json +1 -1
package/dist/context/define.js
CHANGED
|
@@ -5,19 +5,17 @@ exports.defineContext = defineContext;
|
|
|
5
5
|
function defineContext() {
|
|
6
6
|
return {
|
|
7
7
|
withExtensions: (config) => {
|
|
8
|
-
//
|
|
9
|
-
const
|
|
10
|
-
|
|
8
|
+
// Créer un contexte avec un type explicite
|
|
9
|
+
const contextWithType = {};
|
|
10
|
+
// Appliquer les extensions manuellement pour préserver les types
|
|
11
|
+
const result = {
|
|
12
|
+
context: contextWithType,
|
|
13
|
+
};
|
|
11
14
|
for (const extension of config.extensions) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Object.assign(runtimeBuilder, extensionMethods);
|
|
15
|
+
const methods = extension.functions(contextWithType);
|
|
16
|
+
Object.assign(result, methods);
|
|
15
17
|
}
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
...runtimeBuilder,
|
|
19
|
-
context: {},
|
|
20
|
-
};
|
|
18
|
+
return result;
|
|
21
19
|
},
|
|
22
20
|
};
|
|
23
21
|
}
|
package/dist/extensions/rpc.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ export declare const rpc: import("./types").Extension<undefined, Record<string,
|
|
|
16
16
|
handler: (ctx: C, args: z.infer<TArgs>) => AsyncResult<TOutput_1, TError_1>;
|
|
17
17
|
}) => MutationDefinition<C, TArgs, TOutput_1, TError_1>;
|
|
18
18
|
group: <T extends Record<string, APINode>>(definitions: T) => T;
|
|
19
|
+
_contextType: C;
|
|
19
20
|
}>;
|
package/dist/extensions/rpc.js
CHANGED
package/package.json
CHANGED