@base44-preview/cli 0.0.41-pr.367.270daed → 0.0.41-pr.367.40b1ab1

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.
@@ -993,7 +993,7 @@
993
993
  "import { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport { runCommand } from \"@/cli/utils/index.js\";\nimport { login } from \"./login-flow.js\";\n\nexport function getLoginCommand(context: CLIContext): Command {\n return new Command(\"login\")\n .description(\"Authenticate with Base44\")\n .action(async () => {\n await runCommand(login, { requireAppConfig: false }, context);\n });\n}\n",
994
994
  "import { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport { runCommand } from \"@/cli/utils/index.js\";\nimport type { RunCommandResult } from \"@/cli/utils/runCommand.js\";\nimport { deleteAuth } from \"@/core/auth/index.js\";\n\nasync function logout(): Promise<RunCommandResult> {\n await deleteAuth();\n return { outroMessage: \"Logged out successfully\" };\n}\n\nexport function getLogoutCommand(context: CLIContext): Command {\n return new Command(\"logout\")\n .description(\"Logout from current device\")\n .action(async () => {\n await runCommand(logout, { requireAppConfig: false }, context);\n });\n}\n",
995
995
  "import { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport { runCommand, theme } from \"@/cli/utils/index.js\";\nimport type { RunCommandResult } from \"@/cli/utils/runCommand.js\";\nimport { readAuth } from \"@/core/auth/index.js\";\n\nasync function whoami(): Promise<RunCommandResult> {\n const auth = await readAuth();\n return { outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}` };\n}\n\nexport function getWhoamiCommand(context: CLIContext): Command {\n return new Command(\"whoami\")\n .description(\"Display current authenticated user\")\n .action(async () => {\n await runCommand(\n whoami,\n { requireAuth: true, requireAppConfig: false },\n context,\n );\n });\n}\n",
996
- "import { log } from \"@clack/prompts\";\nimport { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport {\n YAML_INDENT,\n formatYaml,\n runCommand,\n runTask,\n} from \"@/cli/utils/index.js\";\nimport type { RunCommandResult } from \"@/cli/utils/runCommand.js\";\nimport { listAvailableIntegrations } from \"@/core/resources/connector/index.js\";\n\nasync function listAvailableAction(): Promise<RunCommandResult> {\n const { integrations } = await runTask(\n \"Fetching available integrations from Base44\",\n async () => {\n return await listAvailableIntegrations();\n },\n {\n successMessage: \"Available integrations fetched successfully\",\n errorMessage: \"Failed to fetch available integrations\",\n },\n );\n\n if (integrations.length === 0) {\n return { outroMessage: \"No available integrations found.\" };\n }\n\n for (const { displayName, ...rest } of integrations) {\n const yaml = formatYaml(rest);\n const pad = \" \".repeat(YAML_INDENT);\n log.info(`${displayName}\\n${pad}${yaml.replace(/\\n/g, `\\n${pad}`)}`);\n }\n\n return {\n outroMessage: `Found ${integrations.length} available integrations.`,\n };\n}\n\nexport function getConnectorsListAvailableCommand(\n context: CLIContext,\n): Command {\n return new Command(\"list-available\")\n .description(\"List all available integration types\")\n .action(async () => {\n await runCommand(listAvailableAction, { requireAuth: true }, context);\n });\n}\n",
996
+ "import { log } from \"@clack/prompts\";\nimport { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport {\n formatYaml,\n runCommand,\n runTask,\n YAML_INDENT,\n} from \"@/cli/utils/index.js\";\nimport type { RunCommandResult } from \"@/cli/utils/runCommand.js\";\nimport { listAvailableIntegrations } from \"@/core/resources/connector/index.js\";\n\nasync function listAvailableAction(): Promise<RunCommandResult> {\n const { integrations } = await runTask(\n \"Fetching available integrations from Base44\",\n async () => {\n return await listAvailableIntegrations();\n },\n {\n successMessage: \"Available integrations fetched successfully\",\n errorMessage: \"Failed to fetch available integrations\",\n },\n );\n\n if (integrations.length === 0) {\n return { outroMessage: \"No available integrations found.\" };\n }\n\n for (const { displayName, ...rest } of integrations) {\n const yaml = formatYaml(rest);\n const pad = \" \".repeat(YAML_INDENT);\n log.info(`${displayName}\\n${pad}${yaml.replace(/\\n/g, `\\n${pad}`)}`);\n }\n\n return {\n outroMessage: `Found ${integrations.length} available integrations.`,\n };\n}\n\nexport function getConnectorsListAvailableCommand(\n context: CLIContext,\n): Command {\n return new Command(\"list-available\")\n .description(\"List all available integration types\")\n .action(async () => {\n await runCommand(listAvailableAction, { requireAuth: true }, context);\n });\n}\n",
997
997
  "import { dirname, join } from \"node:path\";\nimport { log } from \"@clack/prompts\";\nimport { Command } from \"commander\";\nimport type { CLIContext } from \"@/cli/types.js\";\nimport { readProjectConfig } from \"@/core/index.js\";\nimport {\n listConnectors,\n writeConnectors,\n} from \"@/core/resources/connector/index.js\";\nimport { runCommand, runTask } from \"../../utils/index.js\";\nimport type { RunCommandResult } from \"../../utils/runCommand.js\";\n\nasync function pullConnectorsAction(): Promise<RunCommandResult> {\n const { project } = await readProjectConfig();\n\n const configDir = dirname(project.configPath);\n const connectorsDir = join(configDir, project.connectorsDir);\n\n const remoteConnectors = await runTask(\n \"Fetching connectors from Base44\",\n async () => {\n return await listConnectors();\n },\n {\n successMessage: \"Connectors fetched successfully\",\n errorMessage: \"Failed to fetch connectors\",\n },\n );\n\n const { written, deleted } = await runTask(\n \"Syncing connector files\",\n async () => {\n return await writeConnectors(\n connectorsDir,\n remoteConnectors.integrations,\n );\n },\n {\n successMessage: \"Connector files synced successfully\",\n errorMessage: \"Failed to sync connector files\",\n },\n );\n\n if (written.length > 0) {\n log.success(`Written: ${written.join(\", \")}`);\n }\n if (deleted.length > 0) {\n log.warn(`Deleted: ${deleted.join(\", \")}`);\n }\n if (written.length === 0 && deleted.length === 0) {\n log.info(\"All connectors are already up to date\");\n }\n\n return {\n outroMessage: `Pulled ${remoteConnectors.integrations.length} connectors to ${connectorsDir}`,\n };\n}\n\nexport function getConnectorsPullCommand(context: CLIContext): Command {\n return new Command(\"pull\")\n .description(\n \"Pull connectors from Base44 to local files (replaces all local connector configs)\",\n )\n .action(async () => {\n await runCommand(pullConnectorsAction, { requireAuth: true }, context);\n });\n}\n",
