corebasic 1.0.267 → 1.0.268

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.
@@ -57,10 +57,10 @@ function getLeaf(feature, req) {
57
57
  if (feature.featureless && feature.api === req.method.toUpperCase() + ' ' + req.path)
58
58
  return key.split(/\.(query|command)\./)[0];
59
59
  }
60
- return "NOLEAF"; // This code will never be reached as apiHandler()'s prior code ensures req is valid and there exists a feature. Included to silence ./tsc
60
+ throw new Error(`Invalid feature for extracting leaf in getLeaf()`);
61
61
  }
62
62
  else {
63
- return "NOLEAF"; // This code will never be reached as apiHandler()'s prior code ensures req is valid and there exists a feature. Included to silence ./tsc
63
+ throw new Error(`Invalid feature for extracting leaf in getLeaf()`);
64
64
  }
65
65
  }
66
66
  const DEPLOY_TOKEN_SECRET = process.env.DEPLOY_TOKEN_SECRET || "MY_SECRET_DEPLOY_TOKEN";
package/libs/features.ts CHANGED
@@ -166,9 +166,9 @@ function getLeaf(feature: string, req?: ExpressRequest): string {
166
166
  if (feature.featureless && feature.api === req.method.toUpperCase() + ' ' + req.path)
167
167
  return key.split(/\.(query|command)\./)[0]!
168
168
  }
169
- return "NOLEAF" // This code will never be reached as apiHandler()'s prior code ensures req is valid and there exists a feature. Included to silence ./tsc
169
+ throw new Error(`Invalid feature for extracting leaf in getLeaf()`)
170
170
  } else {
171
- return "NOLEAF" // This code will never be reached as apiHandler()'s prior code ensures req is valid and there exists a feature. Included to silence ./tsc
171
+ throw new Error(`Invalid feature for extracting leaf in getLeaf()`)
172
172
  }
173
173
  }
174
174
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.267",
4
+ "version": "1.0.268",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "./index.ts",