@donkeylabs/server 0.1.0

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.
@@ -0,0 +1,25 @@
1
+ import { createPlugin } from "@donkeylabs/server";
2
+ // import type { DB as {{PascalName}}Schema } from "./schema";
3
+
4
+ export interface {{PascalName}}Service {
5
+ // Define your service interface here
6
+ getData(): Promise<string>;
7
+ }
8
+
9
+ export const {{camelName}}Plugin = createPlugin
10
+ // .withSchema<{{PascalName}}Schema>() // Uncomment if using database schema
11
+ .define({
12
+ name: "{{name}}",
13
+ version: "1.0.0",
14
+ // dependencies: ["otherPlugin"] as const, // Uncomment if depending on other plugins
15
+
16
+ service: async (ctx): Promise<{{PascalName}}Service> => {
17
+ console.log("[{{PascalName}}Plugin] Initializing...");
18
+
19
+ return {
20
+ getData: async () => {
21
+ return "Hello from {{name}} plugin!";
22
+ },
23
+ };
24
+ },
25
+ });