998
998
  "import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport {\n\tisWsl,\n\tpowerShellPath,\n\tconvertWslPathToWindows,\n\tcanAccessPowerShell,\n\twslDefaultBrowser,\n} from 'wsl-utils';\nimport {executePowerShell} from 'powershell-utils';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser, {_windowsBrowserProgIdMap} from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\nimport isInSsh from 'is-in-ssh';\n\nconst fallbackAttemptSymbol = Symbol('fallbackAttempt');\n\n// Path to included `xdg-open`.\nconst __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : '';\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\nconst tryEachApp = async (apps, opener) => {\n\tif (apps.length === 0) {\n\t\t// No app was provided\n\t\treturn;\n\t}\n\n\tconst errors = [];\n\n\tfor (const app of apps) {\n\t\ttry {\n\t\t\treturn await opener(app); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\terrors.push(error);\n\t\t}\n\t}\n\n\tthrow new AggregateError(errors, 'Failed to open in all supported apps');\n};\n\n// eslint-disable-next-line complexity\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\n\tif (Array.isArray(options.app)) {\n\t\treturn tryEachApp(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn tryEachApp(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same.\n\t\t// IDs are lowercased to increase chances of a match.\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'com.brave.browser': 'brave',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'com.microsoft.edgemac': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t\t'com.apple.safari': 'safari',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tbrave: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t\t// Safari doesn't support private mode via command line\n\t\t};\n\n\t\tlet browser;\n\t\tif (isWsl) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tconst browserInfo = _windowsBrowserProgIdMap.get(progId);\n\t\t\tbrowser = browserInfo ?? {};\n\t\t} else {\n\t\t\tbrowser = await defaultBrowser();\n\t\t}\n\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\t// Safari doesn't support private mode via command line\n\t\t\t\tif (browserName === 'safari') {\n\t\t\t\t\tthrow new Error('Safari doesn\\'t support opening in private mode via command line');\n\t\t\t\t}\n\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\t// Determine if we should use Windows/PowerShell behavior in WSL.\n\t// We only use Windows integration if PowerShell is actually accessible.\n\t// This allows the package to work in sandboxed WSL environments where Windows access is restricted.\n\tlet shouldUseWindowsInWsl = false;\n\tif (isWsl && !isInsideContainer() && !isInSsh && !app) {\n\t\tshouldUseWindowsInWsl = await canAccessPowerShell();\n\t}\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath();\n\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\t// Convert WSL Linux paths to Windows paths\n\t\tif (isWsl && options.target) {\n\t\t\toptions.target = await convertWslPathToWindows(options.target);\n\t\t}\n\n\t\t// Suppress PowerShell progress messages that are written to stderr\n\t\tconst encodedArguments = ['$ProgressPreference = \\'SilentlyContinue\\';', 'Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(' '));\n\n\t\tif (!options.wait) {\n\t\t\t// PowerShell will keep the parent process alive unless stdio is ignored.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t}\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// IMPORTANT: On macOS, the target MUST come AFTER '--args'.\n\t// When using --args, ALL following arguments are passed to the app.\n\t// Example: open -a \"chrome\" --args --incognito https://site.com\n\t// This passes BOTH --incognito AND https://site.com to Chrome.\n\t// Without this order, Chrome won't open in incognito. See #332.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\t// When we're in a fallback attempt, we need to detect launch failures before trying the next app.\n\t// Wait for the close event to check the exit code before unreffing.\n\t// The launcher (open/xdg-open/PowerShell) exits quickly (~10-30ms) even on success.\n\tif (isFallbackAttempt) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('spawn', () => {\n\t\t\t\t// Keep error handler active for post-spawn errors\n\t\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\t\tsubprocess.off('error', reject);\n\n\t\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tsubprocess.unref();\n\t\t\t\t\tresolve(subprocess);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\t// Handle spawn errors before the caller can attach listeners.\n\t// This prevents unhandled error events from crashing the process.\n\treturn new Promise((resolve, reject) => {\n\t\tsubprocess.once('error', reject);\n\n\t\t// Wait for the subprocess to spawn before resolving.\n\t\t// This ensures the process is established before the caller continues,\n\t\t// preventing issues when process.exit() is called immediately after.\n\t\tsubprocess.once('spawn', () => {\n\t\t\tsubprocess.off('error', reject);\n\t\t\tresolve(subprocess);\n\t\t});\n\t});\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string' && !Array.isArray(name)) {\n\t\tthrow new TypeError('Expected a valid `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl} = {}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {\n\tbrowser: 'browser',\n\tbrowserPrivate: 'browserPrivate',\n};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\t// `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium', 'chromium-browser'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'brave', () => detectPlatformBinary({\n\tdarwin: 'brave browser',\n\twin32: 'brave',\n\tlinux: ['brave-browser', 'brave'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',\n\t\tx64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'safari', () => detectPlatformBinary({\n\tdarwin: 'Safari',\n}));\n\nexport default open;\n",
