@datapos/datapos-development 0.3.12 → 0.3.14
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 +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,8 +7,8 @@ const util = require('util');
|
|
|
7
7
|
const exec = util.promisify(require('child_process').exec);
|
|
8
8
|
|
|
9
9
|
// Operations - Build Configuration
|
|
10
|
-
async function buildConfig() {
|
|
11
|
-
const configJSON = await readJSONFile(
|
|
10
|
+
async function buildConfig(directoryPath) {
|
|
11
|
+
const configJSON = await readJSONFile(`${directoryPath}config.json`);
|
|
12
12
|
const packageJSON = await readJSONFile('package.json');
|
|
13
13
|
await fs.writeFile('src/config.json', JSON.stringify({ ...configJSON, id: packageJSON.name, version: packageJSON.version }, undefined, 4));
|
|
14
14
|
}
|
|
@@ -84,7 +84,7 @@ async function sendDeploymentNotice() {
|
|
|
84
84
|
headers: { 'Content-Type': 'application/json' },
|
|
85
85
|
method: 'PUT'
|
|
86
86
|
};
|
|
87
|
-
const response = await fetch(`https://
|
|
87
|
+
const response = await fetch(`https://api.datapos.app/states/${configJSON.id}`, options);
|
|
88
88
|
if (!response.ok) console.log(await response.text());
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -134,7 +134,7 @@ async function uploadModuleConfig() {
|
|
|
134
134
|
headers: { 'Content-Type': 'application/json' },
|
|
135
135
|
method: 'PUT'
|
|
136
136
|
};
|
|
137
|
-
const response = await fetch(`https://
|
|
137
|
+
const response = await fetch(`https://api.datapos.app/states/${stateId}`, options);
|
|
138
138
|
if (!response.ok) console.log(await response.text());
|
|
139
139
|
}
|
|
140
140
|
|