@base44-preview/cli 0.3.1-pr.692.8cd7d7b → 0.3.1-pr.694.b9f40b5
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 +25 -2
- package/dist/cli/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -228514,6 +228514,21 @@ class DependencyNotFoundError extends UserError {
|
|
|
228514
228514
|
});
|
|
228515
228515
|
}
|
|
228516
228516
|
}
|
|
228517
|
+
|
|
228518
|
+
class AppNotPublishedError extends UserError {
|
|
228519
|
+
code = "APP_NOT_PUBLISHED";
|
|
228520
|
+
constructor(message = "This app has not been published yet, so it has no site URL", options) {
|
|
228521
|
+
super(message, {
|
|
228522
|
+
hints: options?.hints ?? [
|
|
228523
|
+
{
|
|
228524
|
+
message: "Publish the app in the Base44 builder, or deploy its site with 'base44 deploy'",
|
|
228525
|
+
command: "base44 deploy"
|
|
228526
|
+
}
|
|
228527
|
+
],
|
|
228528
|
+
cause: options?.cause
|
|
228529
|
+
});
|
|
228530
|
+
}
|
|
228531
|
+
}
|
|
228517
228532
|
var MAX_RESPONSE_TEXT_CHARS = 500;
|
|
228518
228533
|
async function readResponseText(response) {
|
|
228519
228534
|
try {
|
|
@@ -266128,10 +266143,18 @@ function getSiteInstallCommand() {
|
|
|
266128
266143
|
}
|
|
266129
266144
|
|
|
266130
266145
|
// src/cli/commands/site/open.ts
|
|
266146
|
+
var isAppNotPublished = (error) => error instanceof ApiError && error.statusCode === 404;
|
|
266147
|
+
async function getPublishedSiteUrl() {
|
|
266148
|
+
try {
|
|
266149
|
+
return await getSiteUrl();
|
|
266150
|
+
} catch (error) {
|
|
266151
|
+
throw isAppNotPublished(error) ? new AppNotPublishedError : error;
|
|
266152
|
+
}
|
|
266153
|
+
}
|
|
266131
266154
|
async function openAction({
|
|
266132
266155
|
isNonInteractive
|
|
266133
266156
|
}) {
|
|
266134
|
-
const siteUrl = await
|
|
266157
|
+
const siteUrl = await getPublishedSiteUrl();
|
|
266135
266158
|
if (!isNonInteractive) {
|
|
266136
266159
|
await open_default(siteUrl);
|
|
266137
266160
|
}
|
|
@@ -275042,4 +275065,4 @@ export {
|
|
|
275042
275065
|
runCLI
|
|
275043
275066
|
};
|
|
275044
275067
|
|
|
275045
|
-
//# debugId=
|
|
275068
|
+
//# debugId=11789D5167933FD664756E2164756E21
|