@datapos/datapos-development 0.3.37 → 0.3.39

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/index.js +4 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -17,8 +17,10 @@ async function buildConfig(directoryPath) {
17
17
  async function documentInterface(moduleTypeId) {
18
18
  const configJSON = await readJSONFile('config.json');
19
19
  const indexCode = await fs.readFile('src/index.ts', 'utf8');
20
- const regex = /^\s{4}(?:async\s+)?(?:private\s+|public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm;
21
- const matches = [...indexCode.matchAll(regex)].map((m) => m[1]);
20
+ const regex = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm;
21
+ const matches = [...indexCode.matchAll(regex)]
22
+ .filter((m) => !m[1] && m[2] !== 'constructor') // m[1] is 'private ' if present
23
+ .map((m) => m[2]);
22
24
  configJSON.interface = matches;
23
25
  await fs.writeFile('config.json', JSON.stringify(configJSON, undefined, 4));
24
26
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "index.js",
7
- "version": "0.3.37",
7
+ "version": "0.3.39",
8
8
  "devDependencies": {
9
9
  "eslint": "^9.36.0",
10
10
  "license-report": "^6.8.0",