@base44-preview/cli 0.0.31-pr.246.c851bc7 → 0.0.32-pr.247.7e47d4d
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 +10 -8
- package/dist/cli/index.js +22 -39
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ Base44's backend service provides a managed backend for your applications, inclu
|
|
|
7
7
|
- **Create projects** from templates.
|
|
8
8
|
- **Sync** resources defined in local code with your Base44 backend.
|
|
9
9
|
- **Deploy sites** to Base44's hosting platform.
|
|
10
|
+
- **Generate TypeScript types** from your project resources.
|
|
10
11
|
|
|
11
12
|
To get started, see the full list of commands below or check out the [documentation](https://docs.base44.com/developers/references/cli/get-started/overview).
|
|
12
13
|
|
|
@@ -43,19 +44,20 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
|
|
|
43
44
|
|
|
44
45
|
| Command | Description |
|
|
45
46
|
| ------- | ----------- |
|
|
47
|
+
| [`agents pull`](https://docs.base44.com/developers/references/cli/commands/agents-pull) | Pull agents from Base44 to local files |
|
|
48
|
+
| [`agents push`](https://docs.base44.com/developers/references/cli/commands/agents-push) | Push local agents to Base44 |
|
|
46
49
|
| [`create`](https://docs.base44.com/developers/references/cli/commands/create) | Create a new Base44 project from a template |
|
|
50
|
+
| [`dashboard open`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
47
51
|
| [`deploy`](https://docs.base44.com/developers/references/cli/commands/deploy) | Deploy resources and site to Base44 |
|
|
52
|
+
| [`entities push`](https://docs.base44.com/developers/references/cli/commands/entities-push) | Push local entity schemas to Base44 |
|
|
53
|
+
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
48
54
|
| [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
|
|
49
|
-
| [`dashboard open`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
50
55
|
| [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
|
|
51
56
|
| [`logout`](https://docs.base44.com/developers/references/cli/commands/logout) | Sign out and clear stored credentials |
|
|
52
|
-
| [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami) | Display the current authenticated user |
|
|
53
|
-
| [`agents pull`](https://docs.base44.com/developers/references/cli/commands/agents-pull) | Pull agents from Base44 to local files |
|
|
54
|
-
| [`agents push`](https://docs.base44.com/developers/references/cli/commands/agents-push) | Push local agents to Base44 |
|
|
55
|
-
| [`entities push`](https://docs.base44.com/developers/references/cli/commands/entities-push) | Push local entity schemas to Base44 |
|
|
56
|
-
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
57
57
|
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
58
58
|
| [`site open`](https://docs.base44.com/developers/references/cli/commands/site-open) | Open the published site in your browser |
|
|
59
|
+
| [`types generate`](https://docs.base44.com/developers/references/cli/commands/types-generate) | Generate TypeScript types from project resources |
|
|
60
|
+
| [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami) | Display the current authenticated user |
|
|
59
61
|
|
|
60
62
|
|
|
61
63
|
<!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
|
|
@@ -83,9 +85,9 @@ base44 <command> --help
|
|
|
83
85
|
base44 --version
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
##
|
|
88
|
+
## Beta
|
|
87
89
|
|
|
88
|
-
The CLI and Base44 backend service are currently in
|
|
90
|
+
The CLI and Base44 backend service are currently in beta. We're actively improving them based on user feedback. Share your thoughts and feature requests on our [GitHub Discussions](https://github.com/orgs/base44/discussions).
|
|
89
91
|
|
|
90
92
|
Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
91
93
|
|
package/dist/cli/index.js
CHANGED
|
@@ -9296,10 +9296,10 @@ var require_ejs = __commonJS((exports) => {
|
|
|
9296
9296
|
};
|
|
9297
9297
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
9298
9298
|
var filename = opts.filename;
|
|
9299
|
-
var
|
|
9299
|
+
var basename3 = path11.basename(filename, path11.extname(filename));
|
|
9300
9300
|
try {
|
|
9301
9301
|
Object.defineProperty(returnedFn, "name", {
|
|
9302
|
-
value:
|
|
9302
|
+
value: basename3,
|
|
9303
9303
|
writable: false,
|
|
9304
9304
|
enumerable: false,
|
|
9305
9305
|
configurable: true
|
|
@@ -111567,12 +111567,12 @@ function getLanguageByFileName(languages2, file2) {
|
|
|
111567
111567
|
if (!file2) {
|
|
111568
111568
|
return;
|
|
111569
111569
|
}
|
|
111570
|
-
const
|
|
111570
|
+
const basename4 = getFileBasename(file2).toLowerCase();
|
|
111571
111571
|
return languages2.find(({
|
|
111572
111572
|
filenames
|
|
111573
|
-
}) => filenames?.some((name2) => name2.toLowerCase() ===
|
|
111573
|
+
}) => filenames?.some((name2) => name2.toLowerCase() === basename4)) ?? languages2.find(({
|
|
111574
111574
|
extensions
|
|
111575
|
-
}) => extensions?.some((extension) =>
|
|
111575
|
+
}) => extensions?.some((extension) => basename4.endsWith(extension)));
|
|
111576
111576
|
}
|
|
111577
111577
|
function getLanguageByLanguageName(languages2, languageName) {
|
|
111578
111578
|
if (!languageName) {
|
|
@@ -116794,8 +116794,8 @@ var init_prettier = __esm(() => {
|
|
|
116794
116794
|
}
|
|
116795
116795
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
116796
116796
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
116797
|
-
const
|
|
116798
|
-
return endsWithSlashGlobStar(pattern) || isStaticPattern(
|
|
116797
|
+
const basename4 = path152.basename(pattern);
|
|
116798
|
+
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename4);
|
|
116799
116799
|
}
|
|
116800
116800
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
116801
116801
|
function expandPatternsWithBraceExpansion(patterns) {
|
|
@@ -155679,7 +155679,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155679
155679
|
var path18 = __require("node:path");
|
|
155680
155680
|
var fs28 = __require("node:fs");
|
|
155681
155681
|
var dirname11 = path18.dirname;
|
|
155682
|
-
var
|
|
155682
|
+
var basename4 = path18.basename;
|
|
155683
155683
|
var extname2 = path18.extname;
|
|
155684
155684
|
var join15 = path18.join;
|
|
155685
155685
|
var resolve5 = path18.resolve;
|
|
@@ -155718,7 +155718,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155718
155718
|
var root2 = roots[i5];
|
|
155719
155719
|
var loc = resolve5(root2, name2);
|
|
155720
155720
|
var dir = dirname11(loc);
|
|
155721
|
-
var file2 =
|
|
155721
|
+
var file2 = basename4(loc);
|
|
155722
155722
|
path19 = this.resolve(dir, file2);
|
|
155723
155723
|
}
|
|
155724
155724
|
return path19;
|
|
@@ -155748,7 +155748,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
155748
155748
|
if (stat2 && stat2.isFile()) {
|
|
155749
155749
|
return path19;
|
|
155750
155750
|
}
|
|
155751
|
-
path19 = join15(dir,
|
|
155751
|
+
path19 = join15(dir, basename4(file2, ext), "index" + ext);
|
|
155752
155752
|
stat2 = tryStat(path19);
|
|
155753
155753
|
if (stat2 && stat2.isFile()) {
|
|
155754
155754
|
return path19;
|
|
@@ -159069,7 +159069,7 @@ var require_content_disposition = __commonJS((exports, module) => {
|
|
|
159069
159069
|
*/
|
|
159070
159070
|
module.exports = contentDisposition;
|
|
159071
159071
|
module.exports.parse = parse10;
|
|
159072
|
-
var
|
|
159072
|
+
var basename4 = __require("path").basename;
|
|
159073
159073
|
var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
|
|
159074
159074
|
var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
|
|
159075
159075
|
var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
|
|
@@ -159104,9 +159104,9 @@ var require_content_disposition = __commonJS((exports, module) => {
|
|
|
159104
159104
|
if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) {
|
|
159105
159105
|
throw new TypeError("fallback must be ISO-8859-1 string");
|
|
159106
159106
|
}
|
|
159107
|
-
var name2 =
|
|
159107
|
+
var name2 = basename4(filename);
|
|
159108
159108
|
var isQuotedString = TEXT_REGEXP.test(name2);
|
|
159109
|
-
var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) :
|
|
159109
|
+
var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name2) : basename4(fallback);
|
|
159110
159110
|
var hasFallback = typeof fallbackName === "string" && fallbackName !== name2;
|
|
159111
159111
|
if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name2)) {
|
|
159112
159112
|
params["filename*"] = name2;
|
|
@@ -185615,7 +185615,7 @@ async function deployFunctions(functions) {
|
|
|
185615
185615
|
return result.data;
|
|
185616
185616
|
}
|
|
185617
185617
|
// src/core/resources/function/config.ts
|
|
185618
|
-
import {
|
|
185618
|
+
import { dirname as dirname4, join as join5 } from "node:path";
|
|
185619
185619
|
async function readFunctionConfig(configPath) {
|
|
185620
185620
|
const parsed = await readJsonFile(configPath);
|
|
185621
185621
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -185646,24 +185646,7 @@ async function readAllFunctions(functionsDir) {
|
|
|
185646
185646
|
cwd: functionsDir,
|
|
185647
185647
|
absolute: true
|
|
185648
185648
|
});
|
|
185649
|
-
const
|
|
185650
|
-
cwd: functionsDir,
|
|
185651
|
-
absolute: true
|
|
185652
|
-
});
|
|
185653
|
-
const configFilesDirs = new Set(configFiles.map((f) => dirname4(f)));
|
|
185654
|
-
const indexFilesDirs = indexFiles.filter((indexFile) => !configFilesDirs.has(dirname4(indexFile)));
|
|
185655
|
-
const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
185656
|
-
const functionsWithoutConfig = await Promise.all(indexFilesDirs.map(async (functionFile) => {
|
|
185657
|
-
const functionDir = dirname4(functionFile);
|
|
185658
|
-
const filePaths = await globby("*.{js,ts,json}", {
|
|
185659
|
-
cwd: functionDir,
|
|
185660
|
-
absolute: true
|
|
185661
|
-
});
|
|
185662
|
-
const name2 = basename2(functionDir);
|
|
185663
|
-
const entry = basename2(functionFile);
|
|
185664
|
-
return { name: name2, entry, entryPath: functionFile, filePaths };
|
|
185665
|
-
}));
|
|
185666
|
-
const functions = [...functionsFromConfig, ...functionsWithoutConfig];
|
|
185649
|
+
const functions = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
185667
185650
|
const names = new Set;
|
|
185668
185651
|
for (const fn of functions) {
|
|
185669
185652
|
if (names.has(fn.name)) {
|
|
@@ -185674,11 +185657,11 @@ async function readAllFunctions(functionsDir) {
|
|
|
185674
185657
|
return functions;
|
|
185675
185658
|
}
|
|
185676
185659
|
// src/core/resources/function/deploy.ts
|
|
185677
|
-
import { basename as
|
|
185660
|
+
import { basename as basename2 } from "node:path";
|
|
185678
185661
|
async function loadFunctionCode(fn) {
|
|
185679
185662
|
const loadedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
|
|
185680
185663
|
const content = await readTextFile(filePath);
|
|
185681
|
-
return { path:
|
|
185664
|
+
return { path: basename2(filePath), content };
|
|
185682
185665
|
}));
|
|
185683
185666
|
return { ...fn, files: loadedFiles };
|
|
185684
185667
|
}
|
|
@@ -193462,7 +193445,7 @@ var {
|
|
|
193462
193445
|
// package.json
|
|
193463
193446
|
var package_default = {
|
|
193464
193447
|
name: "base44",
|
|
193465
|
-
version: "0.0.
|
|
193448
|
+
version: "0.0.32",
|
|
193466
193449
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
193467
193450
|
type: "module",
|
|
193468
193451
|
bin: {
|
|
@@ -194646,7 +194629,7 @@ function getFunctionsDeployCommand(context) {
|
|
|
194646
194629
|
}
|
|
194647
194630
|
|
|
194648
194631
|
// src/cli/commands/project/create.ts
|
|
194649
|
-
import { basename as
|
|
194632
|
+
import { basename as basename3, join as join11, resolve as resolve2 } from "node:path";
|
|
194650
194633
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
194651
194634
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
194652
194635
|
async function getTemplateById(templateId) {
|
|
@@ -194681,8 +194664,8 @@ async function createInteractive(options) {
|
|
|
194681
194664
|
name: () => {
|
|
194682
194665
|
return options.name ? Promise.resolve(options.name) : he({
|
|
194683
194666
|
message: "What is the name of your project?",
|
|
194684
|
-
placeholder:
|
|
194685
|
-
initialValue:
|
|
194667
|
+
placeholder: basename3(process.cwd()),
|
|
194668
|
+
initialValue: basename3(process.cwd()),
|
|
194686
194669
|
validate: (value) => {
|
|
194687
194670
|
if (!value || value.trim().length === 0) {
|
|
194688
194671
|
return "Every project deserves a name";
|
|
@@ -199777,4 +199760,4 @@ export {
|
|
|
199777
199760
|
CLIExitError
|
|
199778
199761
|
};
|
|
199779
199762
|
|
|
199780
|
-
//# debugId=
|
|
199763
|
+
//# debugId=BE87F2C8EFF5B4AD64756E2164756E21
|