@base44-preview/cli 0.0.38-pr.362.72930b8 → 0.0.38-pr.362.74cb80f

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.
Files changed (32) hide show
  1. package/bin/binary-entry.ts +40 -0
  2. package/dist/{deno-runtime → assets/deno-runtime}/main.js.map +1 -1
  3. package/dist/cli/index.js +59 -59
  4. package/dist/cli/index.js.map +11 -12
  5. package/package.json +4 -3
  6. /package/dist/{deno-runtime → assets/deno-runtime}/main.js +0 -0
  7. /package/dist/{templates → assets/templates}/backend-and-client/.nvmrc +0 -0
  8. /package/dist/{templates → assets/templates}/backend-and-client/README.md +0 -0
  9. /package/dist/{templates → assets/templates}/backend-and-client/base44/agents/task_manager.jsonc +0 -0
  10. /package/dist/{templates → assets/templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
  11. /package/dist/{templates → assets/templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
  12. /package/dist/{templates → assets/templates}/backend-and-client/base44/entities/task.jsonc +0 -0
  13. /package/dist/{templates → assets/templates}/backend-and-client/components.json +0 -0
  14. /package/dist/{templates → assets/templates}/backend-and-client/gitignore.ejs +0 -0
  15. /package/dist/{templates → assets/templates}/backend-and-client/index.html +0 -0
  16. /package/dist/{templates → assets/templates}/backend-and-client/jsconfig.json +0 -0
  17. /package/dist/{templates → assets/templates}/backend-and-client/package.json +0 -0
  18. /package/dist/{templates → assets/templates}/backend-and-client/postcss.config.js +0 -0
  19. /package/dist/{templates → assets/templates}/backend-and-client/src/App.jsx +0 -0
  20. /package/dist/{templates → assets/templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
  21. /package/dist/{templates → assets/templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
  22. /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/button.jsx +0 -0
  23. /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
  24. /package/dist/{templates → assets/templates}/backend-and-client/src/components/ui/input.jsx +0 -0
  25. /package/dist/{templates → assets/templates}/backend-and-client/src/index.css +0 -0
  26. /package/dist/{templates → assets/templates}/backend-and-client/src/main.jsx +0 -0
  27. /package/dist/{templates → assets/templates}/backend-and-client/tailwind.config.js +0 -0
  28. /package/dist/{templates → assets/templates}/backend-and-client/vite.config.js +0 -0
  29. /package/dist/{templates → assets/templates}/backend-only/base44/app.jsonc.ejs +0 -0
  30. /package/dist/{templates → assets/templates}/backend-only/base44/config.jsonc.ejs +0 -0
  31. /package/dist/{templates → assets/templates}/backend-only/base44/gitignore.ejs +0 -0
  32. /package/dist/{templates → assets/templates}/templates.json +0 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Entry point for standalone compiled binaries (built with `bun build --compile`).
3
+ *
4
+ * This file embeds a single assets tarball (templates + deno-runtime) into the
5
+ * binary and extracts it to ~/.base44/assets/<version>/ on first run.
6
+ * The npm distribution uses bin/run.js instead — this file is only used
7
+ * for the compiled binary path.
8
+ */
9
+ import { existsSync, mkdirSync } from "node:fs";
10
+ import { homedir } from "node:os";
11
+ import { join } from "node:path";
12
+ // Bun embeds this file into the compiled binary.
13
+ // At runtime, it resolves to a path inside the $bunfs virtual filesystem.
14
+ // Only Bun.file() can read these paths — Node.js fs APIs and external
15
+ // processes cannot access them directly.
16
+ // @ts-expect-error -- import attributes with type "file" are a Bun-specific feature
17
+ import assetsTarball from "../dist/assets.tar.gz" with { type: "file" };
18
+ import packageJson from "../package.json";
19
+
20
+ const VERSION = packageJson.version;
21
+
22
+ const assetsDir = join(homedir(), ".base44", "assets", VERSION);
23
+
24
+ // Extract assets if this version hasn't been unpacked yet.
25
+ // Bun.file() reads from the virtual $bunfs, then we write to real disk
26
+ // so the rest of the CLI can access these files normally.
27
+ if (!existsSync(assetsDir)) {
28
+ mkdirSync(assetsDir, { recursive: true });
29
+ const bytes = await Bun.file(assetsTarball).bytes();
30
+ const archive = new Bun.Archive(bytes);
31
+ await archive.extract(assetsDir);
32
+ }
33
+
34
+ // Disable Clack spinners and animations in non-interactive environments.
35
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
36
+ process.env.CI = "true";
37
+ }
38
+
39
+ const { runCLI } = await import("../src/cli/index.js");
40
+ await runCLI({ assetsDir });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../deno-runtime/main.ts"],
3
+ "sources": ["../../../deno-runtime/main.ts"],
4
4
  "sourcesContent": [
5
5
  "/**\n * Deno Function Wrapper\n *\n * This script is executed by Deno to run user functions.\n * It patches Deno.serve to inject a dynamic port before importing the user's function.\n *\n * Environment variables:\n * - FUNCTION_PATH: Absolute path to the user's function entry file\n * - FUNCTION_PORT: Port number for the function to listen on\n * - FUNCTION_NAME: Name of the function (for logging)\n */\n\n// Make this file a module for top-level await support\nexport {};\n\nconst functionPath = Deno.env.get(\"FUNCTION_PATH\");\nconst port = parseInt(Deno.env.get(\"FUNCTION_PORT\") || \"8000\", 10);\nconst functionName = Deno.env.get(\"FUNCTION_NAME\") || \"unknown\";\n\nif (!functionPath) {\n console.error(\"[wrapper] FUNCTION_PATH environment variable is required\");\n Deno.exit(1);\n}\n\n// Store the original Deno.serve\nconst originalServe = Deno.serve.bind(Deno);\n\n// Patch Deno.serve to inject our port and add onListen callback\n// @ts-expect-error - We're intentionally overriding Deno.serve\nDeno.serve = (\n optionsOrHandler:\n | Deno.ServeOptions\n | Deno.ServeHandler\n | (Deno.ServeOptions & { handler: Deno.ServeHandler }),\n maybeHandler?: Deno.ServeHandler,\n): Deno.HttpServer<Deno.NetAddr> => {\n const onListen = () => {\n // This message is used by FunctionManager to detect when the function is ready\n console.log(`[${functionName}] Listening on http://localhost:${port}`);\n };\n\n // Handle the different Deno.serve signatures:\n // 1. Deno.serve(handler)\n // 2. Deno.serve(options, handler)\n // 3. Deno.serve({ ...options, handler })\n if (typeof optionsOrHandler === \"function\") {\n // Signature: Deno.serve(handler)\n return originalServe({ port, onListen }, optionsOrHandler);\n }\n\n if (maybeHandler) {\n // Signature: Deno.serve(options, handler)\n return originalServe({ ...optionsOrHandler, port, onListen }, maybeHandler);\n }\n\n // Signature: Deno.serve({ ...options, handler })\n const options = optionsOrHandler as Deno.ServeOptions & {\n handler: Deno.ServeHandler;\n };\n return originalServe({ ...options, port, onListen });\n};\n\nconsole.log(`[${functionName}] Starting function from ${functionPath}`);\n\n// Dynamically import the user's function\n// The function will call Deno.serve which is now patched to use our port\ntry {\n await import(functionPath);\n} catch (error) {\n console.error(`[${functionName}] Failed to load function:`, error);\n Deno.exit(1);\n}\n"
6
6
  ],
package/dist/cli/index.js CHANGED
@@ -206944,7 +206944,7 @@ var require_buffer_list = __commonJS((exports, module) => {
206944
206944
  }
206945
206945
  }, {
206946
206946
  key: "join",
206947
- value: function join16(s5) {
206947
+ value: function join15(s5) {
206948
206948
  if (this.length === 0)
206949
206949
  return "";
206950
206950
  var p4 = this.head;
@@ -226140,12 +226140,6 @@ import { homedir } from "node:os";
226140
226140
  import { dirname, join } from "node:path";
226141
226141
  import { fileURLToPath } from "node:url";
226142
226142
 
226143
- // src/core/assets.ts
226144
- var assetsDir;
226145
- function getAssetsDir() {
226146
- return assetsDir;
226147
- }
226148
-
226149
226143
  // src/core/consts.ts
226150
226144
  var PROJECT_SUBDIR = "base44";
226151
226145
  var CONFIG_FILE_EXTENSION = "jsonc";
@@ -226223,14 +226217,18 @@ function getBase44GlobalDir() {
226223
226217
  function getAuthFilePath() {
226224
226218
  return join(getBase44GlobalDir(), "auth", "auth.json");
226225
226219
  }
226226
- function getTemplatesDir() {
226227
- const assets = getAssetsDir();
226228
- if (assets)
226229
- return join(assets, "templates");
226230
- return join(__dirname2, "../templates");
226220
+ function getTemplatesDir(assetsDir) {
226221
+ if (assetsDir)
226222
+ return join(assetsDir, "templates");
226223
+ return join(__dirname2, "../assets/templates");
226224
+ }
226225
+ function getTemplatesIndexPath(assetsDir) {
226226
+ return join(getTemplatesDir(assetsDir), "templates.json");
226231
226227
  }
226232
- function getTemplatesIndexPath() {
226233
- return join(getTemplatesDir(), "templates.json");
226228
+ function getDenoWrapperPath(assetsDir) {
226229
+ if (assetsDir)
226230
+ return join(assetsDir, "deno-runtime", "main.js");
226231
+ return join(__dirname2, "../assets/deno-runtime/main.js");
226234
226232
  }
226235
226233
  function getAppConfigPath(projectRoot) {
226236
226234
  return join(projectRoot, PROJECT_SUBDIR, ".app.jsonc");
@@ -234233,16 +234231,17 @@ async function readAppConfig(projectRoot) {
234233
234231
  var import_ejs = __toESM(require_ejs(), 1);
234234
234232
  var import_front_matter = __toESM(require_front_matter(), 1);
234235
234233
  import { dirname as dirname7, join as join7 } from "node:path";
234236
- async function listTemplates() {
234237
- const parsed = await readJsonFile(getTemplatesIndexPath());
234234
+ async function listTemplates(assetsDir) {
234235
+ const indexPath = getTemplatesIndexPath(assetsDir);
234236
+ const parsed = await readJsonFile(indexPath);
234238
234237
  const result = TemplatesConfigSchema.safeParse(parsed);
234239
234238
  if (!result.success) {
234240
- throw new SchemaValidationError("Invalid templates configuration", result.error, getTemplatesIndexPath());
234239
+ throw new SchemaValidationError("Invalid templates configuration", result.error, indexPath);
234241
234240
  }
234242
234241
  return result.data.templates;
234243
234242
  }
234244
- async function renderTemplate(template, destPath, data) {
234245
- const templateDir = join7(getTemplatesDir(), template.path);
234243
+ async function renderTemplate(template, destPath, data, assetsDir) {
234244
+ const templateDir = join7(getTemplatesDir(assetsDir), template.path);
234246
234245
  const files = await globby("**/*", {
234247
234246
  cwd: templateDir,
234248
234247
  dot: true,
@@ -234279,14 +234278,10 @@ async function assertProjectNotExists(dirPath) {
234279
234278
  }
234280
234279
  }
234281
234280
  async function createProjectFiles(options) {
234282
- const { name: name2, description, path: basePath, template } = options;
234281
+ const { name: name2, description, path: basePath, template, assetsDir } = options;
234283
234282
  await assertProjectNotExists(basePath);
234284
234283
  const { projectId } = await createProject(name2, description);
234285
- await renderTemplate(template, basePath, {
234286
- name: name2,
234287
- description,
234288
- projectId
234289
- });
234284
+ await renderTemplate(template, basePath, { name: name2, description, projectId }, assetsDir);
234290
234285
  return {
234291
234286
  projectId,
234292
234287
  projectDir: basePath
@@ -241957,8 +241952,8 @@ var package_default = {
241957
241952
  "bin"
241958
241953
  ],
241959
241954
  scripts: {
241960
- build: "bun run clean && cp -r templates dist/ && bun run infra/build.ts",
241961
- "build:watch": "bun run clean && cp -r templates dist/ && bun run infra/build.ts --watch",
241955
+ build: "bun run clean && mkdir -p dist/assets && cp -r templates dist/assets/ && bun run infra/build.ts",
241956
+ "build:watch": "bun run clean && mkdir -p dist/assets && cp -r templates dist/assets/ && bun run infra/build.ts --watch",
241962
241957
  typecheck: "tsc --noEmit",
241963
241958
  dev: "./bin/dev.ts",
241964
241959
  start: "./bin/run.js",
@@ -241968,6 +241963,7 @@ var package_default = {
241968
241963
  test: "vitest run",
241969
241964
  "test:watch": "vitest",
241970
241965
  "build:binaries": "bun run infra/build-binaries.ts",
241966
+ "package:binaries": "bun run infra/package-binaries.ts",
241971
241967
  knip: "knip",
241972
241968
  "knip:fix": "knip --fix"
241973
241969
  },
@@ -243145,8 +243141,8 @@ function getFunctionsDeployCommand(context) {
243145
243141
  import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
243146
243142
  var import_kebabCase = __toESM(require_kebabCase(), 1);
243147
243143
  var DEFAULT_TEMPLATE_ID = "backend-only";
243148
- async function getTemplateById(templateId) {
243149
- const templates = await listTemplates();
243144
+ async function getTemplateById(templateId, assetsDir) {
243145
+ const templates = await listTemplates(assetsDir);
243150
243146
  const template2 = templates.find((t) => t.id === templateId);
243151
243147
  if (!template2) {
243152
243148
  const validIds = templates.map((t) => t.id).join(", ");
@@ -243162,8 +243158,8 @@ function validateNonInteractiveFlags(command) {
243162
243158
  command.error("Non-interactive mode requires all flags: --name, --path");
243163
243159
  }
243164
243160
  }
243165
- async function createInteractive(options) {
243166
- const templates = await listTemplates();
243161
+ async function createInteractive(options, assetsDir) {
243162
+ const templates = await listTemplates(assetsDir);
243167
243163
  const templateOptions = templates.map((t) => ({
243168
243164
  value: t,
243169
243165
  label: t.name,
@@ -243204,10 +243200,10 @@ async function createInteractive(options) {
243204
243200
  deploy: options.deploy,
243205
243201
  skills: options.skills,
243206
243202
  isInteractive: true
243207
- });
243203
+ }, assetsDir);
243208
243204
  }
243209
- async function createNonInteractive(options) {
243210
- const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
243205
+ async function createNonInteractive(options, assetsDir) {
243206
+ const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID, assetsDir);
243211
243207
  return await executeCreate({
243212
243208
  template: template2,
243213
243209
  name: options.name,
@@ -243215,7 +243211,7 @@ async function createNonInteractive(options) {
243215
243211
  deploy: options.deploy,
243216
243212
  skills: options.skills,
243217
243213
  isInteractive: false
243218
- });
243214
+ }, assetsDir);
243219
243215
  }
243220
243216
  async function executeCreate({
243221
243217
  template: template2,
@@ -243225,7 +243221,7 @@ async function executeCreate({
243225
243221
  deploy: deploy5,
243226
243222
  skills,
243227
243223
  isInteractive
243228
- }) {
243224
+ }, assetsDir) {
243229
243225
  const name2 = rawName.trim();
243230
243226
  const resolvedPath = resolve2(projectPath);
243231
243227
  const { projectId } = await runTask("Setting up your project...", async () => {
@@ -243233,7 +243229,8 @@ async function executeCreate({
243233
243229
  name: name2,
243234
243230
  description: description?.trim(),
243235
243231
  path: resolvedPath,
243236
- template: template2
243232
+ template: template2,
243233
+ assetsDir
243237
243234
  });
243238
243235
  }, {
243239
243236
  successMessage: theme.colors.base44Orange("Project created successfully"),
@@ -243311,9 +243308,9 @@ function getCreateCommand(context) {
243311
243308
  return new Command("create").description("Create a new Base44 project").addArgument(new Argument("name", "Project name").argOptional()).option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--no-skills", "Skip AI agent skills installation").hook("preAction", validateNonInteractiveFlags).action(async (name2, options) => {
243312
243309
  const isNonInteractive = !!(options.name ?? name2) && !!options.path;
243313
243310
  if (isNonInteractive) {
243314
- await runCommand(() => createNonInteractive({ name: options.name ?? name2, ...options }), { requireAuth: true, requireAppConfig: false }, context);
243311
+ await runCommand(() => createNonInteractive({ name: options.name ?? name2, ...options }, context.assetsDir), { requireAuth: true, requireAppConfig: false }, context);
243315
243312
  } else {
243316
- await runCommand(() => createInteractive({ name: name2, ...options }), { fullBanner: true, requireAuth: true, requireAppConfig: false }, context);
243313
+ await runCommand(() => createInteractive({ name: name2, ...options }, context.assetsDir), { fullBanner: true, requireAuth: true, requireAppConfig: false }, context);
243317
243314
  }
243318
243315
  });
243319
243316
  }
@@ -243950,7 +243947,7 @@ function getTypesCommand(context) {
243950
243947
  }
243951
243948
 
243952
243949
  // src/cli/dev/dev-server/main.ts
243953
- import { dirname as dirname15, join as join18 } from "node:path";
243950
+ import { dirname as dirname14, join as join17 } from "node:path";
243954
243951
  var import_cors = __toESM(require_lib4(), 1);
243955
243952
  var import_express4 = __toESM(require_express(), 1);
243956
243953
 
@@ -244109,10 +244106,6 @@ function createDevLogger() {
244109
244106
 
244110
244107
  // src/cli/dev/dev-server/function-manager.ts
244111
244108
  import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
244112
- import { dirname as dirname12, join as join15 } from "node:path";
244113
- import { fileURLToPath as fileURLToPath7 } from "node:url";
244114
- var __dirname5 = dirname12(fileURLToPath7(import.meta.url));
244115
- var WRAPPER_PATH = getAssetsDir() ? join15(getAssetsDir(), "deno-runtime", "main.js") : join15(__dirname5, "../deno-runtime/main.js");
244116
244109
  var READY_TIMEOUT = 30000;
244117
244110
 
244118
244111
  class FunctionManager {
@@ -244120,9 +244113,11 @@ class FunctionManager {
244120
244113
  running = new Map;
244121
244114
  starting = new Map;
244122
244115
  logger;
244123
- constructor(functions, logger) {
244116
+ wrapperPath;
244117
+ constructor(functions, logger, wrapperPath) {
244124
244118
  this.functions = new Map(functions.map((f7) => [f7.name, f7]));
244125
244119
  this.logger = logger;
244120
+ this.wrapperPath = wrapperPath;
244126
244121
  if (functions.length > 0) {
244127
244122
  this.verifyDenoIsInstalled();
244128
244123
  }
@@ -244195,7 +244190,7 @@ class FunctionManager {
244195
244190
  }
244196
244191
  spawnFunction(func, port) {
244197
244192
  this.logger.log(`Spawning function "${func.name}" on port ${port}`);
244198
- const process21 = spawn2("deno", ["run", "--allow-all", WRAPPER_PATH], {
244193
+ const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
244199
244194
  env: {
244200
244195
  ...globalThis.process.env,
244201
244196
  FUNCTION_PATH: func.entryPath,
@@ -245416,9 +245411,9 @@ class NodeFsHandler {
245416
245411
  if (this.fsw.closed) {
245417
245412
  return;
245418
245413
  }
245419
- const dirname14 = sp2.dirname(file2);
245414
+ const dirname13 = sp2.dirname(file2);
245420
245415
  const basename5 = sp2.basename(file2);
245421
- const parent = this.fsw._getWatchedDir(dirname14);
245416
+ const parent = this.fsw._getWatchedDir(dirname13);
245422
245417
  let prevStats = stats;
245423
245418
  if (parent.has(basename5))
245424
245419
  return;
@@ -245445,7 +245440,7 @@ class NodeFsHandler {
245445
245440
  prevStats = newStats2;
245446
245441
  }
245447
245442
  } catch (error48) {
245448
- this.fsw._remove(dirname14, basename5);
245443
+ this.fsw._remove(dirname13, basename5);
245449
245444
  }
245450
245445
  } else if (parent.has(basename5)) {
245451
245446
  const at13 = newStats.atimeMs;
@@ -246406,7 +246401,7 @@ async function createDevServer(options8) {
246406
246401
  next();
246407
246402
  });
246408
246403
  const devLogger = createDevLogger();
246409
- const functionManager = new FunctionManager(functions, devLogger);
246404
+ const functionManager = new FunctionManager(functions, devLogger, options8.denoWrapperPath);
246410
246405
  const functionRoutes = createFunctionRouter(functionManager, devLogger);
246411
246406
  app.use("/api/apps/:appId/functions", functionRoutes);
246412
246407
  if (functionManager.getFunctionNames().length > 0) {
@@ -246448,8 +246443,8 @@ async function createDevServer(options8) {
246448
246443
  broadcastEntityEvent(io6, appId, entityName, event);
246449
246444
  };
246450
246445
  const base44ConfigWatcher = new WatchBase44({
246451
- functions: join18(dirname15(project2.configPath), project2.functionsDir),
246452
- entities: join18(dirname15(project2.configPath), project2.entitiesDir)
246446
+ functions: join17(dirname14(project2.configPath), project2.functionsDir),
246447
+ entities: join17(dirname14(project2.configPath), project2.entitiesDir)
246453
246448
  }, devLogger);
246454
246449
  base44ConfigWatcher.on("change", async (name2) => {
246455
246450
  try {
@@ -246493,10 +246488,11 @@ async function createDevServer(options8) {
246493
246488
  }
246494
246489
 
246495
246490
  // src/cli/commands/dev.ts
246496
- async function devAction(options8) {
246491
+ async function devAction(options8, context) {
246497
246492
  const port = options8.port ? Number(options8.port) : undefined;
246498
246493
  const { port: resolvedPort } = await createDevServer({
246499
246494
  port,
246495
+ denoWrapperPath: getDenoWrapperPath(context.assetsDir),
246500
246496
  loadResources: async () => {
246501
246497
  const { functions, entities, project: project2 } = await readProjectConfig();
246502
246498
  return { functions, entities, project: project2 };
@@ -246508,7 +246504,7 @@ async function devAction(options8) {
246508
246504
  }
246509
246505
  function getDevCommand(context) {
246510
246506
  return new Command("dev").description("Start the development server").option("-p, --port <number>", "Port for the development server").action(async (options8) => {
246511
- await runCommand(() => devAction(options8), { requireAuth: true }, context);
246507
+ await runCommand(() => devAction(options8, context), { requireAuth: true }, context);
246512
246508
  });
246513
246509
  }
246514
246510
 
@@ -246638,7 +246634,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
246638
246634
  import { release, type } from "node:os";
246639
246635
 
246640
246636
  // node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
246641
- import { dirname as dirname16, posix, sep } from "path";
246637
+ import { dirname as dirname15, posix, sep } from "path";
246642
246638
  function createModulerModifier() {
246643
246639
  const getModuleFromFileName = createGetModuleFromFilename();
246644
246640
  return async (frames) => {
@@ -246647,7 +246643,7 @@ function createModulerModifier() {
246647
246643
  return frames;
246648
246644
  };
246649
246645
  }
246650
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname16(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246646
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname15(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
246651
246647
  const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
246652
246648
  return (filename) => {
246653
246649
  if (!filename)
@@ -250836,11 +250832,15 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
250836
250832
  });
250837
250833
  }
250838
250834
  // src/cli/index.ts
250839
- async function runCLI() {
250835
+ async function runCLI(options8) {
250840
250836
  const errorReporter = new ErrorReporter;
250841
250837
  errorReporter.registerProcessErrorHandlers();
250842
250838
  const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
250843
- const context = { errorReporter, isNonInteractive };
250839
+ const context = {
250840
+ errorReporter,
250841
+ isNonInteractive,
250842
+ assetsDir: options8?.assetsDir
250843
+ };
250844
250844
  const program2 = createProgram(context);
250845
250845
  try {
250846
250846
  const userInfo = await readAuth();
@@ -250865,4 +250865,4 @@ export {
250865
250865
  CLIExitError
250866
250866
  };
250867
250867
 
250868
- //# debugId=16BBB389AA548E0B64756E2164756E21
250868
+ //# debugId=C8CB3FB0D3C9C07064756E2164756E21