@base44-preview/cli 0.0.17-pr.104.57e16fe → 0.0.17-pr.104.e7dd3a1

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 (3) hide show
  1. package/README.md +29 -0
  2. package/dist/index.js +175 -135
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -61,6 +61,35 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
61
61
 
62
62
  <!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
63
63
 
64
+ ## AI Agent Skills
65
+
66
+ When creating a project, you'll be prompted to install AI agent skills for your preferred coding assistants:
67
+
68
+ ```
69
+ ◆ Add AI agent skills? (Select agents to configure)
70
+ │ ◼ Cursor
71
+ │ ◼ Claude Code
72
+
73
+ ```
74
+
75
+ This installs [base44/skills](https://github.com/base44/skills) which helps AI agents understand how to work with Base44 projects.
76
+
77
+ **Non-interactive mode:**
78
+
79
+ ```bash
80
+ # Install skills for all supported agents
81
+ base44 create --name my-app --path ./my-app --skills
82
+
83
+ # Skip skills installation
84
+ base44 create --name my-app --path ./my-app
85
+ ```
86
+
87
+ **Manual installation:**
88
+
89
+ ```bash
90
+ npx add-skill base44/skills
91
+ ```
92
+
64
93
  ## Help
65
94
 
66
95
  ```bash
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:
3
3
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
4
4
  import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
5
5
  import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
6
- import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
6
+ import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
7
7
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
8
8
  import * as g from "node:readline";
9
9
  import O from "node:readline";
@@ -893,7 +893,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
893
893
  const childProcess$1 = __require("node:child_process");
894
894
  const path$15 = __require("node:path");
895
895
  const fs$10 = __require("node:fs");
896
- const process$4 = __require("node:process");
896
+ const process$3 = __require("node:process");
897
897
  const { Argument, humanReadableArgName } = require_argument();
898
898
  const { CommanderError } = require_error$1();
899
899
  const { Help } = require_help();
@@ -944,10 +944,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
944
944
  this._showHelpAfterError = false;
945
945
  this._showSuggestionAfterError = true;
946
946
  this._outputConfiguration = {
947
- writeOut: (str) => process$4.stdout.write(str),
948
- writeErr: (str) => process$4.stderr.write(str),
949
- getOutHelpWidth: () => process$4.stdout.isTTY ? process$4.stdout.columns : void 0,
950
- getErrHelpWidth: () => process$4.stderr.isTTY ? process$4.stderr.columns : void 0,
947
+ writeOut: (str) => process$3.stdout.write(str),
948
+ writeErr: (str) => process$3.stderr.write(str),
949
+ getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
950
+ getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
951
951
  outputError: (str, write) => write(str)
952
952
  };
953
953
  this._hidden = false;
@@ -1301,7 +1301,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1301
1301
  */
1302
1302
  _exit(exitCode, code$1, message) {
1303
1303
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
1304
- process$4.exit(exitCode);
1304
+ process$3.exit(exitCode);
1305
1305
  }
1306
1306
  /**
1307
1307
  * Register callback `fn` for the command.
@@ -1640,11 +1640,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1640
1640
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1641
1641
  parseOptions = parseOptions || {};
1642
1642
  if (argv === void 0 && parseOptions.from === void 0) {
1643
- if (process$4.versions?.electron) parseOptions.from = "electron";
1644
- const execArgv$1 = process$4.execArgv ?? [];
1643
+ if (process$3.versions?.electron) parseOptions.from = "electron";
1644
+ const execArgv$1 = process$3.execArgv ?? [];
1645
1645
  if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
1646
1646
  }
1647
- if (argv === void 0) argv = process$4.argv;
1647
+ if (argv === void 0) argv = process$3.argv;
1648
1648
  this.rawArgs = argv.slice();
1649
1649
  let userArgs;
1650
1650
  switch (parseOptions.from) {
@@ -1654,7 +1654,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1654
1654
  userArgs = argv.slice(2);
1655
1655
  break;
1656
1656
  case "electron":
1657
- if (process$4.defaultApp) {
1657
+ if (process$3.defaultApp) {
1658
1658
  this._scriptPath = argv[1];
1659
1659
  userArgs = argv.slice(2);
1660
1660
  } else userArgs = argv.slice(1);
@@ -1768,15 +1768,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
1768
1768
  }
1769
1769
  launchWithNode = sourceExt.includes(path$15.extname(executableFile));
1770
1770
  let proc$1;
1771
- if (process$4.platform !== "win32") if (launchWithNode) {
1771
+ if (process$3.platform !== "win32") if (launchWithNode) {
1772
1772
  args.unshift(executableFile);
1773
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1774
- proc$1 = childProcess$1.spawn(process$4.argv[0], args, { stdio: "inherit" });
1773
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1774
+ proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
1775
1775
  } else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
1776
1776
  else {
1777
1777
  args.unshift(executableFile);
1778
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1779
- proc$1 = childProcess$1.spawn(process$4.execPath, args, { stdio: "inherit" });
1778
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1779
+ proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
1780
1780
  }
1781
1781
  if (!proc$1.killed) [
1782
1782
  "SIGUSR1",
@@ -1785,14 +1785,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
1785
1785
  "SIGINT",
1786
1786
  "SIGHUP"
1787
1787
  ].forEach((signal) => {
1788
- process$4.on(signal, () => {
1788
+ process$3.on(signal, () => {
1789
1789
  if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
1790
1790
  });
1791
1791
  });
1792
1792
  const exitCallback = this._exitCallback;
1793
1793
  proc$1.on("close", (code$1) => {
1794
1794
  code$1 = code$1 ?? 1;
1795
- if (!exitCallback) process$4.exit(code$1);
1795
+ if (!exitCallback) process$3.exit(code$1);
1796
1796
  else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
1797
1797
  });
1798
1798
  proc$1.on("error", (err) => {
@@ -1804,7 +1804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1804
1804
  - ${executableDirMessage}`;
1805
1805
  throw new Error(executableMissing);
1806
1806
  } else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
