@base44-preview/cli 0.1.2-pr.563.37a52bb → 0.1.2-pr.563.728cad8

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 CHANGED
@@ -233593,9 +233593,6 @@ var ApiErrorResponseSchema = exports_external.looseObject({
233593
233593
  });
233594
233594
 
233595
233595
  // src/core/errors.ts
233596
- function usingWorkspaceApiKey() {
233597
- return process.env.BASE44_API_KEY?.trim().startsWith("b44k_") ?? false;
233598
- }
233599
233596
  function formatApiError(errorBody, parsed) {
233600
233597
  const data = parsed ?? ApiErrorResponseSchema.safeParse(errorBody).data;
233601
233598
  if (data) {
@@ -233790,13 +233787,6 @@ class ApiError extends SystemError {
233790
233787
  ];
233791
233788
  }
233792
233789
  if (statusCode === 401) {
233793
- if (usingWorkspaceApiKey()) {
233794
- return [
233795
- {
233796
- message: "The workspace API key (BASE44_API_KEY) was rejected. Verify it is valid and authorized for this app."
233797
- }
233798
- ];
233799
- }
233800
233790
  return [{ message: "Try logging in again", command: "base44 login" }];
233801
233791
  }
233802
233792
  if (statusCode === 403) {
@@ -236112,19 +236102,7 @@ function getTestOverrides() {
236112
236102
 
236113
236103
  // src/core/auth/config.ts
236114
236104
  var TOKEN_REFRESH_BUFFER_MS = 60 * 1000;
236115
- var WORKSPACE_API_KEY_PREFIX = "b44k_";
236116
236105
  var refreshPromise = null;
236117
- function getWorkspaceApiKeyFromEnv() {
236118
- const key = process.env.BASE44_API_KEY?.trim();
236119
- return key ? key : null;
236120
- }
236121
- function isWorkspaceApiKey(value) {
236122
- return value.startsWith(WORKSPACE_API_KEY_PREFIX);
236123
- }
236124
- function hasWorkspaceApiKeyAuth() {
236125
- const key = getWorkspaceApiKeyFromEnv();
236126
- return key !== null && isWorkspaceApiKey(key);
236127
- }
236128
236106
  async function seedAuthFromEnv() {
236129
236107
  const accessToken = process.env.BASE44_ACCESS_TOKEN;
236130
236108
  if (!accessToken) {
@@ -244319,8 +244297,7 @@ async function deployAll(projectData, options) {
244319
244297
  });
244320
244298
  await agentResource.push(agents);
244321
244299
  await authConfigResource.push(authConfig);
244322
- const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
244323
- const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
244300
+ const { results: connectorResults } = await pushConnectors(connectors);
244324
244301
  if (project.site?.outputDirectory) {
244325
244302
  const outputDir = resolve4(project.root, project.site.outputDirectory);
244326
244303
  const { appUrl } = await deploySite(outputDir);
@@ -244344,9 +244321,6 @@ async function handleUnauthorized(request, _options, response) {
244344
244321
  if (response.status !== 401) {
244345
244322
  return;
244346
244323
  }
244347
- if (hasWorkspaceApiKeyAuth()) {
244348
- return;
244349
- }
244350
244324
  if (retriedRequests.has(request)) {
244351
244325
  return;
244352
244326
  }
@@ -244375,11 +244349,6 @@ var base44Client = distribution_default.create({
244375
244349
  },
244376
244350
  captureRequestBody,
244377
244351
  async (request) => {
244378
- const workspaceApiKey = getWorkspaceApiKeyFromEnv();
244379
- if (workspaceApiKey && isWorkspaceApiKey(workspaceApiKey)) {
244380
- request.headers.set("api_key", workspaceApiKey);
244381
- return;
244382
- }
244383
244352
  try {
244384
244353
  const auth = await readAuth();
244385
244354
  if (isTokenExpired(auth)) {
@@ -244585,12 +244554,6 @@ async function login({
244585
244554
 
244586
244555
  // src/cli/utils/command/middleware.ts
244587
244556
  async function ensureAuth(ctx) {
244588
- if (hasWorkspaceApiKeyAuth()) {
244589
- ctx.errorReporter.setContext({
244590
- user: { email: "workspace-api-key", name: "Workspace API key" }
244591
- });
244592
- return;
244593
- }
244594
244557
  await seedAuthFromEnv();
244595
244558
  const loggedIn = await isLoggedIn();
244596
244559
  if (!loggedIn) {
@@ -252015,12 +251978,6 @@ function getLogoutCommand() {
252015
251978
 
252016
251979
  // src/cli/commands/auth/whoami.ts
252017
251980
  async function whoami(_ctx) {
252018
- const workspaceApiKey = getWorkspaceApiKeyFromEnv();
252019
- if (workspaceApiKey && isWorkspaceApiKey(workspaceApiKey)) {
252020
- return {
252021
- outroMessage: `Using workspace API key: ${theme.styles.bold(workspaceApiKey.slice(0, 10))}`
252022
- };
252023
- }
252024
251981
  const auth2 = await readAuth();
252025
251982
  return { outroMessage: `Logged in as: ${theme.styles.bold(auth2.email)}` };
252026
251983
  }
@@ -253914,8 +253871,7 @@ async function fetchLogsForFunctions(functionNames, options, availableFunctionNa
253914
253871
  }
253915
253872
  throw error48;
253916
253873
  }
253917
- const matchingLogs = filters.level ? logs.filter((entry) => entry.level === filters.level) : logs;
253918
- allEntries.push(...matchingLogs.map((entry) => normalizeLogEntry(entry, functionName)));
253874
+ allEntries.push(...logs.map((entry) => normalizeLogEntry(entry, functionName)));
253919
253875
  }
253920
253876
  if (functionNames.length > 1) {
253921
253877
  const order = options.order?.toUpperCase() === "ASC" ? 1 : -1;
@@ -262664,4 +262620,4 @@ export {
262664
262620
  CLIExitError
262665
262621
  };
262666
262622
 
262667
- //# debugId=3549116E1982FEC664756E2164756E21
262623
+ //# debugId=B8C7F17D9436926E64756E2164756E21