@fern-api/fern-api-dev 4.68.1 → 4.68.2-2-g74b3abda377
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 +129 -54
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -226337,9 +226337,9 @@ var require_bl = __commonJS({
|
|
|
226337
226337
|
}
|
|
226338
226338
|
});
|
|
226339
226339
|
|
|
226340
|
-
// ../../../node_modules/.pnpm/follow-redirects@1.
|
|
226340
|
+
// ../../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/debug.js
|
|
226341
226341
|
var require_debug2 = __commonJS({
|
|
226342
|
-
"../../../node_modules/.pnpm/follow-redirects@1.
|
|
226342
|
+
"../../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/debug.js"(exports2, module4) {
|
|
226343
226343
|
"use strict";
|
|
226344
226344
|
var debug9;
|
|
226345
226345
|
module4.exports = function() {
|
|
@@ -226358,9 +226358,9 @@ var require_debug2 = __commonJS({
|
|
|
226358
226358
|
}
|
|
226359
226359
|
});
|
|
226360
226360
|
|
|
226361
|
-
// ../../../node_modules/.pnpm/follow-redirects@1.
|
|
226361
|
+
// ../../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/index.js
|
|
226362
226362
|
var require_follow_redirects = __commonJS({
|
|
226363
|
-
"../../../node_modules/.pnpm/follow-redirects@1.
|
|
226363
|
+
"../../../node_modules/.pnpm/follow-redirects@1.16.0/node_modules/follow-redirects/index.js"(exports2, module4) {
|
|
226364
226364
|
"use strict";
|
|
226365
226365
|
var url3 = require("url");
|
|
226366
226366
|
var URL4 = url3.URL;
|
|
@@ -226383,6 +226383,11 @@ var require_follow_redirects = __commonJS({
|
|
|
226383
226383
|
} catch (error50) {
|
|
226384
226384
|
useNativeURL = error50.code === "ERR_INVALID_URL";
|
|
226385
226385
|
}
|
|
226386
|
+
var sensitiveHeaders = [
|
|
226387
|
+
"Authorization",
|
|
226388
|
+
"Proxy-Authorization",
|
|
226389
|
+
"Cookie"
|
|
226390
|
+
];
|
|
226386
226391
|
var preservedUrlFields = [
|
|
226387
226392
|
"auth",
|
|
226388
226393
|
"host",
|
|
@@ -226447,6 +226452,7 @@ var require_follow_redirects = __commonJS({
|
|
|
226447
226452
|
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
226448
226453
|
}
|
|
226449
226454
|
};
|
|
226455
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options2.sensitiveHeaders).map(escapeRegex2).join("|") + ")$", "i");
|
|
226450
226456
|
this._performRequest();
|
|
226451
226457
|
}
|
|
226452
226458
|
RedirectableRequest.prototype = Object.create(Writable2.prototype);
|
|
@@ -226584,6 +226590,9 @@ var require_follow_redirects = __commonJS({
|
|
|
226584
226590
|
if (!options2.headers) {
|
|
226585
226591
|
options2.headers = {};
|
|
226586
226592
|
}
|
|
226593
|
+
if (!isArray7(options2.sensitiveHeaders)) {
|
|
226594
|
+
options2.sensitiveHeaders = [];
|
|
226595
|
+
}
|
|
226587
226596
|
if (options2.host) {
|
|
226588
226597
|
if (!options2.hostname) {
|
|
226589
226598
|
options2.hostname = options2.host;
|
|
@@ -226689,7 +226698,7 @@ var require_follow_redirects = __commonJS({
|
|
|
226689
226698
|
this._isRedirect = true;
|
|
226690
226699
|
spreadUrlObject(redirectUrl, this._options);
|
|
226691
226700
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
226692
|
-
removeMatchingHeaders(
|
|
226701
|
+
removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
226693
226702
|
}
|
|
226694
226703
|
if (isFunction10(beforeRedirect)) {
|
|
226695
226704
|
var responseDetails = {
|
|
@@ -226838,6 +226847,9 @@ var require_follow_redirects = __commonJS({
|
|
|
226838
226847
|
var dot = subdomain.length - domain3.length - 1;
|
|
226839
226848
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain3);
|
|
226840
226849
|
}
|
|
226850
|
+
function isArray7(value) {
|
|
226851
|
+
return value instanceof Array;
|
|
226852
|
+
}
|
|
226841
226853
|
function isString6(value) {
|
|
226842
226854
|
return typeof value === "string" || value instanceof String;
|
|
226843
226855
|
}
|
|
@@ -226850,6 +226862,9 @@ var require_follow_redirects = __commonJS({
|
|
|
226850
226862
|
function isURL2(value) {
|
|
226851
226863
|
return URL4 && value instanceof URL4;
|
|
226852
226864
|
}
|
|
226865
|
+
function escapeRegex2(regex5) {
|
|
226866
|
+
return regex5.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
226867
|
+
}
|
|
226853
226868
|
module4.exports = wrap10({ http: http13, https: https5 });
|
|
226854
226869
|
module4.exports.wrap = wrap10;
|
|
226855
226870
|
}
|
|
@@ -612963,7 +612978,7 @@ var FernGlobalHeadersExtension = class extends AbstractExtension {
|
|
|
612963
612978
|
}
|
|
612964
612979
|
};
|
|
612965
612980
|
|
|
612966
|
-
// ../api-importers/openapi-to-ir/lib/utils/
|
|
612981
|
+
// ../api-importers/openapi-to-ir/lib/utils/convertGlobalHeaderOverrides.js
|
|
612967
612982
|
function convertDefaultToLiteral2(defaultValue) {
|
|
612968
612983
|
if (defaultValue == null) {
|
|
612969
612984
|
return void 0;
|
|
@@ -612976,6 +612991,60 @@ function convertDefaultToLiteral2(defaultValue) {
|
|
|
612976
612991
|
}
|
|
612977
612992
|
return void 0;
|
|
612978
612993
|
}
|
|
612994
|
+
function convertGlobalHeaderOverrides({ globalHeaderOverrides, context: context3 }) {
|
|
612995
|
+
const headers2 = [];
|
|
612996
|
+
for (const [headerKey, headerSchema] of Object.entries(globalHeaderOverrides.headers ?? {})) {
|
|
612997
|
+
if (typeof headerSchema === "string") {
|
|
612998
|
+
headers2.push({
|
|
612999
|
+
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
613000
|
+
name: headerKey,
|
|
613001
|
+
wireValue: headerKey
|
|
613002
|
+
}),
|
|
613003
|
+
valueType: AbstractConverter.STRING,
|
|
613004
|
+
env: void 0,
|
|
613005
|
+
v2Examples: {
|
|
613006
|
+
userSpecifiedExamples: {},
|
|
613007
|
+
autogeneratedExamples: {}
|
|
613008
|
+
},
|
|
613009
|
+
availability: void 0,
|
|
613010
|
+
docs: void 0,
|
|
613011
|
+
clientDefault: void 0
|
|
613012
|
+
});
|
|
613013
|
+
} else {
|
|
613014
|
+
const name2 = headerSchema.name ?? headerKey;
|
|
613015
|
+
headers2.push({
|
|
613016
|
+
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
613017
|
+
name: name2,
|
|
613018
|
+
wireValue: headerKey
|
|
613019
|
+
}),
|
|
613020
|
+
valueType: AbstractConverter.STRING,
|
|
613021
|
+
env: headerSchema.env,
|
|
613022
|
+
v2Examples: {
|
|
613023
|
+
userSpecifiedExamples: {},
|
|
613024
|
+
autogeneratedExamples: {}
|
|
613025
|
+
},
|
|
613026
|
+
availability: void 0,
|
|
613027
|
+
docs: headerSchema.docs,
|
|
613028
|
+
clientDefault: convertDefaultToLiteral2(headerSchema.default)
|
|
613029
|
+
});
|
|
613030
|
+
}
|
|
613031
|
+
}
|
|
613032
|
+
return headers2;
|
|
613033
|
+
}
|
|
613034
|
+
|
|
613035
|
+
// ../api-importers/openapi-to-ir/lib/utils/convertGlobalHeadersExtension.js
|
|
613036
|
+
function convertDefaultToLiteral3(defaultValue) {
|
|
613037
|
+
if (defaultValue == null) {
|
|
613038
|
+
return void 0;
|
|
613039
|
+
}
|
|
613040
|
+
if (typeof defaultValue === "string") {
|
|
613041
|
+
return api_exports.Literal.string(defaultValue);
|
|
613042
|
+
}
|
|
613043
|
+
if (typeof defaultValue === "boolean") {
|
|
613044
|
+
return api_exports.Literal.boolean(defaultValue);
|
|
613045
|
+
}
|
|
613046
|
+
return void 0;
|
|
613047
|
+
}
|
|
612979
613048
|
function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
|
|
612980
613049
|
return globalHeaders.map((header) => ({
|
|
612981
613050
|
name: context3.casingsGenerator.generateNameAndWireValue({
|
|
@@ -612987,7 +613056,7 @@ function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
|
|
|
612987
613056
|
v2Examples: header.optional ? void 0 : constructGlobalHeaderExample({ header, context: context3 }),
|
|
612988
613057
|
availability: void 0,
|
|
612989
613058
|
docs: void 0,
|
|
612990
|
-
clientDefault:
|
|
613059
|
+
clientDefault: convertDefaultToLiteral3(header["x-fern-default"])
|
|
612991
613060
|
}));
|
|
612992
613061
|
}
|
|
612993
613062
|
function constructGlobalHeaderExample({ header, context: context3 }) {
|
|
@@ -616008,6 +616077,13 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
|
|
|
616008
616077
|
}
|
|
616009
616078
|
convertGlobalHeaders() {
|
|
616010
616079
|
if (this.context.globalHeaderOverrides) {
|
|
616080
|
+
const globalHeaders = convertGlobalHeaderOverrides({
|
|
616081
|
+
globalHeaderOverrides: this.context.globalHeaderOverrides,
|
|
616082
|
+
context: this.context
|
|
616083
|
+
});
|
|
616084
|
+
this.addGlobalHeadersToIr(globalHeaders);
|
|
616085
|
+
this.context.setGlobalHeaders(globalHeaders);
|
|
616086
|
+
return;
|
|
616011
616087
|
}
|
|
616012
616088
|
const globalHeadersExtension = new FernGlobalHeadersExtension({
|
|
616013
616089
|
breadcrumbs: ["x-fern-global-headers"],
|
|
@@ -627624,7 +627700,7 @@ var AccessTokenPosthogManager = class {
|
|
|
627624
627700
|
properties: {
|
|
627625
627701
|
...event,
|
|
627626
627702
|
...event.properties,
|
|
627627
|
-
version: "4.68.
|
|
627703
|
+
version: "4.68.2-2-g74b3abda377",
|
|
627628
627704
|
usingAccessToken: true
|
|
627629
627705
|
}
|
|
627630
627706
|
});
|
|
@@ -627678,7 +627754,7 @@ var UserPosthogManager = class {
|
|
|
627678
627754
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
627679
627755
|
event: "CLI",
|
|
627680
627756
|
properties: {
|
|
627681
|
-
version: "4.68.
|
|
627757
|
+
version: "4.68.2-2-g74b3abda377",
|
|
627682
627758
|
...event,
|
|
627683
627759
|
...event.properties,
|
|
627684
627760
|
usingAccessToken: false,
|
|
@@ -843953,7 +844029,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
843953
844029
|
var LOGS_FOLDER_NAME = "logs";
|
|
843954
844030
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
843955
844031
|
function getCliSource() {
|
|
843956
|
-
const version7 = "4.68.
|
|
844032
|
+
const version7 = "4.68.2-2-g74b3abda377";
|
|
843957
844033
|
return `cli@${version7}`;
|
|
843958
844034
|
}
|
|
843959
844035
|
var DebugLogger = class {
|
|
@@ -844834,7 +844910,7 @@ var ReferencedAPICollector = class {
|
|
|
844834
844910
|
constructor(context3) {
|
|
844835
844911
|
this.context = context3;
|
|
844836
844912
|
}
|
|
844837
|
-
addReferencedAPI({ ir: ir15, snippetsConfig, playgroundConfig, graphqlOperations = {}, graphqlTypes = {} }) {
|
|
844913
|
+
addReferencedAPI({ ir: ir15, snippetsConfig, playgroundConfig, apiName, graphqlOperations = {}, graphqlTypes = {} }) {
|
|
844838
844914
|
try {
|
|
844839
844915
|
const id2 = v4_default();
|
|
844840
844916
|
const dbApiDefinition = convertAPIDefinitionToDb(convertIrToFdrApi({
|
|
@@ -844843,7 +844919,8 @@ var ReferencedAPICollector = class {
|
|
|
844843
844919
|
playgroundConfig,
|
|
844844
844920
|
graphqlOperations,
|
|
844845
844921
|
graphqlTypes,
|
|
844846
|
-
context: this.context
|
|
844922
|
+
context: this.context,
|
|
844923
|
+
apiNameOverride: apiName
|
|
844847
844924
|
}), FdrAPI_exports.ApiDefinitionId(id2), new SDKSnippetHolder({
|
|
844848
844925
|
snippetsConfigWithSdkId: {},
|
|
844849
844926
|
snippetsBySdkId: {},
|
|
@@ -855201,7 +855278,7 @@ var LegacyDocsPublisher = class {
|
|
|
855201
855278
|
previewId,
|
|
855202
855279
|
disableTemplates: void 0,
|
|
855203
855280
|
skipUpload,
|
|
855204
|
-
cliVersion: "4.68.
|
|
855281
|
+
cliVersion: "4.68.2-2-g74b3abda377"
|
|
855205
855282
|
});
|
|
855206
855283
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
855207
855284
|
return { success: false };
|
|
@@ -870284,13 +870361,15 @@ var Class2 = class _Class extends DefinedType {
|
|
|
870284
870361
|
annotations = [];
|
|
870285
870362
|
primaryConstructor;
|
|
870286
870363
|
namespaceReferences = [];
|
|
870364
|
+
skipNamespaceDeclaration;
|
|
870287
870365
|
constructors = [];
|
|
870288
870366
|
operators = [];
|
|
870289
870367
|
nestedClasses = [];
|
|
870290
870368
|
nestedInterfaces = [];
|
|
870291
870369
|
rawBodyBlocks = [];
|
|
870292
|
-
constructor({ name: name2, namespace, access: access6, static_, abstract_, sealed, partial: partial2, readonly: readonly2, parentClassReference, interfaceReferences, enclosingType, type: type8, summary, doc, annotations, primaryConstructor, origin: origin2 }, generation) {
|
|
870370
|
+
constructor({ name: name2, namespace, access: access6, static_, abstract_, sealed, partial: partial2, readonly: readonly2, parentClassReference, interfaceReferences, enclosingType, type: type8, summary, doc, annotations, primaryConstructor, skipNamespaceDeclaration, origin: origin2 }, generation) {
|
|
870293
870371
|
super({ name: name2, namespace, access: access6, partial: partial2, interfaceReferences, enclosingType, origin: origin2 }, generation);
|
|
870372
|
+
this.skipNamespaceDeclaration = skipNamespaceDeclaration ?? false;
|
|
870294
870373
|
this.static_ = static_ ?? false;
|
|
870295
870374
|
this.abstract_ = abstract_ ?? false;
|
|
870296
870375
|
this.sealed = sealed ?? false;
|
|
@@ -870352,7 +870431,7 @@ var Class2 = class _Class extends DefinedType {
|
|
|
870352
870431
|
this.namespaceReferences.forEach((namespace) => {
|
|
870353
870432
|
writer2.addNamespace(namespace);
|
|
870354
870433
|
});
|
|
870355
|
-
if (!this.isNested) {
|
|
870434
|
+
if (!this.isNested && !this.skipNamespaceDeclaration) {
|
|
870356
870435
|
writer2.writeLine(`namespace ${this.namespace};`);
|
|
870357
870436
|
writer2.newLine();
|
|
870358
870437
|
}
|
|
@@ -870360,7 +870439,9 @@ var Class2 = class _Class extends DefinedType {
|
|
|
870360
870439
|
this.annotations.forEach((annotation) => {
|
|
870361
870440
|
annotation.write(writer2);
|
|
870362
870441
|
});
|
|
870363
|
-
|
|
870442
|
+
if (!this.skipNamespaceDeclaration) {
|
|
870443
|
+
writer2.writeNewLineIfLastLineNot();
|
|
870444
|
+
}
|
|
870364
870445
|
writer2.write(`${this.access}`);
|
|
870365
870446
|
if (this.static_) {
|
|
870366
870447
|
writer2.write(" static");
|
|
@@ -872383,7 +872464,7 @@ var CSharp = class {
|
|
|
872383
872464
|
args.name = this.model.getClassNameFor(args.origin);
|
|
872384
872465
|
}
|
|
872385
872466
|
if (args.enclosingType) {
|
|
872386
|
-
if (args.namespace) {
|
|
872467
|
+
if (args.namespace && args.namespace !== args.enclosingType.namespace) {
|
|
872387
872468
|
throw new Error(`ClassReference: Both enclosingType and namespace cannot be provided`);
|
|
872388
872469
|
}
|
|
872389
872470
|
args.namespace = args.enclosingType.namespace;
|
|
@@ -874329,6 +874410,8 @@ var Generation = class {
|
|
|
874329
874410
|
useDefaultRequestParameterValues: () => this.customConfig["use-default-request-parameter-values"] ?? false,
|
|
874330
874411
|
/** When true, redacts the response body in deserialization error exceptions and adds a custom ToString override to the base API exception. Default: false. */
|
|
874331
874412
|
redactResponseBodyOnError: () => this.customConfig["redact-response-body-on-error"] ?? false,
|
|
874413
|
+
/** When true, generates inline types as nested classes inside a static Types class on the parent type, instead of as separate top-level files. Default: false. */
|
|
874414
|
+
enableInlineTypes: () => this.customConfig["enable-inline-types"] ?? false,
|
|
874332
874415
|
/** Temporary mapping of websocket environment configurations. Default: {}. */
|
|
874333
874416
|
temporaryWebsocketEnvironments: () => this.customConfig["temporary-websocket-environments"] ?? {},
|
|
874334
874417
|
/** Custom name for the base API exception class. Default: "" (auto-generated). */
|
|
@@ -875984,7 +876067,7 @@ var DynamicTypeMapper = class extends WithGeneration {
|
|
|
875984
876067
|
if (named == null) {
|
|
875985
876068
|
return this.convertUnknown();
|
|
875986
876069
|
}
|
|
875987
|
-
return this.convertNamed({ named });
|
|
876070
|
+
return this.convertNamed({ named, typeId: args.typeReference.value });
|
|
875988
876071
|
}
|
|
875989
876072
|
case "optional":
|
|
875990
876073
|
case "nullable": {
|
|
@@ -876001,13 +876084,13 @@ var DynamicTypeMapper = class extends WithGeneration {
|
|
|
876001
876084
|
assertNever(args.typeReference);
|
|
876002
876085
|
}
|
|
876003
876086
|
}
|
|
876004
|
-
convertToClassReference(named) {
|
|
876087
|
+
convertToClassReference(named, typeId) {
|
|
876005
876088
|
return this.csharp.classReference({
|
|
876006
876089
|
origin: named.declaration,
|
|
876007
876090
|
namespace: this.context.getNamespace(named.declaration.fernFilepath)
|
|
876008
876091
|
});
|
|
876009
876092
|
}
|
|
876010
|
-
convertNamed({ named }) {
|
|
876093
|
+
convertNamed({ named, typeId }) {
|
|
876011
876094
|
switch (named.type) {
|
|
876012
876095
|
case "alias":
|
|
876013
876096
|
if (this.settings.generateLiterals && named.typeReference.type === "literal") {
|
|
@@ -876019,24 +876102,15 @@ var DynamicTypeMapper = class extends WithGeneration {
|
|
|
876019
876102
|
return this.convert({ typeReference: named.typeReference });
|
|
876020
876103
|
case "enum":
|
|
876021
876104
|
case "object":
|
|
876022
|
-
return this.
|
|
876023
|
-
origin: named.declaration,
|
|
876024
|
-
namespace: this.context.getNamespace(named.declaration.fernFilepath)
|
|
876025
|
-
});
|
|
876105
|
+
return this.convertToClassReference(named, typeId);
|
|
876026
876106
|
case "discriminatedUnion":
|
|
876027
876107
|
if (!this.settings.shouldGeneratedDiscriminatedUnions) {
|
|
876028
876108
|
return this.Primitive.object;
|
|
876029
876109
|
}
|
|
876030
|
-
return this.
|
|
876031
|
-
origin: named.declaration,
|
|
876032
|
-
namespace: this.context.getNamespace(named.declaration.fernFilepath)
|
|
876033
|
-
});
|
|
876110
|
+
return this.convertToClassReference(named, typeId);
|
|
876034
876111
|
case "undiscriminatedUnion":
|
|
876035
876112
|
if (this.settings.shouldGenerateUndiscriminatedUnions) {
|
|
876036
|
-
return this.
|
|
876037
|
-
origin: named.declaration,
|
|
876038
|
-
namespace: this.context.getNamespace(named.declaration.fernFilepath)
|
|
876039
|
-
});
|
|
876113
|
+
return this.convertToClassReference(named, typeId);
|
|
876040
876114
|
}
|
|
876041
876115
|
return this.OneOf.OneOf(named.types.map((typeReference2) => {
|
|
876042
876116
|
return this.convert({ typeReference: typeReference2 });
|
|
@@ -876377,7 +876451,7 @@ var DynamicSnippetsGeneratorContext = class _DynamicSnippetsGeneratorContext ext
|
|
|
876377
876451
|
Object.entries(this.ir.types).sort((a10, b19) => {
|
|
876378
876452
|
return a10[0].length - b19[0].length;
|
|
876379
876453
|
}).forEach(([typeId, type8]) => {
|
|
876380
|
-
this.dynamicTypeMapper.convertToClassReference(type8);
|
|
876454
|
+
this.dynamicTypeMapper.convertToClassReference(type8, typeId);
|
|
876381
876455
|
});
|
|
876382
876456
|
for (const [idx, request7] of requests3.entries()) {
|
|
876383
876457
|
this.csharp.classReference({
|
|
@@ -876418,7 +876492,7 @@ var EndpointSnippetGenerator2 = class extends WithGeneration {
|
|
|
876418
876492
|
async generateSnippet({ endpoint: endpoint3, request: request7, options: options2 }) {
|
|
876419
876493
|
const code5 = this.buildCodeBlock({ endpoint: endpoint3, snippet: request7, options: options2 });
|
|
876420
876494
|
return code5.toString({
|
|
876421
|
-
namespace: "
|
|
876495
|
+
namespace: "Examples",
|
|
876422
876496
|
generation: this.generation,
|
|
876423
876497
|
allNamespaceSegments: /* @__PURE__ */ new Set(),
|
|
876424
876498
|
allTypeClassReferences: /* @__PURE__ */ new Map(),
|
|
@@ -876432,7 +876506,7 @@ var EndpointSnippetGenerator2 = class extends WithGeneration {
|
|
|
876432
876506
|
generateSnippetSync({ endpoint: endpoint3, request: request7, options: options2 }) {
|
|
876433
876507
|
const code5 = this.buildCodeBlock({ endpoint: endpoint3, snippet: request7, options: options2 });
|
|
876434
876508
|
return code5.toString({
|
|
876435
|
-
namespace: "
|
|
876509
|
+
namespace: "Examples",
|
|
876436
876510
|
generation: this.generation,
|
|
876437
876511
|
allNamespaceSegments: /* @__PURE__ */ new Set(),
|
|
876438
876512
|
allTypeClassReferences: /* @__PURE__ */ new Map(),
|
|
@@ -876464,14 +876538,17 @@ var EndpointSnippetGenerator2 = class extends WithGeneration {
|
|
|
876464
876538
|
}
|
|
876465
876539
|
buildFullCodeBlock({ body, options: options2 }) {
|
|
876466
876540
|
const config5 = this.getConfig(options2);
|
|
876541
|
+
const methodName = config5.fullStyleMethodName ?? config5.fullStyleClassName ?? "Example";
|
|
876467
876542
|
const class_6 = this.csharp.class_({
|
|
876468
|
-
name:
|
|
876469
|
-
namespace: "
|
|
876543
|
+
name: "Examples",
|
|
876544
|
+
namespace: "Examples",
|
|
876545
|
+
partial: true,
|
|
876546
|
+
skipNamespaceDeclaration: true,
|
|
876470
876547
|
access: ast_exports.Access.Public
|
|
876471
876548
|
});
|
|
876472
876549
|
class_6.addNamespaceReference(this.Types.RootClientForSnippets.namespace);
|
|
876473
876550
|
class_6.addMethod({
|
|
876474
|
-
name:
|
|
876551
|
+
name: methodName,
|
|
876475
876552
|
access: ast_exports.Access.Public,
|
|
876476
876553
|
isAsync: true,
|
|
876477
876554
|
parameters: [],
|
|
@@ -877114,18 +877191,16 @@ function convertIr(ir15) {
|
|
|
877114
877191
|
}
|
|
877115
877192
|
|
|
877116
877193
|
// ../generation/local-generation/local-workspace-runner/lib/dynamic-snippets/csharp/DynamicSnippetsCsharpTestGenerator.js
|
|
877117
|
-
var PROJECT_FILE_CONTENT =
|
|
877118
|
-
<
|
|
877119
|
-
<
|
|
877120
|
-
|
|
877121
|
-
|
|
877122
|
-
|
|
877123
|
-
|
|
877124
|
-
|
|
877125
|
-
|
|
877126
|
-
|
|
877127
|
-
<ProjectReference Include="..\\..\\**\\*.csproj" Exclude="..\\..\\**\\*.DynamicSnippets.csproj;..\\..\\**\\*.Test.csproj" />
|
|
877128
|
-
</ItemGroup>
|
|
877194
|
+
var PROJECT_FILE_CONTENT = `<Project Sdk="Microsoft.NET.Sdk">
|
|
877195
|
+
<PropertyGroup>
|
|
877196
|
+
<TargetFramework>net10.0</TargetFramework>
|
|
877197
|
+
<RootNamespace>Snippets</RootNamespace>
|
|
877198
|
+
<ImplicitUsings>enable</ImplicitUsings>
|
|
877199
|
+
<Nullable>enable</Nullable>
|
|
877200
|
+
</PropertyGroup>
|
|
877201
|
+
<ItemGroup>
|
|
877202
|
+
<ProjectReference Include="..\\**\\*.csproj" Exclude="..\\**\\*.Test.csproj;..\\Snippets\\*.csproj" />
|
|
877203
|
+
</ItemGroup>
|
|
877129
877204
|
</Project>`;
|
|
877130
877205
|
var DynamicSnippetsCsharpTestGenerator = class {
|
|
877131
877206
|
context;
|
|
@@ -877154,7 +877229,7 @@ var DynamicSnippetsCsharpTestGenerator = class {
|
|
|
877154
877229
|
}
|
|
877155
877230
|
const response = await this.dynamicSnippetsGenerator.generate(convertedRequest, {
|
|
877156
877231
|
config: {
|
|
877157
|
-
|
|
877232
|
+
fullStyleMethodName: `Example${idx}`
|
|
877158
877233
|
},
|
|
877159
877234
|
style: Style2.Full,
|
|
877160
877235
|
endpointId
|
|
@@ -877169,9 +877244,9 @@ var DynamicSnippetsCsharpTestGenerator = class {
|
|
|
877169
877244
|
this.context.logger.debug("Done generating dynamic snippet tests");
|
|
877170
877245
|
}
|
|
877171
877246
|
async initializeProject(outputDir) {
|
|
877172
|
-
const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("
|
|
877247
|
+
const absolutePathToOutputDir = join8(outputDir, RelativeFilePath2.of("Snippets"));
|
|
877173
877248
|
await (0, import_promises93.mkdir)(absolutePathToOutputDir, { recursive: true });
|
|
877174
|
-
await (0, import_promises93.writeFile)(join8(absolutePathToOutputDir, RelativeFilePath2.of("
|
|
877249
|
+
await (0, import_promises93.writeFile)(join8(absolutePathToOutputDir, RelativeFilePath2.of("Snippets.csproj")), PROJECT_FILE_CONTENT);
|
|
877175
877250
|
return absolutePathToOutputDir;
|
|
877176
877251
|
}
|
|
877177
877252
|
getTestFilePath({ absolutePathToOutputDir, idx }) {
|
|
@@ -928943,7 +929018,7 @@ var CliContext = class _CliContext {
|
|
|
928943
929018
|
if (false) {
|
|
928944
929019
|
this.logger.error("CLI_VERSION is not defined");
|
|
928945
929020
|
}
|
|
928946
|
-
return "4.68.
|
|
929021
|
+
return "4.68.2-2-g74b3abda377";
|
|
928947
929022
|
}
|
|
928948
929023
|
getCliName() {
|
|
928949
929024
|
if (false) {
|
package/package.json
CHANGED