@base44-preview/cli 0.1.5-pr.575.c55cbe2 → 0.1.5-pr.576.58ab8ee
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/bin/binary-entry.ts +6 -2
- package/dist/assets/backend-runtime/base44-runtime.ts +62 -0
- package/dist/assets/backend-runtime/import-map.json +5 -0
- package/dist/assets/backend-runtime/main.ts +169 -0
- package/dist/assets/templates/backend-and-client/base44/agents/task_manager.jsonc +0 -1
- package/dist/cli/index.js +692 -908
- package/dist/cli/index.js.map +12 -19
- package/package.json +1 -1
- package/dist/assets/deno-runtime/main.ts +0 -80
- package/dist/assets/templates/backend-and-client/base44/agent-skills/weekly-report.md +0 -8
- /package/dist/assets/{deno-runtime → backend-runtime}/exec.ts +0 -0
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deno Function Wrapper
|
|
3
|
-
*
|
|
4
|
-
* This script is executed by Deno to run user functions.
|
|
5
|
-
* It patches Deno.serve to inject a dynamic port before importing the user's function.
|
|
6
|
-
*
|
|
7
|
-
* Environment variables:
|
|
8
|
-
* - FUNCTION_PATH: Absolute path to the user's function entry file
|
|
9
|
-
* - FUNCTION_PORT: Port number for the function to listen on
|
|
10
|
-
* - FUNCTION_NAME: Name of the function (for logging)
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
// Make this file a module for top-level await support
|
|
14
|
-
export {};
|
|
15
|
-
|
|
16
|
-
const functionPath = Deno.env.get("FUNCTION_PATH");
|
|
17
|
-
const port = parseInt(Deno.env.get("FUNCTION_PORT") || "8000", 10);
|
|
18
|
-
const functionName = Deno.env.get("FUNCTION_NAME") || "unknown";
|
|
19
|
-
|
|
20
|
-
if (!functionPath) {
|
|
21
|
-
console.error("[wrapper] FUNCTION_PATH environment variable is required");
|
|
22
|
-
Deno.exit(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Store the original Deno.serve
|
|
26
|
-
const originalServe = Deno.serve.bind(Deno);
|
|
27
|
-
|
|
28
|
-
// Patch Deno.serve to inject our port and add onListen callback.
|
|
29
|
-
const patchedServe = (
|
|
30
|
-
optionsOrHandler:
|
|
31
|
-
| Deno.ServeOptions
|
|
32
|
-
| Deno.ServeHandler
|
|
33
|
-
| (Deno.ServeOptions & { handler: Deno.ServeHandler }),
|
|
34
|
-
maybeHandler?: Deno.ServeHandler,
|
|
35
|
-
): Deno.HttpServer<Deno.NetAddr> => {
|
|
36
|
-
const onListen = () => {
|
|
37
|
-
// This message is used by FunctionManager to detect when the function is ready
|
|
38
|
-
console.log(`[${functionName}] Listening on http://localhost:${port}`);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// Handle the different Deno.serve signatures:
|
|
42
|
-
// 1. Deno.serve(handler)
|
|
43
|
-
// 2. Deno.serve(options, handler)
|
|
44
|
-
// 3. Deno.serve({ ...options, handler })
|
|
45
|
-
if (typeof optionsOrHandler === "function") {
|
|
46
|
-
// Signature: Deno.serve(handler)
|
|
47
|
-
return originalServe({ port, onListen }, optionsOrHandler);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (maybeHandler) {
|
|
51
|
-
// Signature: Deno.serve(options, handler)
|
|
52
|
-
return originalServe({ ...optionsOrHandler, port, onListen }, maybeHandler);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Signature: Deno.serve({ ...options, handler })
|
|
56
|
-
const options = optionsOrHandler as Deno.ServeOptions & {
|
|
57
|
-
handler: Deno.ServeHandler;
|
|
58
|
-
};
|
|
59
|
-
return originalServe({ ...options, port, onListen });
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Deno 2.8 exposes `Deno.serve` as a getter-only property, so a plain
|
|
63
|
-
// `Deno.serve = ...` assignment throws. Use defineProperty to override it
|
|
64
|
-
// (works on both the old writable property and the new accessor).
|
|
65
|
-
Object.defineProperty(Deno, "serve", {
|
|
66
|
-
value: patchedServe,
|
|
67
|
-
writable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
console.log(`[${functionName}] Starting function from ${functionPath}`);
|
|
72
|
-
|
|
73
|
-
// Dynamically import the user's function
|
|
74
|
-
// The function will call Deno.serve which is now patched to use our port
|
|
75
|
-
try {
|
|
76
|
-
await import(functionPath);
|
|
77
|
-
} catch (error) {
|
|
78
|
-
console.error(`[${functionName}] Failed to load function:`, error);
|
|
79
|
-
Deno.exit(1);
|
|
80
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Summarize the week's completed tasks grouped by assignee.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
When the user asks for a weekly report:
|
|
6
|
-
1. Read all Tasks completed in the last 7 days.
|
|
7
|
-
2. Group them by assignee and count done vs. carried-over.
|
|
8
|
-
3. Return a short markdown table, newest first.
|
|
File without changes
|