@base44-preview/cli 0.0.54-pr.537.2a32173 → 0.0.54-pr.537.331c674
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +87 -74
- package/dist/cli/index.js.map +7 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -12980,10 +12980,10 @@ var require_ejs = __commonJS((exports) => {
|
|
|
12980
12980
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
12981
12981
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
12982
12982
|
exports.resolveInclude = function(name2, filename, isDir) {
|
|
12983
|
-
var
|
|
12983
|
+
var dirname8 = path11.dirname;
|
|
12984
12984
|
var extname = path11.extname;
|
|
12985
12985
|
var resolve2 = path11.resolve;
|
|
12986
|
-
var includePath = resolve2(isDir ? filename :
|
|
12986
|
+
var includePath = resolve2(isDir ? filename : dirname8(filename), name2);
|
|
12987
12987
|
var ext = extname(name2);
|
|
12988
12988
|
if (!ext) {
|
|
12989
12989
|
includePath += ".ejs";
|
|
@@ -163944,7 +163944,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
163944
163944
|
var debug = require_src4()("express:view");
|
|
163945
163945
|
var path18 = __require("node:path");
|
|
163946
163946
|
var fs28 = __require("node:fs");
|
|
163947
|
-
var
|
|
163947
|
+
var dirname18 = path18.dirname;
|
|
163948
163948
|
var basename4 = path18.basename;
|
|
163949
163949
|
var extname2 = path18.extname;
|
|
163950
163950
|
var join25 = path18.join;
|
|
@@ -163983,7 +163983,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
163983
163983
|
for (var i5 = 0;i5 < roots.length && !path19; i5++) {
|
|
163984
163984
|
var root2 = roots[i5];
|
|
163985
163985
|
var loc = resolve9(root2, name2);
|
|
163986
|
-
var dir =
|
|
163986
|
+
var dir = dirname18(loc);
|
|
163987
163987
|
var file2 = basename4(loc);
|
|
163988
163988
|
path19 = this.resolve(dir, file2);
|
|
163989
163989
|
}
|
|
@@ -218205,7 +218205,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
218205
218205
|
});
|
|
218206
218206
|
module.exports = __toCommonJS(src_exports);
|
|
218207
218207
|
var import_promises22 = __require("node:fs/promises");
|
|
218208
|
-
var
|
|
218208
|
+
var import_node_fs24 = __require("node:fs");
|
|
218209
218209
|
var DEVIN_LOCAL_PATH = "/opt/.devin";
|
|
218210
218210
|
var CURSOR2 = "cursor";
|
|
218211
218211
|
var CURSOR_CLI = "cursor-cli";
|
|
@@ -218262,7 +218262,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
218262
218262
|
return { isAgent: true, agent: { name: REPLIT } };
|
|
218263
218263
|
}
|
|
218264
218264
|
try {
|
|
218265
|
-
await (0, import_promises22.access)(DEVIN_LOCAL_PATH,
|
|
218265
|
+
await (0, import_promises22.access)(DEVIN_LOCAL_PATH, import_node_fs24.constants.F_OK);
|
|
218266
218266
|
return { isAgent: true, agent: { name: DEVIN } };
|
|
218267
218267
|
} catch (error48) {}
|
|
218268
218268
|
return { isAgent: false, agent: undefined };
|
|
@@ -218271,7 +218271,24 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
218271
218271
|
|
|
218272
218272
|
// src/core/utils/env.ts
|
|
218273
218273
|
var import_dotenv = __toESM(require_main(), 1);
|
|
218274
|
-
import {
|
|
218274
|
+
import { existsSync } from "node:fs";
|
|
218275
|
+
import { dirname as dirname2, join } from "node:path";
|
|
218276
|
+
|
|
218277
|
+
// src/core/consts.ts
|
|
218278
|
+
var PROJECT_SUBDIR = "base44";
|
|
218279
|
+
var CONFIG_FILE_EXTENSION = "jsonc";
|
|
218280
|
+
var CONFIG_FILE_EXTENSION_GLOB = "{json,jsonc}";
|
|
218281
|
+
var FUNCTION_CONFIG_GLOB = `**/function.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
218282
|
+
var ENTRY_FILE_GLOB = "**/entry.{js,ts}";
|
|
218283
|
+
var ENTRY_IGNORE_DOT_PATHS = ["**/*.*/**"];
|
|
218284
|
+
var APP_CONFIG_PATTERN = `**/.app.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
218285
|
+
var PROJECT_CONFIG_PATTERNS = [
|
|
218286
|
+
`${PROJECT_SUBDIR}/config.${CONFIG_FILE_EXTENSION_GLOB}`,
|
|
218287
|
+
`config.${CONFIG_FILE_EXTENSION_GLOB}`
|
|
218288
|
+
];
|
|
218289
|
+
var TYPES_OUTPUT_SUBDIR = ".types";
|
|
218290
|
+
var TYPES_FILENAME = "types.d.ts";
|
|
218291
|
+
var AUTH_CLIENT_ID = "base44_cli";
|
|
218275
218292
|
|
|
218276
218293
|
// src/core/utils/fs.ts
|
|
218277
218294
|
var import_json5 = __toESM(require_lib(), 1);
|
|
@@ -233041,9 +233058,21 @@ var BASE44_ENV_KEYS = [
|
|
|
233041
233058
|
"BASE44_REFRESH_TOKEN",
|
|
233042
233059
|
"BASE44_API_URL"
|
|
233043
233060
|
];
|
|
233061
|
+
var PROJECT_CONFIG_FILES = ["jsonc", "json"].map((ext) => join(PROJECT_SUBDIR, `config.${ext}`));
|
|
233062
|
+
function findProjectRootSync(startDir) {
|
|
233063
|
+
let current = startDir;
|
|
233064
|
+
while (current !== dirname2(current)) {
|
|
233065
|
+
if (PROJECT_CONFIG_FILES.some((rel) => existsSync(join(current, rel)))) {
|
|
233066
|
+
return current;
|
|
233067
|
+
}
|
|
233068
|
+
current = dirname2(current);
|
|
233069
|
+
}
|
|
233070
|
+
return null;
|
|
233071
|
+
}
|
|
233044
233072
|
function loadProjectEnvFiles(cwd = process.cwd()) {
|
|
233073
|
+
const root = findProjectRootSync(cwd) ?? cwd;
|
|
233045
233074
|
import_dotenv.config({
|
|
233046
|
-
path: [join(
|
|
233075
|
+
path: [join(root, ".env.local"), join(root, ".env")],
|
|
233047
233076
|
quiet: true
|
|
233048
233077
|
});
|
|
233049
233078
|
normalizeBase44Env();
|
|
@@ -233064,7 +233093,7 @@ function normalizeBase44Env() {
|
|
|
233064
233093
|
loadProjectEnvFiles();
|
|
233065
233094
|
|
|
233066
233095
|
// src/cli/index.ts
|
|
233067
|
-
import { dirname as
|
|
233096
|
+
import { dirname as dirname22, join as join29 } from "node:path";
|
|
233068
233097
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
233069
233098
|
|
|
233070
233099
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
@@ -234272,7 +234301,7 @@ var {
|
|
|
234272
234301
|
} = import__.default;
|
|
234273
234302
|
|
|
234274
234303
|
// src/cli/commands/agents/pull.ts
|
|
234275
|
-
import { dirname as
|
|
234304
|
+
import { dirname as dirname9, join as join14 } from "node:path";
|
|
234276
234305
|
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
234277
234306
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
234278
234307
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -235036,22 +235065,6 @@ var import_jsonwebtoken = __toESM(require_jsonwebtoken(), 1);
|
|
|
235036
235065
|
import { homedir } from "node:os";
|
|
235037
235066
|
import { join as join2 } from "node:path";
|
|
235038
235067
|
|
|
235039
|
-
// src/core/consts.ts
|
|
235040
|
-
var PROJECT_SUBDIR = "base44";
|
|
235041
|
-
var CONFIG_FILE_EXTENSION = "jsonc";
|
|
235042
|
-
var CONFIG_FILE_EXTENSION_GLOB = "{json,jsonc}";
|
|
235043
|
-
var FUNCTION_CONFIG_GLOB = `**/function.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
235044
|
-
var ENTRY_FILE_GLOB = "**/entry.{js,ts}";
|
|
235045
|
-
var ENTRY_IGNORE_DOT_PATHS = ["**/*.*/**"];
|
|
235046
|
-
var APP_CONFIG_PATTERN = `**/.app.${CONFIG_FILE_EXTENSION_GLOB}`;
|
|
235047
|
-
var PROJECT_CONFIG_PATTERNS = [
|
|
235048
|
-
`${PROJECT_SUBDIR}/config.${CONFIG_FILE_EXTENSION_GLOB}`,
|
|
235049
|
-
`config.${CONFIG_FILE_EXTENSION_GLOB}`
|
|
235050
|
-
];
|
|
235051
|
-
var TYPES_OUTPUT_SUBDIR = ".types";
|
|
235052
|
-
var TYPES_FILENAME = "types.d.ts";
|
|
235053
|
-
var AUTH_CLIENT_ID = "base44_cli";
|
|
235054
|
-
|
|
235055
235068
|
// src/core/project/schema.ts
|
|
235056
235069
|
var TemplateSchema = exports_external.object({
|
|
235057
235070
|
id: exports_external.string(),
|
|
@@ -236292,7 +236305,7 @@ import path3 from "node:path";
|
|
|
236292
236305
|
|
|
236293
236306
|
// ../../node_modules/tar/dist/esm/list.js
|
|
236294
236307
|
import fs2 from "node:fs";
|
|
236295
|
-
import { dirname as
|
|
236308
|
+
import { dirname as dirname3, parse as parse7 } from "path";
|
|
236296
236309
|
|
|
236297
236310
|
// ../../node_modules/tar/dist/esm/options.js
|
|
236298
236311
|
var argmap = new Map([
|
|
@@ -237868,7 +237881,7 @@ var filesFilter = (opt, files) => {
|
|
|
237868
237881
|
if (m !== undefined) {
|
|
237869
237882
|
ret = m;
|
|
237870
237883
|
} else {
|
|
237871
|
-
ret = mapHas(
|
|
237884
|
+
ret = mapHas(dirname3(file2), root);
|
|
237872
237885
|
}
|
|
237873
237886
|
}
|
|
237874
237887
|
map2.set(file2, ret);
|
|
@@ -241392,9 +241405,9 @@ var shouldExpandGlobstarDirectory = (pattern) => {
|
|
|
241392
241405
|
if (!match) {
|
|
241393
241406
|
return false;
|
|
241394
241407
|
}
|
|
241395
|
-
const
|
|
241396
|
-
const hasWildcards = /[*?[\]{}]/.test(
|
|
241397
|
-
const hasExtension = nodePath.extname(
|
|
241408
|
+
const dirname4 = match[1];
|
|
241409
|
+
const hasWildcards = /[*?[\]{}]/.test(dirname4);
|
|
241410
|
+
const hasExtension = nodePath.extname(dirname4) && !dirname4.startsWith(".");
|
|
241398
241411
|
return !hasWildcards && !hasExtension;
|
|
241399
241412
|
};
|
|
241400
241413
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
@@ -241651,17 +241664,17 @@ var generateGlobTasks = normalizeArguments(generateTasks);
|
|
|
241651
241664
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
241652
241665
|
|
|
241653
241666
|
// src/core/project/config.ts
|
|
241654
|
-
import { dirname as
|
|
241667
|
+
import { dirname as dirname7, join as join10 } from "node:path";
|
|
241655
241668
|
|
|
241656
241669
|
// src/core/project/plugins.ts
|
|
241657
241670
|
import { createRequire as createRequire2 } from "node:module";
|
|
241658
|
-
import { dirname as
|
|
241671
|
+
import { dirname as dirname4, isAbsolute as isAbsolute2, join as join4, resolve } from "node:path";
|
|
241659
241672
|
function resolvePluginRoot(pluginSource, fromRoot) {
|
|
241660
241673
|
if (pluginSource.startsWith(".") || isAbsolute2(pluginSource)) {
|
|
241661
241674
|
return resolve(fromRoot, pluginSource);
|
|
241662
241675
|
}
|
|
241663
241676
|
const req = createRequire2(join4(fromRoot, "package.json"));
|
|
241664
|
-
return
|
|
241677
|
+
return dirname4(req.resolve(`${pluginSource}/package.json`));
|
|
241665
241678
|
}
|
|
241666
241679
|
function requirePluginNamespace(project, pluginSource, configPath) {
|
|
241667
241680
|
if (!project.plugin?.namespace) {
|
|
@@ -243282,7 +243295,7 @@ async function fetchFunctionLogs(functionName, filters = {}) {
|
|
|
243282
243295
|
return result.data;
|
|
243283
243296
|
}
|
|
243284
243297
|
// src/core/resources/function/config.ts
|
|
243285
|
-
import { basename as basename2, dirname as
|
|
243298
|
+
import { basename as basename2, dirname as dirname5, join as join8, relative } from "node:path";
|
|
243286
243299
|
async function readFunctionConfig(configPath) {
|
|
243287
243300
|
const parsed = await readJsonFile(configPath);
|
|
243288
243301
|
const result = FunctionConfigSchema.safeParse(parsed);
|
|
@@ -243293,7 +243306,7 @@ async function readFunctionConfig(configPath) {
|
|
|
243293
243306
|
}
|
|
243294
243307
|
async function readFunction(configPath) {
|
|
243295
243308
|
const config7 = await readFunctionConfig(configPath);
|
|
243296
|
-
const functionDir =
|
|
243309
|
+
const functionDir = dirname5(configPath);
|
|
243297
243310
|
const entryPath = join8(functionDir, config7.entry);
|
|
243298
243311
|
if (!await pathExists(entryPath)) {
|
|
243299
243312
|
throw new InvalidInputError(`Function entry file not found: ${entryPath} (referenced in ${configPath})`, {
|
|
@@ -243325,11 +243338,11 @@ async function readAllFunctions(functionsDir) {
|
|
|
243325
243338
|
absolute: true,
|
|
243326
243339
|
ignore: ENTRY_IGNORE_DOT_PATHS
|
|
243327
243340
|
});
|
|
243328
|
-
const configFilesDirs = new Set(configFiles.map((f) =>
|
|
243329
|
-
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(
|
|
243341
|
+
const configFilesDirs = new Set(configFiles.map((f) => dirname5(f)));
|
|
243342
|
+
const entryFilesWithoutConfig = entryFiles.filter((entryFile) => !configFilesDirs.has(dirname5(entryFile)));
|
|
243330
243343
|
const functionsFromConfig = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
|
|
243331
243344
|
const functionsWithoutConfig = await Promise.all(entryFilesWithoutConfig.map(async (entryFile) => {
|
|
243332
|
-
const functionDir =
|
|
243345
|
+
const functionDir = dirname5(entryFile);
|
|
243333
243346
|
const filePaths = await globby("**/*.{js,ts,json}", {
|
|
243334
243347
|
cwd: functionDir,
|
|
243335
243348
|
absolute: true
|
|
@@ -243371,9 +243384,9 @@ async function readAllFunctions(functionsDir) {
|
|
|
243371
243384
|
return functions;
|
|
243372
243385
|
}
|
|
243373
243386
|
// src/core/resources/function/deploy.ts
|
|
243374
|
-
import { dirname as
|
|
243387
|
+
import { dirname as dirname6, relative as relative2 } from "node:path";
|
|
243375
243388
|
async function loadFunctionCode(fn) {
|
|
243376
|
-
const functionDir =
|
|
243389
|
+
const functionDir = dirname6(fn.entryPath);
|
|
243377
243390
|
const resolvedFiles = await Promise.all(fn.filePaths.map(async (filePath) => {
|
|
243378
243391
|
const content = await readTextFile(filePath);
|
|
243379
243392
|
const path11 = relative2(functionDir, filePath).split(/[/\\]/).join("/");
|
|
@@ -243514,12 +243527,12 @@ async function findConfigInDir(dir) {
|
|
|
243514
243527
|
}
|
|
243515
243528
|
async function findProjectRoot(startPath) {
|
|
243516
243529
|
let current = startPath || process.cwd();
|
|
243517
|
-
while (current !==
|
|
243530
|
+
while (current !== dirname7(current)) {
|
|
243518
243531
|
const configPath = await findConfigInDir(current);
|
|
243519
243532
|
if (configPath) {
|
|
243520
243533
|
return { root: current, configPath };
|
|
243521
243534
|
}
|
|
243522
|
-
current =
|
|
243535
|
+
current = dirname7(current);
|
|
243523
243536
|
}
|
|
243524
243537
|
return null;
|
|
243525
243538
|
}
|
|
@@ -243569,7 +243582,7 @@ class ProjectConfigReader {
|
|
|
243569
243582
|
return result.data;
|
|
243570
243583
|
}
|
|
243571
243584
|
async readProjectResources(configPath, project) {
|
|
243572
|
-
const configDir =
|
|
243585
|
+
const configDir = dirname7(configPath);
|
|
243573
243586
|
const [entities, functions, agents, connectors, authConfig] = await Promise.all([
|
|
243574
243587
|
entityResource.readAll(join10(configDir, project.entitiesDir)),
|
|
243575
243588
|
functionResource.readAll(join10(configDir, project.functionsDir)),
|
|
@@ -243598,7 +243611,7 @@ class ProjectConfigReader {
|
|
|
243598
243611
|
this.pluginSourceByNamespace.set(namespace, source);
|
|
243599
243612
|
}
|
|
243600
243613
|
async readPluginConfig(plugin, hostConfigPath) {
|
|
243601
|
-
const pluginRoot = resolvePluginRoot(plugin.source,
|
|
243614
|
+
const pluginRoot = resolvePluginRoot(plugin.source, dirname7(hostConfigPath));
|
|
243602
243615
|
const { configPath } = await this.findConfigOrThrow(pluginRoot);
|
|
243603
243616
|
const project = await this.readConfigFile(configPath);
|
|
243604
243617
|
const namespace = requirePluginNamespace(project, plugin.source, configPath);
|
|
@@ -243848,10 +243861,10 @@ async function getSiteUrl(projectId) {
|
|
|
243848
243861
|
// src/core/project/template.ts
|
|
243849
243862
|
var import_ejs = __toESM(require_ejs(), 1);
|
|
243850
243863
|
var import_front_matter = __toESM(require_front_matter(), 1);
|
|
243851
|
-
import { dirname as
|
|
243864
|
+
import { dirname as dirname8, join as join12 } from "node:path";
|
|
243852
243865
|
|
|
243853
243866
|
// src/core/assets.ts
|
|
243854
|
-
import { cpSync, existsSync } from "node:fs";
|
|
243867
|
+
import { cpSync, existsSync as existsSync2 } from "node:fs";
|
|
243855
243868
|
import { homedir as homedir2 } from "node:os";
|
|
243856
243869
|
import { join as join11 } from "node:path";
|
|
243857
243870
|
// package.json
|
|
@@ -243966,9 +243979,9 @@ function getExecWrapperPath() {
|
|
|
243966
243979
|
return join11(ASSETS_DIR, "deno-runtime", "exec.ts");
|
|
243967
243980
|
}
|
|
243968
243981
|
function ensureNpmAssets(sourceDir) {
|
|
243969
|
-
if (
|
|
243982
|
+
if (existsSync2(ASSETS_DIR))
|
|
243970
243983
|
return;
|
|
243971
|
-
if (!
|
|
243984
|
+
if (!existsSync2(sourceDir))
|
|
243972
243985
|
return;
|
|
243973
243986
|
cpSync(sourceDir, ASSETS_DIR, { recursive: true });
|
|
243974
243987
|
}
|
|
@@ -243996,7 +244009,7 @@ async function renderTemplate(template, destPath, data) {
|
|
|
243996
244009
|
if (file2.endsWith(".ejs")) {
|
|
243997
244010
|
const rendered = await import_ejs.default.renderFile(srcPath, data);
|
|
243998
244011
|
const { attributes, body } = import_front_matter.default(rendered);
|
|
243999
|
-
const destFile = attributes.outputFileName ? join12(
|
|
244012
|
+
const destFile = attributes.outputFileName ? join12(dirname8(file2), attributes.outputFileName) : file2.replace(/\.ejs$/, "");
|
|
244000
244013
|
const destFilePath = join12(destPath, destFile);
|
|
244001
244014
|
await writeFile(destFilePath, body);
|
|
244002
244015
|
} else {
|
|
@@ -251274,7 +251287,7 @@ async function pullAgentsAction({
|
|
|
251274
251287
|
runTask: runTask2
|
|
251275
251288
|
}) {
|
|
251276
251289
|
const { project: project2 } = await readProjectConfig();
|
|
251277
|
-
const configDir =
|
|
251290
|
+
const configDir = dirname9(project2.configPath);
|
|
251278
251291
|
const agentsDir = join14(configDir, project2.agentsDir);
|
|
251279
251292
|
const remoteAgents = await runTask2("Fetching agents from Base44", async () => {
|
|
251280
251293
|
return await fetchAgents();
|
|
@@ -251339,11 +251352,11 @@ function getAgentsCommand() {
|
|
|
251339
251352
|
}
|
|
251340
251353
|
|
|
251341
251354
|
// src/cli/commands/auth/password-login.ts
|
|
251342
|
-
import { dirname as
|
|
251355
|
+
import { dirname as dirname10, join as join15 } from "node:path";
|
|
251343
251356
|
async function passwordLoginAction({ log, runTask: runTask2 }, action) {
|
|
251344
251357
|
const shouldEnable = action === "enable";
|
|
251345
251358
|
const { project: project2 } = await readProjectConfig();
|
|
251346
|
-
const configDir =
|
|
251359
|
+
const configDir = dirname10(project2.configPath);
|
|
251347
251360
|
const authDir = join15(configDir, project2.authDir);
|
|
251348
251361
|
const updated = await runTask2("Updating local auth config", async () => {
|
|
251349
251362
|
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
@@ -251364,13 +251377,13 @@ function getPasswordLoginCommand() {
|
|
|
251364
251377
|
}
|
|
251365
251378
|
|
|
251366
251379
|
// src/cli/commands/auth/pull.ts
|
|
251367
|
-
import { dirname as
|
|
251380
|
+
import { dirname as dirname11, join as join16 } from "node:path";
|
|
251368
251381
|
async function pullAuthAction({
|
|
251369
251382
|
log,
|
|
251370
251383
|
runTask: runTask2
|
|
251371
251384
|
}) {
|
|
251372
251385
|
const { project: project2 } = await readProjectConfig();
|
|
251373
|
-
const configDir =
|
|
251386
|
+
const configDir = dirname11(project2.configPath);
|
|
251374
251387
|
const authDir = join16(configDir, project2.authDir);
|
|
251375
251388
|
const remoteConfig = await runTask2("Fetching auth config from Base44", async () => {
|
|
251376
251389
|
return await pullAuthConfig();
|
|
@@ -251435,7 +251448,7 @@ function getAuthPushCommand() {
|
|
|
251435
251448
|
}
|
|
251436
251449
|
|
|
251437
251450
|
// src/cli/commands/auth/social-login.ts
|
|
251438
|
-
import { dirname as
|
|
251451
|
+
import { dirname as dirname12, join as join17, resolve as resolve3 } from "node:path";
|
|
251439
251452
|
var PROVIDER_LABELS = {
|
|
251440
251453
|
google: "Google",
|
|
251441
251454
|
microsoft: "Microsoft",
|
|
@@ -251505,7 +251518,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
|
|
|
251505
251518
|
}
|
|
251506
251519
|
}
|
|
251507
251520
|
const { project: project2 } = await readProjectConfig();
|
|
251508
|
-
const configDir =
|
|
251521
|
+
const configDir = dirname12(project2.configPath);
|
|
251509
251522
|
const authDir = join17(configDir, project2.authDir);
|
|
251510
251523
|
const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
|
|
251511
251524
|
if (clientSecret) {
|
|
@@ -251531,7 +251544,7 @@ function getSocialLoginCommand() {
|
|
|
251531
251544
|
}
|
|
251532
251545
|
|
|
251533
251546
|
// src/cli/commands/auth/sso.ts
|
|
251534
|
-
import { dirname as
|
|
251547
|
+
import { dirname as dirname13, join as join18, resolve as resolve4 } from "node:path";
|
|
251535
251548
|
var SSOConfigFileSchema = exports_external.object({
|
|
251536
251549
|
provider: exports_external.enum(Object.values(KNOWN_SSO_PROVIDERS)),
|
|
251537
251550
|
clientId: exports_external.string(),
|
|
@@ -251694,7 +251707,7 @@ async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options)
|
|
|
251694
251707
|
throw error48;
|
|
251695
251708
|
}
|
|
251696
251709
|
const { project: project2 } = await readProjectConfig();
|
|
251697
|
-
const configDir =
|
|
251710
|
+
const configDir = dirname13(project2.configPath);
|
|
251698
251711
|
const authDir = join18(configDir, project2.authDir);
|
|
251699
251712
|
await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, provider, true));
|
|
251700
251713
|
await runTask2("Saving SSO credentials", async () => pushSSOSecrets(secrets));
|
|
@@ -251710,7 +251723,7 @@ async function ssoDisableAction({ log, runTask: runTask2 }, options) {
|
|
|
251710
251723
|
throw new InvalidInputError("Configuration options cannot be used with disable. To disable SSO: base44 auth sso disable");
|
|
251711
251724
|
}
|
|
251712
251725
|
const { project: project2 } = await readProjectConfig();
|
|
251713
|
-
const configDir =
|
|
251726
|
+
const configDir = dirname13(project2.configPath);
|
|
251714
251727
|
const authDir = join18(configDir, project2.authDir);
|
|
251715
251728
|
const updated = await runTask2("Updating local auth config", async () => updateSSOConfig(authDir, null, false));
|
|
251716
251729
|
await runTask2("Removing SSO credentials", async () => deleteSSOSecrets());
|
|
@@ -251798,13 +251811,13 @@ function getConnectorsListAvailableCommand() {
|
|
|
251798
251811
|
}
|
|
251799
251812
|
|
|
251800
251813
|
// src/cli/commands/connectors/pull.ts
|
|
251801
|
-
import { dirname as
|
|
251814
|
+
import { dirname as dirname14, join as join19 } from "node:path";
|
|
251802
251815
|
async function pullConnectorsAction({
|
|
251803
251816
|
log,
|
|
251804
251817
|
runTask: runTask2
|
|
251805
251818
|
}) {
|
|
251806
251819
|
const { project: project2 } = await readProjectConfig();
|
|
251807
|
-
const configDir =
|
|
251820
|
+
const configDir = dirname14(project2.configPath);
|
|
251808
251821
|
const connectorsDir = join19(configDir, project2.connectorsDir);
|
|
251809
251822
|
const remoteConnectors = await runTask2("Fetching connectors from Base44", async () => {
|
|
251810
251823
|
return await pullAllConnectors();
|
|
@@ -252865,10 +252878,10 @@ function getListCommand() {
|
|
|
252865
252878
|
}
|
|
252866
252879
|
|
|
252867
252880
|
// src/cli/commands/functions/pull.ts
|
|
252868
|
-
import { dirname as
|
|
252881
|
+
import { dirname as dirname15, join as join20 } from "node:path";
|
|
252869
252882
|
async function pullFunctionsAction({ log, runTask: runTask2 }, name2) {
|
|
252870
252883
|
const { project: project2, functions } = await readProjectConfig();
|
|
252871
|
-
const configDir =
|
|
252884
|
+
const configDir = dirname15(project2.configPath);
|
|
252872
252885
|
const functionsDir = join20(configDir, project2.functionsDir);
|
|
252873
252886
|
const pluginFunctionNames = new Set(functions.filter((fn) => fn.source.type === "plugin").map((fn) => fn.name));
|
|
252874
252887
|
const remoteFunctions = await runTask2("Fetching functions from Base44", async () => {
|
|
@@ -253805,7 +253818,7 @@ import process21 from "node:process";
|
|
|
253805
253818
|
// src/cli/dev/dev-server/main.ts
|
|
253806
253819
|
var import_cors = __toESM(require_lib4(), 1);
|
|
253807
253820
|
var import_express6 = __toESM(require_express(), 1);
|
|
253808
|
-
import { dirname as
|
|
253821
|
+
import { dirname as dirname20, join as join27 } from "node:path";
|
|
253809
253822
|
|
|
253810
253823
|
// ../../node_modules/get-port/index.js
|
|
253811
253824
|
import net from "node:net";
|
|
@@ -256061,9 +256074,9 @@ class NodeFsHandler {
|
|
|
256061
256074
|
if (this.fsw.closed) {
|
|
256062
256075
|
return;
|
|
256063
256076
|
}
|
|
256064
|
-
const
|
|
256077
|
+
const dirname19 = sp2.dirname(file2);
|
|
256065
256078
|
const basename5 = sp2.basename(file2);
|
|
256066
|
-
const parent = this.fsw._getWatchedDir(
|
|
256079
|
+
const parent = this.fsw._getWatchedDir(dirname19);
|
|
256067
256080
|
let prevStats = stats;
|
|
256068
256081
|
if (parent.has(basename5))
|
|
256069
256082
|
return;
|
|
@@ -256090,7 +256103,7 @@ class NodeFsHandler {
|
|
|
256090
256103
|
prevStats = newStats2;
|
|
256091
256104
|
}
|
|
256092
256105
|
} catch (error48) {
|
|
256093
|
-
this.fsw._remove(
|
|
256106
|
+
this.fsw._remove(dirname19, basename5);
|
|
256094
256107
|
}
|
|
256095
256108
|
} else if (parent.has(basename5)) {
|
|
256096
256109
|
const at13 = newStats.atimeMs;
|
|
@@ -257117,8 +257130,8 @@ async function createDevServer(options8) {
|
|
|
257117
257130
|
broadcastEntityEvent(io6, appId, entityName, event);
|
|
257118
257131
|
};
|
|
257119
257132
|
const base44ConfigWatcher = new WatchBase44({
|
|
257120
|
-
functions: join27(
|
|
257121
|
-
entities: join27(
|
|
257133
|
+
functions: join27(dirname20(project2.configPath), project2.functionsDir),
|
|
257134
|
+
entities: join27(dirname20(project2.configPath), project2.entitiesDir)
|
|
257122
257135
|
}, devLogger);
|
|
257123
257136
|
base44ConfigWatcher.on("change", async (name2) => {
|
|
257124
257137
|
try {
|
|
@@ -257426,7 +257439,7 @@ var import_detect_agent = __toESM(require_dist5(), 1);
|
|
|
257426
257439
|
import { release, type } from "node:os";
|
|
257427
257440
|
|
|
257428
257441
|
// ../../node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
257429
|
-
import { dirname as
|
|
257442
|
+
import { dirname as dirname21, posix, sep } from "path";
|
|
257430
257443
|
function createModulerModifier() {
|
|
257431
257444
|
const getModuleFromFileName = createGetModuleFromFilename();
|
|
257432
257445
|
return async (frames) => {
|
|
@@ -257435,7 +257448,7 @@ function createModulerModifier() {
|
|
|
257435
257448
|
return frames;
|
|
257436
257449
|
};
|
|
257437
257450
|
}
|
|
257438
|
-
function createGetModuleFromFilename(basePath = process.argv[1] ?
|
|
257451
|
+
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname21(process.argv[1]) : process.cwd(), isWindows5 = sep === "\\") {
|
|
257439
257452
|
const normalizedBase = isWindows5 ? normalizeWindowsPath2(basePath) : basePath;
|
|
257440
257453
|
return (filename) => {
|
|
257441
257454
|
if (!filename)
|
|
@@ -261624,7 +261637,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
261624
261637
|
});
|
|
261625
261638
|
}
|
|
261626
261639
|
// src/cli/index.ts
|
|
261627
|
-
var __dirname4 =
|
|
261640
|
+
var __dirname4 = dirname22(fileURLToPath6(import.meta.url));
|
|
261628
261641
|
async function runCLI(options8) {
|
|
261629
261642
|
ensureNpmAssets(join29(__dirname4, "../assets"));
|
|
261630
261643
|
const errorReporter = new ErrorReporter;
|
|
@@ -261663,4 +261676,4 @@ export {
|
|
|
261663
261676
|
CLIExitError
|
|
261664
261677
|
};
|
|
261665
261678
|
|
|
261666
|
-
//# debugId=
|
|
261679
|
+
//# debugId=3FF967BB3585146964756E2164756E21
|