@datapos/datapos-development 0.3.29 → 0.3.31

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 +23 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -13,6 +13,17 @@ async function buildConfig(directoryPath) {
13
13
  await fs.writeFile(`${directoryPath || ''}config.json`, JSON.stringify({ ...configJSON, id: packageJSON.name, version: packageJSON.version }, undefined, 4));
14
14
  }
15
15
 
16
+ // Operations - Document interface.
17
+ async function documentInterface(directoryPath) {
18
+ const configJSON = await readJSONFile(`${directoryPath || ''}config.json`);
19
+ const indexCode = await fs.readFile(`${directoryPath || ''}src/index.ts`, 'utf8');
20
+ // Match class methods and function declarations more precisely
21
+ const regex = /(?:^|\n)\s*(?:async\s+)?(?:private\s+|public\s+|protected\s+)?([A-Za-z_]\w*)\s*\([^)]*\)\s*(?::\s*[^{]+)?\s*\{/g;
22
+ const matches = [...indexCode.matchAll(regex)].map((m) => m[1]);
23
+
24
+ console.log(matches);
25
+ }
26
+
16
27
  // Operations - Build public directory index.
17
28
  async function buildPublicDirectoryIndex(id) {
18
29
  const index = {};
@@ -156,4 +167,15 @@ async function readJSONFile(path) {
156
167
  }
157
168
 
158
169
  // Exposures
159
- export { buildConfig, buildPublicDirectoryIndex, bumpVersion, clearDirectory, sendDeploymentNotice, syncWithGitHub, uploadDirectoryToR2, uploadModuleConfig, uploadModuleToR2 };
170
+ export {
171
+ buildConfig,
172
+ buildPublicDirectoryIndex,
173
+ bumpVersion,
174
+ clearDirectory,
175
+ documentInterface,
176
+ sendDeploymentNotice,
177
+ syncWithGitHub,
178
+ uploadDirectoryToR2,
179
+ uploadModuleConfig,
180
+ uploadModuleToR2
181
+ };
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.29",
7
+ "version": "0.3.31",
8
8
  "devDependencies": {
9
9
  "eslint": "^9.36.0",
10
10
  "license-report": "^6.8.0",