@paralect/hive 0.0.6 → 0.0.8
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/helpers/axiosAuth.js
CHANGED
|
@@ -3,7 +3,7 @@ const axios = require('axios');
|
|
|
3
3
|
module.exports = (options) => {
|
|
4
4
|
return axios({
|
|
5
5
|
...options,
|
|
6
|
-
url: options.url.startsWith('http') ? options.url : `https://hive-api-
|
|
6
|
+
url: options.url.startsWith('http') ? options.url : `https://hive-api-core.paralect.co/${options.url}`,
|
|
7
7
|
headers: {
|
|
8
8
|
...(options?.headers || {}),
|
|
9
9
|
...(process.env.HIVE_TOKEN ? { Authorization: `Bearer ${process.env.HIVE_TOKEN}` } : {})}
|
|
@@ -39,7 +39,7 @@ module.exports = async () => {
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
dependencies: {
|
|
42
|
-
"@paralect/hive": "^0.0.
|
|
42
|
+
"@paralect/hive": "^0.0.7"
|
|
43
43
|
},
|
|
44
44
|
devDependencies: {
|
|
45
45
|
"nodemon": "^3.1.4"
|
|
@@ -52,7 +52,7 @@ module.exports = async () => {
|
|
|
52
52
|
fs.writeFileSync(projectConfigPath, `module.exports = { projectId: '${project._id}' } `);
|
|
53
53
|
|
|
54
54
|
const projectEnvPath = path.resolve(process.env.HIVE_SRC, './app-config/.env');
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
if (project?.envs?.staging) {
|
|
57
57
|
if (!fs.existsSync(path.resolve(process.env.HIVE_SRC, './app-config'))) {
|
|
58
58
|
fs.mkdirSync(path.resolve(process.env.HIVE_SRC, './app-config'));
|
|
@@ -61,7 +61,11 @@ module.exports = async () => {
|
|
|
61
61
|
fs.writeFileSync(projectEnvPath, Object.keys(project.envs.staging).map(key => `${key}=${project.envs.staging[key]}`).join('\n'));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
console.log(`Successfully initialised project ${projectName}
|
|
64
|
+
console.log(`Successfully initialised project ${projectName}!
|
|
65
|
+
To launch the dev server run:
|
|
66
|
+
npm install
|
|
67
|
+
npm run dev
|
|
68
|
+
`);
|
|
65
69
|
|
|
66
70
|
process.env.PROJECT_ID = project._id;
|
|
67
71
|
}
|