corebasic 1.0.33 → 1.0.35

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.
Files changed (2) hide show
  1. package/libs/features.js +3 -2
  2. package/package.json +1 -1
package/libs/features.js CHANGED
@@ -7,7 +7,8 @@ const require = createRequire(import.meta.url);
7
7
  let features = {}
8
8
  let apis = {}
9
9
 
10
- export function start(app, file) {
10
+ export function start(app, url) {
11
+ let file = url.toString().replace('file://','')
11
12
  features = require(file)
12
13
 
13
14
  Object.entries(features).forEach(async ([name,feature]) => {
@@ -24,7 +25,7 @@ export function start(app, file) {
24
25
  if (name === 'transactions/query')
25
26
  return
26
27
 
27
- feature.handler = (await import(`./${name}.js`))[handler]
28
+ feature.handler = (await import(`${new URL(`${name}.js`, url).toString().replace('file://', '')}`))[handler]
28
29
 
29
30
  if (feature.api.split(' ')[0].toLowerCase() !== "get") {
30
31
  let topic = feature.topic
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.33",
4
+ "version": "1.0.35",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {