@paralect/hive 0.0.7 → 0.0.9
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.
|
@@ -36,10 +36,11 @@ module.exports = async () => {
|
|
|
36
36
|
|
|
37
37
|
scripts: {
|
|
38
38
|
"dev": "nodemon --watch . --exec hive run .",
|
|
39
|
+
"deploy-local": "hive build-local && hive deploy",
|
|
39
40
|
},
|
|
40
41
|
|
|
41
42
|
dependencies: {
|
|
42
|
-
"@paralect/hive": "^0.0.
|
|
43
|
+
"@paralect/hive": "^0.0.9"
|
|
43
44
|
},
|
|
44
45
|
devDependencies: {
|
|
45
46
|
"nodemon": "^3.1.4"
|
|
@@ -61,7 +62,11 @@ module.exports = async () => {
|
|
|
61
62
|
fs.writeFileSync(projectEnvPath, Object.keys(project.envs.staging).map(key => `${key}=${project.envs.staging[key]}`).join('\n'));
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
console.log(`Successfully initialised project ${projectName}
|
|
65
|
+
console.log(`Successfully initialised project ${projectName}!
|
|
66
|
+
To launch the dev server run:
|
|
67
|
+
npm install
|
|
68
|
+
npm run dev
|
|
69
|
+
`);
|
|
65
70
|
|
|
66
71
|
process.env.PROJECT_ID = project._id;
|
|
67
72
|
}
|
package/cli/hive.js
CHANGED
|
@@ -64,8 +64,8 @@ program
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
program
|
|
67
|
-
.command('
|
|
68
|
-
.description('Build
|
|
67
|
+
.command('build-local')
|
|
68
|
+
.description('Build Hive project from local machine with docker')
|
|
69
69
|
.action(async () => {
|
|
70
70
|
try {
|
|
71
71
|
let outDir = path.resolve(process.cwd(), './dist');
|
|
@@ -74,6 +74,7 @@ program
|
|
|
74
74
|
console.log('outDir', path.resolve(outDir, `./deploy/script`))
|
|
75
75
|
await execCommand(`npm install --prefix ${path.resolve(outDir, `./deploy/script`)}`);
|
|
76
76
|
|
|
77
|
+
process.env.SKIP_KUBERNETES = true;
|
|
77
78
|
await execCommand('node ./index.js', {
|
|
78
79
|
cwd: path.resolve(outDir, `./deploy/script/src`)
|
|
79
80
|
});
|
package/package.json
CHANGED
|
@@ -90,12 +90,14 @@ const deploy = async () => {
|
|
|
90
90
|
environment: config.environment,
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
if (!process.env.SKIP_KUBERNETES) {
|
|
94
|
+
// deploy api to kubernetes and deploy migrator through helm hooks
|
|
95
|
+
await pushToKubernetes({
|
|
96
|
+
imageTag,
|
|
97
|
+
appName: "api",
|
|
98
|
+
deployConfig,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
99
101
|
};
|
|
100
102
|
|
|
101
103
|
deploy();
|