@paralect/hive 0.1.1 → 0.1.3
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/cli/hive.js +20 -2
- package/package.json +1 -1
- package/starter/package.json +1 -1
- package/starter/tsconfig.json +5 -1
package/cli/hive.js
CHANGED
|
@@ -16,9 +16,27 @@ program
|
|
|
16
16
|
.action(async (dirPath = '.') => {
|
|
17
17
|
try {
|
|
18
18
|
process.env.HIVE_SRC = path.resolve(process.cwd(), dirPath);
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
const hiveProjectDir = path.resolve(process.env.HIVE_SRC, `../.hive`);
|
|
21
|
+
await execCommand(`mkdir -p ${hiveProjectDir}`);
|
|
22
|
+
await execCommand(`cp -r ${path.resolve(__dirname, '..')}/starter/ ${hiveProjectDir}`);
|
|
23
|
+
|
|
24
|
+
tsx.require(`${hiveProjectDir}/src/app.js`, __filename); // TSX doesn't work inside node_moduels
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error('An error occurred:', error.message);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
program
|
|
31
|
+
.command('prepare [dirPath]')
|
|
32
|
+
.description('Prepare Hive server')
|
|
33
|
+
.action(async (dirPath = '.') => {
|
|
34
|
+
try {
|
|
35
|
+
process.env.HIVE_SRC = path.resolve(process.cwd(), dirPath);
|
|
36
|
+
const hiveProjectDir = path.resolve(process.env.HIVE_SRC, `../.hive`);
|
|
20
37
|
|
|
21
|
-
|
|
38
|
+
await execCommand(`mkdir -p ${hiveProjectDir}`);
|
|
39
|
+
await execCommand(`cp -r ${path.resolve(__dirname, '..')}/starter/ ${hiveProjectDir}`);
|
|
22
40
|
} catch (error) {
|
|
23
41
|
console.error('An error occurred:', error.message);
|
|
24
42
|
}
|
package/package.json
CHANGED
package/starter/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build-emails": "babel src/emails --out-dir src/emails/compiled",
|
|
21
21
|
"dev": "tsx --watch src/app.js",
|
|
22
22
|
"init-project": "./bin/init-project.sh",
|
|
23
|
-
"start": "
|
|
23
|
+
"start": "tsx src/app.js",
|
|
24
24
|
"migrate": "node ./src/migrator.js",
|
|
25
25
|
"schedule-dev": "nodemon --watch ./src ./src/scheduler ./src/scheduler.js",
|
|
26
26
|
"schedule": "node ./src/scheduler.js",
|