pasika 0.10.70 → 0.10.71

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.
@@ -44,6 +44,11 @@ function importedContractMember(expression, propertyName4, imports) {
44
44
  }
45
45
  return expression.object.name;
46
46
  }
47
+ function isImportedContractReference(expression, imports) {
48
+ if (expression.type === "Identifier") return imports.has(expression.name);
49
+ if (expression.type !== "MemberExpression" || expression.object.type !== "Identifier") return false;
50
+ return imports.has(expression.object.name);
51
+ }
47
52
  function responseSchemaParserContract(callee, imports) {
48
53
  if (callee.type === "Super" || callee.type !== "MemberExpression" || memberPropertyName(callee) !== "parse") {
49
54
  return void 0;
@@ -136,7 +141,7 @@ var apiContractRule = {
136
141
  const contractProperty = objectProperty(options, "contract");
137
142
  if (contractProperty) {
138
143
  const value = contractProperty.value;
139
- if (!(value.type === "Identifier" && imports.has(value.name))) {
144
+ if (!isImportedContractReference(value, imports)) {
140
145
  context.report({ node: value, message: CLIENT_CONTRACT });
141
146
  }
142
147
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasika",
3
- "version": "0.10.70",
3
+ "version": "0.10.71",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",