Refactor VPN proxy components and update related behavior
This commit is contained in:
@@ -235,16 +235,6 @@ function dynamicClassBindings(files) {
|
||||
add(routingSuffix, 'status', [...routingStatusBody.matchAll(/return \['([a-z-]+)'/g)].map((match) => match[1]));
|
||||
}
|
||||
|
||||
const subscriptionSuffix = '/features/subscription/SubscriptionFeature.tsx';
|
||||
const subscription = bySuffix(subscriptionSuffix);
|
||||
if (subscription) {
|
||||
add(subscriptionSuffix, 'validationStatus', literalUnion(
|
||||
subscription,
|
||||
/interface SubscriptionValidation[\s\S]+?status: ([^;]+);/,
|
||||
'SubscriptionValidation.status',
|
||||
));
|
||||
}
|
||||
|
||||
const connectionSuffix = '/features/connection/ConnectionPanel.tsx';
|
||||
const connection = bySuffix(connectionSuffix);
|
||||
if (connection) {
|
||||
@@ -281,7 +271,13 @@ function bindComponentProps(definition, element, callerEnvironment, dynamicBindi
|
||||
const node = attribute.value?.type === 'JSXExpressionContainer'
|
||||
? attribute.value.expression
|
||||
: attribute.value || { type: 'BooleanLiteral', value: true };
|
||||
supplied.set(name, { node, environment: callerEnvironment });
|
||||
supplied.set(name, node.type === 'Identifier' && callerEnvironment.get(node.name)
|
||||
? callerEnvironment.get(node.name)
|
||||
: {
|
||||
callable: ['ArrowFunctionExpression', 'FunctionExpression'].includes(node.type) && producesJsx(node),
|
||||
node,
|
||||
environment: callerEnvironment,
|
||||
});
|
||||
}
|
||||
supplied.set('children', { node: element.children, environment: callerEnvironment });
|
||||
const environment = new Map(dynamicBindings.get(definition.file));
|
||||
|
||||
Reference in New Issue
Block a user