@base44-preview/cli 0.0.56-pr.547.6723c69 → 0.0.56-pr.547.f5a339a
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/README.md +0 -24
- package/dist/cli/index.js +60 -155
- package/dist/cli/index.js.map +10 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,30 +72,6 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
72
72
|
| [`site open`](https://docs.base44.com/developers/references/cli/commands/site-open) | Open the published site in your browser |
|
|
73
73
|
| [`types generate`](https://docs.base44.com/developers/references/cli/commands/types-generate) | Generate TypeScript types from project resources |
|
|
74
74
|
|
|
75
|
-
## Global flags
|
|
76
|
-
|
|
77
|
-
These work with any command:
|
|
78
|
-
|
|
79
|
-
| Flag | Description |
|
|
80
|
-
| ---- | ----------- |
|
|
81
|
-
| `--app-id <id>` | Target a Base44 app explicitly (overrides the linked project and `BASE44_APP_ID`) |
|
|
82
|
-
| `--json` | Emit machine-readable JSON to stdout and run in silent mode |
|
|
83
|
-
|
|
84
|
-
### `--json`
|
|
85
|
-
|
|
86
|
-
Use `--json` for scripting and agent automation:
|
|
87
|
-
|
|
88
|
-
- **stdout is a single JSON document** — pipe it straight into `jq`.
|
|
89
|
-
- **Silent mode** — interactive prompts, the spinner, and human status lines are suppressed; all status and diagnostics go to **stderr**, so stdout stays pure JSON.
|
|
90
|
-
- **Errors are JSON too** — a failure prints `{ "error": "...", "code": "...", "hints": [...] }` to stdout and exits non-zero, so you can parse success and failure from the same stream.
|
|
91
|
-
- **Every command accepts it.** Commands with structured output (e.g. `sandbox`, `connectors`) return rich JSON; others fall back to `{ "output": "<status>" }`.
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Pure JSON on stdout, ready for jq
|
|
95
|
-
base44 sandbox list-directory src --app-id app_123 --json | jq '.entries'
|
|
96
|
-
base44 sandbox run-command "npm test" --app-id app_123 --json | jq '.exitCode'
|
|
97
|
-
```
|
|
98
|
-
|
|
99
75
|
## AI agent skills
|
|
100
76
|
|
|
101
77
|
When creating a project, [base44/skills](https://github.com/base44/skills) are automatically installed. These help AI agents understand how to work with Base44 projects.
|
package/dist/cli/index.js
CHANGED
|
@@ -16349,7 +16349,7 @@ var require_front_matter = __commonJS((exports, module) => {
|
|
|
16349
16349
|
var optionalByteOrderMark = "\\ufeff?";
|
|
16350
16350
|
var platform5 = typeof process !== "undefined" ? process.platform : "";
|
|
16351
16351
|
var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)" + "$([\\s\\S]*?)" + "^(?:\\2|\\.\\.\\.)\\s*" + "$" + (platform5 === "win32" ? "\\r?" : "") + "(?:\\n)?)";
|
|
16352
|
-
var
|
|
16352
|
+
var regex = new RegExp(pattern, "m");
|
|
16353
16353
|
module.exports = extractor;
|
|
16354
16354
|
module.exports.test = test;
|
|
16355
16355
|
function extractor(string4, options) {
|
|
@@ -16384,7 +16384,7 @@ var require_front_matter = __commonJS((exports, module) => {
|
|
|
16384
16384
|
return line;
|
|
16385
16385
|
}
|
|
16386
16386
|
function parse10(string4, allowUnsafe) {
|
|
16387
|
-
var match =
|
|
16387
|
+
var match = regex.exec(string4);
|
|
16388
16388
|
if (!match) {
|
|
16389
16389
|
return {
|
|
16390
16390
|
attributes: {},
|
|
@@ -16406,7 +16406,7 @@ var require_front_matter = __commonJS((exports, module) => {
|
|
|
16406
16406
|
}
|
|
16407
16407
|
function test(string4) {
|
|
16408
16408
|
string4 = string4 || "";
|
|
16409
|
-
return
|
|
16409
|
+
return regex.test(string4);
|
|
16410
16410
|
}
|
|
16411
16411
|
});
|
|
16412
16412
|
|
|
@@ -121034,9 +121034,9 @@ function getMessage2(key2, parameters, self2) {
|
|
|
121034
121034
|
assert22.ok(message.length <= parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
|
|
121035
121035
|
return Reflect.apply(message, self2, parameters);
|
|
121036
121036
|
}
|
|
121037
|
-
const
|
|
121037
|
+
const regex = /%[dfijoOs]/g;
|
|
121038
121038
|
let expectedLength = 0;
|
|
121039
|
-
while (
|
|
121039
|
+
while (regex.exec(message) !== null)
|
|
121040
121040
|
expectedLength++;
|
|
121041
121041
|
assert22.ok(expectedLength === parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
|
|
121042
121042
|
if (parameters.length === 0)
|
|
@@ -121937,9 +121937,9 @@ function convertEndOfLineOptionToCharacter2(endOfLineOption) {
|
|
|
121937
121937
|
return endOfLineOption === OPTION_CR2 ? CHARACTER_CR2 : endOfLineOption === OPTION_CRLF2 ? CHARACTER_CRLF2 : DEFAULT_EOL2;
|
|
121938
121938
|
}
|
|
121939
121939
|
function countEndOfLineCharacters(text, endOfLineCharacter) {
|
|
121940
|
-
const
|
|
121940
|
+
const regex = regexps.get(endOfLineCharacter);
|
|
121941
121941
|
if (false) {}
|
|
121942
|
-
return text.match(
|
|
121942
|
+
return text.match(regex)?.length ?? 0;
|
|
121943
121943
|
}
|
|
121944
121944
|
function normalizeEndOfLine(text) {
|
|
121945
121945
|
return method_replace_all_default2(0, text, END_OF_LINE_REGEXP, CHARACTER_LF2);
|
|
@@ -124141,8 +124141,8 @@ function legacyIsNextLineEmpty(text, node, locEnd) {
|
|
|
124141
124141
|
}
|
|
124142
124142
|
function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
|
|
124143
124143
|
const otherQuote = enclosingQuote === '"' ? "'" : '"';
|
|
124144
|
-
const
|
|
124145
|
-
const raw2 = method_replace_all_default2(0, rawText,
|
|
124144
|
+
const regex = /\\(.)|(["'])/gsu;
|
|
124145
|
+
const raw2 = method_replace_all_default2(0, rawText, regex, (match, escaped, quote) => {
|
|
124146
124146
|
if (escaped === otherQuote) {
|
|
124147
124147
|
return escaped;
|
|
124148
124148
|
}
|
|
@@ -127563,17 +127563,17 @@ var init_prettier = __esm(() => {
|
|
|
127563
127563
|
}
|
|
127564
127564
|
const opts = options8 || {};
|
|
127565
127565
|
const posix = utils3.isWindows(options8);
|
|
127566
|
-
const
|
|
127567
|
-
const state =
|
|
127568
|
-
delete
|
|
127566
|
+
const regex = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true);
|
|
127567
|
+
const state = regex.state;
|
|
127568
|
+
delete regex.state;
|
|
127569
127569
|
let isIgnored2 = () => false;
|
|
127570
127570
|
if (opts.ignore) {
|
|
127571
127571
|
const ignoreOpts = { ...options8, ignore: null, onMatch: null, onResult: null };
|
|
127572
127572
|
isIgnored2 = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
127573
127573
|
}
|
|
127574
127574
|
const matcher = (input, returnObject = false) => {
|
|
127575
|
-
const { isMatch, match, output } = picomatch.test(input,
|
|
127576
|
-
const result = { glob, state, regex
|
|
127575
|
+
const { isMatch, match, output } = picomatch.test(input, regex, options8, { glob, posix });
|
|
127576
|
+
const result = { glob, state, regex, posix, input, output, match, isMatch };
|
|
127577
127577
|
if (typeof opts.onResult === "function") {
|
|
127578
127578
|
opts.onResult(result);
|
|
127579
127579
|
}
|
|
@@ -127598,7 +127598,7 @@ var init_prettier = __esm(() => {
|
|
|
127598
127598
|
}
|
|
127599
127599
|
return matcher;
|
|
127600
127600
|
};
|
|
127601
|
-
picomatch.test = (input,
|
|
127601
|
+
picomatch.test = (input, regex, options8, { glob, posix } = {}) => {
|
|
127602
127602
|
if (typeof input !== "string") {
|
|
127603
127603
|
throw new TypeError("Expected input to be a string");
|
|
127604
127604
|
}
|
|
@@ -127615,16 +127615,16 @@ var init_prettier = __esm(() => {
|
|
|
127615
127615
|
}
|
|
127616
127616
|
if (match === false || opts.capture === true) {
|
|
127617
127617
|
if (opts.matchBase === true || opts.basename === true) {
|
|
127618
|
-
match = picomatch.matchBase(input,
|
|
127618
|
+
match = picomatch.matchBase(input, regex, options8, posix);
|
|
127619
127619
|
} else {
|
|
127620
|
-
match =
|
|
127620
|
+
match = regex.exec(output);
|
|
127621
127621
|
}
|
|
127622
127622
|
}
|
|
127623
127623
|
return { isMatch: Boolean(match), match, output };
|
|
127624
127624
|
};
|
|
127625
127625
|
picomatch.matchBase = (input, glob, options8, posix = utils3.isWindows(options8)) => {
|
|
127626
|
-
const
|
|
127627
|
-
return
|
|
127626
|
+
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8);
|
|
127627
|
+
return regex.test(path152.basename(input));
|
|
127628
127628
|
};
|
|
127629
127629
|
picomatch.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str);
|
|
127630
127630
|
picomatch.parse = (pattern, options8) => {
|
|
@@ -127644,11 +127644,11 @@ var init_prettier = __esm(() => {
|
|
|
127644
127644
|
if (state && state.negated === true) {
|
|
127645
127645
|
source2 = `^(?!${source2}).*$`;
|
|
127646
127646
|
}
|
|
127647
|
-
const
|
|
127647
|
+
const regex = picomatch.toRegex(source2, options8);
|
|
127648
127648
|
if (returnState === true) {
|
|
127649
|
-
|
|
127649
|
+
regex.state = state;
|
|
127650
127650
|
}
|
|
127651
|
-
return
|
|
127651
|
+
return regex;
|
|
127652
127652
|
};
|
|
127653
127653
|
picomatch.makeRe = (input, options8 = {}, returnOutput = false, returnState = false) => {
|
|
127654
127654
|
if (!input || typeof input !== "string") {
|
|
@@ -127812,8 +127812,8 @@ var init_prettier = __esm(() => {
|
|
|
127812
127812
|
};
|
|
127813
127813
|
micromatch2.capture = (glob, input, options8) => {
|
|
127814
127814
|
let posix = utils3.isWindows(options8);
|
|
127815
|
-
let
|
|
127816
|
-
let match =
|
|
127815
|
+
let regex = picomatch.makeRe(String(glob), { ...options8, capture: true });
|
|
127816
|
+
let match = regex.exec(posix ? utils3.toPosixSlashes(input) : input);
|
|
127817
127817
|
if (match) {
|
|
127818
127818
|
return match.slice(1).map((v10) => v10 === undefined ? "" : v10);
|
|
127819
127819
|
}
|
|
@@ -132252,7 +132252,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
132252
132252
|
};
|
|
132253
132253
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
132254
132254
|
var fs42 = __importStar(__require2("fs"));
|
|
132255
|
-
var
|
|
132255
|
+
var regex = {
|
|
132256
132256
|
section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/,
|
|
132257
132257
|
param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
|
|
132258
132258
|
comment: /^\s*[#;].*$/
|
|
@@ -132284,14 +132284,14 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
132284
132284
|
var lines = data.split(/\r\n|\r|\n/);
|
|
132285
132285
|
lines.forEach(function(line3) {
|
|
132286
132286
|
var match;
|
|
132287
|
-
if (
|
|
132287
|
+
if (regex.comment.test(line3)) {
|
|
132288
132288
|
return;
|
|
132289
132289
|
}
|
|
132290
|
-
if (
|
|
132291
|
-
match = line3.match(
|
|
132290
|
+
if (regex.param.test(line3)) {
|
|
132291
|
+
match = line3.match(regex.param);
|
|
132292
132292
|
sectionBody[match[1]] = match[2];
|
|
132293
|
-
} else if (
|
|
132294
|
-
match = line3.match(
|
|
132293
|
+
} else if (regex.section.test(line3)) {
|
|
132294
|
+
match = line3.match(regex.section);
|
|
132295
132295
|
sectionName = match[1];
|
|
132296
132296
|
sectionBody = {};
|
|
132297
132297
|
value.push([sectionName, sectionBody]);
|
|
@@ -133377,8 +133377,8 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
133377
133377
|
}
|
|
133378
133378
|
_make(mode, key2) {
|
|
133379
133379
|
const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
|
|
133380
|
-
const
|
|
133381
|
-
return define2(this, key2,
|
|
133380
|
+
const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
|
|
133381
|
+
return define2(this, key2, regex);
|
|
133382
133382
|
}
|
|
133383
133383
|
};
|
|
133384
133384
|
var createRule = ({
|
|
@@ -138174,8 +138174,8 @@ var require_prettier = __commonJS((exports, module) => {
|
|
|
138174
138174
|
}
|
|
138175
138175
|
function makeString2(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
|
|
138176
138176
|
const otherQuote = enclosingQuote === '"' ? "'" : '"';
|
|
138177
|
-
const
|
|
138178
|
-
const raw2 = method_replace_all_default3(0, rawText,
|
|
138177
|
+
const regex = /\\(.)|(["'])/gsu;
|
|
138178
|
+
const raw2 = method_replace_all_default3(0, rawText, regex, (match, escaped, quote) => {
|
|
138179
138179
|
if (escaped === otherQuote) {
|
|
138180
138180
|
return escaped;
|
|
138181
138181
|
}
|
|
@@ -164333,12 +164333,12 @@ var require_ipaddr = __commonJS((exports, module) => {
|
|
|
164333
164333
|
return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::");
|
|
164334
164334
|
};
|
|
164335
164335
|
IPv6.prototype.toRFC5952String = function() {
|
|
164336
|
-
var bestMatchIndex, bestMatchLength, match,
|
|
164337
|
-
|
|
164336
|
+
var bestMatchIndex, bestMatchLength, match, regex, string4;
|
|
164337
|
+
regex = /((^|:)(0(:|$)){2,})/g;
|
|
164338
164338
|
string4 = this.toNormalizedString();
|
|
164339
164339
|
bestMatchIndex = 0;
|
|
164340
164340
|
bestMatchLength = -1;
|
|
164341
|
-
while (match =
|
|
164341
|
+
while (match = regex.exec(string4)) {
|
|
164342
164342
|
if (match[0].length > bestMatchLength) {
|
|
164343
164343
|
bestMatchIndex = match.index;
|
|
164344
164344
|
bestMatchLength = match[0].length;
|
|
@@ -169656,10 +169656,10 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
169656
169656
|
spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
|
|
169657
169657
|
return spread;
|
|
169658
169658
|
}
|
|
169659
|
-
function removeMatchingHeaders(
|
|
169659
|
+
function removeMatchingHeaders(regex, headers) {
|
|
169660
169660
|
var lastValue;
|
|
169661
169661
|
for (var header2 in headers) {
|
|
169662
|
-
if (
|
|
169662
|
+
if (regex.test(header2)) {
|
|
169663
169663
|
lastValue = headers[header2];
|
|
169664
169664
|
delete headers[header2];
|
|
169665
169665
|
}
|
|
@@ -201219,9 +201219,9 @@ var require_dist4 = __commonJS((exports, module) => {
|
|
|
201219
201219
|
name2 = "/" + name2;
|
|
201220
201220
|
let nsp = this._nsps.get(name2);
|
|
201221
201221
|
if (!nsp) {
|
|
201222
|
-
for (const [
|
|
201223
|
-
if (
|
|
201224
|
-
debug("attaching namespace %s to parent namespace %s", name2,
|
|
201222
|
+
for (const [regex, parentNamespace] of this.parentNamespacesFromRegExp) {
|
|
201223
|
+
if (regex.test(name2)) {
|
|
201224
|
+
debug("attaching namespace %s to parent namespace %s", name2, regex);
|
|
201225
201225
|
return parentNamespace.createChild(name2);
|
|
201226
201226
|
}
|
|
201227
201227
|
}
|
|
@@ -235840,24 +235840,6 @@ var BANNER_LINES = [
|
|
|
235840
235840
|
async function printBanner() {
|
|
235841
235841
|
await printAnimatedLines(BANNER_LINES);
|
|
235842
235842
|
}
|
|
235843
|
-
// ../../node_modules/ansi-regex/index.js
|
|
235844
|
-
function ansiRegex({ onlyFirst = false } = {}) {
|
|
235845
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
235846
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
235847
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
235848
|
-
const pattern = `${osc}|${csi}`;
|
|
235849
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
235850
|
-
}
|
|
235851
|
-
|
|
235852
|
-
// ../../node_modules/strip-ansi/index.js
|
|
235853
|
-
var regex = ansiRegex();
|
|
235854
|
-
function stripAnsi(string4) {
|
|
235855
|
-
if (typeof string4 !== "string") {
|
|
235856
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
|
|
235857
|
-
}
|
|
235858
|
-
return string4.replace(regex, "");
|
|
235859
|
-
}
|
|
235860
|
-
|
|
235861
235843
|
// ../../node_modules/p-wait-for/index.js
|
|
235862
235844
|
var resolveValue = Symbol("resolveValue");
|
|
235863
235845
|
var sleep2 = (ms, signal) => new Promise((resolve, reject) => {
|
|
@@ -251109,35 +251091,6 @@ function showPlainError(error48) {
|
|
|
251109
251091
|
}
|
|
251110
251092
|
|
|
251111
251093
|
// src/cli/utils/command/Base44Command.ts
|
|
251112
|
-
function writeJsonSuccess(result) {
|
|
251113
|
-
if (result.stdout) {
|
|
251114
|
-
if (result.outroMessage) {
|
|
251115
|
-
process.stderr.write(`${result.outroMessage}
|
|
251116
|
-
`);
|
|
251117
|
-
}
|
|
251118
|
-
process.stdout.write(result.stdout);
|
|
251119
|
-
return;
|
|
251120
|
-
}
|
|
251121
|
-
process.stdout.write(`${JSON.stringify({ output: stripAnsi(result.outroMessage ?? "") })}
|
|
251122
|
-
`);
|
|
251123
|
-
}
|
|
251124
|
-
function writeJsonError(error48) {
|
|
251125
|
-
const envelope = {
|
|
251126
|
-
error: error48 instanceof Error ? error48.message : String(error48)
|
|
251127
|
-
};
|
|
251128
|
-
if (isCLIError(error48)) {
|
|
251129
|
-
envelope.code = error48.code;
|
|
251130
|
-
if (error48.details.length > 0) {
|
|
251131
|
-
envelope.details = error48.details;
|
|
251132
|
-
}
|
|
251133
|
-
if (error48.hints.length > 0) {
|
|
251134
|
-
envelope.hints = error48.hints;
|
|
251135
|
-
}
|
|
251136
|
-
}
|
|
251137
|
-
process.stdout.write(`${JSON.stringify(envelope)}
|
|
251138
|
-
`);
|
|
251139
|
-
}
|
|
251140
|
-
|
|
251141
251094
|
class Base44Command extends Command {
|
|
251142
251095
|
_context;
|
|
251143
251096
|
_commandOptions;
|
|
@@ -251160,8 +251113,7 @@ class Base44Command extends Command {
|
|
|
251160
251113
|
}
|
|
251161
251114
|
action(fn) {
|
|
251162
251115
|
return super.action(async (...args) => {
|
|
251163
|
-
const
|
|
251164
|
-
const quiet = this.context.isNonInteractive || jsonMode;
|
|
251116
|
+
const quiet = this.context.isNonInteractive;
|
|
251165
251117
|
if (!quiet) {
|
|
251166
251118
|
await showCommandStart(this._commandOptions.fullBanner);
|
|
251167
251119
|
}
|
|
@@ -251177,13 +251129,6 @@ class Base44Command extends Command {
|
|
|
251177
251129
|
const result = await fn(this.context, ...args) ?? {};
|
|
251178
251130
|
if (!quiet) {
|
|
251179
251131
|
await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
|
|
251180
|
-
} else if (jsonMode) {
|
|
251181
|
-
writeJsonSuccess(result);
|
|
251182
|
-
const upgradeInfo = await upgradeCheckPromise;
|
|
251183
|
-
if (upgradeInfo) {
|
|
251184
|
-
process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
|
|
251185
|
-
`);
|
|
251186
|
-
}
|
|
251187
251132
|
} else {
|
|
251188
251133
|
if (result.outroMessage) {
|
|
251189
251134
|
process.stdout.write(`${result.outroMessage}
|
|
@@ -251199,9 +251144,7 @@ class Base44Command extends Command {
|
|
|
251199
251144
|
}
|
|
251200
251145
|
}
|
|
251201
251146
|
} catch (error48) {
|
|
251202
|
-
if (
|
|
251203
|
-
writeJsonError(error48);
|
|
251204
|
-
} else if (quiet) {
|
|
251147
|
+
if (quiet) {
|
|
251205
251148
|
showPlainError(error48);
|
|
251206
251149
|
} else {
|
|
251207
251150
|
showThemedError(error48, this.context);
|
|
@@ -252594,7 +252537,7 @@ function parseScopes(scopes) {
|
|
|
252594
252537
|
return (scopes ?? []).flatMap((s) => s.split(",")).map((s) => s.trim()).filter(Boolean);
|
|
252595
252538
|
}
|
|
252596
252539
|
async function initiateAction(ctx, options) {
|
|
252597
|
-
const { log, runTask: runTask2, isNonInteractive
|
|
252540
|
+
const { log, runTask: runTask2, isNonInteractive } = ctx;
|
|
252598
252541
|
const integrationType = parseIntegrationType(options.integrationType);
|
|
252599
252542
|
const scopes = parseScopes(options.scopes);
|
|
252600
252543
|
const response = await runTask2(`Initiating ${integrationType} connector`, () => setConnector(integrationType, scopes), {
|
|
@@ -252605,18 +252548,6 @@ async function initiateAction(ctx, options) {
|
|
|
252605
252548
|
const detail = response.error === "different_user" && response.otherUserEmail ? ` (already authorized by ${response.otherUserEmail})` : response.errorMessage ? ` (${response.errorMessage})` : "";
|
|
252606
252549
|
throw new InvalidInputError(`Could not initiate ${integrationType}: ${response.error}${detail}`);
|
|
252607
252550
|
}
|
|
252608
|
-
if (jsonMode) {
|
|
252609
|
-
return {
|
|
252610
|
-
outroMessage: response.alreadyAuthorized ? `${integrationType} already authorized` : `${integrationType} initialized`,
|
|
252611
|
-
stdout: `${JSON.stringify({
|
|
252612
|
-
integrationType,
|
|
252613
|
-
alreadyAuthorized: response.alreadyAuthorized,
|
|
252614
|
-
redirectUrl: response.redirectUrl,
|
|
252615
|
-
connectionId: response.connectionId
|
|
252616
|
-
}, null, 2)}
|
|
252617
|
-
`
|
|
252618
|
-
};
|
|
252619
|
-
}
|
|
252620
252551
|
if (response.alreadyAuthorized || !response.redirectUrl) {
|
|
252621
252552
|
return {
|
|
252622
252553
|
outroMessage: `${integrationType} is already authorized. Run 'base44 connectors pull' to fetch its config.`
|
|
@@ -252651,8 +252582,7 @@ Examples:
|
|
|
252651
252582
|
// src/cli/commands/connectors/list-available.ts
|
|
252652
252583
|
async function listAvailableAction({
|
|
252653
252584
|
log,
|
|
252654
|
-
runTask: runTask2
|
|
252655
|
-
jsonMode
|
|
252585
|
+
runTask: runTask2
|
|
252656
252586
|
}) {
|
|
252657
252587
|
const { integrations } = await runTask2("Fetching available integrations from Base44", async () => {
|
|
252658
252588
|
return await listAvailableIntegrations();
|
|
@@ -252660,13 +252590,6 @@ async function listAvailableAction({
|
|
|
252660
252590
|
successMessage: "Available integrations fetched successfully",
|
|
252661
252591
|
errorMessage: "Failed to fetch available integrations"
|
|
252662
252592
|
});
|
|
252663
|
-
if (jsonMode) {
|
|
252664
|
-
return {
|
|
252665
|
-
outroMessage: `Found ${integrations.length} available integrations.`,
|
|
252666
|
-
stdout: `${JSON.stringify({ integrations }, null, 2)}
|
|
252667
|
-
`
|
|
252668
|
-
};
|
|
252669
|
-
}
|
|
252670
252593
|
if (integrations.length === 0) {
|
|
252671
252594
|
return { outroMessage: "No available integrations found." };
|
|
252672
252595
|
}
|
|
@@ -252694,7 +252617,7 @@ async function resolveConnectorsDir(options) {
|
|
|
252694
252617
|
const { project: project2 } = await readProjectConfig();
|
|
252695
252618
|
return join19(dirname15(project2.configPath), project2.connectorsDir);
|
|
252696
252619
|
}
|
|
252697
|
-
async function pullConnectorsAction({ log, runTask: runTask2
|
|
252620
|
+
async function pullConnectorsAction({ log, runTask: runTask2 }, options) {
|
|
252698
252621
|
const connectorsDir = await resolveConnectorsDir(options);
|
|
252699
252622
|
const remoteConnectors = await runTask2("Fetching connectors from Base44", async () => {
|
|
252700
252623
|
return await pullAllConnectors();
|
|
@@ -252708,13 +252631,6 @@ async function pullConnectorsAction({ log, runTask: runTask2, jsonMode }, option
|
|
|
252708
252631
|
successMessage: "Connector files synced successfully",
|
|
252709
252632
|
errorMessage: "Failed to sync connector files"
|
|
252710
252633
|
});
|
|
252711
|
-
if (jsonMode) {
|
|
252712
|
-
return {
|
|
252713
|
-
outroMessage: `Pulled ${remoteConnectors.length} connectors to ${connectorsDir}`,
|
|
252714
|
-
stdout: `${JSON.stringify({ connectorsDir, pulled: remoteConnectors.length, written, deleted }, null, 2)}
|
|
252715
|
-
`
|
|
252716
|
-
};
|
|
252717
|
-
}
|
|
252718
252634
|
if (written.length > 0) {
|
|
252719
252635
|
log.success(`Written: ${written.join(", ")}`);
|
|
252720
252636
|
}
|
|
@@ -252803,15 +252719,13 @@ function printSummary(results, oauthOutcomes, log) {
|
|
|
252803
252719
|
log.error(`Failed: ${r.type} - ${r.error}`);
|
|
252804
252720
|
}
|
|
252805
252721
|
}
|
|
252806
|
-
async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2
|
|
252722
|
+
async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2 }, options) {
|
|
252807
252723
|
const connectors = await readConnectorsToPush(options);
|
|
252808
|
-
if (
|
|
252809
|
-
|
|
252810
|
-
|
|
252811
|
-
|
|
252812
|
-
|
|
252813
|
-
log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
|
|
252814
|
-
}
|
|
252724
|
+
if (connectors.length === 0) {
|
|
252725
|
+
log.info("No local connectors found - checking for remote connectors to remove");
|
|
252726
|
+
} else {
|
|
252727
|
+
const connectorNames = connectors.map((c3) => c3.type).join(", ");
|
|
252728
|
+
log.info(`Found ${connectors.length} connectors to push: ${connectorNames}`);
|
|
252815
252729
|
}
|
|
252816
252730
|
const { results } = await runTask2("Pushing connectors to Base44", async () => {
|
|
252817
252731
|
return await pushConnectors(connectors);
|
|
@@ -252825,13 +252739,6 @@ async function pushConnectorsAction({ isNonInteractive, log, runTask: runTask2,
|
|
|
252825
252739
|
if (needsOAuth.length > 0 && !allAuthorized) {
|
|
252826
252740
|
outroMessage = isNonInteractive ? "Skipped OAuth in non-interactive mode. Run 'base44 connectors push' locally or open the links above to authorize." : "Some connectors still require authorization. Run 'base44 connectors push' or open the links above to authorize.";
|
|
252827
252741
|
}
|
|
252828
|
-
if (jsonMode) {
|
|
252829
|
-
return {
|
|
252830
|
-
outroMessage,
|
|
252831
|
-
stdout: `${JSON.stringify({ results, oauth: Object.fromEntries(oauthOutcomes) }, null, 2)}
|
|
252832
|
-
`
|
|
252833
|
-
};
|
|
252834
|
-
}
|
|
252835
252742
|
printSummary(results, oauthOutcomes, log);
|
|
252836
252743
|
return { outroMessage };
|
|
252837
252744
|
}
|
|
@@ -258173,7 +258080,7 @@ function getEjectCommand() {
|
|
|
258173
258080
|
// src/cli/program.ts
|
|
258174
258081
|
function createProgram(context) {
|
|
258175
258082
|
const program2 = new Command;
|
|
258176
|
-
program2.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(package_default.version).addOption(new Option("--app-id <id>", "Base44 app ID to use").env(BASE44_APP_ID_ENV_VAR))
|
|
258083
|
+
program2.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(package_default.version).addOption(new Option("--app-id <id>", "Base44 app ID to use").env(BASE44_APP_ID_ENV_VAR));
|
|
258177
258084
|
program2.configureHelp({
|
|
258178
258085
|
sortSubcommands: true
|
|
258179
258086
|
});
|
|
@@ -261424,9 +261331,9 @@ function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, deb
|
|
|
261424
261331
|
throw new InconclusiveMatchError("can't match cohort without a given cohort property value");
|
|
261425
261332
|
return propertyGroupType === "AND";
|
|
261426
261333
|
}
|
|
261427
|
-
function isValidRegex(
|
|
261334
|
+
function isValidRegex(regex) {
|
|
261428
261335
|
try {
|
|
261429
|
-
new RegExp(
|
|
261336
|
+
new RegExp(regex);
|
|
261430
261337
|
return true;
|
|
261431
261338
|
} catch (err) {
|
|
261432
261339
|
return false;
|
|
@@ -261444,8 +261351,8 @@ function convertToDateTime(value) {
|
|
|
261444
261351
|
throw new InconclusiveMatchError(`The date provided ${value} must be a string, number, or date object`);
|
|
261445
261352
|
}
|
|
261446
261353
|
function relativeDateParseForFeatureFlagMatching(value) {
|
|
261447
|
-
const
|
|
261448
|
-
const match = value.match(
|
|
261354
|
+
const regex = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
|
|
261355
|
+
const match = value.match(regex);
|
|
261449
261356
|
const parsedDt = new Date(new Date().toISOString());
|
|
261450
261357
|
if (!match)
|
|
261451
261358
|
return null;
|
|
@@ -262414,14 +262321,12 @@ async function runCLI(options8) {
|
|
|
262414
262321
|
ensureNpmAssets(join28(__dirname4, "../assets"));
|
|
262415
262322
|
const errorReporter = new ErrorReporter;
|
|
262416
262323
|
errorReporter.registerProcessErrorHandlers();
|
|
262417
|
-
const
|
|
262418
|
-
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY || jsonMode;
|
|
262324
|
+
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
262419
262325
|
const log = isNonInteractive ? new SimpleLogger : new ClackLogger;
|
|
262420
262326
|
const runTask2 = isNonInteractive ? createSimpleRunTask(log) : createInteractiveRunTask();
|
|
262421
262327
|
const context = {
|
|
262422
262328
|
errorReporter,
|
|
262423
262329
|
isNonInteractive,
|
|
262424
|
-
jsonMode,
|
|
262425
262330
|
distribution: options8?.distribution ?? "npm",
|
|
262426
262331
|
log,
|
|
262427
262332
|
runTask: runTask2
|
|
@@ -262450,4 +262355,4 @@ export {
|
|
|
262450
262355
|
CLIExitError
|
|
262451
262356
|
};
|
|
262452
262357
|
|
|
262453
|
-
//# debugId=
|
|
262358
|
+
//# debugId=B346AA8B9932872164756E2164756E21
|