@base44-preview/cli 0.2.6-pr.684.c1fb02f → 0.2.6-pr.685.636d588
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/cli/index.js +9 -4
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -238778,8 +238778,11 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
238778
238778
|
}
|
|
238779
238779
|
// src/core/resources/function/config.ts
|
|
238780
238780
|
import { basename as basename4, dirname as dirname8, join as join10, relative as relative3, resolve as resolve2 } from "node:path";
|
|
238781
|
+
function getSharedDir(functionsDir) {
|
|
238782
|
+
return resolve2(functionsDir, "..", "shared");
|
|
238783
|
+
}
|
|
238781
238784
|
async function readSharedFiles(functionsDir) {
|
|
238782
|
-
const sharedDir =
|
|
238785
|
+
const sharedDir = getSharedDir(functionsDir);
|
|
238783
238786
|
if (!await pathExists(sharedDir)) {
|
|
238784
238787
|
return [];
|
|
238785
238788
|
}
|
|
@@ -270224,14 +270227,16 @@ async function createDevServer(options) {
|
|
|
270224
270227
|
emitEntityEvent = (appId, entityName, event) => {
|
|
270225
270228
|
broadcastEntityEvent(io, appId, entityName, event);
|
|
270226
270229
|
};
|
|
270230
|
+
const functionsDir = join40(dirname29(project.configPath), project.functionsDir);
|
|
270227
270231
|
const base44ConfigWatcher = new WatchBase44({
|
|
270228
|
-
functions:
|
|
270232
|
+
functions: functionsDir,
|
|
270233
|
+
shared: getSharedDir(functionsDir),
|
|
270229
270234
|
entities: join40(dirname29(project.configPath), project.entitiesDir)
|
|
270230
270235
|
}, devLogger);
|
|
270231
270236
|
base44ConfigWatcher.on("change", async (name) => {
|
|
270232
270237
|
try {
|
|
270233
270238
|
const { functions, entities } = await options.loadResources();
|
|
270234
|
-
if (name === "functions") {
|
|
270239
|
+
if (name === "functions" || name === "shared") {
|
|
270235
270240
|
const previousFunctionCount = functionManager.getFunctionNames().length;
|
|
270236
270241
|
await functionManager.reload(functions);
|
|
270237
270242
|
const names = functionManager.getFunctionNames();
|
|
@@ -274796,4 +274801,4 @@ export {
|
|
|
274796
274801
|
runCLI
|
|
274797
274802
|
};
|
|
274798
274803
|
|
|
274799
|
-
//# debugId=
|
|
274804
|
+
//# debugId=A4D22590EC0FD45564756E2164756E21
|