@datapos/datapos-development 0.3.29 → 0.3.30
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.
- package/index.js +21 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13,6 +13,15 @@ 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
|
+
const regex = /(?:async\s+)?(?:private\s+)?([A-Za-z_]\w*)\s*\([^)]*\)\s*[:{]/g;
|
|
21
|
+
const matches = [...indexCode.matchAll(regex)].map((m) => m[1]);
|
|
22
|
+
console.log(matches);
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
// Operations - Build public directory index.
|
|
17
26
|
async function buildPublicDirectoryIndex(id) {
|
|
18
27
|
const index = {};
|
|
@@ -156,4 +165,15 @@ async function readJSONFile(path) {
|
|
|
156
165
|
}
|
|
157
166
|
|
|
158
167
|
// Exposures
|
|
159
|
-
export {
|
|
168
|
+
export {
|
|
169
|
+
buildConfig,
|
|
170
|
+
buildPublicDirectoryIndex,
|
|
171
|
+
bumpVersion,
|
|
172
|
+
clearDirectory,
|
|
173
|
+
documentInterface,
|
|
174
|
+
sendDeploymentNotice,
|
|
175
|
+
syncWithGitHub,
|
|
176
|
+
uploadDirectoryToR2,
|
|
177
|
+
uploadModuleConfig,
|
|
178
|
+
uploadModuleToR2
|
|
179
|
+
};
|