fern-api 0.37.2 → 0.37.3
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/bundle.cjs +20 -9
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -1214385,7 +1214385,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1214385
1214385
|
properties: {
|
|
1214386
1214386
|
...event,
|
|
1214387
1214387
|
...event.properties,
|
|
1214388
|
-
version: "0.37.
|
|
1214388
|
+
version: "0.37.3",
|
|
1214389
1214389
|
usingAccessToken: true
|
|
1214390
1214390
|
}
|
|
1214391
1214391
|
});
|
|
@@ -1214447,7 +1214447,7 @@ var UserPosthogManager = class {
|
|
|
1214447
1214447
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1214448
1214448
|
event: "CLI",
|
|
1214449
1214449
|
properties: {
|
|
1214450
|
-
version: "0.37.
|
|
1214450
|
+
version: "0.37.3",
|
|
1214451
1214451
|
...event,
|
|
1214452
1214452
|
...event.properties
|
|
1214453
1214453
|
}
|
|
@@ -1243345,10 +1243345,10 @@ var CliContext = class {
|
|
|
1243345
1243345
|
return "fern-api";
|
|
1243346
1243346
|
}
|
|
1243347
1243347
|
getPackageVersion() {
|
|
1243348
|
-
if ("0.37.
|
|
1243348
|
+
if ("0.37.3" == null) {
|
|
1243349
1243349
|
this.logger.error("CLI_VERSION is not defined");
|
|
1243350
1243350
|
}
|
|
1243351
|
-
return "0.37.
|
|
1243351
|
+
return "0.37.3";
|
|
1243352
1243352
|
}
|
|
1243353
1243353
|
getCliName() {
|
|
1243354
1243354
|
if ("fern" == null) {
|
|
@@ -1255533,12 +1255533,21 @@ var EMPTY_DOCS_DEFINITION = {
|
|
|
1255533
1255533
|
};
|
|
1255534
1255534
|
async function runPreviewServer({ initialProject, reloadProject, validateProject, context, port }) {
|
|
1255535
1255535
|
var _a5, _b4;
|
|
1255536
|
-
|
|
1255537
|
-
|
|
1255538
|
-
|
|
1255539
|
-
|
|
1255536
|
+
try {
|
|
1255537
|
+
const url = "https://prod-local-preview-bundle2.s3.amazonaws.com/";
|
|
1255538
|
+
if (url == null) {
|
|
1255539
|
+
throw new Error("Failed to connect to the docs preview server. Please contact support@buildwithfern.com");
|
|
1255540
|
+
}
|
|
1255541
|
+
await downloadBundle({ bucketUrl: url, logger: context.logger, preferCached: true });
|
|
1255542
|
+
} catch (err) {
|
|
1255543
|
+
const pathToBundle = getPathToBundleFolder();
|
|
1255544
|
+
if (await doesPathExist(pathToBundle)) {
|
|
1255545
|
+
context.logger.warn("Failed to download latest docs application. Falling back to existing bundle.");
|
|
1255546
|
+
} else {
|
|
1255547
|
+
context.logger.warn("Failed to download docs application. Please reach out to support@buildwithfern.com.");
|
|
1255548
|
+
return;
|
|
1255549
|
+
}
|
|
1255540
1255550
|
}
|
|
1255541
|
-
await downloadBundle({ bucketUrl: url, logger: context.logger, preferCached: true });
|
|
1255542
1255551
|
const absoluteFilePathToFern = dirname(initialProject.config._absolutePath);
|
|
1255543
1255552
|
const app = (0, import_express.default)();
|
|
1255544
1255553
|
const httpServer = import_http3.default.createServer(app);
|
|
@@ -1300708,6 +1300717,8 @@ async function runCli() {
|
|
|
1300708
1300717
|
});
|
|
1300709
1300718
|
if (error instanceof FernCliError) {
|
|
1300710
1300719
|
cliContext.failWithoutThrowing();
|
|
1300720
|
+
} else if (error instanceof LoggableFernCliError) {
|
|
1300721
|
+
cliContext.logger.error(`Failed. ${error.log}`);
|
|
1300711
1300722
|
} else {
|
|
1300712
1300723
|
cliContext.failWithoutThrowing("Failed.", error);
|
|
1300713
1300724
|
}
|