1807
- if (!exitCallback) process$4.exit(1);
1807
+ if (!exitCallback) process$3.exit(1);
1808
1808
  else {
1809
1809
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
1810
1810
  wrappedError.nestedError = err;
@@ -2210,13 +2210,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2210
2210
  */
2211
2211
  _parseOptionsEnv() {
2212
2212
  this.options.forEach((option) => {
2213
- if (option.envVar && option.envVar in process$4.env) {
2213
+ if (option.envVar && option.envVar in process$3.env) {
2214
2214
  const optionKey = option.attributeName();
2215
2215
  if (this.getOptionValue(optionKey) === void 0 || [
2216
2216
  "default",
2217
2217
  "config",
2218
2218
  "env"
2219
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$4.env[option.envVar]);
2219
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
2220
2220
  else this.emit(`optionEnv:${option.name()}`);
2221
2221
  }
2222
2222
  });
@@ -2595,7 +2595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2595
2595
  */
2596
2596
  help(contextOptions) {
2597
2597
  this.outputHelp(contextOptions);
2598
- let exitCode = process$4.exitCode || 0;
2598
+ let exitCode = process$3.exitCode || 0;
2599
2599
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2600
2600
  this._exit(exitCode, "commander.help", "(outputHelp)");
2601
2601
  }
@@ -2711,16 +2711,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2711
2711
  const CSI = `${ESC}[`;
2712
2712
  const beep = "\x07";
2713
2713
  const cursor = {
2714
- to(x$2, y$1) {
2715
- if (!y$1) return `${CSI}${x$2 + 1}G`;
2716
- return `${CSI}${y$1 + 1};${x$2 + 1}H`;
2714
+ to(x$2, y$2) {
2715
+ if (!y$2) return `${CSI}${x$2 + 1}G`;
2716
+ return `${CSI}${y$2 + 1};${x$2 + 1}H`;
2717
2717
  },
2718
- move(x$2, y$1) {
2718
+ move(x$2, y$2) {
2719
2719
  let ret = "";
2720
2720
  if (x$2 < 0) ret += `${CSI}${-x$2}D`;
2721
2721
  else if (x$2 > 0) ret += `${CSI}${x$2}C`;
2722
- if (y$1 < 0) ret += `${CSI}${-y$1}A`;
2723
- else if (y$1 > 0) ret += `${CSI}${y$1}B`;
2722
+ if (y$2 < 0) ret += `${CSI}${-y$2}A`;
2723
+ else if (y$2 > 0) ret += `${CSI}${y$2}B`;
2724
2724
  return ret;
2725
2725
  },
2726
2726
  up: (count$1 = 1) => `${CSI}${count$1}A`,
@@ -3030,13 +3030,13 @@ function rD() {
3030
3030
  }
3031
3031
  }), r;
3032
3032
  }
3033
- const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
3033
+ const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y$1 = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y$1}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
3034
3034
  const F$1 = [...u$2];
3035
3035
  let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
3036
3036
  for (const [C$1, n$1] of F$1.entries()) {
3037
3037
  const E = p(n$1);
3038
3038
  if (D$1 + E <= t ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$1 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
3039
- i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3039
+ i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3040
3040
  continue;
3041
3041
  }
3042
3042
  D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
@@ -3078,7 +3078,7 @@ const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y = "\x07", V$1 = "[",
3078
3078
  `)];
3079
3079
  for (const [E, a$1] of n$1.entries()) {
3080
3080
  if (F$1 += a$1, d$1.has(a$1)) {
3081
- const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3081
+ const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3082
3082
  if (c$1.code !== void 0) {
3083
3083
  const f = Number.parseFloat(c$1.code);
3084
3084
  s = f === oD ? void 0 : f;
@@ -3479,7 +3479,7 @@ var RD = class extends x$1 {
3479
3479
  //#endregion
3480
3480
  //#region node_modules/@clack/prompts/dist/index.mjs
3481
3481
  function ce() {
3482
- return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3482
+ return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3483
3483
  }
3484
3484
  const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t) => {
3485
3485
  switch (t) {
@@ -6744,7 +6744,7 @@ function initializeContext(params) {
6744
6744
  external: params?.external ?? void 0
6745
6745
  };
6746
6746
  }
6747
- function process$3(schema, ctx, _params = {
6747
+ function process$2(schema, ctx, _params = {
6748
6748
  path: [],
6749
6749
  schemaPath: []
6750
6750
  }) {
@@ -6781,7 +6781,7 @@ function process$3(schema, ctx, _params = {
6781
6781
  const parent = schema._zod.parent;
6782
6782
  if (parent) {
6783
6783
  if (!result.ref) result.ref = parent;
6784
- process$3(parent, ctx, params);
6784
+ process$2(parent, ctx, params);
6785
6785
  ctx.seen.get(parent).isParent = true;
6786
6786
  }
6787
6787
  }
@@ -6993,7 +6993,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
6993
6993
  ...params,
6994
6994
  processors
6995
6995
  });
6996
- process$3(schema, ctx);
6996
+ process$2(schema, ctx);
6997
6997
  extractDefs(ctx, schema);
6998
6998
  return finalize(ctx, schema);
6999
6999
  };
@@ -7005,7 +7005,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
7005
7005
  io,
7006
7006
  processors
7007
7007
  });
7008
- process$3(schema, ctx);
7008
+ process$2(schema, ctx);
7009
7009
  extractDefs(ctx, schema);
7010
7010
  return finalize(ctx, schema);
7011
7011
  };
@@ -7092,7 +7092,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
7092
7092
  if (typeof minimum === "number") json.minItems = minimum;
7093
7093
  if (typeof maximum === "number") json.maxItems = maximum;
7094
7094
  json.type = "array";
7095
- json.items = process$3(def.element, ctx, {
7095
+ json.items = process$2(def.element, ctx, {
7096
7096
  ...params,
7097
7097
  path: [...params.path, "items"]
7098
7098
  });
@@ -7103,7 +7103,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7103
7103
  json.type = "object";
7104
7104
  json.properties = {};
7105
7105
  const shape = def.shape;
7106
- for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
7106
+ for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
7107
7107
  ...params,
7108
7108
  path: [
7109
7109
  ...params.path,
@@ -7121,7 +7121,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7121
7121
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
7122
7122
  else if (!def.catchall) {
7123
7123
  if (ctx.io === "output") json.additionalProperties = false;
7124
- } else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
7124
+ } else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
7125
7125
  ...params,
7126
7126
  path: [...params.path, "additionalProperties"]
7127
7127
  });
@@ -7129,7 +7129,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7129
7129
  const unionProcessor = (schema, ctx, json, params) => {
7130
7130
  const def = schema._zod.def;
7131
7131
  const isExclusive = def.inclusive === false;
7132
- const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
7132
+ const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
7133
7133
  ...params,
7134
7134
  path: [
7135
7135
  ...params.path,
@@ -7142,7 +7142,7 @@ const unionProcessor = (schema, ctx, json, params) => {
7142
7142
  };
7143
7143
  const intersectionProcessor = (schema, ctx, json, params) => {
7144
7144
  const def = schema._zod.def;
7145
- const a$1 = process$3(def.left, ctx, {
7145
+ const a$1 = process$2(def.left, ctx, {
7146
7146
  ...params,
7147
7147
  path: [
7148
7148
  ...params.path,
@@ -7150,7 +7150,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7150
7150
  0
7151
7151
  ]
7152
7152
  });
7153
- const b$2 = process$3(def.right, ctx, {
7153
+ const b$2 = process$2(def.right, ctx, {
7154
7154
  ...params,
7155
7155
  path: [
7156
7156
  ...params.path,
@@ -7167,7 +7167,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
7167
7167
  json.type = "array";
7168
7168
  const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
7169
7169
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
7170
- const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
7170
+ const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
7171
7171
  ...params,
7172
7172
  path: [
7173
7173
  ...params.path,
@@ -7175,7 +7175,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
7175
7175
  i$1
7176
7176
  ]
7177
7177
  }));
7178
- const rest = def.rest ? process$3(def.rest, ctx, {
7178
+ const rest = def.rest ? process$2(def.rest, ctx, {
7179
7179
  ...params,
7180
7180
  path: [
7181
7181
  ...params.path,
@@ -7206,7 +7206,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7206
7206
  const keyType = def.keyType;
7207
7207
  const patterns = keyType._zod.bag?.patterns;
7208
7208
  if (def.mode === "loose" && patterns && patterns.size > 0) {
7209
- const valueSchema = process$3(def.valueType, ctx, {
7209
+ const valueSchema = process$2(def.valueType, ctx, {
7210
7210
  ...params,
7211
7211
  path: [
7212
7212
  ...params.path,
@@ -7217,11 +7217,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
7217
7217
  json.patternProperties = {};
7218
7218
  for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
7219
7219
  } else {
7220
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
7220
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
7221
7221
  ...params,
7222
7222
  path: [...params.path, "propertyNames"]
7223
7223
  });
7224
- json.additionalProperties = process$3(def.valueType, ctx, {
7224
+ json.additionalProperties = process$2(def.valueType, ctx, {
7225
7225
  ...params,
7226
7226
  path: [...params.path, "additionalProperties"]
7227
7227
  });
@@ -7234,7 +7234,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7234
7234
  };
7235
7235
  const nullableProcessor = (schema, ctx, json, params) => {
7236
7236
  const def = schema._zod.def;
7237
- const inner = process$3(def.innerType, ctx, params);
7237
+ const inner = process$2(def.innerType, ctx, params);
7238
7238
  const seen = ctx.seen.get(schema);
7239
7239
  if (ctx.target === "openapi-3.0") {
7240
7240
  seen.ref = def.innerType;
@@ -7243,27 +7243,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
7243
7243
  };
7244
7244
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
7245
7245
  const def = schema._zod.def;
7246
- process$3(def.innerType, ctx, params);
7246
+ process$2(def.innerType, ctx, params);
7247
7247
  const seen = ctx.seen.get(schema);
7248
7248
  seen.ref = def.innerType;
7249
7249
  };
7250
7250
  const defaultProcessor = (schema, ctx, json, params) => {
7251
7251
  const def = schema._zod.def;
7252
- process$3(def.innerType, ctx, params);
7252
+ process$2(def.innerType, ctx, params);
7253
7253
  const seen = ctx.seen.get(schema);
7254
7254
  seen.ref = def.innerType;
7255
7255
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
7256
7256
  };
7257
7257
  const prefaultProcessor = (schema, ctx, json, params) => {
7258
7258
  const def = schema._zod.def;
7259
- process$3(def.innerType, ctx, params);
7259
+ process$2(def.innerType, ctx, params);
7260
7260
  const seen = ctx.seen.get(schema);
7261
7261
  seen.ref = def.innerType;
7262
7262
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
7263
7263
  };
7264
7264
  const catchProcessor = (schema, ctx, json, params) => {
7265
7265
  const def = schema._zod.def;
7266
- process$3(def.innerType, ctx, params);
7266
+ process$2(def.innerType, ctx, params);
7267
7267
  const seen = ctx.seen.get(schema);
7268
7268
  seen.ref = def.innerType;
7269
7269
  let catchValue;
@@ -7277,20 +7277,20 @@ const catchProcessor = (schema, ctx, json, params) => {
7277
7277
  const pipeProcessor = (schema, ctx, _json, params) => {
7278
7278
  const def = schema._zod.def;
7279
7279
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
7280
- process$3(innerType, ctx, params);
7280
+ process$2(innerType, ctx, params);
7281
7281
  const seen = ctx.seen.get(schema);
7282
7282
  seen.ref = innerType;
7283
7283
  };
7284
7284
  const readonlyProcessor = (schema, ctx, json, params) => {
7285
7285
  const def = schema._zod.def;
7286
- process$3(def.innerType, ctx, params);
7286
+ process$2(def.innerType, ctx, params);
7287
7287
  const seen = ctx.seen.get(schema);
7288
7288
  seen.ref = def.innerType;
7289
7289
  json.readOnly = true;
7290
7290
  };
7291
7291
  const optionalProcessor = (schema, ctx, _json, params) => {
7292
7292
  const def = schema._zod.def;
7293
- process$3(def.innerType, ctx, params);
7293
+ process$2(def.innerType, ctx, params);
7294
7294
  const seen = ctx.seen.get(schema);
7295
7295
  seen.ref = def.innerType;
7296
7296
  };
@@ -16344,7 +16344,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
16344
16344
  };
16345
16345
  const normalizeOptions$2 = (options = {}) => {
16346
16346
  const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
16347
- const cwd = toPath$1(options.cwd) ?? process$1.cwd();
16347
+ const cwd = toPath$1(options.cwd) ?? y.cwd();
16348
16348
  const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
16349
16349
  return {
16350
16350
  cwd,
@@ -16441,7 +16441,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
16441
16441
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
16442
16442
  return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
16443
16443
  };
16444
- const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16444
+ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16445
16445
  return (await Promise.all(directoryPaths.map(async (directoryPath) => {
16446
16446
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16447
16447
  directoryPath,
@@ -16455,7 +16455,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
16455
16455
  }) : directoryPath;
16456
16456
  }))).flat();
16457
16457
  };
16458
- const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16458
+ const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16459
16459
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16460
16460
  directoryPath,
16461
16461
  files,
@@ -16551,7 +16551,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
16551
16551
  };
16552
16552
  const createFilterFunction = (isIgnored, cwd) => {
16553
16553
  const seen = /* @__PURE__ */ new Set();
16554
- const basePath = cwd || process$1.cwd();
16554
+ const basePath = cwd || y.cwd();
16555
16555
  const pathCache = /* @__PURE__ */ new Map();
16556
16556
  return (fastGlobResult) => {
16557
16557
  const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
@@ -30923,13 +30923,13 @@ var ansi_styles_default = ansiStyles;
30923
30923
 
30924
30924
  //#endregion
30925
30925
  //#region node_modules/chalk/source/vendor/supports-color/index.js
30926
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
30926
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
30927
30927
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
30928
30928
  const position = argv.indexOf(prefix + flag);
30929
30929
  const terminatorPosition = argv.indexOf("--");
30930
30930
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
30931
30931
  }
30932
- const { env } = process$1;
30932
+ const { env } = y;
30933
30933
  let flagForceColor;
30934
30934
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
30935
30935
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
@@ -30962,7 +30962,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
30962
30962
  if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
30963
30963
  const min = forceColor || 0;
30964
30964
  if (env.TERM === "dumb") return min;
30965
- if (process$1.platform === "win32") {
30965
+ if (y.platform === "win32") {
30966
30966
  const osRelease = os.release().split(".");
30967
30967
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
30968
30968
  return 1;
@@ -31704,9 +31704,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
31704
31704
  //#region node_modules/execa/lib/utils/standard-stream.js
31705
31705
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
31706
31706
  const STANDARD_STREAMS = [
31707
- process$1.stdin,
31708
- process$1.stdout,
31709
- process$1.stderr
31707
+ y.stdin,
31708
+ y.stdout,
31709
+ y.stderr
31710
31710
  ];
31711
31711
  const STANDARD_STREAMS_ALIASES = [
31712
31712
  "stdin",
@@ -31831,9 +31831,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
31831
31831
  //#endregion
31832
31832
  //#region node_modules/is-unicode-supported/index.js
31833
31833
  function isUnicodeSupported() {
31834
- const { env: env$1 } = process$1;
31834
+ const { env: env$1 } = y;
31835
31835
  const { TERM, TERM_PROGRAM } = env$1;
31836
- if (process$1.platform !== "win32") return TERM !== "linux";
31836
+ if (y.platform !== "win32") return TERM !== "linux";
31837
31837
  return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
31838
31838
  }
31839
31839
 
@@ -32760,7 +32760,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
32760
32760
 
32761
32761
  //#endregion
32762
32762
  //#region node_modules/npm-run-path/index.js
32763
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
32763
+ const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
32764
32764
  const cwdPath = path.resolve(toPath(cwd));
32765
32765
  const result = [];
32766
32766
  const pathParts = pathOption.split(path.delimiter);
@@ -32778,7 +32778,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
32778
32778
  const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
32779
32779
  if (!pathParts.includes(pathPart)) result.push(pathPart);
32780
32780
  };
32781
- const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
32781
+ const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
32782
32782
  env$1 = { ...env$1 };
32783
32783
  const pathName = pathKey({ env: env$1 });
32784
32784
  options.path = env$1[pathName];
@@ -33913,7 +33913,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
33913
33913
  };
33914
33914
  const getDefaultCwd = () => {
33915
33915
  try {
33916
- return process$1.cwd();
33916
+ return y.cwd();
33917
33917
  } catch (error) {
33918
33918
  error.message = `The current directory does not exist.\n${error.message}`;
33919
33919
  throw error;
@@ -33948,7 +33948,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
33948
33948
  options.killSignal = normalizeKillSignal(options.killSignal);
33949
33949
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
33950
33950
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
33951
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
33951
+ if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
33952
33952
  return {
33953
33953
  file,
33954
33954
  commandArguments,
@@ -33975,7 +33975,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
33975
33975
  });
33976
33976
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
33977
33977
  const env$1 = extendEnv ? {
33978
- ...process$1.env,
33978
+ ...y.env,
33979
33979
  ...envOption
33980
33980
  } : envOption;
33981
33981
  if (preferLocal || node) return npmRunPathEnv({
@@ -34975,12 +34975,12 @@ const guessStreamDirection = {
34975
34975
  }
34976
34976
  };
34977
34977
  const getStandardStreamDirection = (value) => {
34978
- if ([0, process$1.stdin].includes(value)) return "input";
34978
+ if ([0, y.stdin].includes(value)) return "input";
34979
34979
  if ([
34980
34980
  1,
34981
34981
  2,
34982
- process$1.stdout,
34983
- process$1.stderr
34982
+ y.stdout,
34983
+ y.stderr
34984
34984
  ].includes(value)) return "output";
34985
34985
  };
34986
34986
  const DEFAULT_DIRECTION = "output";
@@ -36044,9 +36044,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
36044
36044
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
36045
36045
  };
36046
36046
  const getIpcExport = () => {
36047
- const anyProcess = process$1;
36047
+ const anyProcess = y;
36048
36048
  const isSubprocess = true;
36049
- const ipc = process$1.channel !== void 0;
36049
+ const ipc = y.channel !== void 0;
36050
36050
  return {
36051
36051
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
36052
36052
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -36288,7 +36288,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
36288
36288
 
36289
36289
  //#endregion
36290
36290
  //#region node_modules/signal-exit/dist/mjs/index.js
36291
- const processOk = (process$5) => !!process$5 && typeof process$5 === "object" && typeof process$5.removeListener === "function" && typeof process$5.emit === "function" && typeof process$5.reallyExit === "function" && typeof process$5.listeners === "function" && typeof process$5.kill === "function" && typeof process$5.pid === "number" && typeof process$5.on === "function";
36291
+ const processOk = (process$4) => !!process$4 && typeof process$4 === "object" && typeof process$4.removeListener === "function" && typeof process$4.emit === "function" && typeof process$4.reallyExit === "function" && typeof process$4.listeners === "function" && typeof process$4.kill === "function" && typeof process$4.pid === "number" && typeof process$4.on === "function";
36292
36292
  const kExitEmitter = Symbol.for("signal-exit emitter");
36293
36293
  const global$1 = globalThis;
36294
36294
  const ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -36356,7 +36356,7 @@ var SignalExitFallback = class extends SignalExitBase {
36356
36356
  };
36357
36357
  var SignalExit = class extends SignalExitBase {
36358
36358
  /* c8 ignore start */
36359
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
36359
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
36360
36360
  /* c8 ignore stop */
36361
36361
  #emitter = new Emitter();
36362
36362
  #process;
@@ -36364,15 +36364,15 @@ var SignalExit = class extends SignalExitBase {
36364
36364
  #originalProcessReallyExit;
36365
36365
  #sigListeners = {};
36366
36366
  #loaded = false;
36367
- constructor(process$5) {
36367
+ constructor(process$4) {
36368
36368
  super();
36369
- this.#process = process$5;
36369
+ this.#process = process$4;
36370
36370
  this.#sigListeners = {};
36371
36371
  for (const sig of signals) this.#sigListeners[sig] = () => {
36372
36372
  const listeners = this.#process.listeners(sig);
36373
36373
  let { count: count$1 } = this.#emitter;
36374
36374
  /* c8 ignore start */
36375
- const p$1 = process$5;
36375
+ const p$1 = process$4;
36376
36376
  if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
36377
36377
  /* c8 ignore stop */
36378
36378
  if (listeners.length === count$1) {
@@ -36380,11 +36380,11 @@ var SignalExit = class extends SignalExitBase {
36380
36380
  const ret = this.#emitter.emit("exit", null, sig);
36381
36381
  /* c8 ignore start */
36382
36382
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
36383
- if (!ret) process$5.kill(process$5.pid, s);
36383
+ if (!ret) process$4.kill(process$4.pid, s);
36384
36384
  }
36385
36385
  };
36386
- this.#originalProcessReallyExit = process$5.reallyExit;
36387
- this.#originalProcessEmit = process$5.emit;
36386
+ this.#originalProcessReallyExit = process$4.reallyExit;
36387
+ this.#originalProcessEmit = process$4.emit;
36388
36388
  }
36389
36389
  onExit(cb, opts) {
36390
36390
  /* c8 ignore start */
@@ -36451,8 +36451,8 @@ var SignalExit = class extends SignalExitBase {
36451
36451
  } else return og.call(this.#process, ev, ...args);
36452
36452
  }
36453
36453
  };
36454
- const process$2 = globalThis.process;
36455
- const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
36454
+ const process$1 = globalThis.process;
36455
+ const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
36456
36456
 
36457
36457
  //#endregion
36458
36458
  //#region node_modules/execa/lib/terminate/cleanup.js
@@ -38203,6 +38203,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38203
38203
  //#region src/cli/commands/project/create.ts
38204
38204
  var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
38205
38205
  const DEFAULT_TEMPLATE_ID = "backend-only";
38206
+ const SUPPORTED_AGENTS = [{
38207
+ value: "cursor",
38208
+ label: "Cursor"
38209
+ }, {
38210
+ value: "claude-code",
38211
+ label: "Claude Code"
38212
+ }];
38206
38213
  async function getTemplateById(templateId) {
38207
38214
  const templates = await listTemplates();
38208
38215
  const template = templates.find((t) => t.id === templateId);
@@ -38265,6 +38272,7 @@ async function createInteractive(options) {
38265
38272
  description: result.description || void 0,
38266
38273
  projectPath: result.projectPath,
38267
38274
  deploy: options.deploy,
38275
+ skills: options.skills,
38268
38276
  isInteractive: true
38269
38277
  });
38270
38278
  }
@@ -38275,10 +38283,11 @@ async function createNonInteractive(options) {
38275
38283
  description: options.description,
38276
38284
  projectPath: options.path,
38277
38285
  deploy: options.deploy,
38286
+ skills: options.skills,
38278
38287
  isInteractive: false
38279
38288
  });
38280
38289
  }
38281
- async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
38290
+ async function executeCreate({ template, name: rawName, description, projectPath, deploy, skills, isInteractive }) {
38282
38291
  const name$1 = rawName.trim();
38283
38292
  const resolvedPath = resolve(projectPath);
38284
38293
  const { projectId } = await runTask("Setting up your project...", async () => {
@@ -38338,12 +38347,45 @@ async function executeCreate({ template, name: rawName, description, projectPath
38338
38347
  finalAppUrl = appUrl;
38339
38348
  }
38340
38349
  }
38350
+ let selectedAgents = [];
38351
+ if (isInteractive) {
38352
+ const result = await fe({
38353
+ message: "Add AI agent skills? (Select agents to configure)",
38354
+ options: SUPPORTED_AGENTS,
38355
+ initialValues: SUPPORTED_AGENTS.map((agent) => agent.value),
38356
+ required: false
38357
+ });
38358
+ if (!pD(result)) selectedAgents = result;
38359
+ } else if (skills) selectedAgents = SUPPORTED_AGENTS.map((agent) => agent.value);
38360
+ if (selectedAgents.length > 0) {
38361
+ const agentArgs = selectedAgents.flatMap((agent) => ["-a", agent]);
38362
+ M.step(`Installing skills for: ${selectedAgents.join(", ")}`);
38363
+ await runTask(`Installing skills for: ${selectedAgents.join(", ")}`, async () => {
38364
+ await execa("npx", [
38365
+ "-y",
38366
+ "add-skill",
38367
+ "base44/skills",
38368
+ "-y",
38369
+ "-s",
38370
+ "base44-cli",
38371
+ "-s",
38372
+ "base44-sdk",
38373
+ ...agentArgs
38374
+ ], {
38375
+ cwd: resolvedPath,
38376
+ stdio: "inherit"
38377
+ });
38378
+ }, {
38379
+ successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
38380
+ errorMessage: "Failed to add AI agent skills - you can add them later with: npx add-skill base44/skills"
38381
+ });
38382
+ }
38341
38383
  M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38342
38384
  M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
38343
38385
  if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38344
38386
  return { outroMessage: "Your project is set up and ready to use" };
38345
38387
  }
38346
- const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").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").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38388
+ const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").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("--skills", "Add AI agent skills (Cursor, Claude Code)").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38347
38389
  await chooseCreate(options);
38348
38390
  });
38349
38391
 
@@ -38389,7 +38431,7 @@ function isInsideContainer() {
38389
38431
  //#endregion
38390
38432
  //#region node_modules/is-wsl/index.js
38391
38433
  const isWsl = () => {
38392
- if (process$1.platform !== "linux") return false;
38434
+ if (y.platform !== "linux") return false;
38393
38435
  if (os.release().toLowerCase().includes("microsoft")) {
38394
38436
  if (isInsideContainer()) return false;
38395
38437
  return true;
@@ -38400,12 +38442,12 @@ const isWsl = () => {
38400
38442
  return false;
38401
38443
  }
38402
38444
  };
38403
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38445
+ var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38404
38446
 
38405
38447
  //#endregion
38406
38448
  //#region node_modules/powershell-utils/index.js
38407
38449
  const execFile$2 = promisify(childProcess.execFile);
38408
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38450
+ const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38409
38451
  const executePowerShell = async (command, options = {}) => {
38410
38452
  const { powerShellPath: psPath, ...execFileOptions } = options;
38411
38453
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -38516,7 +38558,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
38516
38558
  //#region node_modules/default-browser-id/index.js
38517
38559
  const execFileAsync$3 = promisify(execFile);
38518
38560
  async function defaultBrowserId() {
38519
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38561
+ if (y.platform !== "darwin") throw new Error("macOS only");
38520
38562
  const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
38521
38563
  "read",
38522
38564
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -38531,7 +38573,7 @@ async function defaultBrowserId() {
38531
38573
  //#region node_modules/run-applescript/index.js
38532
38574
  const execFileAsync$2 = promisify(execFile);
38533
38575
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
38534
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38576
+ if (y.platform !== "darwin") throw new Error("macOS only");
38535
38577
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
38536
38578
  const execOptions = {};
38537
38579
  if (signal) execOptions.signal = signal;
@@ -38640,14 +38682,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
38640
38682
  const execFileAsync = promisify(execFile);
38641
38683
  const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
38642
38684
  async function defaultBrowser() {
38643
- if (process$1.platform === "darwin") {
38685
+ if (y.platform === "darwin") {
38644
38686
  const id = await defaultBrowserId();
38645
38687
  return {
38646
38688
  name: await bundleName(id),
38647
38689
  id
38648
38690
  };
38649
38691
  }
38650
- if (process$1.platform === "linux") {
38692
+ if (y.platform === "linux") {
38651
38693
  const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
38652
38694
  "query",
38653
38695
  "default",
@@ -38659,13 +38701,13 @@ async function defaultBrowser() {
38659
38701
  id
38660
38702
  };
38661
38703
  }
38662
- if (process$1.platform === "win32") return defaultBrowser$1();
38704
+ if (y.platform === "win32") return defaultBrowser$1();
38663
38705
  throw new Error("Only macOS, Linux, and Windows are supported");
38664
38706
  }
38665
38707
 
38666
38708
  //#endregion
38667
38709
  //#region node_modules/is-in-ssh/index.js
38668
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
38710
+ const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
38669
38711
  var is_in_ssh_default = isInSsh;
38670
38712
 
38671
38713
  //#endregion
@@ -38673,7 +38715,7 @@ var is_in_ssh_default = isInSsh;
38673
38715
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
38674
38716
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
38675
38717
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
38676
- const { platform: platform$1, arch } = process$1;
38718
+ const { platform: platform$1, arch } = y;
38677
38719
  const tryEachApp = async (apps$1, opener) => {
38678
38720
  if (apps$1.length === 0) return;
38679
38721
  const errors = [];
@@ -38786,7 +38828,7 @@ const baseOpen = async (options) => {
38786
38828
  await fs$1.access(localXdgOpenPath, constants$1.X_OK);
38787
38829
  exeLocalXdgOpen = true;
38788
38830
  } catch {}
38789
- command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
38831
+ command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
38790
38832
  }
38791
38833
  if (appArguments.length > 0) cliArguments.push(...appArguments);
38792
38834
  if (!options.wait) {
@@ -39400,33 +39442,31 @@ async function promptForIntegrationType() {
39400
39442
  }
39401
39443
  return selected;
39402
39444
  }
39403
- async function pollForOAuthCompletion(integrationType, connectionId) {
39404
- return await runTask("Waiting for authorization...", async () => {
39405
- return await waitForOAuthCompletion(integrationType, connectionId);
39406
- }, {
39407
- successMessage: "Authorization completed!",
39408
- errorMessage: "Authorization failed"
39409
- });
39410
- }
39411
39445
  async function addConnector(integrationType) {
39412
39446
  const selectedType = integrationType ? validateIntegrationType(integrationType) : await promptForIntegrationType();
39413
39447
  const displayName = getIntegrationDisplayName(selectedType);
39414
- const initiateResponse = await runTask(`Initiating ${displayName} connection...`, async () => {
39415
- return await initiateOAuth(selectedType);
39448
+ const result = await runTask(`Initiating ${displayName} connection...`, async (updateMessage) => {
39449
+ const initiateResponse = await initiateOAuth(selectedType);
39450
+ if (initiateResponse.already_authorized) {
39451
+ await addLocalConnector(selectedType);
39452
+ return { alreadyAuthorized: true };
39453
+ }
39454
+ if (initiateResponse.error === "different_user" && initiateResponse.other_user_email) throw new Error(`This app is already connected to ${displayName} by ${initiateResponse.other_user_email}`);
39455
+ if (!initiateResponse.redirect_url || !initiateResponse.connection_id) throw new Error("Invalid response from server: missing redirect URL or connection ID");
39456
+ M.info(`Please authorize ${displayName} at:\n${theme.colors.links(initiateResponse.redirect_url)}`);
39457
+ updateMessage("Waiting for authorization...");
39458
+ const oauthResult = await waitForOAuthCompletion(selectedType, initiateResponse.connection_id);
39459
+ if (!oauthResult.success) throw new Error(oauthResult.error || "Authorization failed");
39460
+ await addLocalConnector(selectedType);
39461
+ return {
39462
+ alreadyAuthorized: false,
39463
+ accountEmail: oauthResult.accountEmail
39464
+ };
39416
39465
  }, {
39417
- successMessage: `${displayName} OAuth initiated`,
39418
- errorMessage: `Failed to initiate ${displayName} connection`
39466
+ successMessage: "Authorization completed!",
39467
+ errorMessage: `Failed to connect ${displayName}`
39419
39468
  });
39420
- if (initiateResponse.already_authorized) {
39421
- await addLocalConnector(selectedType);
39422
- return { outroMessage: `Already connected to ${theme.styles.bold(displayName)} (added to config)` };
39423
- }
39424
- if (initiateResponse.error === "different_user" && initiateResponse.other_user_email) throw new Error(`This app is already connected to ${displayName} by ${initiateResponse.other_user_email}`);
39425
- if (!initiateResponse.redirect_url || !initiateResponse.connection_id) throw new Error("Invalid response from server: missing redirect URL or connection ID");
39426
- M.info(`Please authorize ${displayName} at:\n${theme.colors.links(initiateResponse.redirect_url)}`);
39427
- const result = await pollForOAuthCompletion(selectedType, initiateResponse.connection_id);
39428
- if (!result.success) throw new Error(result.error || "Authorization failed");
39429
- await addLocalConnector(selectedType);
39469
+ if (result.alreadyAuthorized) return { outroMessage: `Already connected to ${theme.styles.bold(displayName)} (added to config)` };
39430
39470
  const accountInfo = result.accountEmail ? ` as ${theme.styles.bold(result.accountEmail)}` : "";
39431
39471
  return { outroMessage: `Successfully connected to ${theme.styles.bold(displayName)}${accountInfo}` };
39432
39472
  }
@@ -39537,18 +39577,19 @@ function findOrphanedConnectors(local, backend) {
39537
39577
  }
39538
39578
  async function connectSingleConnector(connector) {
39539
39579
  const { type, displayName, scopes } = connector;
39540
- const initiateResponse = await initiateOAuth(type, scopes || null);
39541
- if (initiateResponse.already_authorized) return { success: true };
39542
- if (initiateResponse.error === "different_user") return {
39543
- success: false,
39544
- error: `Already connected by ${initiateResponse.other_user_email}`
39545
- };
39546
- if (!initiateResponse.redirect_url || !initiateResponse.connection_id) return {
39547
- success: false,
39548
- error: "Invalid response from server"
39549
- };
39550
- M.info(`Please authorize ${displayName} at:\n${theme.colors.links(initiateResponse.redirect_url)}`);
39551
- return await runTask("Waiting for authorization...", async () => {
39580
+ return await runTask(`Initiating ${displayName} connection...`, async (updateMessage) => {
39581
+ const initiateResponse = await initiateOAuth(type, scopes || null);
39582
+ if (initiateResponse.already_authorized) return { success: true };
39583
+ if (initiateResponse.error === "different_user") return {
39584
+ success: false,
39585
+ error: `Already connected by ${initiateResponse.other_user_email}`
39586
+ };
39587
+ if (!initiateResponse.redirect_url || !initiateResponse.connection_id) return {
39588
+ success: false,
39589
+ error: "Invalid response from server"
39590
+ };
39591
+ M.info(`Please authorize ${displayName} at:\n${theme.colors.links(initiateResponse.redirect_url)}`);
39592
+ updateMessage("Waiting for authorization...");
39552
39593
  return await waitForOAuthCompletion(type, initiateResponse.connection_id);
39553
39594
  }, {
39554
39595
  successMessage: "Authorization completed!",
@@ -39595,7 +39636,6 @@ async function pushConnectorsCommand() {
39595
39636
  }
39596
39637
  for (const connector of pending) {
39597
39638
  console.log();
39598
- M.info(`Connecting ${theme.styles.bold(connector.displayName)}...`);
39599
39639
  const result = await connectSingleConnector(connector);
39600
39640
  if (result.success) {
39601
39641
  const accountInfo = result.accountEmail ? ` as ${result.accountEmail}` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.17-pr.104.57e16fe",
3
+ "version": "0.0.17-pr.104.e7dd3a1",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {