@fern-api/fern-api-dev 3.35.1 → 3.35.2
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/cli.cjs +22 -16
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1413767,7 +1413767,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1413767
1413767
|
properties: {
|
|
1413768
1413768
|
...event,
|
|
1413769
1413769
|
...event.properties,
|
|
1413770
|
-
version: "3.35.
|
|
1413770
|
+
version: "3.35.2",
|
|
1413771
1413771
|
usingAccessToken: true
|
|
1413772
1413772
|
}
|
|
1413773
1413773
|
});
|
|
@@ -1413866,7 +1413866,7 @@ var UserPosthogManager = class {
|
|
|
1413866
1413866
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1413867
1413867
|
event: "CLI",
|
|
1413868
1413868
|
properties: {
|
|
1413869
|
-
version: "3.35.
|
|
1413869
|
+
version: "3.35.2",
|
|
1413870
1413870
|
...event,
|
|
1413871
1413871
|
...event.properties,
|
|
1413872
1413872
|
usingAccessToken: false,
|
|
@@ -1493970,7 +1493970,7 @@ var CliContext = class {
|
|
|
1493970
1493970
|
if (false) {
|
|
1493971
1493971
|
this.logger.error("CLI_VERSION is not defined");
|
|
1493972
1493972
|
}
|
|
1493973
|
-
return "3.35.
|
|
1493973
|
+
return "3.35.2";
|
|
1493974
1493974
|
}
|
|
1493975
1493975
|
getCliName() {
|
|
1493976
1493976
|
if (false) {
|
|
@@ -1563964,12 +1563964,12 @@ async function replaceReferencedCode({
|
|
|
1563964
1563964
|
title5 = filepath.split("/").pop();
|
|
1563965
1563965
|
}
|
|
1563966
1563966
|
const allProps = /* @__PURE__ */ new Map();
|
|
1563967
|
-
const propsRegex = /(\w+)=(?:{([^}]+)}|"([^"]+)")/g;
|
|
1563967
|
+
const propsRegex = /(\w+)=(?:{([^}]+)}|"([^"]+)"|(\d+)(?=\s|\/|>|$))/g;
|
|
1563968
1563968
|
const beforeSrcProps = matchString?.split("src=")[0]?.trim() ?? "";
|
|
1563969
1563969
|
let propMatch;
|
|
1563970
1563970
|
while ((propMatch = propsRegex.exec(beforeSrcProps)) !== null) {
|
|
1563971
1563971
|
const propName = propMatch[1];
|
|
1563972
|
-
const propValue = propMatch[2] || propMatch[3];
|
|
1563972
|
+
const propValue = propMatch[2] || propMatch[3] || propMatch[4];
|
|
1563973
1563973
|
const fromCurlyBraces = propMatch[2] !== void 0;
|
|
1563974
1563974
|
if (propName && propValue) {
|
|
1563975
1563975
|
allProps.set(propName, { value: propValue, fromCurlyBraces });
|
|
@@ -1563979,7 +1563979,7 @@ async function replaceReferencedCode({
|
|
|
1563979
1563979
|
propsRegex.lastIndex = 0;
|
|
1563980
1563980
|
while ((propMatch = propsRegex.exec(afterSrcProps)) !== null) {
|
|
1563981
1563981
|
const propName = propMatch[1];
|
|
1563982
|
-
const propValue = propMatch[2] || propMatch[3];
|
|
1563982
|
+
const propValue = propMatch[2] || propMatch[3] || propMatch[4];
|
|
1563983
1563983
|
const fromCurlyBraces = propMatch[2] !== void 0;
|
|
1563984
1563984
|
if (propName && propValue) {
|
|
1563985
1563985
|
allProps.set(propName, { value: propValue, fromCurlyBraces });
|
|
@@ -1588918,7 +1588918,7 @@ var import_path35 = __toESM(require("path"), 1);
|
|
|
1588918
1588918
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1588919
1588919
|
var LOGS_FOLDER_NAME = "logs";
|
|
1588920
1588920
|
function getCliSource() {
|
|
1588921
|
-
const version6 = "3.35.
|
|
1588921
|
+
const version6 = "3.35.2";
|
|
1588922
1588922
|
return `cli@${version6}`;
|
|
1588923
1588923
|
}
|
|
1588924
1588924
|
var DebugLogger = class {
|
|
@@ -1590351,12 +1590351,12 @@ async function replaceReferencedCode2({
|
|
|
1590351
1590351
|
title5 = filepath.split("/").pop();
|
|
1590352
1590352
|
}
|
|
1590353
1590353
|
const allProps = /* @__PURE__ */ new Map();
|
|
1590354
|
-
const propsRegex = /(\w+)=(?:{([^}]+)}|"([^"]+)")/g;
|
|
1590354
|
+
const propsRegex = /(\w+)=(?:{([^}]+)}|"([^"]+)"|(\d+)(?=\s|\/|>|$))/g;
|
|
1590355
1590355
|
const beforeSrcProps = matchString?.split("src=")[0]?.trim() ?? "";
|
|
1590356
1590356
|
let propMatch;
|
|
1590357
1590357
|
while ((propMatch = propsRegex.exec(beforeSrcProps)) !== null) {
|
|
1590358
1590358
|
const propName = propMatch[1];
|
|
1590359
|
-
const propValue = propMatch[2] || propMatch[3];
|
|
1590359
|
+
const propValue = propMatch[2] || propMatch[3] || propMatch[4];
|
|
1590360
1590360
|
const fromCurlyBraces = propMatch[2] !== void 0;
|
|
1590361
1590361
|
if (propName && propValue) {
|
|
1590362
1590362
|
allProps.set(propName, { value: propValue, fromCurlyBraces });
|
|
@@ -1590366,7 +1590366,7 @@ async function replaceReferencedCode2({
|
|
|
1590366
1590366
|
propsRegex.lastIndex = 0;
|
|
1590367
1590367
|
while ((propMatch = propsRegex.exec(afterSrcProps)) !== null) {
|
|
1590368
1590368
|
const propName = propMatch[1];
|
|
1590369
|
-
const propValue = propMatch[2] || propMatch[3];
|
|
1590369
|
+
const propValue = propMatch[2] || propMatch[3] || propMatch[4];
|
|
1590370
1590370
|
const fromCurlyBraces = propMatch[2] !== void 0;
|
|
1590371
1590371
|
if (propName && propValue) {
|
|
1590372
1590372
|
allProps.set(propName, { value: propValue, fromCurlyBraces });
|
|
@@ -1608491,12 +1608491,14 @@ function extractLicenseInfo(generatorInvocation, absolutePathToFernConfig) {
|
|
|
1608491
1608491
|
function getGithubPublishConfig(githubPublishInfo) {
|
|
1608492
1608492
|
return githubPublishInfo != null ? import_api2.GithubPublishInfo._visit(githubPublishInfo, {
|
|
1608493
1608493
|
npm: (value) => {
|
|
1608494
|
-
const token = (value.token
|
|
1608494
|
+
const token = (value.token ?? "").trim();
|
|
1608495
1608495
|
const useOidc = token === "<USE_OIDC>" || token === "OIDC";
|
|
1608496
|
+
const hasToken = token !== "";
|
|
1608496
1608497
|
return import_generator_exec_sdk.FernGeneratorExec.GithubPublishInfo.npm({
|
|
1608497
1608498
|
registryUrl: value.registryUrl,
|
|
1608498
1608499
|
packageName: value.packageName,
|
|
1608499
|
-
tokenEnvironmentVariable: (0, import_api3.EnvironmentVariable)(useOidc ? "<USE_OIDC>" : token.startsWith("${") && token.endsWith("}") ? token.slice(2, -1).trim() : "")
|
|
1608500
|
+
tokenEnvironmentVariable: (0, import_api3.EnvironmentVariable)(useOidc ? "<USE_OIDC>" : token.startsWith("${") && token.endsWith("}") ? token.slice(2, -1).trim() : ""),
|
|
1608501
|
+
shouldGeneratePublishWorkflow: useOidc || hasToken
|
|
1608500
1608502
|
});
|
|
1608501
1608503
|
},
|
|
1608502
1608504
|
maven: (value) => import_generator_exec_sdk.FernGeneratorExec.GithubPublishInfo.maven({
|
|
@@ -1608652,7 +1608654,7 @@ function newDummyPublishOutputConfig(version6, multipleOutputMode, generatorInvo
|
|
|
1608652
1608654
|
let repoUrl = "";
|
|
1608653
1608655
|
if (generatorInvocation.raw?.github != null) {
|
|
1608654
1608656
|
if (isGithubSelfhosted(generatorInvocation.raw.github)) {
|
|
1608655
|
-
repoUrl = generatorInvocation.raw.github.uri
|
|
1608657
|
+
repoUrl = `https://github.com/${generatorInvocation.raw.github.uri}`;
|
|
1608656
1608658
|
} else {
|
|
1608657
1608659
|
repoUrl = generatorInvocation.raw?.github.repository;
|
|
1608658
1608660
|
}
|
|
@@ -1623357,7 +1623359,7 @@ async function publishDocs({ token, organization, docsWorkspace, domain: domain2
|
|
|
1623357
1623359
|
let docsRegistrationId;
|
|
1623358
1623360
|
let urlToOutput = customDomains[0] ?? domain2;
|
|
1623359
1623361
|
const basePath = parseBasePath(domain2);
|
|
1623360
|
-
const disableDynamicSnippets = docsWorkspace.config.experimental &&
|
|
1623362
|
+
const disableDynamicSnippets = docsWorkspace.config.experimental && docsWorkspace.config.experimental.dynamicSnippets === false;
|
|
1623361
1623363
|
const resolver2 = new DocsDefinitionResolver({
|
|
1623362
1623364
|
domain: domain2,
|
|
1623363
1623365
|
docsWorkspace,
|
|
@@ -1627443,8 +1627445,8 @@ generators:
|
|
|
1627443
1627445
|
githubRepository: selfhostedGithubConfig.uri,
|
|
1627444
1627446
|
installationToken: selfhostedGithubConfig.token,
|
|
1627445
1627447
|
targetDirectory: absolutePathToLocalOutput,
|
|
1627446
|
-
timeoutMs:
|
|
1627447
|
-
//
|
|
1627448
|
+
timeoutMs: 3e4
|
|
1627449
|
+
// 30 seconds timeout for credential/network issues
|
|
1627448
1627450
|
});
|
|
1627449
1627451
|
const mode = selfhostedGithubConfig.mode ?? "push";
|
|
1627450
1627452
|
if (mode === "push" && selfhostedGithubConfig.branch != null) {
|
|
@@ -1627506,6 +1627508,10 @@ function getPackageNameFromGeneratorConfig(generatorInvocation) {
|
|
|
1627506
1627508
|
if (packageName != null) {
|
|
1627507
1627509
|
return packageName;
|
|
1627508
1627510
|
}
|
|
1627511
|
+
const coordinate = generatorInvocation.raw.output.coordinate;
|
|
1627512
|
+
if (coordinate != null) {
|
|
1627513
|
+
return coordinate;
|
|
1627514
|
+
}
|
|
1627509
1627515
|
}
|
|
1627510
1627516
|
if (typeof generatorInvocation.raw?.config === "object" && generatorInvocation.raw?.config !== null) {
|
|
1627511
1627517
|
const packageName = generatorInvocation.raw.config.package_name;
|
package/package.json
CHANGED