@uscreen.de/dev-service 0.11.19 → 0.11.21
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/README.md +2 -2
- package/package.json +7 -7
- package/src/install.js +1 -1
- package/src/utils.js +1 -1
- package/templates/elasticsearch.yml +3 -0
- package/templates/mongo.yml +3 -0
- package/templates/rabbitmq.yml +3 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dev-service
|
|
2
2
|
|
|
3
|
-
[](https://github.com/uscreen/dev-service/actions/workflows/node.js.yml)
|
|
4
4
|
[](https://snyk.io/test/github/uscreen/dev-service?targetFile=package.json)
|
|
5
5
|
|
|
6
6
|
> Manage docker services for local development
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
- a local or remote docker host
|
|
11
11
|
- a docker client connected to that host
|
|
12
12
|
- `docker` and `docker-compose` located in your `$PATH`
|
|
13
|
-
- `node`
|
|
13
|
+
- `node` v14.13 or higher, or v15 or higher
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uscreen.de/dev-service",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.21",
|
|
4
4
|
"description": "cli to manage services in dev repos",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"author": "Martin Herting <herting@uscreen.de>",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": "^
|
|
26
|
+
"node": "^14.13 || >=15"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"test": "c8 --all tap --no-coverage test/**/*.test.js",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"templates"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@uscreen.de/eslint-config-prettystandard-node": "^0.2.
|
|
44
|
-
"husky": ">=
|
|
43
|
+
"@uscreen.de/eslint-config-prettystandard-node": "^0.2.10",
|
|
44
|
+
"husky": ">=8.0.2",
|
|
45
45
|
"lint-staged": ">=13.0.3",
|
|
46
|
-
"tap": "^16.3.
|
|
46
|
+
"tap": "^16.3.2"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"c8": "^7.12.0",
|
|
50
|
-
"commander": "^9.4.
|
|
50
|
+
"commander": "^9.4.1",
|
|
51
51
|
"fs-extra": "^10.0.1",
|
|
52
52
|
"nanoid": "^4.0.0",
|
|
53
53
|
"parse-json": "^6.0.2",
|
|
54
54
|
"read-pkg": "^7.1.0",
|
|
55
|
-
"yaml": "^2.1.
|
|
55
|
+
"yaml": "^2.1.3"
|
|
56
56
|
},
|
|
57
57
|
"lint-staged": {
|
|
58
58
|
"*.js": "eslint --cache --fix"
|
package/src/install.js
CHANGED
|
@@ -44,7 +44,7 @@ const fillTemplate = (template, data, removeSections, keepSections) => {
|
|
|
44
44
|
|
|
45
45
|
for (const r of removeSections) {
|
|
46
46
|
template = template.replace(
|
|
47
|
-
new RegExp(`{{${r}}}(.|\n)
|
|
47
|
+
new RegExp(`{{${r}}}(.|\n)*?{{/${r}}}\n?`, 'gm'),
|
|
48
48
|
''
|
|
49
49
|
)
|
|
50
50
|
}
|
package/src/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ export const readPackageJson = () => {
|
|
|
37
37
|
* Escape string for use in docker
|
|
38
38
|
*/
|
|
39
39
|
export const escape = (name) =>
|
|
40
|
-
name.replace(/^[^a-zA-Z0-9]*/, '').replace(/[^a-zA-Z0-9
|
|
40
|
+
name.replace(/^[^a-zA-Z0-9]*/, '').replace(/[^a-zA-Z0-9-]/g, '-')
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Checks if compose directory exists and contains files
|
|
@@ -6,6 +6,9 @@ services:
|
|
|
6
6
|
container_name: {{container_name}}
|
|
7
7
|
ports:
|
|
8
8
|
- 9200:9200
|
|
9
|
+
{{mapped-volumes}}
|
|
10
|
+
user: ${CURRENT_UID}
|
|
11
|
+
{{/mapped-volumes}}
|
|
9
12
|
environment:
|
|
10
13
|
- cluster.name={{projectname}}-elasticsearch-cluster
|
|
11
14
|
- cluster.routing.allocation.disk.threshold_enabled=false
|
package/templates/mongo.yml
CHANGED
package/templates/rabbitmq.yml
CHANGED