@base44-preview/cli 0.3.6-pr.706.15dfd19 → 0.3.6-pr.707.41f83a6
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 +28 -11
- package/dist/cli/index.js.map +10 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -225898,6 +225898,7 @@ var ProjectConfigSchema = object({
|
|
|
225898
225898
|
actorsDir: string2().optional().default("actors"),
|
|
225899
225899
|
agentsDir: string2().optional().default("agents"),
|
|
225900
225900
|
agentSkillsDir: string2().optional().default("agent-skills"),
|
|
225901
|
+
workflowsDir: string2().optional().default("workflows"),
|
|
225901
225902
|
connectorsDir: string2().optional().default("connectors"),
|
|
225902
225903
|
authDir: string2().optional().default("auth"),
|
|
225903
225904
|
plugin: PluginMetadataSchema.optional(),
|
|
@@ -225957,10 +225958,6 @@ var DEFAULT_API_URL = "https://app.base44.com";
|
|
|
225957
225958
|
function getBase44ApiUrl() {
|
|
225958
225959
|
return process.env.BASE44_API_URL || DEFAULT_API_URL;
|
|
225959
225960
|
}
|
|
225960
|
-
function getAppsBackendUrl() {
|
|
225961
|
-
const apiUrl = getBase44ApiUrl();
|
|
225962
|
-
return apiUrl === DEFAULT_API_URL ? "https://base44.app" : apiUrl;
|
|
225963
|
-
}
|
|
225964
225961
|
function getTestOverrides() {
|
|
225965
225962
|
const raw = process.env.BASE44_CLI_TEST_OVERRIDES;
|
|
225966
225963
|
if (!raw) {
|
|
@@ -247177,6 +247174,7 @@ async function resolveBuildTarget(projectRoot, overrides = {}) {
|
|
|
247177
247174
|
entitiesDir: project?.entitiesDir ?? "entities",
|
|
247178
247175
|
agentsDir: project?.agentsDir ?? "agents",
|
|
247179
247176
|
agentSkillsDir: project?.agentSkillsDir ?? "agent-skills",
|
|
247177
|
+
workflowsDir: project?.workflowsDir ?? "workflows",
|
|
247180
247178
|
functionsDir: project?.functionsDir ?? "functions",
|
|
247181
247179
|
actorsDir: project?.actorsDir ?? "actors"
|
|
247182
247180
|
};
|
|
@@ -253016,6 +253014,7 @@ async function createVersion(artifacts, options = {}) {
|
|
|
253016
253014
|
agents: artifacts.agents,
|
|
253017
253015
|
mcp_config: artifacts.mcpConfig,
|
|
253018
253016
|
agent_skills: artifacts.agentSkills,
|
|
253017
|
+
workflows: artifacts.workflows,
|
|
253019
253018
|
...artifacts.routes ? { routes: declaredRoutes(artifacts.routes) } : {},
|
|
253020
253019
|
source_commit: options.sourceCommit
|
|
253021
253020
|
}, "declaring a version")).json(), "declare");
|
|
@@ -265072,6 +265071,22 @@ async function readRawResources(dir) {
|
|
|
265072
265071
|
}
|
|
265073
265072
|
return payloads;
|
|
265074
265073
|
}
|
|
265074
|
+
async function readWorkflowFiles(dir) {
|
|
265075
|
+
if (!await pathExists(dir)) {
|
|
265076
|
+
return {};
|
|
265077
|
+
}
|
|
265078
|
+
const files = await globby(`*.${CONFIG_FILE_EXTENSION}`, {
|
|
265079
|
+
cwd: dir,
|
|
265080
|
+
onlyFiles: true,
|
|
265081
|
+
followSymbolicLinks: false,
|
|
265082
|
+
dot: true
|
|
265083
|
+
});
|
|
265084
|
+
const workflows = {};
|
|
265085
|
+
for (const file of files.sort()) {
|
|
265086
|
+
workflows[file.slice(0, -`.${CONFIG_FILE_EXTENSION}`.length)] = await readJsonFile(join31(dir, file));
|
|
265087
|
+
}
|
|
265088
|
+
return workflows;
|
|
265089
|
+
}
|
|
265075
265090
|
async function readMcpConfig(configDir) {
|
|
265076
265091
|
const path = join31(configDir, "mcp", "config.json");
|
|
265077
265092
|
return await pathExists(path) ? await readTextFile(path) : "";
|
|
@@ -265092,13 +265107,14 @@ async function readAgentSkillFiles(dir) {
|
|
|
265092
265107
|
return skills;
|
|
265093
265108
|
}
|
|
265094
265109
|
async function collectResources(configDir, dirs) {
|
|
265095
|
-
const [entities, agents, mcpConfig, agentSkills] = await Promise.all([
|
|
265110
|
+
const [entities, agents, mcpConfig, agentSkills, workflows] = await Promise.all([
|
|
265096
265111
|
readRawResources(join31(configDir, dirs.entitiesDir)),
|
|
265097
265112
|
readRawResources(join31(configDir, dirs.agentsDir)),
|
|
265098
265113
|
readMcpConfig(configDir),
|
|
265099
|
-
readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir))
|
|
265114
|
+
readAgentSkillFiles(join31(configDir, dirs.agentSkillsDir)),
|
|
265115
|
+
readWorkflowFiles(join31(configDir, dirs.workflowsDir))
|
|
265100
265116
|
]);
|
|
265101
|
-
return { entities, agents, mcpConfig, agentSkills };
|
|
265117
|
+
return { entities, agents, mcpConfig, agentSkills, workflows };
|
|
265102
265118
|
}
|
|
265103
265119
|
async function collectArtifacts(target, options = {}) {
|
|
265104
265120
|
const built = await resolveFullStackBuild(target.root);
|
|
@@ -270981,6 +270997,7 @@ class WatchBase44 extends EventEmitter4 {
|
|
|
270981
270997
|
|
|
270982
270998
|
// src/cli/dev/dev-server/main.ts
|
|
270983
270999
|
var DEFAULT_PORT = 4400;
|
|
271000
|
+
var BASE44_APP_URL = "https://base44.app";
|
|
270984
271001
|
async function createDevServer(options) {
|
|
270985
271002
|
const { port: userPort } = options;
|
|
270986
271003
|
const port = userPort ?? await getPorts({
|
|
@@ -270990,7 +271007,7 @@ async function createDevServer(options) {
|
|
|
270990
271007
|
const { functions, entities, project, siteUrl } = await options.loadResources();
|
|
270991
271008
|
const app = import_express6.default();
|
|
270992
271009
|
const remoteProxy = import_http_proxy_middleware2.createProxyMiddleware({
|
|
270993
|
-
target:
|
|
271010
|
+
target: BASE44_APP_URL,
|
|
270994
271011
|
changeOrigin: true
|
|
270995
271012
|
});
|
|
270996
271013
|
app.use(import_cors.default({
|
|
@@ -271000,7 +271017,7 @@ async function createDevServer(options) {
|
|
|
271000
271017
|
const AUTH_ROUTE_PATTERN = /^\/api\/apps\/auth(\/|$)/;
|
|
271001
271018
|
app.use((req, res, next) => {
|
|
271002
271019
|
if (AUTH_ROUTE_PATTERN.test(req.path)) {
|
|
271003
|
-
const targetUrl = new URL(req.originalUrl,
|
|
271020
|
+
const targetUrl = new URL(req.originalUrl, BASE44_APP_URL);
|
|
271004
271021
|
return res.redirect(targetUrl.toString());
|
|
271005
271022
|
}
|
|
271006
271023
|
next();
|
|
@@ -271307,7 +271324,7 @@ function inheritedEnv() {
|
|
|
271307
271324
|
}
|
|
271308
271325
|
return env;
|
|
271309
271326
|
}
|
|
271310
|
-
var appPreviewUrl = (appId) =>
|
|
271327
|
+
var appPreviewUrl = (appId) => `https://preview--${appId}.base44.app`;
|
|
271311
271328
|
async function resolveAppBaseUrl(appId) {
|
|
271312
271329
|
try {
|
|
271313
271330
|
return await getSiteUrl();
|
|
@@ -275663,4 +275680,4 @@ export {
|
|
|
275663
275680
|
runCLI
|
|
275664
275681
|
};
|
|
275665
275682
|
|
|
275666
|
-
//# debugId=
|
|
275683
|
+
//# debugId=AB7FE5EE4631966564756E2164756E21
|