occam-open-cli 5.0.90 → 5.0.92
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/bin/constants.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
const END = "end",
|
|
4
4
|
DATA = "data",
|
|
5
5
|
OPEN = "open",
|
|
6
|
-
PERIOD = ".",
|
|
7
6
|
HOST_URL = "hostURL",
|
|
8
7
|
OPEN_CLI = "Open-CLI",
|
|
9
8
|
DOUBLE_DOTS = "..",
|
|
10
9
|
DOUBLE_DASH = "--",
|
|
10
|
+
DOUBLE_SPACE = " ",
|
|
11
11
|
EMPTY_STRING = "",
|
|
12
12
|
PACKAGE_JSON = "package.json";
|
|
13
13
|
|
|
@@ -15,11 +15,11 @@ module.exports = {
|
|
|
15
15
|
END,
|
|
16
16
|
DATA,
|
|
17
17
|
OPEN,
|
|
18
|
-
PERIOD,
|
|
19
18
|
HOST_URL,
|
|
20
19
|
OPEN_CLI,
|
|
21
20
|
DOUBLE_DOTS,
|
|
22
21
|
DOUBLE_DASH,
|
|
22
|
+
DOUBLE_SPACE,
|
|
23
23
|
EMPTY_STRING,
|
|
24
24
|
PACKAGE_JSON
|
|
25
25
|
};
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const { fileSystemUtilities } = require("occam-file-system");
|
|
4
4
|
|
|
5
|
-
const { PERIOD } = require("../constants");
|
|
6
|
-
|
|
7
5
|
const { loadRelease } = fileSystemUtilities;
|
|
8
6
|
|
|
9
7
|
function loadReleaseOperation(proceed, abort, context) {
|
|
10
8
|
const { releaseName } = context,
|
|
11
|
-
projectsDirectoryPath =
|
|
9
|
+
projectsDirectoryPath = process.cwd(), ///
|
|
12
10
|
release = loadRelease(releaseName ,projectsDirectoryPath);
|
|
13
11
|
|
|
14
12
|
if (release === null) {
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const { DOUBLE_SPACE } = require("../constants"),
|
|
4
|
+
{ fileNames, metaJSONUtilities, fileSystemUtilities } = require("occam-file-system");
|
|
4
5
|
|
|
5
|
-
const {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const { loadFile, saveFile } = fileSystemUtilities,
|
|
7
|
+
{ META_JSON_FILE_NAME } = fileNames,
|
|
8
|
+
{ repositoryFromNode, dependenciesFromNode, metaJSONNodeFromMetaJSONFile } = metaJSONUtilities;
|
|
8
9
|
|
|
9
10
|
function updateVersionOperation(proceed, abort, context) {
|
|
10
|
-
const { success } = context;
|
|
11
|
+
const { success, release } = context;
|
|
11
12
|
|
|
12
13
|
if (success) {
|
|
13
|
-
const
|
|
14
|
+
const releaseName = release.getName(),
|
|
15
|
+
metaJSONFilePath = `${releaseName}/${META_JSON_FILE_NAME}`,
|
|
16
|
+
projectsDirectoryPath = process.cwd(), ///
|
|
17
|
+
metaJSONFile = loadFile(metaJSONFilePath, projectsDirectoryPath),
|
|
18
|
+
metaJSONNode = metaJSONNodeFromMetaJSONFile(metaJSONFile),
|
|
19
|
+
node = metaJSONNode, ///
|
|
20
|
+
repository = repositoryFromNode(node);
|
|
21
|
+
|
|
22
|
+
let dependencies = dependenciesFromNode(node);
|
|
23
|
+
|
|
24
|
+
const dependenciesJSON = dependencies.toJSON();
|
|
25
|
+
|
|
26
|
+
dependencies = dependenciesJSON; ///
|
|
27
|
+
|
|
28
|
+
const { version } = context,
|
|
29
|
+
metaJSON = {
|
|
30
|
+
version,
|
|
31
|
+
repository,
|
|
32
|
+
dependencies
|
|
33
|
+
},
|
|
34
|
+
metaJSONString = JSON.stringify(metaJSON, null, DOUBLE_SPACE),
|
|
35
|
+
content = metaJSONString, ///
|
|
36
|
+
file = metaJSONFile; ///
|
|
14
37
|
|
|
38
|
+
file.setContent(content);
|
|
15
39
|
|
|
40
|
+
saveFile(file, projectsDirectoryPath);
|
|
16
41
|
}
|
|
17
42
|
|
|
18
43
|
proceed();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "occam-open-cli",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.92",
|
|
5
5
|
"license": "MIT, Anti-996",
|
|
6
6
|
"homepage": "https://github.com/djalbat/occam-open-cli",
|
|
7
7
|
"description": "Occam's command line package management tool.",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"argumentative": "^2.0.15",
|
|
14
14
|
"necessary": "^11.1.4",
|
|
15
|
-
"occam-file-system": "^5.0.
|
|
15
|
+
"occam-file-system": "^5.0.63"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {},
|
|
18
18
|
"bin": {
|