fern-api 0.23.1-rc5 → 0.23.1
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 +10 -10
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -890251,7 +890251,7 @@ var AccessTokenPosthogManager = class {
|
|
|
890251
890251
|
properties: {
|
|
890252
890252
|
...event,
|
|
890253
890253
|
...event.properties,
|
|
890254
|
-
version: "0.23.1
|
|
890254
|
+
version: "0.23.1",
|
|
890255
890255
|
usingAccessToken: true
|
|
890256
890256
|
}
|
|
890257
890257
|
});
|
|
@@ -890313,7 +890313,7 @@ var UserPosthogManager = class {
|
|
|
890313
890313
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
890314
890314
|
event: "CLI",
|
|
890315
890315
|
properties: {
|
|
890316
|
-
version: "0.23.1
|
|
890316
|
+
version: "0.23.1",
|
|
890317
890317
|
...event,
|
|
890318
890318
|
...event.properties
|
|
890319
890319
|
}
|
|
@@ -914780,10 +914780,10 @@ var CliContext = class {
|
|
|
914780
914780
|
return "fern-api";
|
|
914781
914781
|
}
|
|
914782
914782
|
getPackageVersion() {
|
|
914783
|
-
if ("0.23.1
|
|
914783
|
+
if ("0.23.1" == null) {
|
|
914784
914784
|
this.logger.error("CLI_VERSION is not defined");
|
|
914785
914785
|
}
|
|
914786
|
-
return "0.23.1
|
|
914786
|
+
return "0.23.1";
|
|
914787
914787
|
}
|
|
914788
914788
|
getCliName() {
|
|
914789
914789
|
if ("fern" == null) {
|
|
@@ -964345,16 +964345,16 @@ function isExternalUrl(url) {
|
|
|
964345
964345
|
return /^(https?:)?\/\//.test(url);
|
|
964346
964346
|
}
|
|
964347
964347
|
function replaceImagePaths(markdown, fileIdsMap) {
|
|
964348
|
-
const
|
|
964349
|
-
let
|
|
964348
|
+
const { content: content5, data: data2 } = (0, import_gray_matter.default)(markdown);
|
|
964349
|
+
let replacedContent = content5;
|
|
964350
964350
|
const tree = fromMarkdown2(content5);
|
|
964351
964351
|
let offset2 = 0;
|
|
964352
964352
|
visit3(tree, (node3) => {
|
|
964353
964353
|
if (node3.position == null) {
|
|
964354
964354
|
return;
|
|
964355
964355
|
}
|
|
964356
|
-
const { start: start3, length } = getPosition(
|
|
964357
|
-
const original =
|
|
964356
|
+
const { start: start3, length } = getPosition(content5, node3.position);
|
|
964357
|
+
const original = replacedContent.slice(start3 + offset2, start3 + offset2 + length);
|
|
964358
964358
|
let replaced = original;
|
|
964359
964359
|
if (node3.type === "image") {
|
|
964360
964360
|
const src = node3.url;
|
|
@@ -964380,10 +964380,10 @@ function replaceImagePaths(markdown, fileIdsMap) {
|
|
|
964380
964380
|
}
|
|
964381
964381
|
}
|
|
964382
964382
|
}
|
|
964383
|
-
|
|
964383
|
+
replacedContent = replacedContent.slice(0, start3 + offset2) + replaced + replacedContent.slice(start3 + offset2 + length);
|
|
964384
964384
|
offset2 += replaced.length - length;
|
|
964385
964385
|
});
|
|
964386
|
-
return import_gray_matter.default.stringify(
|
|
964386
|
+
return import_gray_matter.default.stringify(replacedContent, data2);
|
|
964387
964387
|
}
|
|
964388
964388
|
function getPosition(markdown, position4) {
|
|
964389
964389
|
const lines = markdown.split("\n");
|