@fern-api/fern-api-dev 4.71.2 → 4.71.3-3-ge9a920d9274
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 +154 -31
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -521218,7 +521218,45 @@ function buildEnvironments(context3) {
|
|
|
521218
521218
|
}
|
|
521219
521219
|
}
|
|
521220
521220
|
}
|
|
521221
|
-
|
|
521221
|
+
const endpointServerNamesSet = new Set(apiToUrls.keys());
|
|
521222
|
+
const topLevelServerNamesSet = new Set(Object.keys(topLevelServersWithName));
|
|
521223
|
+
const endpointServersReferenceTopLevel = endpointServerNamesSet.size > 0 && [...endpointServerNamesSet].every((name2) => topLevelServerNamesSet.has(name2));
|
|
521224
|
+
if (apiToUrls.size > 0 && endpointServersReferenceTopLevel) {
|
|
521225
|
+
const entries23 = Object.entries(topLevelServersWithName);
|
|
521226
|
+
const firstEntry = entries23[0];
|
|
521227
|
+
if (firstEntry) {
|
|
521228
|
+
const [envName, firstSchema] = firstEntry;
|
|
521229
|
+
const baseUrl = typeof firstSchema === "string" ? firstSchema : isRawMultipleBaseUrlsEnvironment(firstSchema) ? Object.values(firstSchema.urls)[0] : firstSchema["default-url"] ?? firstSchema.url;
|
|
521230
|
+
const urls = {};
|
|
521231
|
+
if (baseUrl != null) {
|
|
521232
|
+
urls[DEFAULT_URL_NAME] = baseUrl;
|
|
521233
|
+
context3.setUrlId(baseUrl, DEFAULT_URL_NAME);
|
|
521234
|
+
}
|
|
521235
|
+
for (let i11 = 1; i11 < entries23.length; i11++) {
|
|
521236
|
+
const entry = entries23[i11];
|
|
521237
|
+
if (entry == null) {
|
|
521238
|
+
continue;
|
|
521239
|
+
}
|
|
521240
|
+
const [name2, schema2] = entry;
|
|
521241
|
+
const url3 = typeof schema2 === "string" ? schema2 : isRawMultipleBaseUrlsEnvironment(schema2) ? Object.values(schema2.urls)[0] : schema2["default-url"] ?? schema2.url;
|
|
521242
|
+
if (url3 != null) {
|
|
521243
|
+
urls[name2] = url3;
|
|
521244
|
+
context3.setUrlId(url3, name2);
|
|
521245
|
+
}
|
|
521246
|
+
}
|
|
521247
|
+
if (hasWebsocketServersWithName) {
|
|
521248
|
+
Object.assign(urls, extractUrlsFromEnvironmentSchema(websocketServersWithName));
|
|
521249
|
+
}
|
|
521250
|
+
context3.builder.addEnvironment({
|
|
521251
|
+
name: envName,
|
|
521252
|
+
schema: { urls }
|
|
521253
|
+
});
|
|
521254
|
+
if (context3.options.inferDefaultEnvironment !== false) {
|
|
521255
|
+
context3.builder.setDefaultEnvironment(envName);
|
|
521256
|
+
}
|
|
521257
|
+
context3.builder.setDefaultUrl(DEFAULT_URL_NAME);
|
|
521258
|
+
}
|
|
521259
|
+
} else if (apiToUrls.size > 0) {
|
|
521222
521260
|
let firstEnvironment = true;
|
|
521223
521261
|
for (const [envName, envSchema] of Object.entries(topLevelServersWithName)) {
|
|
521224
521262
|
const baseUrl = typeof envSchema === "string" ? envSchema : isRawMultipleBaseUrlsEnvironment(envSchema) ? Object.values(envSchema.urls)[0] : envSchema["default-url"] ?? envSchema.url;
|
|
@@ -563496,12 +563534,16 @@ function convertOAuthRefreshEndpoint({ endpointResolver, propertyResolver, file:
|
|
|
563496
563534
|
}
|
|
563497
563535
|
|
|
563498
563536
|
// ../generation/ir-generator/lib/converters/convertOAuthTokenEndpoint.js
|
|
563499
|
-
function convertOAuthTokenEndpoint({ endpointResolver, propertyResolver, file: file4, tokenEndpoint }) {
|
|
563537
|
+
function convertOAuthTokenEndpoint({ endpointResolver, propertyResolver, typeResolver, file: file4, tokenEndpoint }) {
|
|
563500
563538
|
const resolvedEndpoint = endpointResolver.resolveEndpointOrThrow({
|
|
563501
563539
|
endpoint: tokenEndpoint.endpoint,
|
|
563502
563540
|
file: file4
|
|
563503
563541
|
});
|
|
563504
|
-
const requestBodyProperties =
|
|
563542
|
+
const requestBodyProperties = getRequestBodyPropertyNames({
|
|
563543
|
+
endpoint: resolvedEndpoint.endpoint,
|
|
563544
|
+
file: resolvedEndpoint.file,
|
|
563545
|
+
typeResolver
|
|
563546
|
+
});
|
|
563505
563547
|
let expiresIn = void 0;
|
|
563506
563548
|
try {
|
|
563507
563549
|
expiresIn = tokenEndpoint.responseProperties.expires_in != null ? propertyResolver.resolveResponsePropertyOrThrow({
|
|
@@ -563530,7 +563572,7 @@ function convertOAuthTokenEndpoint({ endpointResolver, propertyResolver, file: f
|
|
|
563530
563572
|
propertyComponents: tokenEndpoint.requestProperties.scopes
|
|
563531
563573
|
}) : void 0,
|
|
563532
563574
|
customProperties: resolveCustomRequestProperties({
|
|
563533
|
-
requestBodyProperties,
|
|
563575
|
+
requestBodyPropertyNames: requestBodyProperties,
|
|
563534
563576
|
tokenEndpoint,
|
|
563535
563577
|
file: file4,
|
|
563536
563578
|
propertyResolver
|
|
@@ -563551,20 +563593,63 @@ function convertOAuthTokenEndpoint({ endpointResolver, propertyResolver, file: f
|
|
|
563551
563593
|
}
|
|
563552
563594
|
};
|
|
563553
563595
|
}
|
|
563554
|
-
var resolveCustomRequestProperties = ({
|
|
563555
|
-
const customPropertyNames =
|
|
563596
|
+
var resolveCustomRequestProperties = ({ requestBodyPropertyNames, tokenEndpoint, file: file4, propertyResolver }) => {
|
|
563597
|
+
const customPropertyNames = requestBodyPropertyNames.filter((propertyName) => !tokenEndpoint.requestProperties.client_id.includes(propertyName) && !tokenEndpoint.requestProperties.client_secret.includes(propertyName) && (tokenEndpoint.requestProperties.scopes == null || !tokenEndpoint.requestProperties.scopes.includes(propertyName)));
|
|
563556
563598
|
return customPropertyNames.length > 0 ? customPropertyNames.map((propertyName) => propertyResolver.resolveRequestPropertyOrThrow({
|
|
563557
563599
|
file: file4,
|
|
563558
563600
|
endpoint: tokenEndpoint.endpoint,
|
|
563559
563601
|
propertyComponents: [propertyName]
|
|
563560
563602
|
})) : void 0;
|
|
563561
563603
|
};
|
|
563604
|
+
function getRequestBodyPropertyNames({ endpoint: endpoint3, file: file4, typeResolver }) {
|
|
563605
|
+
const request7 = endpoint3.request;
|
|
563606
|
+
if (request7 == null) {
|
|
563607
|
+
return [];
|
|
563608
|
+
}
|
|
563609
|
+
if (typeof request7 === "string") {
|
|
563610
|
+
return getPropertyNamesFromType({ typeName: request7, file: file4, typeResolver });
|
|
563611
|
+
}
|
|
563612
|
+
const body = request7.body;
|
|
563613
|
+
if (body == null) {
|
|
563614
|
+
return [];
|
|
563615
|
+
}
|
|
563616
|
+
if (typeof body === "string") {
|
|
563617
|
+
return getPropertyNamesFromType({ typeName: body, file: file4, typeResolver });
|
|
563618
|
+
}
|
|
563619
|
+
if (isInlineRequestBody(body)) {
|
|
563620
|
+
const names2 = Object.keys(body.properties ?? {});
|
|
563621
|
+
if (body.extends != null) {
|
|
563622
|
+
const extendsList = typeof body.extends === "string" ? [body.extends] : body.extends;
|
|
563623
|
+
for (const extendedType of extendsList) {
|
|
563624
|
+
names2.push(...getPropertyNamesFromType({ typeName: extendedType, file: file4, typeResolver }));
|
|
563625
|
+
}
|
|
563626
|
+
}
|
|
563627
|
+
return names2;
|
|
563628
|
+
}
|
|
563629
|
+
return getPropertyNamesFromType({ typeName: body.type, file: file4, typeResolver });
|
|
563630
|
+
}
|
|
563631
|
+
function getPropertyNamesFromType({ typeName, file: file4, typeResolver }) {
|
|
563632
|
+
const resolved = typeResolver.resolveType({ type: typeName, file: file4 });
|
|
563633
|
+
if (resolved == null || resolved._type !== "named") {
|
|
563634
|
+
return [];
|
|
563635
|
+
}
|
|
563636
|
+
const declaration = resolved.declaration;
|
|
563637
|
+
const names2 = [];
|
|
563638
|
+
if ("properties" in declaration && declaration.properties != null) {
|
|
563639
|
+
names2.push(...Object.keys(declaration.properties));
|
|
563640
|
+
}
|
|
563641
|
+
if ("base-properties" in declaration && declaration["base-properties"] != null) {
|
|
563642
|
+
names2.push(...Object.keys(declaration["base-properties"]));
|
|
563643
|
+
}
|
|
563644
|
+
return names2;
|
|
563645
|
+
}
|
|
563562
563646
|
|
|
563563
563647
|
// ../generation/ir-generator/lib/converters/convertOAuthClientCredentials.js
|
|
563564
|
-
function convertOAuthClientCredentials({ propertyResolver, endpointResolver, file: file4, oauthScheme, tokenEndpoint, refreshTokenEndpoint }) {
|
|
563648
|
+
function convertOAuthClientCredentials({ propertyResolver, endpointResolver, typeResolver, file: file4, oauthScheme, tokenEndpoint, refreshTokenEndpoint }) {
|
|
563565
563649
|
const oauthTokenEndpoint = convertOAuthTokenEndpoint({
|
|
563566
563650
|
propertyResolver,
|
|
563567
563651
|
endpointResolver,
|
|
563652
|
+
typeResolver,
|
|
563568
563653
|
file: file4,
|
|
563569
563654
|
tokenEndpoint
|
|
563570
563655
|
});
|
|
@@ -563692,7 +563777,7 @@ function getTokenEndpointResponsePropertiesWithDefault({ responseProperties, def
|
|
|
563692
563777
|
}
|
|
563693
563778
|
|
|
563694
563779
|
// ../generation/ir-generator/lib/converters/convertApiAuth.js
|
|
563695
|
-
function convertApiAuth2({ rawApiFileSchema, file: file4, propertyResolver, endpointResolver }) {
|
|
563780
|
+
function convertApiAuth2({ rawApiFileSchema, file: file4, propertyResolver, endpointResolver, typeResolver }) {
|
|
563696
563781
|
if (rawApiFileSchema.auth == null) {
|
|
563697
563782
|
return {
|
|
563698
563783
|
docs: void 0,
|
|
@@ -563708,7 +563793,8 @@ function convertApiAuth2({ rawApiFileSchema, file: file4, propertyResolver, endp
|
|
|
563708
563793
|
authSchemeDeclarations: rawApiFileSchema["auth-schemes"],
|
|
563709
563794
|
file: file4,
|
|
563710
563795
|
propertyResolver,
|
|
563711
|
-
endpointResolver
|
|
563796
|
+
endpointResolver,
|
|
563797
|
+
typeResolver
|
|
563712
563798
|
});
|
|
563713
563799
|
return {
|
|
563714
563800
|
docs,
|
|
@@ -563724,7 +563810,8 @@ function convertApiAuth2({ rawApiFileSchema, file: file4, propertyResolver, endp
|
|
|
563724
563810
|
authSchemeDeclarations: rawApiFileSchema["auth-schemes"],
|
|
563725
563811
|
file: file4,
|
|
563726
563812
|
propertyResolver,
|
|
563727
|
-
endpointResolver
|
|
563813
|
+
endpointResolver,
|
|
563814
|
+
typeResolver
|
|
563728
563815
|
}))
|
|
563729
563816
|
}),
|
|
563730
563817
|
endpointSecurity: () => ({
|
|
@@ -563735,12 +563822,13 @@ function convertApiAuth2({ rawApiFileSchema, file: file4, propertyResolver, endp
|
|
|
563735
563822
|
authSchemeDeclarations: rawApiFileSchema["auth-schemes"],
|
|
563736
563823
|
file: file4,
|
|
563737
563824
|
propertyResolver,
|
|
563738
|
-
endpointResolver
|
|
563825
|
+
endpointResolver,
|
|
563826
|
+
typeResolver
|
|
563739
563827
|
}))
|
|
563740
563828
|
})
|
|
563741
563829
|
});
|
|
563742
563830
|
}
|
|
563743
|
-
function convertSchemeReference2({ reference: reference4, authSchemeDeclarations, file: file4, propertyResolver, endpointResolver }) {
|
|
563831
|
+
function convertSchemeReference2({ reference: reference4, authSchemeDeclarations, file: file4, propertyResolver, endpointResolver, typeResolver }) {
|
|
563744
563832
|
const convertNamedAuthSchemeReference = (reference5, docs) => {
|
|
563745
563833
|
const declaration = authSchemeDeclarations?.[reference5];
|
|
563746
563834
|
if (declaration == null) {
|
|
@@ -563784,7 +563872,8 @@ function convertSchemeReference2({ reference: reference4, authSchemeDeclarations
|
|
|
563784
563872
|
docs,
|
|
563785
563873
|
rawScheme,
|
|
563786
563874
|
propertyResolver,
|
|
563787
|
-
endpointResolver
|
|
563875
|
+
endpointResolver,
|
|
563876
|
+
typeResolver
|
|
563788
563877
|
})
|
|
563789
563878
|
});
|
|
563790
563879
|
};
|
|
@@ -563811,7 +563900,8 @@ function convertSchemeReference2({ reference: reference4, authSchemeDeclarations
|
|
|
563811
563900
|
docs: void 0,
|
|
563812
563901
|
rawScheme: void 0,
|
|
563813
563902
|
propertyResolver,
|
|
563814
|
-
endpointResolver
|
|
563903
|
+
endpointResolver,
|
|
563904
|
+
typeResolver
|
|
563815
563905
|
});
|
|
563816
563906
|
default:
|
|
563817
563907
|
return convertNamedAuthSchemeReference(scheme, typeof reference4 !== "string" ? reference4.docs : void 0);
|
|
@@ -563837,7 +563927,7 @@ function generateBasicAuth2({ key: key2, file: file4, docs, rawScheme }) {
|
|
|
563837
563927
|
passwordOmit: rawScheme?.password?.omit
|
|
563838
563928
|
});
|
|
563839
563929
|
}
|
|
563840
|
-
function generateOAuth({ key: key2, file: file4, docs, rawScheme, propertyResolver, endpointResolver }) {
|
|
563930
|
+
function generateOAuth({ key: key2, file: file4, docs, rawScheme, propertyResolver, endpointResolver, typeResolver }) {
|
|
563841
563931
|
switch (rawScheme?.type) {
|
|
563842
563932
|
case "client-credentials":
|
|
563843
563933
|
return AuthScheme.oauth({
|
|
@@ -563846,6 +563936,7 @@ function generateOAuth({ key: key2, file: file4, docs, rawScheme, propertyResolv
|
|
|
563846
563936
|
configuration: OAuthConfiguration.clientCredentials(convertOAuthClientCredentials({
|
|
563847
563937
|
propertyResolver,
|
|
563848
563938
|
endpointResolver,
|
|
563939
|
+
typeResolver,
|
|
563849
563940
|
file: file4,
|
|
563850
563941
|
oauthScheme: rawScheme,
|
|
563851
563942
|
tokenEndpoint: get0AuthTokenEndpoint(rawScheme),
|
|
@@ -566636,7 +566727,8 @@ function generateIntermediateRepresentation({ workspace, generationLanguage, key
|
|
|
566636
566727
|
rawApiFileSchema: workspace.definition.rootApiFile.contents,
|
|
566637
566728
|
file: rootApiFileContext,
|
|
566638
566729
|
propertyResolver,
|
|
566639
|
-
endpointResolver
|
|
566730
|
+
endpointResolver,
|
|
566731
|
+
typeResolver
|
|
566640
566732
|
}),
|
|
566641
566733
|
headers: workspace.definition.rootApiFile.contents.headers != null ? Object.entries(workspace.definition.rootApiFile.contents.headers).map(([headerKey, header]) => convertHttpHeader({ headerKey, header, file: rootApiFileContext })) : [],
|
|
566642
566734
|
idempotencyHeaders: workspace.definition.rootApiFile.contents["idempotency-headers"] != null ? Object.entries(workspace.definition.rootApiFile.contents["idempotency-headers"]).map(([headerKey, header]) => convertHttpHeader({ headerKey, header, file: rootApiFileContext })) : [],
|
|
@@ -610875,7 +610967,14 @@ function resolveOAuthScheme({ ir: ir15, key: key2, oauthScheme }) {
|
|
|
610875
610967
|
clientId: clientIdProp,
|
|
610876
610968
|
clientSecret: clientSecretProp,
|
|
610877
610969
|
scopes: void 0,
|
|
610878
|
-
customProperties:
|
|
610970
|
+
customProperties: findCustomRequestProperties({
|
|
610971
|
+
ir: ir15,
|
|
610972
|
+
endpoint: endpoint3,
|
|
610973
|
+
excludeWireValues: [
|
|
610974
|
+
extractWireName(reqProps?.["client-id"], "client_id"),
|
|
610975
|
+
extractWireName(reqProps?.["client-secret"], "client_secret")
|
|
610976
|
+
]
|
|
610977
|
+
})
|
|
610879
610978
|
},
|
|
610880
610979
|
responseProperties: {
|
|
610881
610980
|
accessToken: accessTokenProp,
|
|
@@ -611001,6 +611100,26 @@ function findRequestBodyProperty({ ir: ir15, endpoint: endpoint3, wireValue }) {
|
|
|
611001
611100
|
property: RequestPropertyValue.body({ ...prop })
|
|
611002
611101
|
};
|
|
611003
611102
|
}
|
|
611103
|
+
function findCustomRequestProperties({ ir: ir15, endpoint: endpoint3, excludeWireValues }) {
|
|
611104
|
+
if (endpoint3.requestBody == null) {
|
|
611105
|
+
return void 0;
|
|
611106
|
+
}
|
|
611107
|
+
let properties7;
|
|
611108
|
+
if (endpoint3.requestBody.type === "inlinedRequestBody") {
|
|
611109
|
+
properties7 = endpoint3.requestBody.properties;
|
|
611110
|
+
} else if (endpoint3.requestBody.type === "reference" && endpoint3.requestBody.requestBodyType.type === "named") {
|
|
611111
|
+
properties7 = getObjectPropertiesForNamedType(ir15, endpoint3.requestBody.requestBodyType.typeId);
|
|
611112
|
+
}
|
|
611113
|
+
if (properties7 == null) {
|
|
611114
|
+
return void 0;
|
|
611115
|
+
}
|
|
611116
|
+
const excludeSet = new Set(excludeWireValues);
|
|
611117
|
+
const customProps = properties7.filter((prop) => !excludeSet.has(getWireValue(prop.name))).map((prop) => ({
|
|
611118
|
+
propertyPath: void 0,
|
|
611119
|
+
property: RequestPropertyValue.body({ ...prop })
|
|
611120
|
+
}));
|
|
611121
|
+
return customProps.length > 0 ? customProps : void 0;
|
|
611122
|
+
}
|
|
611004
611123
|
function findResponseProperty({ ir: ir15, endpoint: endpoint3, wireValue }) {
|
|
611005
611124
|
if (endpoint3.response?.body?.type !== "json") {
|
|
611006
611125
|
return void 0;
|
|
@@ -621274,7 +621393,7 @@ var AccessTokenPosthogManager = class {
|
|
|
621274
621393
|
properties: {
|
|
621275
621394
|
...event,
|
|
621276
621395
|
...event.properties,
|
|
621277
|
-
version: "4.71.
|
|
621396
|
+
version: "4.71.3-3-ge9a920d9274",
|
|
621278
621397
|
usingAccessToken: true
|
|
621279
621398
|
}
|
|
621280
621399
|
});
|
|
@@ -621328,7 +621447,7 @@ var UserPosthogManager = class {
|
|
|
621328
621447
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
621329
621448
|
event: "CLI",
|
|
621330
621449
|
properties: {
|
|
621331
|
-
version: "4.71.
|
|
621450
|
+
version: "4.71.3-3-ge9a920d9274",
|
|
621332
621451
|
...event,
|
|
621333
621452
|
...event.properties,
|
|
621334
621453
|
usingAccessToken: false,
|
|
@@ -793368,7 +793487,7 @@ var ApiReferenceNodeConverter = class {
|
|
|
793368
793487
|
const pointsTo = navigation_exports2.V1.followRedirects(this.#children);
|
|
793369
793488
|
const changelogNodeConverter = new ChangelogNodeConverter(this.markdownFilesToFullSlugs, this.markdownFilesToNoIndex, this.markdownFilesToTags, this.workspace?.changelog?.files.map((file4) => file4.absoluteFilepath), this.docsWorkspace, this.#idgen).orUndefined();
|
|
793370
793489
|
let overviewPageId = this.#overviewPageId;
|
|
793371
|
-
if (overviewPageId == null) {
|
|
793490
|
+
if (overviewPageId == null && !this.apiSection.tagDescriptionPages) {
|
|
793372
793491
|
const apiPackageWithOverview = this.#children.find((child) => child.type === "apiPackage" && child.overviewPageId != null);
|
|
793373
793492
|
if (apiPackageWithOverview != null) {
|
|
793374
793493
|
overviewPageId = apiPackageWithOverview.overviewPageId;
|
|
@@ -838427,7 +838546,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
838427
838546
|
var LOGS_FOLDER_NAME = "logs";
|
|
838428
838547
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
838429
838548
|
function getCliSource() {
|
|
838430
|
-
const version7 = "4.71.
|
|
838549
|
+
const version7 = "4.71.3-3-ge9a920d9274";
|
|
838431
838550
|
return `cli@${version7}`;
|
|
838432
838551
|
}
|
|
838433
838552
|
var DebugLogger = class {
|
|
@@ -849674,7 +849793,7 @@ var LegacyDocsPublisher = class {
|
|
|
849674
849793
|
previewId,
|
|
849675
849794
|
disableTemplates: void 0,
|
|
849676
849795
|
skipUpload,
|
|
849677
|
-
cliVersion: "4.71.
|
|
849796
|
+
cliVersion: "4.71.3-3-ge9a920d9274"
|
|
849678
849797
|
});
|
|
849679
849798
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
849680
849799
|
return { success: false };
|
|
@@ -877189,19 +877308,20 @@ var DynamicTypeLiteralMapper = class {
|
|
|
877189
877308
|
case "discriminatedUnion":
|
|
877190
877309
|
return this.convertDiscriminatedUnion({
|
|
877191
877310
|
discriminatedUnion: named,
|
|
877192
|
-
value
|
|
877311
|
+
value,
|
|
877312
|
+
as: as8
|
|
877193
877313
|
});
|
|
877194
877314
|
case "enum":
|
|
877195
877315
|
return this.convertEnum({ enum_: named, value });
|
|
877196
877316
|
case "object":
|
|
877197
877317
|
return this.convertObject({ object_: named, value, as: as8, inUndiscriminatedUnion });
|
|
877198
877318
|
case "undiscriminatedUnion":
|
|
877199
|
-
return this.convertUndiscriminatedUnion({ undiscriminatedUnion: named, value });
|
|
877319
|
+
return this.convertUndiscriminatedUnion({ undiscriminatedUnion: named, value, as: as8 });
|
|
877200
877320
|
default:
|
|
877201
877321
|
assertNever(named);
|
|
877202
877322
|
}
|
|
877203
877323
|
}
|
|
877204
|
-
convertDiscriminatedUnion({ discriminatedUnion: discriminatedUnion2, value }) {
|
|
877324
|
+
convertDiscriminatedUnion({ discriminatedUnion: discriminatedUnion2, value, as: as8 }) {
|
|
877205
877325
|
const classReference4 = this.context.getJavaClassReferenceFromDeclaration({
|
|
877206
877326
|
declaration: discriminatedUnion2.declaration
|
|
877207
877327
|
});
|
|
@@ -877224,7 +877344,7 @@ var DynamicTypeLiteralMapper = class {
|
|
|
877224
877344
|
return java_exports.TypeLiteral.reference(java_exports.invokeMethod({
|
|
877225
877345
|
on: classReference4,
|
|
877226
877346
|
method: this.context.getPropertyName(unionVariant.discriminantValue.name),
|
|
877227
|
-
arguments_: [this.convertNamed({ named, value: discriminatedUnionTypeInstance.value })]
|
|
877347
|
+
arguments_: [this.convertNamed({ named, value: discriminatedUnionTypeInstance.value, as: as8 })]
|
|
877228
877348
|
}));
|
|
877229
877349
|
}
|
|
877230
877350
|
case "singleProperty": {
|
|
@@ -877241,7 +877361,8 @@ var DynamicTypeLiteralMapper = class {
|
|
|
877241
877361
|
arguments_: [
|
|
877242
877362
|
this.convert({
|
|
877243
877363
|
typeReference: unionVariant.typeReference,
|
|
877244
|
-
value: record22[propertyKey]
|
|
877364
|
+
value: record22[propertyKey],
|
|
877365
|
+
as: as8
|
|
877245
877366
|
})
|
|
877246
877367
|
]
|
|
877247
877368
|
}));
|
|
@@ -877453,10 +877574,11 @@ var DynamicTypeLiteralMapper = class {
|
|
|
877453
877574
|
}
|
|
877454
877575
|
return this.context.getEnumName(enumValue.name);
|
|
877455
877576
|
}
|
|
877456
|
-
convertUndiscriminatedUnion({ undiscriminatedUnion: undiscriminatedUnion21, value }) {
|
|
877577
|
+
convertUndiscriminatedUnion({ undiscriminatedUnion: undiscriminatedUnion21, value, as: as8 }) {
|
|
877457
877578
|
const result = this.findMatchingUndiscriminatedUnionType({
|
|
877458
877579
|
undiscriminatedUnion: undiscriminatedUnion21,
|
|
877459
|
-
value
|
|
877580
|
+
value,
|
|
877581
|
+
as: as8
|
|
877460
877582
|
});
|
|
877461
877583
|
if (result == null) {
|
|
877462
877584
|
return java_exports.TypeLiteral.nop();
|
|
@@ -877478,13 +877600,14 @@ var DynamicTypeLiteralMapper = class {
|
|
|
877478
877600
|
arguments_: [result.typeInstantiation]
|
|
877479
877601
|
}));
|
|
877480
877602
|
}
|
|
877481
|
-
findMatchingUndiscriminatedUnionType({ undiscriminatedUnion: undiscriminatedUnion21, value }) {
|
|
877603
|
+
findMatchingUndiscriminatedUnionType({ undiscriminatedUnion: undiscriminatedUnion21, value, as: as8 }) {
|
|
877482
877604
|
for (const typeReference2 of undiscriminatedUnion21.types) {
|
|
877483
877605
|
const errorsBefore = this.context.errors.size();
|
|
877484
877606
|
try {
|
|
877485
877607
|
const typeInstantiation = this.convert({
|
|
877486
877608
|
typeReference: typeReference2,
|
|
877487
877609
|
value,
|
|
877610
|
+
as: as8,
|
|
877488
877611
|
inUndiscriminatedUnion: true
|
|
877489
877612
|
});
|
|
877490
877613
|
if (java_exports.TypeLiteral.isNop(typeInstantiation) || this.context.errors.size() > errorsBefore) {
|
|
@@ -924023,7 +924146,7 @@ var CliContext = class _CliContext {
|
|
|
924023
924146
|
if (false) {
|
|
924024
924147
|
this.logger.error("CLI_VERSION is not defined");
|
|
924025
924148
|
}
|
|
924026
|
-
return "4.71.
|
|
924149
|
+
return "4.71.3-3-ge9a920d9274";
|
|
924027
924150
|
}
|
|
924028
924151
|
getCliName() {
|
|
924029
924152
|
if (false) {
|
package/package.json
CHANGED