@fern-api/fern-api-dev 5.74.3 → 5.75.0
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 +47 -20
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -79657,7 +79657,8 @@ var init_CasingsConfig2 = __esm({
|
|
|
79657
79657
|
CasingsConfig = schemas_exports3.objectWithoutOptionalProperties({
|
|
79658
79658
|
generationLanguage: SupportedSdkLanguage2.optional(),
|
|
79659
79659
|
keywords: schemas_exports3.list(schemas_exports3.string()).optional(),
|
|
79660
|
-
smartCasing: schemas_exports3.boolean()
|
|
79660
|
+
smartCasing: schemas_exports3.boolean(),
|
|
79661
|
+
smartCasingDigitWordBoundary: schemas_exports3.boolean().optional()
|
|
79661
79662
|
});
|
|
79662
79663
|
}
|
|
79663
79664
|
});
|
|
@@ -130696,6 +130697,7 @@ var init_BaseGeneratorInvocationSchema2 = __esm({
|
|
|
130696
130697
|
snippets: GeneratorSnippetsSchema.optional(),
|
|
130697
130698
|
"ir-version": schemas_exports8.string().optional(),
|
|
130698
130699
|
"smart-casing": schemas_exports8.boolean().optional(),
|
|
130700
|
+
"smart-casing-digit-word-boundary": schemas_exports8.boolean().optional(),
|
|
130699
130701
|
api: GeneratorApiSettingsSchema.optional(),
|
|
130700
130702
|
"disable-examples": schemas_exports8.boolean().optional(),
|
|
130701
130703
|
"publish-metadata": GeneratorPublishMetadataSchema.optional(),
|
|
@@ -260866,6 +260868,7 @@ async function convertGenerator({ absolutePathToGeneratorsConfiguration, generat
|
|
|
260866
260868
|
}),
|
|
260867
260869
|
keywords: generator.keywords,
|
|
260868
260870
|
smartCasing: generator["smart-casing"] ?? true,
|
|
260871
|
+
smartCasingDigitWordBoundary: generator["smart-casing-digit-word-boundary"] ?? false,
|
|
260869
260872
|
disableExamples: generator["disable-examples"] ?? false,
|
|
260870
260873
|
absolutePathToLocalOutput: generator.output?.location === "local-file-system" ? resolve6(dirname6(absolutePathToGeneratorsConfiguration), generator.output.path) : void 0,
|
|
260871
260874
|
absolutePathToLocalSnippets: generator.snippets?.path != null ? resolve6(dirname6(absolutePathToGeneratorsConfiguration), generator.snippets.path) : void 0,
|
|
@@ -262719,7 +262722,7 @@ var init_reserved = __esm({
|
|
|
262719
262722
|
|
|
262720
262723
|
// ../../commons/casings-generator/lib/CasingsGenerator.js
|
|
262721
262724
|
function computeName(inputName, opts, config5) {
|
|
262722
|
-
const { generationLanguage, keywords: keywords3, smartCasing } = config5;
|
|
262725
|
+
const { generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary } = config5;
|
|
262723
262726
|
const name2 = preprocessName(inputName);
|
|
262724
262727
|
const generateSafeAndUnsafeString = (unsafeString) => ({
|
|
262725
262728
|
unsafeName: unsafeString,
|
|
@@ -262768,7 +262771,7 @@ function computeName(inputName, opts, config5) {
|
|
|
262768
262771
|
return segments.map((segment, index3) => {
|
|
262769
262772
|
const casedSegment = snakeCase_default(segment);
|
|
262770
262773
|
const previousSegment = segments[index3 - 1];
|
|
262771
|
-
const startsNewWord = casedSegment !== "" && previousSegment != null && /^\d+$/.test(previousSegment) && /^[^a-z0-9]/.test(segment);
|
|
262774
|
+
const startsNewWord = (smartCasingDigitWordBoundary ?? false) && casedSegment !== "" && previousSegment != null && /^\d+$/.test(previousSegment) && /^[^a-z0-9]/.test(segment);
|
|
262772
262775
|
return startsNewWord ? `_${casedSegment}` : casedSegment;
|
|
262773
262776
|
}).join("");
|
|
262774
262777
|
}).join("_");
|
|
@@ -262782,8 +262785,8 @@ function computeName(inputName, opts, config5) {
|
|
|
262782
262785
|
pascalCase: generateSafeAndUnsafeString(opts.casingOverrides?.pascal ?? pascalCaseName)
|
|
262783
262786
|
};
|
|
262784
262787
|
}
|
|
262785
|
-
function constructCasingsGenerator({ generationLanguage, keywords: keywords3, smartCasing }) {
|
|
262786
|
-
const config5 = { generationLanguage, keywords: keywords3, smartCasing };
|
|
262788
|
+
function constructCasingsGenerator({ generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary }) {
|
|
262789
|
+
const config5 = { generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary };
|
|
262787
262790
|
return {
|
|
262788
262791
|
generateName: (inputName, opts) => {
|
|
262789
262792
|
if (opts?.casingOverrides != null) {
|
|
@@ -262802,8 +262805,8 @@ function constructCasingsGenerator({ generationLanguage, keywords: keywords3, sm
|
|
|
262802
262805
|
}
|
|
262803
262806
|
};
|
|
262804
262807
|
}
|
|
262805
|
-
function constructFullCasingsGenerator({ generationLanguage, keywords: keywords3, smartCasing }) {
|
|
262806
|
-
const config5 = { generationLanguage, keywords: keywords3, smartCasing };
|
|
262808
|
+
function constructFullCasingsGenerator({ generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary }) {
|
|
262809
|
+
const config5 = { generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary };
|
|
262807
262810
|
return {
|
|
262808
262811
|
generateName: (inputName, opts) => {
|
|
262809
262812
|
if (typeof inputName === "string") {
|
|
@@ -272873,11 +272876,13 @@ var init_DynamicSnippetsConverter = __esm({
|
|
|
272873
272876
|
this.casingsGenerator = constructCasingsGenerator({
|
|
272874
272877
|
generationLanguage: args.generationLanguage,
|
|
272875
272878
|
smartCasing: args.smartCasing ?? args.ir.casingsConfig?.smartCasing ?? true,
|
|
272879
|
+
smartCasingDigitWordBoundary: args.smartCasingDigitWordBoundary ?? args.ir.casingsConfig?.smartCasingDigitWordBoundary ?? false,
|
|
272876
272880
|
keywords: args.ir.casingsConfig?.keywords
|
|
272877
272881
|
});
|
|
272878
272882
|
this.fullCasingsGenerator = constructFullCasingsGenerator({
|
|
272879
272883
|
generationLanguage: args.generationLanguage,
|
|
272880
272884
|
smartCasing: args.smartCasing ?? args.ir.casingsConfig?.smartCasing ?? true,
|
|
272885
|
+
smartCasingDigitWordBoundary: args.smartCasingDigitWordBoundary ?? args.ir.casingsConfig?.smartCasingDigitWordBoundary ?? false,
|
|
272881
272886
|
keywords: args.ir.casingsConfig?.keywords
|
|
272882
272887
|
});
|
|
272883
272888
|
this.auth = this.convertAuth(this.ir.auth);
|
|
@@ -273656,8 +273661,14 @@ var init_DynamicSnippetsConverter = __esm({
|
|
|
273656
273661
|
});
|
|
273657
273662
|
|
|
273658
273663
|
// ../generation/ir-generator/lib/dynamic-snippets/convertIrToDynamicSnippetsIr.js
|
|
273659
|
-
function convertIrToDynamicSnippetsIr({ ir: ir3, generationLanguage, smartCasing, disableExamples, generatorConfig }) {
|
|
273660
|
-
const converter = new DynamicSnippetsConverter({
|
|
273664
|
+
function convertIrToDynamicSnippetsIr({ ir: ir3, generationLanguage, smartCasing, smartCasingDigitWordBoundary, disableExamples, generatorConfig }) {
|
|
273665
|
+
const converter = new DynamicSnippetsConverter({
|
|
273666
|
+
ir: ir3,
|
|
273667
|
+
generationLanguage,
|
|
273668
|
+
smartCasing,
|
|
273669
|
+
smartCasingDigitWordBoundary,
|
|
273670
|
+
generatorConfig
|
|
273671
|
+
});
|
|
273661
273672
|
return converter.convert({ disableExamples });
|
|
273662
273673
|
}
|
|
273663
273674
|
var init_convertIrToDynamicSnippetsIr = __esm({
|
|
@@ -277807,9 +277818,14 @@ var init_getIrGenerationSettings = __esm({
|
|
|
277807
277818
|
});
|
|
277808
277819
|
|
|
277809
277820
|
// ../generation/ir-generator/lib/generateIntermediateRepresentation.js
|
|
277810
|
-
function generateIntermediateRepresentation({ workspace, generationLanguage, keywords: keywords3, smartCasing, exampleGeneration, audiences, readme, packageName, userAgentTemplate, idempotencyKeyGeneration, organization, version: version7, context: context3, fdrApiDefinitionId, sourceResolver, disableDynamicExamples, dynamicGeneratorConfig, generationMetadata }) {
|
|
277821
|
+
function generateIntermediateRepresentation({ workspace, generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary, exampleGeneration, audiences, readme, packageName, userAgentTemplate, idempotencyKeyGeneration, organization, version: version7, context: context3, fdrApiDefinitionId, sourceResolver, disableDynamicExamples, dynamicGeneratorConfig, generationMetadata }) {
|
|
277811
277822
|
const irSettings = getIrGenerationSettings({ workspace });
|
|
277812
|
-
const casingsGenerator = constructCasingsGenerator({
|
|
277823
|
+
const casingsGenerator = constructCasingsGenerator({
|
|
277824
|
+
generationLanguage,
|
|
277825
|
+
keywords: keywords3,
|
|
277826
|
+
smartCasing,
|
|
277827
|
+
smartCasingDigitWordBoundary
|
|
277828
|
+
});
|
|
277813
277829
|
const irGraph = new IrGraph(audiences);
|
|
277814
277830
|
const rootApiFileContext = constructRootApiFileContext({
|
|
277815
277831
|
casingsGenerator,
|
|
@@ -277889,7 +277905,7 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
277889
277905
|
audiences: workspace.definition.rootApiFile.contents.audiences,
|
|
277890
277906
|
generationMetadata,
|
|
277891
277907
|
apiPlayground: true,
|
|
277892
|
-
casingsConfig: { generationLanguage, keywords: keywords3, smartCasing }
|
|
277908
|
+
casingsConfig: { generationLanguage, keywords: keywords3, smartCasing, smartCasingDigitWordBoundary }
|
|
277893
277909
|
};
|
|
277894
277910
|
const packageTreeGenerator = new PackageTreeGenerator();
|
|
277895
277911
|
const visitDefinitionFile = (file4) => {
|
|
@@ -278189,7 +278205,8 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
278189
278205
|
generatorConfig: dynamicGeneratorConfig,
|
|
278190
278206
|
disableExamples: disableDynamicExamples,
|
|
278191
278207
|
generationLanguage,
|
|
278192
|
-
smartCasing
|
|
278208
|
+
smartCasing,
|
|
278209
|
+
smartCasingDigitWordBoundary
|
|
278193
278210
|
})
|
|
278194
278211
|
};
|
|
278195
278212
|
}
|
|
@@ -690977,7 +690994,7 @@ var AccessTokenPosthogManager = class {
|
|
|
690977
690994
|
properties: {
|
|
690978
690995
|
...event,
|
|
690979
690996
|
...event.properties,
|
|
690980
|
-
version: "5.
|
|
690997
|
+
version: "5.75.0",
|
|
690981
690998
|
usingAccessToken: true,
|
|
690982
690999
|
...getRunIdProperties()
|
|
690983
691000
|
}
|
|
@@ -691043,7 +691060,7 @@ var UserPosthogManager = class {
|
|
|
691043
691060
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
691044
691061
|
event: "CLI",
|
|
691045
691062
|
properties: {
|
|
691046
|
-
version: "5.
|
|
691063
|
+
version: "5.75.0",
|
|
691047
691064
|
...event,
|
|
691048
691065
|
...event.properties,
|
|
691049
691066
|
usingAccessToken: false,
|
|
@@ -872144,7 +872161,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
872144
872161
|
var LOGS_FOLDER_NAME = "logs";
|
|
872145
872162
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
872146
872163
|
function getCliSource() {
|
|
872147
|
-
const version7 = "5.
|
|
872164
|
+
const version7 = "5.75.0";
|
|
872148
872165
|
return `cli@${version7}`;
|
|
872149
872166
|
}
|
|
872150
872167
|
var DebugLogger = class {
|
|
@@ -901978,6 +901995,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
901978
901995
|
generationLanguage: generatorInvocation.language,
|
|
901979
901996
|
keywords: generatorInvocation.keywords,
|
|
901980
901997
|
smartCasing: generatorInvocation.smartCasing,
|
|
901998
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
901981
901999
|
exampleGeneration: {
|
|
901982
902000
|
disabled: generatorInvocation.disableExamples,
|
|
901983
902001
|
skipAutogenerationIfManualExamplesExist: true,
|
|
@@ -902092,6 +902110,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
902092
902110
|
packageName,
|
|
902093
902111
|
ir: ir3,
|
|
902094
902112
|
smartCasing: generatorInvocation.smartCasing,
|
|
902113
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
902095
902114
|
dynamicGeneratorConfig,
|
|
902096
902115
|
context: interactiveTaskContext
|
|
902097
902116
|
});
|
|
@@ -902188,6 +902207,7 @@ async function runRemoteGenerationForGenerator({ projectConfig, organization, wo
|
|
|
902188
902207
|
packageName,
|
|
902189
902208
|
ir: ir3,
|
|
902190
902209
|
smartCasing: generatorInvocation.smartCasing,
|
|
902210
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
902191
902211
|
dynamicGeneratorConfig,
|
|
902192
902212
|
context: interactiveTaskContext
|
|
902193
902213
|
});
|
|
@@ -902248,7 +902268,7 @@ var emptyReadmeConfig = {
|
|
|
902248
902268
|
features: void 0,
|
|
902249
902269
|
exampleStyle: void 0
|
|
902250
902270
|
};
|
|
902251
|
-
async function uploadDynamicIRForSdkGeneration({ fdr, organization, version: version7, language, packageName, ir: ir3, smartCasing, dynamicGeneratorConfig, context: context3 }) {
|
|
902271
|
+
async function uploadDynamicIRForSdkGeneration({ fdr, organization, version: version7, language, packageName, ir: ir3, smartCasing, smartCasingDigitWordBoundary, dynamicGeneratorConfig, context: context3 }) {
|
|
902252
902272
|
context3.logger.debug(`Uploading dynamic IR for ${language} SDK...`);
|
|
902253
902273
|
let uploadUrlsResponse;
|
|
902254
902274
|
try {
|
|
@@ -902270,6 +902290,7 @@ async function uploadDynamicIRForSdkGeneration({ fdr, organization, version: ver
|
|
|
902270
902290
|
ir: ir3,
|
|
902271
902291
|
disableExamples: true,
|
|
902272
902292
|
smartCasing,
|
|
902293
|
+
smartCasingDigitWordBoundary,
|
|
902273
902294
|
generationLanguage: language,
|
|
902274
902295
|
generatorConfig: dynamicGeneratorConfig
|
|
902275
902296
|
});
|
|
@@ -904483,6 +904504,7 @@ async function generateLanguageSpecificDynamicIRs({ workspace, organization, con
|
|
|
904483
904504
|
generationLanguage: generatorInvocation.language,
|
|
904484
904505
|
keywords: void 0,
|
|
904485
904506
|
smartCasing: generatorInvocation.smartCasing,
|
|
904507
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
904486
904508
|
exampleGeneration: {
|
|
904487
904509
|
disabled: true,
|
|
904488
904510
|
skipAutogenerationIfManualExamplesExist: true,
|
|
@@ -904502,6 +904524,7 @@ async function generateLanguageSpecificDynamicIRs({ workspace, organization, con
|
|
|
904502
904524
|
ir: irForDynamicSnippets,
|
|
904503
904525
|
disableExamples: true,
|
|
904504
904526
|
smartCasing: generatorInvocation.smartCasing,
|
|
904527
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
904505
904528
|
generationLanguage: generatorInvocation.language,
|
|
904506
904529
|
generatorConfig: dynamicGeneratorConfig
|
|
904507
904530
|
});
|
|
@@ -904727,7 +904750,7 @@ var LegacyDocsPublisher = class {
|
|
|
904727
904750
|
previewId,
|
|
904728
904751
|
disableTemplates: void 0,
|
|
904729
904752
|
skipUpload,
|
|
904730
|
-
cliVersion: "5.
|
|
904753
|
+
cliVersion: "5.75.0",
|
|
904731
904754
|
loginCommand: "fern auth login"
|
|
904732
904755
|
});
|
|
904733
904756
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -957729,6 +957752,7 @@ async function getIntermediateRepresentation({ workspace, audiences, generatorIn
|
|
|
957729
957752
|
generationLanguage: generatorInvocation.language,
|
|
957730
957753
|
keywords: generatorInvocation.keywords,
|
|
957731
957754
|
smartCasing: generatorInvocation.smartCasing,
|
|
957755
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
957732
957756
|
exampleGeneration: {
|
|
957733
957757
|
includeOptionalRequestPropertyExamples,
|
|
957734
957758
|
disabled: generatorInvocation.disableExamples
|
|
@@ -959132,6 +959156,7 @@ async function runLocalGenerationForWorkspace({ token, projectConfig, workspace,
|
|
|
959132
959156
|
generationLanguage: generatorInvocation.language,
|
|
959133
959157
|
keywords: generatorInvocation.keywords,
|
|
959134
959158
|
smartCasing: generatorInvocation.smartCasing,
|
|
959159
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
959135
959160
|
exampleGeneration: {
|
|
959136
959161
|
includeOptionalRequestPropertyExamples: false,
|
|
959137
959162
|
disabled: generatorInvocation.disableExamples
|
|
@@ -959674,6 +959699,7 @@ var GenerationRunner = class {
|
|
|
959674
959699
|
generationLanguage: generatorInvocation.language,
|
|
959675
959700
|
keywords: generatorInvocation.keywords,
|
|
959676
959701
|
smartCasing: generatorInvocation.smartCasing,
|
|
959702
|
+
smartCasingDigitWordBoundary: generatorInvocation.smartCasingDigitWordBoundary,
|
|
959677
959703
|
exampleGeneration: {
|
|
959678
959704
|
includeOptionalRequestPropertyExamples: true,
|
|
959679
959705
|
disabled: generatorInvocation.disableExamples,
|
|
@@ -959778,6 +959804,7 @@ var LegacyGeneratorInvocationAdapter = class {
|
|
|
959778
959804
|
outputMode: await this.buildOutputMode(target),
|
|
959779
959805
|
absolutePathToLocalOutput: this.context.resolveOutputFilePath(target.output.path),
|
|
959780
959806
|
smartCasing: target.smartCasing ?? true,
|
|
959807
|
+
smartCasingDigitWordBoundary: false,
|
|
959781
959808
|
readme: this.buildReadme(target),
|
|
959782
959809
|
// Legacy options which are no longer supported.
|
|
959783
959810
|
absolutePathToLocalSnippets: void 0,
|
|
@@ -971273,7 +971300,7 @@ function getAutomationContextFromEnv() {
|
|
|
971273
971300
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
971274
971301
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
971275
971302
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
971276
|
-
cli_version: "5.
|
|
971303
|
+
cli_version: "5.75.0"
|
|
971277
971304
|
};
|
|
971278
971305
|
}
|
|
971279
971306
|
function isAutomationMode() {
|
|
@@ -972105,7 +972132,7 @@ var CliContext = class _CliContext {
|
|
|
972105
972132
|
if (false) {
|
|
972106
972133
|
this.logger.error("CLI_VERSION is not defined");
|
|
972107
972134
|
}
|
|
972108
|
-
return "5.
|
|
972135
|
+
return "5.75.0";
|
|
972109
972136
|
}
|
|
972110
972137
|
getCliName() {
|
|
972111
972138
|
if (false) {
|
package/package.json
CHANGED