@base44-preview/cli 0.0.56-pr.547.51a9904 → 0.0.56-pr.547.a0144b8

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
@@ -244285,7 +244285,7 @@ async function generateDeviceCode() {
244285
244285
  const response = await oauthClient.post("oauth/device/code", {
244286
244286
  json: {
244287
244287
  client_id: AUTH_CLIENT_ID,
244288
- scope: "apps:read apps:write"
244288
+ scope: "apps:read apps:write sandbox:write"
244289
244289
  },
244290
244290
  throwHttpErrors: false
244291
244291
  });
@@ -253812,13 +253812,35 @@ var ReleaseResponseSchema = exports_external.object({
253812
253812
  }));
253813
253813
 
253814
253814
  // src/core/resources/sandbox/api.ts
253815
+ function withSandboxAuthHint(error48) {
253816
+ if (error48.statusCode !== 403) {
253817
+ return error48;
253818
+ }
253819
+ return new ApiError(error48.message, {
253820
+ statusCode: error48.statusCode,
253821
+ requestUrl: error48.requestUrl,
253822
+ requestMethod: error48.requestMethod,
253823
+ requestBody: error48.requestBody,
253824
+ responseBody: error48.responseBody,
253825
+ requestId: error48.requestId,
253826
+ details: error48.details,
253827
+ hints: [
253828
+ ...error48.hints,
253829
+ {
253830
+ message: "If you have admin access to this app, your login may predate sandbox support — run 'base44 login' again to grant sandbox access.",
253831
+ command: "base44 login"
253832
+ }
253833
+ ],
253834
+ cause: error48
253835
+ });
253836
+ }
253815
253837
  async function callTool(appId, tool, payload, schema10, context, timeout2 = 60000) {
253816
253838
  const client = getSandboxClient(appId);
253817
253839
  let response;
253818
253840
  try {
253819
253841
  response = await client.post(tool, { json: payload, timeout: timeout2 });
253820
253842
  } catch (error48) {
253821
- throw await ApiError.fromHttpError(error48, context);
253843
+ throw withSandboxAuthHint(await ApiError.fromHttpError(error48, context));
253822
253844
  }
253823
253845
  const result = schema10.safeParse(await response.json());
253824
253846
  if (!result.success) {
@@ -262326,4 +262348,4 @@ export {
262326
262348
  CLIExitError
262327
262349
  };
262328
262350
 
262329
- //# debugId=680B4B248801421C64756E2164756E21
262351
+ //# debugId=99691B3EA78ED95C64756E2164756E21