@base44-preview/cli 0.3.1-pr.685.145f2be → 0.3.1-pr.691.71865f0

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 CHANGED
@@ -230773,6 +230773,7 @@ var ProjectConfigSchema = object({
230773
230773
  functionsDir: string2().optional().default("functions"),
230774
230774
  actorsDir: string2().optional().default("actors"),
230775
230775
  agentsDir: string2().optional().default("agents"),
230776
+ workflowsDir: string2().optional().default("workflows"),
230776
230777
  agentSkillsDir: string2().optional().default("agent-skills"),
230777
230778
  connectorsDir: string2().optional().default("connectors"),
230778
230779
  authDir: string2().optional().default("auth"),
@@ -238798,11 +238799,8 @@ async function fetchFunctionLogs(functionName, filters = {}) {
238798
238799
  }
238799
238800
  // src/core/resources/function/config.ts
238800
238801
  import { basename as basename4, dirname as dirname8, join as join10, relative as relative3, resolve as resolve2 } from "node:path";
238801
- function getSharedDir(functionsDir) {
238802
- return resolve2(functionsDir, "..", "shared");
238803
- }
238804
238802
  async function readSharedFiles(functionsDir) {
238805
- const sharedDir = getSharedDir(functionsDir);
238803
+ const sharedDir = resolve2(functionsDir, "..", "shared");
238806
238804
  if (!await pathExists(sharedDir)) {
238807
238805
  return [];
238808
238806
  }
@@ -247061,6 +247059,7 @@ async function resolveBuildTarget(projectRoot, overrides = {}) {
247061
247059
  outputDir: resolve6(root, overrides.outputDir ?? site.outputDirectory ?? DEFAULT_SITE.outputDirectory),
247062
247060
  entitiesDir: project?.entitiesDir ?? "entities",
247063
247061
  agentsDir: project?.agentsDir ?? "agents",
247062
+ workflowsDir: project?.workflowsDir ?? "workflows",
247064
247063
  functionsDir: project?.functionsDir ?? "functions",
247065
247064
  actorsDir: project?.actorsDir ?? "actors"
247066
247065
  };
@@ -252865,6 +252864,7 @@ async function createVersion(artifacts, options = {}) {
252865
252864
  actors: artifacts.actors.map(declaredActor),
252866
252865
  entities: artifacts.entities,
252867
252866
  agents: artifacts.agents,
252867
+ workflows: artifacts.workflows,
252868
252868
  source_commit: options.sourceCommit
252869
252869
  }, "declaring a version")).json(), "declare");
252870
252870
  const declaredFiles = [
@@ -264524,14 +264524,16 @@ async function describeSiteWorker(built) {
264524
264524
  servingConfig: config.assetsConfig
264525
264525
  };
264526
264526
  }
264527
- async function readRawResources(dir) {
264527
+ async function readRawResources(dir, options = {}) {
264528
264528
  if (!await pathExists(dir)) {
264529
264529
  return {};
264530
264530
  }
264531
- const files = await globby(`**/*.${CONFIG_FILE_EXTENSION_GLOB}`, {
264531
+ const extensions = options.extensions ?? CONFIG_FILE_EXTENSION_GLOB;
264532
+ const files = await globby(`**/*.${extensions}`, {
264532
264533
  cwd: dir,
264533
264534
  onlyFiles: true,
264534
- followSymbolicLinks: false
264535
+ followSymbolicLinks: false,
264536
+ dot: options.dot ?? false
264535
264537
  });
264536
264538
  const payloads = {};
264537
264539
  for (const relativePath of files.sort()) {
@@ -264541,11 +264543,15 @@ async function readRawResources(dir) {
264541
264543
  return payloads;
264542
264544
  }
264543
264545
  async function collectResources(configDir, dirs) {
264544
- const [entities, agents] = await Promise.all([
264546
+ const [entities, agents, workflows] = await Promise.all([
264545
264547
  readRawResources(join30(configDir, dirs.entitiesDir)),
264546
- readRawResources(join30(configDir, dirs.agentsDir))
264548
+ readRawResources(join30(configDir, dirs.agentsDir)),
264549
+ readRawResources(join30(configDir, dirs.workflowsDir), {
264550
+ extensions: CONFIG_FILE_EXTENSION,
264551
+ dot: true
264552
+ })
264547
264553
  ]);
264548
- return { entities, agents };
264554
+ return { entities, agents, workflows };
264549
264555
  }
264550
264556
  async function collectArtifacts(target) {
264551
264557
  const built = await resolveFullStackBuild(target.root);
@@ -270473,16 +270479,14 @@ async function createDevServer(options) {
270473
270479
  emitEntityEvent = (appId, entityName, event) => {
270474
270480
  broadcastEntityEvent(io, appId, entityName, event);
270475
270481
  };
270476
- const functionsDir = join40(dirname29(project.configPath), project.functionsDir);
270477
270482
  const base44ConfigWatcher = new WatchBase44({
270478
- functions: functionsDir,
270479
- shared: getSharedDir(functionsDir),
270483
+ functions: join40(dirname29(project.configPath), project.functionsDir),
270480
270484
  entities: join40(dirname29(project.configPath), project.entitiesDir)
270481
270485
  }, devLogger);
270482
270486
  base44ConfigWatcher.on("change", async (name) => {
270483
270487
  try {
270484
270488
  const { functions, entities } = await options.loadResources();
270485
- if (name === "functions" || name === "shared") {
270489
+ if (name === "functions") {
270486
270490
  const previousFunctionCount = functionManager.getFunctionNames().length;
270487
270491
  await functionManager.reload(functions);
270488
270492
  const names = functionManager.getFunctionNames();
@@ -275047,4 +275051,4 @@ export {
275047
275051
  runCLI
275048
275052
  };
275049
275053
 
275050
- //# debugId=B298C98845AB73BC64756E2164756E21
275054
+ //# debugId=CA94D7FB74D2100F64756E2164756E21