@base44-preview/cli 0.0.56-pr.547.a0144b8 → 0.0.56-pr.547.f5a339a
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 +10 -3
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -253812,8 +253812,15 @@ var ReleaseResponseSchema = exports_external.object({
|
|
|
253812
253812
|
}));
|
|
253813
253813
|
|
|
253814
253814
|
// src/core/resources/sandbox/api.ts
|
|
253815
|
+
function isMissingSandboxScope(error48) {
|
|
253816
|
+
if (error48.statusCode !== 401 && error48.statusCode !== 403) {
|
|
253817
|
+
return false;
|
|
253818
|
+
}
|
|
253819
|
+
const text = `${error48.message} ${JSON.stringify(error48.responseBody ?? "")}`;
|
|
253820
|
+
return /sandbox:write/i.test(text) || /granting sandbox access/i.test(text);
|
|
253821
|
+
}
|
|
253815
253822
|
function withSandboxAuthHint(error48) {
|
|
253816
|
-
if (error48
|
|
253823
|
+
if (!isMissingSandboxScope(error48)) {
|
|
253817
253824
|
return error48;
|
|
253818
253825
|
}
|
|
253819
253826
|
return new ApiError(error48.message, {
|
|
@@ -253827,7 +253834,7 @@ function withSandboxAuthHint(error48) {
|
|
|
253827
253834
|
hints: [
|
|
253828
253835
|
...error48.hints,
|
|
253829
253836
|
{
|
|
253830
|
-
message: "
|
|
253837
|
+
message: "Run 'base44 login' again to grant sandbox access (the sandbox:write scope is only granted at login).",
|
|
253831
253838
|
command: "base44 login"
|
|
253832
253839
|
}
|
|
253833
253840
|
],
|
|
@@ -262348,4 +262355,4 @@ export {
|
|
|
262348
262355
|
CLIExitError
|
|
262349
262356
|
};
|
|
262350
262357
|
|
|
262351
|
-
//# debugId=
|
|
262358
|
+
//# debugId=B346AA8B9932872164756E2164756E21
|