@fern-api/fern-api-dev 5.19.0 → 5.19.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/cli.cjs +180 -128
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -594335,6 +594335,18 @@ init_lodash();
|
|
|
594335
594335
|
|
|
594336
594336
|
// ../../commons/ir-utils/lib/filtered-ir/filterExamples.js
|
|
594337
594337
|
init_lib4();
|
|
594338
|
+
function filterJsonExampleObjectKeys(jsonExample, allowedKeys) {
|
|
594339
|
+
if (jsonExample == null || typeof jsonExample !== "object" || Array.isArray(jsonExample)) {
|
|
594340
|
+
return jsonExample;
|
|
594341
|
+
}
|
|
594342
|
+
const filtered = {};
|
|
594343
|
+
for (const [key2, value2] of Object.entries(jsonExample)) {
|
|
594344
|
+
if (allowedKeys.has(key2)) {
|
|
594345
|
+
filtered[key2] = value2;
|
|
594346
|
+
}
|
|
594347
|
+
}
|
|
594348
|
+
return filtered;
|
|
594349
|
+
}
|
|
594338
594350
|
function filterExampleSingleUnionTypeProperties({ filteredIr, singleUnionTypeProperties }) {
|
|
594339
594351
|
return singleUnionTypeProperties._visit({
|
|
594340
594352
|
samePropertiesAsObject: (s9) => {
|
|
@@ -594441,22 +594453,27 @@ function filterExampleTypeReference({ filteredIr, exampleTypeReference }) {
|
|
|
594441
594453
|
...exampleTypeReference,
|
|
594442
594454
|
shape: ExampleTypeReferenceShape.named({ ...n19, shape: ExampleTypeShape.enum(e8) })
|
|
594443
594455
|
}),
|
|
594444
|
-
object: (o3) =>
|
|
594445
|
-
|
|
594446
|
-
|
|
594447
|
-
|
|
594448
|
-
|
|
594449
|
-
|
|
594450
|
-
properties: o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594451
|
-
...p14,
|
|
594452
|
-
value: filterExampleTypeReference({
|
|
594453
|
-
filteredIr,
|
|
594454
|
-
exampleTypeReference: p14.value
|
|
594455
|
-
})
|
|
594456
|
-
})).filter((p14) => p14.value !== void 0)
|
|
594456
|
+
object: (o3) => {
|
|
594457
|
+
const filteredProperties = o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594458
|
+
...p14,
|
|
594459
|
+
value: filterExampleTypeReference({
|
|
594460
|
+
filteredIr,
|
|
594461
|
+
exampleTypeReference: p14.value
|
|
594457
594462
|
})
|
|
594458
|
-
})
|
|
594459
|
-
|
|
594463
|
+
})).filter((p14) => p14.value !== void 0);
|
|
594464
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594465
|
+
return {
|
|
594466
|
+
...exampleTypeReference,
|
|
594467
|
+
jsonExample: filterJsonExampleObjectKeys(exampleTypeReference.jsonExample, allowedKeys),
|
|
594468
|
+
shape: ExampleTypeReferenceShape.named({
|
|
594469
|
+
...n19,
|
|
594470
|
+
shape: ExampleTypeShape.object({
|
|
594471
|
+
...o3,
|
|
594472
|
+
properties: filteredProperties
|
|
594473
|
+
})
|
|
594474
|
+
})
|
|
594475
|
+
};
|
|
594476
|
+
},
|
|
594460
594477
|
union: (u6) => {
|
|
594461
594478
|
const filteredUnion = filterExampleSingleUnionTypeProperties({
|
|
594462
594479
|
filteredIr,
|
|
@@ -594506,8 +594523,8 @@ function filterExamplePathParameters({ filteredIr, pathParameters }) {
|
|
|
594506
594523
|
} : void 0;
|
|
594507
594524
|
}).filter((param) => param !== void 0);
|
|
594508
594525
|
}
|
|
594509
|
-
function filterExampleQueryParameters({ filteredIr, queryParameters }) {
|
|
594510
|
-
return queryParameters.map((queryParameter) => {
|
|
594526
|
+
function filterExampleQueryParameters({ filteredIr, queryParameters, endpointId }) {
|
|
594527
|
+
return queryParameters.filter((queryParameter) => endpointId == null || filteredIr.hasQueryParameter(endpointId, getWireValue(queryParameter.name))).map((queryParameter) => {
|
|
594511
594528
|
const filteredQueryParameter = filterExampleTypeReference({
|
|
594512
594529
|
filteredIr,
|
|
594513
594530
|
exampleTypeReference: queryParameter.value
|
|
@@ -594527,21 +594544,27 @@ function filterExampleHeader({ filteredIr, headers: headers2 }) {
|
|
|
594527
594544
|
} : void 0;
|
|
594528
594545
|
}).filter((header) => header !== void 0);
|
|
594529
594546
|
}
|
|
594530
|
-
function filterExampleRequestBody({ filteredIr, requestBody }) {
|
|
594547
|
+
function filterExampleRequestBody({ filteredIr, requestBody, endpointId }) {
|
|
594531
594548
|
return requestBody._visit({
|
|
594532
594549
|
inlinedRequestBody: (inlined) => {
|
|
594550
|
+
const filteredProperties = inlined.properties.filter((p14) => {
|
|
594551
|
+
const wireName = getWireValue(p14.name);
|
|
594552
|
+
if (p14.originalTypeDeclaration == null) {
|
|
594553
|
+
return endpointId != null ? filteredIr.hasRequestProperty(endpointId, wireName) : true;
|
|
594554
|
+
}
|
|
594555
|
+
return filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, wireName);
|
|
594556
|
+
}).map((property24) => {
|
|
594557
|
+
const filteredValue = filterExampleTypeReference({
|
|
594558
|
+
filteredIr,
|
|
594559
|
+
exampleTypeReference: property24.value
|
|
594560
|
+
});
|
|
594561
|
+
return filteredValue !== void 0 ? { ...property24, value: filteredValue } : void 0;
|
|
594562
|
+
}).filter((property24) => property24 !== void 0);
|
|
594563
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594533
594564
|
return {
|
|
594534
594565
|
...requestBody,
|
|
594535
|
-
|
|
594536
|
-
|
|
594537
|
-
filteredIr,
|
|
594538
|
-
exampleTypeReference: property24.value
|
|
594539
|
-
});
|
|
594540
|
-
return filteredProperty !== void 0 ? {
|
|
594541
|
-
...property24,
|
|
594542
|
-
value: filteredProperty
|
|
594543
|
-
} : void 0;
|
|
594544
|
-
}).filter((property24) => property24 !== void 0)
|
|
594566
|
+
jsonExample: filterJsonExampleObjectKeys(inlined.jsonExample, allowedKeys),
|
|
594567
|
+
properties: filteredProperties
|
|
594545
594568
|
};
|
|
594546
594569
|
},
|
|
594547
594570
|
reference: (reference4) => {
|
|
@@ -594578,7 +594601,7 @@ function filterExampleResponse({ filteredIr, response }) {
|
|
|
594578
594601
|
}
|
|
594579
594602
|
});
|
|
594580
594603
|
}
|
|
594581
|
-
function filterEndpointExample({ filteredIr, example }) {
|
|
594604
|
+
function filterEndpointExample({ filteredIr, example, endpointId }) {
|
|
594582
594605
|
return {
|
|
594583
594606
|
...example,
|
|
594584
594607
|
rootPathParameters: filterExamplePathParameters({ filteredIr, pathParameters: example.rootPathParameters }),
|
|
@@ -594592,11 +594615,52 @@ function filterEndpointExample({ filteredIr, example }) {
|
|
|
594592
594615
|
}),
|
|
594593
594616
|
serviceHeaders: filterExampleHeader({ filteredIr, headers: example.serviceHeaders }),
|
|
594594
594617
|
endpointHeaders: filterExampleHeader({ filteredIr, headers: example.endpointHeaders }),
|
|
594595
|
-
queryParameters: filterExampleQueryParameters({
|
|
594596
|
-
|
|
594618
|
+
queryParameters: filterExampleQueryParameters({
|
|
594619
|
+
filteredIr,
|
|
594620
|
+
queryParameters: example.queryParameters,
|
|
594621
|
+
endpointId
|
|
594622
|
+
}),
|
|
594623
|
+
request: example.request !== void 0 ? filterExampleRequestBody({ filteredIr, requestBody: example.request, endpointId }) : void 0,
|
|
594597
594624
|
response: filterExampleResponse({ filteredIr, response: example.response })
|
|
594598
594625
|
};
|
|
594599
594626
|
}
|
|
594627
|
+
function filterWebhookExamplePayload({ filteredIr, payload, webhookId }) {
|
|
594628
|
+
if (webhookId == null) {
|
|
594629
|
+
return payload;
|
|
594630
|
+
}
|
|
594631
|
+
const isAllowed = (wireName) => filteredIr.hasWebhookPayloadProperty(webhookId, wireName);
|
|
594632
|
+
if (payload.shape.type === "named" && payload.shape.shape.type === "object") {
|
|
594633
|
+
const named = payload.shape;
|
|
594634
|
+
const objectShape = named.shape;
|
|
594635
|
+
if (objectShape.type !== "object") {
|
|
594636
|
+
return payload;
|
|
594637
|
+
}
|
|
594638
|
+
const filteredProperties = objectShape.properties.filter((p14) => isAllowed(getWireValue(p14.name)));
|
|
594639
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594640
|
+
return {
|
|
594641
|
+
...payload,
|
|
594642
|
+
jsonExample: filterJsonExampleObjectKeys(payload.jsonExample, allowedKeys),
|
|
594643
|
+
shape: ExampleTypeReferenceShape.named({
|
|
594644
|
+
...named,
|
|
594645
|
+
shape: ExampleTypeShape.object({ ...objectShape, properties: filteredProperties })
|
|
594646
|
+
})
|
|
594647
|
+
};
|
|
594648
|
+
}
|
|
594649
|
+
if (payload.shape.type === "container" && payload.shape.container.type === "map") {
|
|
594650
|
+
const mapContainer = payload.shape.container;
|
|
594651
|
+
const filteredEntries = mapContainer.map.filter((entry) => {
|
|
594652
|
+
const keyJson = entry.key.jsonExample;
|
|
594653
|
+
return typeof keyJson === "string" && isAllowed(keyJson);
|
|
594654
|
+
});
|
|
594655
|
+
const allowedKeys = new Set(filteredEntries.map((entry) => entry.key.jsonExample).filter((key2) => typeof key2 === "string"));
|
|
594656
|
+
return {
|
|
594657
|
+
...payload,
|
|
594658
|
+
jsonExample: filterJsonExampleObjectKeys(payload.jsonExample, allowedKeys),
|
|
594659
|
+
shape: ExampleTypeReferenceShape.container(ExampleContainer.map({ ...mapContainer, map: filteredEntries }))
|
|
594660
|
+
};
|
|
594661
|
+
}
|
|
594662
|
+
return payload;
|
|
594663
|
+
}
|
|
594600
594664
|
function filterExampleType({ filteredIr, exampleType }) {
|
|
594601
594665
|
return exampleType.shape._visit({
|
|
594602
594666
|
alias: (a3) => {
|
|
@@ -594604,16 +594668,18 @@ function filterExampleType({ filteredIr, exampleType }) {
|
|
|
594604
594668
|
return filteredAlias !== void 0 ? { ...exampleType, shape: ExampleTypeShape.alias({ ...a3, value: filteredAlias }) } : void 0;
|
|
594605
594669
|
},
|
|
594606
594670
|
enum: () => exampleType,
|
|
594607
|
-
object: (o3) =>
|
|
594608
|
-
|
|
594609
|
-
|
|
594610
|
-
|
|
594611
|
-
|
|
594612
|
-
|
|
594613
|
-
|
|
594614
|
-
|
|
594615
|
-
|
|
594616
|
-
|
|
594671
|
+
object: (o3) => {
|
|
594672
|
+
const filteredProperties = o3.properties.filter((p14) => filteredIr.hasProperty(p14.originalTypeDeclaration.typeId, getWireValue(p14.name))).map((p14) => ({
|
|
594673
|
+
...p14,
|
|
594674
|
+
value: filterExampleTypeReference({ filteredIr, exampleTypeReference: p14.value })
|
|
594675
|
+
})).filter((p14) => p14.value !== void 0);
|
|
594676
|
+
const allowedKeys = new Set(filteredProperties.map((p14) => getWireValue(p14.name)));
|
|
594677
|
+
return {
|
|
594678
|
+
...exampleType,
|
|
594679
|
+
jsonExample: filterJsonExampleObjectKeys(exampleType.jsonExample, allowedKeys),
|
|
594680
|
+
shape: ExampleTypeShape.object({ ...o3, properties: filteredProperties })
|
|
594681
|
+
};
|
|
594682
|
+
},
|
|
594617
594683
|
union: (u6) => {
|
|
594618
594684
|
const filteredUnion = filterExampleSingleUnionTypeProperties({
|
|
594619
594685
|
filteredIr,
|
|
@@ -594683,6 +594749,16 @@ function filterIntermediateRepresentationForAudiences(intermediateRepresentation
|
|
|
594683
594749
|
})
|
|
594684
594750
|
};
|
|
594685
594751
|
}
|
|
594752
|
+
if (webhook.examples != null && webhookId != null) {
|
|
594753
|
+
webhook.examples = webhook.examples.map((example) => ({
|
|
594754
|
+
...example,
|
|
594755
|
+
payload: filterWebhookExamplePayload({
|
|
594756
|
+
filteredIr,
|
|
594757
|
+
payload: example.payload,
|
|
594758
|
+
webhookId
|
|
594759
|
+
})
|
|
594760
|
+
}));
|
|
594761
|
+
}
|
|
594686
594762
|
return webhook;
|
|
594687
594763
|
});
|
|
594688
594764
|
return [webhookGroupId, filteredWebhooks];
|
|
@@ -594723,16 +594799,25 @@ function filterIntermediateRepresentationForAudiences(intermediateRepresentation
|
|
|
594723
594799
|
services: mapValues_default(pickBy_default(intermediateRepresentation.services, (httpService) => filteredIr.hasService(httpService)), (httpService) => ({
|
|
594724
594800
|
...httpService,
|
|
594725
594801
|
endpoints: httpService.endpoints.filter((httpEndpoint) => filteredIr.hasEndpoint(httpEndpoint)).map((httpEndpoint) => {
|
|
594802
|
+
const endpointId = httpEndpoint.id;
|
|
594726
594803
|
httpEndpoint.autogeneratedExamples = httpEndpoint.autogeneratedExamples.map((autogenerated) => {
|
|
594727
594804
|
return {
|
|
594728
594805
|
...autogenerated,
|
|
594729
|
-
example: filterEndpointExample({
|
|
594806
|
+
example: filterEndpointExample({
|
|
594807
|
+
filteredIr,
|
|
594808
|
+
example: autogenerated.example,
|
|
594809
|
+
endpointId
|
|
594810
|
+
})
|
|
594730
594811
|
};
|
|
594731
594812
|
});
|
|
594732
594813
|
httpEndpoint.userSpecifiedExamples = httpEndpoint.userSpecifiedExamples.map((userSpecified) => {
|
|
594733
594814
|
return {
|
|
594734
594815
|
...userSpecified,
|
|
594735
|
-
example: userSpecified.example != null ? filterEndpointExample({
|
|
594816
|
+
example: userSpecified.example != null ? filterEndpointExample({
|
|
594817
|
+
filteredIr,
|
|
594818
|
+
example: userSpecified.example,
|
|
594819
|
+
endpointId
|
|
594820
|
+
}) : void 0
|
|
594736
594821
|
};
|
|
594737
594822
|
});
|
|
594738
594823
|
if (httpEndpoint.queryParameters.length > 0) {
|
|
@@ -594850,28 +594935,30 @@ function isReferencedWebhookPayloadSchema(payload) {
|
|
|
594850
594935
|
var FilteredIrImpl = class {
|
|
594851
594936
|
environments = /* @__PURE__ */ new Set();
|
|
594852
594937
|
types = /* @__PURE__ */ new Set();
|
|
594853
|
-
|
|
594938
|
+
// Property wire-names to exclude per type/endpoint/webhook. `undefined` means no
|
|
594939
|
+
// filtering applies and every property is kept.
|
|
594940
|
+
excludedProperties;
|
|
594854
594941
|
errors = /* @__PURE__ */ new Set();
|
|
594855
594942
|
services = /* @__PURE__ */ new Set();
|
|
594856
594943
|
endpoints = /* @__PURE__ */ new Set();
|
|
594857
|
-
|
|
594858
|
-
|
|
594944
|
+
excludedRequestProperties;
|
|
594945
|
+
excludedQueryParameters;
|
|
594859
594946
|
webhooks = /* @__PURE__ */ new Set();
|
|
594860
|
-
|
|
594947
|
+
excludedWebhookPayloadProperties;
|
|
594861
594948
|
channels = /* @__PURE__ */ new Set();
|
|
594862
594949
|
subpackages = /* @__PURE__ */ new Set();
|
|
594863
|
-
constructor({ types: types4,
|
|
594950
|
+
constructor({ types: types4, excludedProperties, errors: errors4, environments: environments2, services, endpoints, webhooks: webhooks2, subpackages, excludedQueryParameters, excludedRequestProperties, excludedWebhookPayloadProperties, channels }) {
|
|
594864
594951
|
this.environments = environments2;
|
|
594865
594952
|
this.types = types4;
|
|
594866
|
-
this.
|
|
594953
|
+
this.excludedProperties = excludedProperties;
|
|
594867
594954
|
this.errors = errors4;
|
|
594868
594955
|
this.services = services;
|
|
594869
594956
|
this.endpoints = endpoints;
|
|
594870
594957
|
this.webhooks = webhooks2;
|
|
594871
|
-
this.
|
|
594958
|
+
this.excludedWebhookPayloadProperties = excludedWebhookPayloadProperties;
|
|
594872
594959
|
this.subpackages = subpackages;
|
|
594873
|
-
this.
|
|
594874
|
-
this.
|
|
594960
|
+
this.excludedRequestProperties = excludedRequestProperties;
|
|
594961
|
+
this.excludedQueryParameters = excludedQueryParameters;
|
|
594875
594962
|
this.channels = channels;
|
|
594876
594963
|
}
|
|
594877
594964
|
hasTypeId(typeId) {
|
|
@@ -594891,11 +594978,8 @@ var FilteredIrImpl = class {
|
|
|
594891
594978
|
return this.types.has(typeId);
|
|
594892
594979
|
}
|
|
594893
594980
|
hasProperty(typeId, property24) {
|
|
594894
|
-
const
|
|
594895
|
-
|
|
594896
|
-
return true;
|
|
594897
|
-
}
|
|
594898
|
-
return properties7.has(property24);
|
|
594981
|
+
const excluded = this.excludedProperties[typeId];
|
|
594982
|
+
return excluded == null || !excluded.has(property24);
|
|
594899
594983
|
}
|
|
594900
594984
|
hasError(error50) {
|
|
594901
594985
|
const errorId = IdGenerator.generateErrorId(error50.name);
|
|
@@ -594912,18 +594996,12 @@ var FilteredIrImpl = class {
|
|
|
594912
594996
|
return this.endpoints.has(endpoint3.id);
|
|
594913
594997
|
}
|
|
594914
594998
|
hasRequestProperty(endpoint3, property24) {
|
|
594915
|
-
const
|
|
594916
|
-
|
|
594917
|
-
return true;
|
|
594918
|
-
}
|
|
594919
|
-
return properties7.has(property24);
|
|
594999
|
+
const excluded = this.excludedRequestProperties[endpoint3];
|
|
595000
|
+
return excluded == null || !excluded.has(property24);
|
|
594920
595001
|
}
|
|
594921
595002
|
hasQueryParameter(endpoint3, parameter6) {
|
|
594922
|
-
const
|
|
594923
|
-
|
|
594924
|
-
return true;
|
|
594925
|
-
}
|
|
594926
|
-
return parameters2.has(parameter6);
|
|
595003
|
+
const excluded = this.excludedQueryParameters[endpoint3];
|
|
595004
|
+
return excluded == null || !excluded.has(parameter6);
|
|
594927
595005
|
}
|
|
594928
595006
|
hasSubpackage(subpackageId) {
|
|
594929
595007
|
return this.subpackages.has(subpackageId);
|
|
@@ -594941,11 +595019,8 @@ var FilteredIrImpl = class {
|
|
|
594941
595019
|
return true;
|
|
594942
595020
|
}
|
|
594943
595021
|
hasWebhookPayloadProperty(webhookId, property24) {
|
|
594944
|
-
const
|
|
594945
|
-
|
|
594946
|
-
return true;
|
|
594947
|
-
}
|
|
594948
|
-
return properties7.has(property24);
|
|
595022
|
+
const excluded = this.excludedWebhookPayloadProperties[webhookId];
|
|
595023
|
+
return excluded == null || !excluded.has(property24);
|
|
594949
595024
|
}
|
|
594950
595025
|
};
|
|
594951
595026
|
|
|
@@ -595283,86 +595358,48 @@ var IrGraph = class {
|
|
|
595283
595358
|
const channelNode = this.getChannelNode(channelId);
|
|
595284
595359
|
this.addReferencedTypes(typeIds, channelNode.referencedTypes);
|
|
595285
595360
|
}
|
|
595286
|
-
const
|
|
595287
|
-
const
|
|
595288
|
-
const
|
|
595289
|
-
const
|
|
595361
|
+
const excludedProperties = {};
|
|
595362
|
+
const excludedRequestProperties = {};
|
|
595363
|
+
const excludedQueryParameters = {};
|
|
595364
|
+
const excludedWebhookPayloadProperties = {};
|
|
595290
595365
|
if (this.audiences.type === "filtered") {
|
|
595366
|
+
const activeAudiences = this.audiences.audiences;
|
|
595291
595367
|
for (const [typeId, typePropertiesNode] of Object.entries(this.properties)) {
|
|
595292
595368
|
if (!typeIds.has(typeId)) {
|
|
595293
595369
|
continue;
|
|
595294
595370
|
}
|
|
595295
|
-
|
|
595296
|
-
for (const audience of this.audiences.audiences) {
|
|
595297
|
-
const propertiesForAudience = typePropertiesNode.propertiesByAudience[audience];
|
|
595298
|
-
if (propertiesForAudience != null) {
|
|
595299
|
-
propertiesForAudience.forEach((property24) => {
|
|
595300
|
-
propertiesForTypeId.add(property24);
|
|
595301
|
-
});
|
|
595302
|
-
}
|
|
595303
|
-
}
|
|
595304
|
-
if (propertiesForTypeId.size > 0) {
|
|
595305
|
-
properties7[typeId] = propertiesForTypeId;
|
|
595306
|
-
}
|
|
595307
|
-
properties7[typeId] = propertiesForTypeId.size > 0 ? propertiesForTypeId : void 0;
|
|
595371
|
+
excludedProperties[typeId] = computeExcludedKeys(typePropertiesNode.propertiesByAudience, activeAudiences);
|
|
595308
595372
|
}
|
|
595309
595373
|
for (const [endpointId, requestPropertiesNode] of Object.entries(this.requestProperties)) {
|
|
595310
595374
|
if (!this.endpointsNeededForAudience.has(endpointId)) {
|
|
595311
595375
|
continue;
|
|
595312
595376
|
}
|
|
595313
|
-
|
|
595314
|
-
for (const audience of this.audiences.audiences) {
|
|
595315
|
-
const propertiesForAudience = requestPropertiesNode.propertiesByAudience[audience];
|
|
595316
|
-
if (propertiesForAudience != null) {
|
|
595317
|
-
propertiesForAudience.forEach((property24) => {
|
|
595318
|
-
propertiesForEndpoint.add(property24);
|
|
595319
|
-
});
|
|
595320
|
-
}
|
|
595321
|
-
}
|
|
595322
|
-
requestProperties[endpointId] = propertiesForEndpoint.size > 0 ? propertiesForEndpoint : void 0;
|
|
595377
|
+
excludedRequestProperties[endpointId] = computeExcludedKeys(requestPropertiesNode.propertiesByAudience, activeAudiences);
|
|
595323
595378
|
}
|
|
595324
595379
|
for (const [endpointId, queryParametersNode] of Object.entries(this.queryParameters)) {
|
|
595325
595380
|
if (!this.endpointsNeededForAudience.has(endpointId)) {
|
|
595326
595381
|
continue;
|
|
595327
595382
|
}
|
|
595328
|
-
|
|
595329
|
-
for (const audience of this.audiences.audiences) {
|
|
595330
|
-
const parametersByAudience = queryParametersNode.parametersByAudience[audience];
|
|
595331
|
-
if (parametersByAudience != null) {
|
|
595332
|
-
parametersByAudience.forEach((parameter6) => {
|
|
595333
|
-
parametersForEndpoint.add(parameter6);
|
|
595334
|
-
});
|
|
595335
|
-
}
|
|
595336
|
-
}
|
|
595337
|
-
queryParameters[endpointId] = parametersForEndpoint.size > 0 ? parametersForEndpoint : void 0;
|
|
595383
|
+
excludedQueryParameters[endpointId] = computeExcludedKeys(queryParametersNode.parametersByAudience, activeAudiences);
|
|
595338
595384
|
}
|
|
595339
595385
|
for (const [webhookId, webhookPaylodPropertiesNode] of Object.entries(this.webhookProperties)) {
|
|
595340
595386
|
if (!this.webhooksNeededForAudience.has(webhookId)) {
|
|
595341
595387
|
continue;
|
|
595342
595388
|
}
|
|
595343
|
-
|
|
595344
|
-
for (const audience of this.audiences.audiences) {
|
|
595345
|
-
const propertiesForAudience = webhookPaylodPropertiesNode.propertiesByAudience[audience];
|
|
595346
|
-
if (propertiesForAudience != null) {
|
|
595347
|
-
propertiesForAudience.forEach((property24) => {
|
|
595348
|
-
propertiesForWebhook.add(property24);
|
|
595349
|
-
});
|
|
595350
|
-
}
|
|
595351
|
-
}
|
|
595352
|
-
webhookPayloadProperties[webhookId] = propertiesForWebhook.size > 0 ? propertiesForWebhook : void 0;
|
|
595389
|
+
excludedWebhookPayloadProperties[webhookId] = computeExcludedKeys(webhookPaylodPropertiesNode.propertiesByAudience, activeAudiences);
|
|
595353
595390
|
}
|
|
595354
595391
|
}
|
|
595355
595392
|
return new FilteredIrImpl({
|
|
595356
595393
|
types: typeIds,
|
|
595357
|
-
|
|
595394
|
+
excludedProperties,
|
|
595358
595395
|
errors: errorIds,
|
|
595359
|
-
|
|
595360
|
-
|
|
595396
|
+
excludedRequestProperties,
|
|
595397
|
+
excludedQueryParameters,
|
|
595361
595398
|
environments: this.environmentsNeededForAudience,
|
|
595362
595399
|
services: this.servicesNeededForAudience,
|
|
595363
595400
|
endpoints: this.endpointsNeededForAudience,
|
|
595364
595401
|
webhooks: this.webhooksNeededForAudience,
|
|
595365
|
-
|
|
595402
|
+
excludedWebhookPayloadProperties,
|
|
595366
595403
|
subpackages: this.subpackagesNeededForAudience,
|
|
595367
595404
|
channels: this.channelsNeededForAudience
|
|
595368
595405
|
});
|
|
@@ -595465,6 +595502,21 @@ var IrGraph = class {
|
|
|
595465
595502
|
}
|
|
595466
595503
|
}
|
|
595467
595504
|
};
|
|
595505
|
+
function computeExcludedKeys(keysByAudience, activeAudiences) {
|
|
595506
|
+
const matched = /* @__PURE__ */ new Set();
|
|
595507
|
+
for (const audience of activeAudiences) {
|
|
595508
|
+
keysByAudience[audience]?.forEach((key2) => matched.add(key2));
|
|
595509
|
+
}
|
|
595510
|
+
const excluded = /* @__PURE__ */ new Set();
|
|
595511
|
+
for (const keys25 of Object.values(keysByAudience)) {
|
|
595512
|
+
keys25.forEach((key2) => {
|
|
595513
|
+
if (!matched.has(key2)) {
|
|
595514
|
+
excluded.add(key2);
|
|
595515
|
+
}
|
|
595516
|
+
});
|
|
595517
|
+
}
|
|
595518
|
+
return excluded;
|
|
595519
|
+
}
|
|
595468
595520
|
function audiencesFromConfig(configAudiences) {
|
|
595469
595521
|
switch (configAudiences.type) {
|
|
595470
595522
|
case "all":
|
|
@@ -661096,7 +661148,7 @@ var AccessTokenPosthogManager = class {
|
|
|
661096
661148
|
properties: {
|
|
661097
661149
|
...event,
|
|
661098
661150
|
...event.properties,
|
|
661099
|
-
version: "5.19.
|
|
661151
|
+
version: "5.19.1",
|
|
661100
661152
|
usingAccessToken: true,
|
|
661101
661153
|
...getRunIdProperties()
|
|
661102
661154
|
}
|
|
@@ -661151,7 +661203,7 @@ var UserPosthogManager = class {
|
|
|
661151
661203
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
661152
661204
|
event: "CLI",
|
|
661153
661205
|
properties: {
|
|
661154
|
-
version: "5.19.
|
|
661206
|
+
version: "5.19.1",
|
|
661155
661207
|
...event,
|
|
661156
661208
|
...event.properties,
|
|
661157
661209
|
usingAccessToken: false,
|
|
@@ -852134,7 +852186,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
852134
852186
|
var LOGS_FOLDER_NAME = "logs";
|
|
852135
852187
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
852136
852188
|
function getCliSource() {
|
|
852137
|
-
const version7 = "5.19.
|
|
852189
|
+
const version7 = "5.19.1";
|
|
852138
852190
|
return `cli@${version7}`;
|
|
852139
852191
|
}
|
|
852140
852192
|
var DebugLogger = class {
|
|
@@ -864943,7 +864995,7 @@ var LegacyDocsPublisher = class {
|
|
|
864943
864995
|
previewId,
|
|
864944
864996
|
disableTemplates: void 0,
|
|
864945
864997
|
skipUpload,
|
|
864946
|
-
cliVersion: "5.19.
|
|
864998
|
+
cliVersion: "5.19.1",
|
|
864947
864999
|
loginCommand: "fern auth login"
|
|
864948
865000
|
});
|
|
864949
865001
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -939557,7 +939609,7 @@ var CliContext = class _CliContext {
|
|
|
939557
939609
|
if (false) {
|
|
939558
939610
|
this.logger.error("CLI_VERSION is not defined");
|
|
939559
939611
|
}
|
|
939560
|
-
return "5.19.
|
|
939612
|
+
return "5.19.1";
|
|
939561
939613
|
}
|
|
939562
939614
|
getCliName() {
|
|
939563
939615
|
if (false) {
|
package/package.json
CHANGED