@scm-manager/ui-plugins 2.47.0 → 2.48.0
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/package.json +11 -14
- package/bin/ui-plugins.js +0 -66
- package/src/commands/postinstall.js +0 -72
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-plugins",
|
|
3
|
-
"
|
|
3
|
+
"description": "Defines the versions of SCM-Manager plugin dependencies provided by the core webapp. Exclusively used by the postinstall command of @scm-manager/plugin-scripts.",
|
|
4
|
+
"version": "2.48.0",
|
|
4
5
|
"license": "MIT",
|
|
5
|
-
"bin": {
|
|
6
|
-
"ui-plugins": "./bin/ui-plugins.js"
|
|
7
|
-
},
|
|
8
6
|
"dependencies": {
|
|
9
7
|
"react": "17",
|
|
10
8
|
"react-dom": "17",
|
|
@@ -12,13 +10,13 @@
|
|
|
12
10
|
"react-router-dom": "^5.3.1",
|
|
13
11
|
"react-i18next": "11",
|
|
14
12
|
"styled-components": "^5.3.5",
|
|
15
|
-
"@scm-manager/ui-api": "2.
|
|
16
|
-
"@scm-manager/ui-extensions": "2.
|
|
17
|
-
"@scm-manager/ui-components": "2.
|
|
18
|
-
"@scm-manager/ui-forms": "2.
|
|
19
|
-
"@scm-manager/ui-buttons": "2.
|
|
20
|
-
"@scm-manager/ui-overlays": "2.
|
|
21
|
-
"@scm-manager/ui-layout": "2.
|
|
13
|
+
"@scm-manager/ui-api": "2.48.0",
|
|
14
|
+
"@scm-manager/ui-extensions": "2.48.0",
|
|
15
|
+
"@scm-manager/ui-components": "2.48.0",
|
|
16
|
+
"@scm-manager/ui-forms": "2.48.0",
|
|
17
|
+
"@scm-manager/ui-buttons": "2.48.0",
|
|
18
|
+
"@scm-manager/ui-overlays": "2.48.0",
|
|
19
|
+
"@scm-manager/ui-layout": "2.48.0",
|
|
22
20
|
"classnames": "^2.2.6",
|
|
23
21
|
"query-string": "6.14.1",
|
|
24
22
|
"redux": "^4.0.0",
|
|
@@ -33,9 +31,8 @@
|
|
|
33
31
|
"@scm-manager/plugin-scripts": "^1.2.2",
|
|
34
32
|
"@scm-manager/prettier-config": "^2.10.1",
|
|
35
33
|
"@scm-manager/tsconfig": "^2.13.0",
|
|
36
|
-
"@scm-manager/ui-
|
|
37
|
-
"@scm-manager/ui-
|
|
38
|
-
"@scm-manager/ui-types": "2.47.0",
|
|
34
|
+
"@scm-manager/ui-tests": "2.48.0",
|
|
35
|
+
"@scm-manager/ui-types": "2.48.0",
|
|
39
36
|
"@types/classnames": "^2.2.9",
|
|
40
37
|
"@types/enzyme": "^3.10.3",
|
|
41
38
|
"@types/fetch-mock": "^7.3.1",
|
package/bin/ui-plugins.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/*
|
|
3
|
-
* MIT License
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/* eslint-disable no-console */
|
|
27
|
-
const { spawnSync } = require("child_process");
|
|
28
|
-
|
|
29
|
-
const commands = ["postinstall"];
|
|
30
|
-
|
|
31
|
-
const args = process.argv.slice(2);
|
|
32
|
-
|
|
33
|
-
const commandIndex = args.findIndex(arg => {
|
|
34
|
-
return commands.includes(arg);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const command = commandIndex === -1 ? args[0] : args[commandIndex];
|
|
38
|
-
const nodeArgs = commandIndex > 0 ? args.slice(0, commandIndex) : [];
|
|
39
|
-
|
|
40
|
-
if (commands.includes(command)) {
|
|
41
|
-
const result = spawnSync(
|
|
42
|
-
"node",
|
|
43
|
-
nodeArgs.concat(require.resolve("../src/commands/" + command)).concat(args.slice(commandIndex + 1)),
|
|
44
|
-
{ stdio: "inherit" }
|
|
45
|
-
);
|
|
46
|
-
if (result.signal) {
|
|
47
|
-
if (result.signal === "SIGKILL") {
|
|
48
|
-
console.log(
|
|
49
|
-
"The build failed because the process exited too early. " +
|
|
50
|
-
"This probably means the system ran out of memory or someone called " +
|
|
51
|
-
"`kill -9` on the process."
|
|
52
|
-
);
|
|
53
|
-
} else if (result.signal === "SIGTERM") {
|
|
54
|
-
console.log(
|
|
55
|
-
"The build failed because the process exited too early. " +
|
|
56
|
-
"Someone might have called `kill` or `killall`, or the system could " +
|
|
57
|
-
"be shutting down."
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
process.exit(1);
|
|
61
|
-
}
|
|
62
|
-
process.exit(result.status);
|
|
63
|
-
} else {
|
|
64
|
-
console.log(`Unknown script "${command}".`);
|
|
65
|
-
console.log("Perhaps you need to update ui-plugins?");
|
|
66
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
/* eslint-disable no-console */
|
|
25
|
-
const path = require("path");
|
|
26
|
-
const fs = require("fs");
|
|
27
|
-
const { spawnSync } = require("child_process");
|
|
28
|
-
|
|
29
|
-
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
30
|
-
const packageJSON = JSON.parse(fs.readFileSync(packageJsonPath, "UTF-8"));
|
|
31
|
-
|
|
32
|
-
const reference = require("../../package.json");
|
|
33
|
-
|
|
34
|
-
const sync = (left, right, key) => {
|
|
35
|
-
if (!right[key]) {
|
|
36
|
-
right[key] = {};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let changed = false;
|
|
40
|
-
|
|
41
|
-
const keys = Object.keys(left[key]);
|
|
42
|
-
keys.forEach(name => {
|
|
43
|
-
if (right[key][name] !== left[key][name]) {
|
|
44
|
-
console.log(name, "has changed from", right[key][name], "to", left[key][name]);
|
|
45
|
-
right[key][name] = left[key][name];
|
|
46
|
-
changed = true;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return changed;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const update = () => {
|
|
54
|
-
let dep = sync(reference, packageJSON, "dependencies");
|
|
55
|
-
let devDep = sync(reference, packageJSON, "devDependencies");
|
|
56
|
-
return dep || devDep;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
if (update()) {
|
|
60
|
-
console.log("dependencies changed, install new dependencies");
|
|
61
|
-
|
|
62
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJSON, null, " "), { encoding: "UTF-8" });
|
|
63
|
-
|
|
64
|
-
const result = spawnSync("yarn", ["install"], { stdio: "inherit" });
|
|
65
|
-
if (result.error) {
|
|
66
|
-
console.log("could not start yarn command:", result.error);
|
|
67
|
-
process.exit(2);
|
|
68
|
-
} else if (result.status !== 0) {
|
|
69
|
-
console.log("yarn process ends with status code:", result.status);
|
|
70
|
-
process.exit(3);
|
|
71
|
-
}
|
|
72
|
-
}
|