999
999
  "import {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\nimport {powerShellPath as windowsPowerShellPath, executePowerShell} from 'powershell-utils';\nimport {parseMountPointFromConfig} from './utilities.js';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const wslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst parsedMountPoint = parseMountPointFromConfig(configContent);\n\n\t\tif (parsedMountPoint === undefined) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nexport const powerShellPathFromWsl = async () => {\n\tconst mountPoint = await wslDrivesMountPoint();\n\treturn `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n};\n\nexport const powerShellPath = isWsl ? powerShellPathFromWsl : windowsPowerShellPath;\n\n// Cache for PowerShell accessibility check\nlet canAccessPowerShellPromise;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath();\n\t\t\tawait fs.access(psPath, fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// PowerShell is not accessible (either doesn't exist, no execute permission, or other error)\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessPowerShellPromise;\n};\n\nexport const wslDefaultBrowser = async () => {\n\tconst psPath = await powerShellPath();\n\tconst command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n\n\tconst {stdout} = await executePowerShell(command, {powerShellPath: psPath});\n\n\treturn stdout.trim();\n};\n\nexport const convertWslPathToWindows = async path => {\n\t// Don't convert URLs\n\tif (/^[a-z]+:\\/\\//i.test(path)) {\n\t\treturn path;\n\t}\n\n\ttry {\n\t\tconst {stdout} = await execFile('wslpath', ['-aw', path], {encoding: 'utf8'});\n\t\treturn stdout.trim();\n\t} catch {\n\t\t// If wslpath fails, return the original path\n\t\treturn path;\n\t}\n};\n\nexport {default as isWsl} from 'is-wsl';\n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.41-pr.367.270daed",
3
+ "version": "0.0.41-pr.367.40b1ab1",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {