saturn-core-cli 0.0.5 → 0.0.7
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/commands/publish.js +13 -4
- package/package.json +4 -4
package/commands/publish.js
CHANGED
|
@@ -22,13 +22,15 @@ try {
|
|
|
22
22
|
exemptions = [];
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
async function action(
|
|
25
|
+
async function action(options) {
|
|
26
26
|
try {
|
|
27
|
+
let version_raw = options["version"];
|
|
28
|
+
let message = options["message"];
|
|
27
29
|
const packageObj = await fs.readJson(`package.json`);
|
|
28
30
|
//if (version == undefined) {
|
|
29
31
|
//let version = packageObj.version;
|
|
30
32
|
//}
|
|
31
|
-
let version = semverInc(packageObj.version,
|
|
33
|
+
let version = semverInc(packageObj.version, version_raw);
|
|
32
34
|
packageObj.version = version;
|
|
33
35
|
await fs.writeJson(`package.json`, packageObj, { spaces: 2 });
|
|
34
36
|
let map = await new mapper({ exemptions: exemptions }).createMap("./");
|
|
@@ -36,7 +38,7 @@ async function action(release = "patch", options) {
|
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
40
|
let core = await getCoreId(packageObj.saturn.core);
|
|
39
|
-
await createInstance(map, core.id, version);
|
|
41
|
+
await createInstance(map, core.id, version, message);
|
|
40
42
|
await doGitAdd();
|
|
41
43
|
await doGitCommit("SC Publish");
|
|
42
44
|
await doGitPush();
|
|
@@ -186,12 +188,13 @@ async function getCoreId(core) {
|
|
|
186
188
|
return mapped_result;
|
|
187
189
|
}
|
|
188
190
|
|
|
189
|
-
async function createInstance(map, core, version) {
|
|
191
|
+
async function createInstance(map, core, version, message) {
|
|
190
192
|
try {
|
|
191
193
|
var formData = {
|
|
192
194
|
map: JSON.stringify({ version, map }),
|
|
193
195
|
core,
|
|
194
196
|
version,
|
|
197
|
+
description: message,
|
|
195
198
|
};
|
|
196
199
|
let response = await axios.post(
|
|
197
200
|
`${SATURN_URL}/saturn_instances`,
|
|
@@ -214,6 +217,12 @@ function command(prog) {
|
|
|
214
217
|
program
|
|
215
218
|
.command("publish [release]", { isDefault: true })
|
|
216
219
|
.option("-d, --dry <template>", "Dry Run", false)
|
|
220
|
+
.option(
|
|
221
|
+
"-v, --version",
|
|
222
|
+
"Version, options are major, minor, patch",
|
|
223
|
+
"patch"
|
|
224
|
+
)
|
|
225
|
+
.option("-m, --description", "Description of the update", "")
|
|
217
226
|
.description("Publish Saturn Version")
|
|
218
227
|
.action(action);
|
|
219
228
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "saturn-core-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Saturn Core CLI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"author": "Chad Fraser <chad@sonover.com> (http://sonover.com)",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "^
|
|
17
|
+
"axios": "^1.6.2",
|
|
18
18
|
"babel-polyfill": "^6.26.0",
|
|
19
19
|
"child-process-promise": "^2.2.1",
|
|
20
20
|
"chokidar": "^3.5.2",
|
|
21
21
|
"colors": "^1.4.0",
|
|
22
|
-
"commander": "^
|
|
23
|
-
"fs-extra": "^
|
|
22
|
+
"commander": "^11.1.0",
|
|
23
|
+
"fs-extra": "^11.1.1",
|
|
24
24
|
"klaw-sync": "^6.0.0",
|
|
25
25
|
"lodash": "^4.17.21",
|
|
26
26
|
"pluralize": "^8.0.0",
|