@base44-preview/cli 0.1.1-pr.555.d5bd4a4 → 0.1.1-pr.555.f184656
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 +26 -18
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -163944,7 +163944,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
163944
163944
|
var debug = require_src4()("express:view");
|
|
163945
163945
|
var path18 = __require("node:path");
|
|
163946
163946
|
var fs28 = __require("node:fs");
|
|
163947
|
-
var
|
|
163947
|
+
var dirname22 = path18.dirname;
|
|
163948
163948
|
var basename7 = path18.basename;
|
|
163949
163949
|
var extname2 = path18.extname;
|
|
163950
163950
|
var join26 = path18.join;
|
|
@@ -163983,7 +163983,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
163983
163983
|
for (var i5 = 0;i5 < roots.length && !path19; i5++) {
|
|
163984
163984
|
var root2 = roots[i5];
|
|
163985
163985
|
var loc = resolve12(root2, name2);
|
|
163986
|
-
var dir =
|
|
163986
|
+
var dir = dirname22(loc);
|
|
163987
163987
|
var file2 = basename7(loc);
|
|
163988
163988
|
path19 = this.resolve(dir, file2);
|
|
163989
163989
|
}
|
|
@@ -234018,7 +234018,7 @@ function normalizeBase44Env() {
|
|
|
234018
234018
|
loadProjectEnvFiles();
|
|
234019
234019
|
|
|
234020
234020
|
// src/cli/index.ts
|
|
234021
|
-
import { dirname as
|
|
234021
|
+
import { dirname as dirname26, join as join29 } from "node:path";
|
|
234022
234022
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
234023
234023
|
|
|
234024
234024
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
@@ -254138,15 +254138,23 @@ function getDeployCommand3() {
|
|
|
254138
254138
|
}
|
|
254139
254139
|
|
|
254140
254140
|
// src/cli/commands/realtime/new.ts
|
|
254141
|
-
import { join as join22 } from "node:path";
|
|
254141
|
+
import { dirname as dirname19, join as join22 } from "node:path";
|
|
254142
254142
|
function buildHandlerScaffold(handlerName) {
|
|
254143
|
-
return `import { RealtimeHandler, type Conn } from "base44";
|
|
254143
|
+
return `import { RealtimeHandler, type Conn } from "@base44/sdk";
|
|
254144
254144
|
|
|
254145
|
-
|
|
254145
|
+
interface State {
|
|
254146
|
+
// shared state broadcast to all clients
|
|
254147
|
+
}
|
|
254148
|
+
|
|
254149
|
+
interface Message {
|
|
254150
|
+
// messages sent from clients
|
|
254151
|
+
}
|
|
254152
|
+
|
|
254153
|
+
export class ${handlerName} extends RealtimeHandler<State, Message> {
|
|
254146
254154
|
handleConnect(conn: Conn) {
|
|
254147
254155
|
console.log("Connected:", conn.userId);
|
|
254148
254156
|
}
|
|
254149
|
-
handleMessage(conn: Conn, msg:
|
|
254157
|
+
handleMessage(conn: Conn, msg: Message) {
|
|
254150
254158
|
console.log("Message:", msg);
|
|
254151
254159
|
}
|
|
254152
254160
|
handleTick() {}
|
|
@@ -254156,7 +254164,7 @@ export class ${handlerName} extends RealtimeHandler {
|
|
|
254156
254164
|
}
|
|
254157
254165
|
async function newRealtimeHandlerAction(_ctx, handlerName) {
|
|
254158
254166
|
const { project: project2 } = await readProjectConfig();
|
|
254159
|
-
const realtimeDir = join22(project2.
|
|
254167
|
+
const realtimeDir = join22(dirname19(project2.configPath), project2.realtimeDir);
|
|
254160
254168
|
const handlerDir = join22(realtimeDir, handlerName);
|
|
254161
254169
|
if (await pathExists(handlerDir)) {
|
|
254162
254170
|
throw new InvalidInputError(`Realtime handler "${handlerName}" already exists at ${handlerDir}`);
|
|
@@ -254785,7 +254793,7 @@ function getTypesCommand() {
|
|
|
254785
254793
|
// src/cli/dev/dev-server/main.ts
|
|
254786
254794
|
var import_cors = __toESM(require_lib4(), 1);
|
|
254787
254795
|
var import_express6 = __toESM(require_express(), 1);
|
|
254788
|
-
import { dirname as
|
|
254796
|
+
import { dirname as dirname24, join as join28 } from "node:path";
|
|
254789
254797
|
|
|
254790
254798
|
// ../../node_modules/get-port/index.js
|
|
254791
254799
|
import net from "node:net";
|
|
@@ -257143,9 +257151,9 @@ class NodeFsHandler {
|
|
|
257143
257151
|
if (this.fsw.closed) {
|
|
257144
257152
|
return;
|
|
257145
257153
|
}
|
|
257146
|
-
const
|
|
257154
|
+
const dirname23 = sp2.dirname(file2);
|
|
257147
257155
|
const basename8 = sp2.basename(file2);
|
|
257148
|
-
const parent = this.fsw._getWatchedDir(
|
|
257156
|
+
const parent = this.fsw._getWatchedDir(dirname23);
|
|
257149
257157
|
let prevStats = stats;
|
|
257150
257158
|
if (parent.has(basename8))
|
|
257151
257159
|
return;
|
|
@@ -257172,7 +257180,7 @@ class NodeFsHandler {
|
|
|
257172
257180
|
prevStats = newStats2;
|
|
257173
257181
|
}
|
|
257174
257182
|
} catch (error48) {
|
|
257175
|
-
this.fsw._remove(
|
|
257183
|
+
this.fsw._remove(dirname23, basename8);
|
|
257176
257184
|
}
|
|
257177
257185
|
} else if (parent.has(basename8)) {
|
|
257178
257186
|
const at13 = newStats.atimeMs;
|
|
@@ -258205,8 +258213,8 @@ async function createDevServer(options8) {
|
|
|
258205
258213
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
258206
258214
|
};
|
|
258207
258215
|
const base44ConfigWatcher = new WatchBase44({
|
|
258208
|
-
functions: join28(
|
|
258209
|
-
entities: join28(
|
|
258216
|
+
functions: join28(dirname24(project2.configPath), project2.functionsDir),
|
|
258217
|
+
entities: join28(dirname24(project2.configPath), project2.entitiesDir)
|
|
258210
258218
|
}, devLogger);
|
|
258211
258219
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
258212
258220
|
try {
|
|
@@ -258572,7 +258580,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
258572
258580
|
import { release, type } from "node:os";
|
|
258573
258581
|
|
|
258574
258582
|
// ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
258575
|
-
import { dirname as
|
|
258583
|
+
import { dirname as dirname25, posix, sep } from "path";
|
|
258576
258584
|
function createModulerModifier() {
|
|
258577
258585
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
258578
258586
|
return async (frames) => {
|
|
@@ -258581,7 +258589,7 @@ function createModulerModifier() {
|
|
|
258581
258589
|
return frames;
|
|
258582
258590
|
};
|
|
258583
258591
|
}
|
|
258584
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
258592
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname25(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
258585
258593
|
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
258586
258594
|
return (filename) => {
|
|
258587
258595
|
if (!filename)
|
|
@@ -262770,7 +262778,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
262770
262778
|
});
|
|
262771
262779
|
}
|
|
262772
262780
|
// src/cli/index.ts
|
|
262773
|
-
var __dirname4 =
|
|
262781
|
+
var __dirname4 = dirname26(fileURLToPath6(import.meta.url));
|
|
262774
262782
|
async function runCLI(options8) {
|
|
262775
262783
|
ensureNpmAssets(join29(__dirname4, "../assets"));
|
|
262776
262784
|
const errorReporter = new ErrorReporter;
|
|
@@ -262811,4 +262819,4 @@ export {
|
|
|
262811
262819
|
CLIExitError
|
|
262812
262820
|
};
|
|
262813
262821
|
|
|
262814
|
-
//# debugId=
|
|
262822
|
+
//# debugId=3D480857EA9CF9EE64756E2164756E21
|