fix(core): update
This commit is contained in:
parent
3a4f59ef9e
commit
1675c0c4c9
@ -19,23 +19,35 @@ mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
audit:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- docker
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
@ -50,9 +62,7 @@ testStable:
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
@ -63,9 +73,7 @@ testBuild:
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
@ -85,6 +93,8 @@ release:
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -15,7 +15,7 @@
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm"]
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
174
package-lock.json
generated
174
package-lock.json
generated
@ -21,8 +21,7 @@
|
||||
"@apiglobal/typedrequest-interfaces": {
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA=="
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.10.4",
|
||||
@ -1439,16 +1438,6 @@
|
||||
"@pushrocks/smarttime": "^3.0.24",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"symbol-tree": "^3.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.10.tgz",
|
||||
"integrity": "sha512-JOFpEfYiKnqcQYoUrL/jDyBDZUmlgJNm5U30MQQ3f+yci+rlFnMY5VvBBEYn5WgoX0ilwU+E15mtpDWhXcmhzg==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartbrowser": {
|
||||
@ -1482,7 +1471,6 @@
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.10.tgz",
|
||||
"integrity": "sha512-JOFpEfYiKnqcQYoUrL/jDyBDZUmlgJNm5U30MQQ3f+yci+rlFnMY5VvBBEYn5WgoX0ilwU+E15mtpDWhXcmhzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
@ -1494,13 +1482,6 @@
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@types/node": "^14.11.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "14.11.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-14.11.2.tgz",
|
||||
"integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartexit": {
|
||||
@ -1625,17 +1606,6 @@
|
||||
"fs-extra": "^9.0.1",
|
||||
"glob": "^7.1.6",
|
||||
"js-yaml": "^3.14.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-yaml": {
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smarthash": {
|
||||
@ -1666,21 +1636,6 @@
|
||||
"requires": {
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.20"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": {
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.15.tgz",
|
||||
"integrity": "sha512-KncX168fUQJ73FeT22Cvls41mkJmtasP8dB2s9+9/OyWZpNsCzk9NEmtdRhulW2vLQwuAbQc1eoloe7ffCmhcA=="
|
||||
},
|
||||
"@pushrocks/smartlog-interfaces": {
|
||||
"version": "2.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.22.tgz",
|
||||
"integrity": "sha512-blvtNLgYz08F5EhftxfzLEkQ3VE9uoXRVQukbVpwJ4Zk0QRkNg2VCkuJu/kkfbtlCEOEOG2HCZDyhbxeEeq0pA==",
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartlog-destination-local": {
|
||||
@ -1698,7 +1653,6 @@
|
||||
"version": "2.0.22",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.22.tgz",
|
||||
"integrity": "sha512-blvtNLgYz08F5EhftxfzLEkQ3VE9uoXRVQukbVpwJ4Zk0QRkNg2VCkuJu/kkfbtlCEOEOG2HCZDyhbxeEeq0pA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15"
|
||||
}
|
||||
@ -1763,6 +1717,12 @@
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-4.0.0.tgz",
|
||||
@ -2086,16 +2046,6 @@
|
||||
"croner": "^1.1.23",
|
||||
"dayjs": "^1.8.35",
|
||||
"is-nan": "^1.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.10.tgz",
|
||||
"integrity": "sha512-JOFpEfYiKnqcQYoUrL/jDyBDZUmlgJNm5U30MQQ3f+yci+rlFnMY5VvBBEYn5WgoX0ilwU+E15mtpDWhXcmhzg==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@pushrocks/smartunique": {
|
||||
@ -2131,7 +2081,6 @@
|
||||
"version": "3.2.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.9.tgz",
|
||||
"integrity": "sha512-vtmYL/l7BZvAzySh7cYnnTG6CFMp5zYtowJuMAmqUjhIaQaWW1Tvbrpjp7lVwRXj2JlL/i69KcJ6RVdLItK+rA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartenv": "^4.0.10",
|
||||
@ -2244,26 +2193,6 @@
|
||||
"type-fest": "^0.16.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdelay": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartdelay/-/smartdelay-2.0.10.tgz",
|
||||
"integrity": "sha512-JOFpEfYiKnqcQYoUrL/jDyBDZUmlgJNm5U30MQQ3f+yci+rlFnMY5VvBBEYn5WgoX0ilwU+E15mtpDWhXcmhzg==",
|
||||
"requires": {
|
||||
"@pushrocks/smartpromise": "^3.0.6"
|
||||
}
|
||||
},
|
||||
"@pushrocks/tapbundle": {
|
||||
"version": "3.2.9",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.9.tgz",
|
||||
"integrity": "sha512-vtmYL/l7BZvAzySh7cYnnTG6CFMp5zYtowJuMAmqUjhIaQaWW1Tvbrpjp7lVwRXj2JlL/i69KcJ6RVdLItK+rA==",
|
||||
"requires": {
|
||||
"@pushrocks/smartdelay": "^2.0.9",
|
||||
"@pushrocks/smartenv": "^4.0.10",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"@pushrocks/smarttime": "^3.0.19",
|
||||
"smartchai": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"type-fest": {
|
||||
"version": "0.16.0",
|
||||
"resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-0.16.0.tgz",
|
||||
@ -2282,14 +2211,14 @@
|
||||
}
|
||||
},
|
||||
"@types/chai": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.11.tgz",
|
||||
"integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw=="
|
||||
"version": "4.2.12",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.12.tgz",
|
||||
"integrity": "sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ=="
|
||||
},
|
||||
"@types/chai-as-promised": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-as-promised/-/chai-as-promised-7.1.2.tgz",
|
||||
"integrity": "sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fchai-as-promised/-/chai-as-promised-7.1.3.tgz",
|
||||
"integrity": "sha512-FQnh1ohPXJELpKhzjuDkPLR2BZCAqed+a6xV4MI/T3XzHfd2FlarfUGUdZYgqYe8oxkYn0fchHEeHfHqdZ96sg==",
|
||||
"requires": {
|
||||
"@types/chai": "*"
|
||||
}
|
||||
@ -2502,9 +2431,9 @@
|
||||
}
|
||||
},
|
||||
"@types/semver": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsemver/-/semver-6.2.1.tgz",
|
||||
"integrity": "sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA=="
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fsemver/-/semver-6.2.2.tgz",
|
||||
"integrity": "sha512-RxAwYt4rGwK5GyoRwuP0jT6ZHAVTdz2EqgsHmX0PYNjGsko+OeT4WFXXTs/lM3teJUJodM+SNtAL5/pXIJ61IQ=="
|
||||
},
|
||||
"@types/serve-static": {
|
||||
"version": "1.13.5",
|
||||
@ -3493,6 +3422,13 @@
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"check-error": {
|
||||
@ -3945,9 +3881,9 @@
|
||||
}
|
||||
},
|
||||
"crypto-random-string": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://verdaccio.lossless.one/crypto-random-string/-/crypto-random-string-3.2.0.tgz",
|
||||
"integrity": "sha512-8vPu5bsKaq2uKRy3OL7h1Oo7RayAWB8sYexLKAqvCXVib8SxgbmoF1IN4QMKjBv8uI8mp5gPPMbiRah25GMrVQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://verdaccio.lossless.one/crypto-random-string/-/crypto-random-string-3.3.0.tgz",
|
||||
"integrity": "sha512-teWAwfMb1d6brahYyKqcBEb5Yp8PJPvPOdOonXDnvaKOTmKDFNVE8E3Y2XQuzjNV/3XMwHbrX9fHWvrhRKt4Gg==",
|
||||
"requires": {
|
||||
"type-fest": "^0.8.1"
|
||||
}
|
||||
@ -4015,6 +3951,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-1.0.0.tgz",
|
||||
@ -4753,9 +4695,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
},
|
||||
"escodegen": {
|
||||
"version": "1.9.1",
|
||||
@ -5172,6 +5114,14 @@
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
@ -6868,9 +6818,9 @@
|
||||
}
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://verdaccio.lossless.one/js-base64/-/js-base64-2.5.2.tgz",
|
||||
"integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ=="
|
||||
"version": "2.6.4",
|
||||
"resolved": "https://verdaccio.lossless.one/js-base64/-/js-base64-2.6.4.tgz",
|
||||
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
@ -6882,7 +6832,6 @@
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
@ -7255,13 +7204,6 @@
|
||||
"integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",
|
||||
"requires": {
|
||||
"escape-string-regexp": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"math-random": {
|
||||
@ -7401,9 +7343,9 @@
|
||||
"integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="
|
||||
},
|
||||
"min-indent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/min-indent/-/min-indent-1.0.0.tgz",
|
||||
"integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/min-indent/-/min-indent-1.0.1.tgz",
|
||||
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="
|
||||
},
|
||||
"minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
@ -9666,9 +9608,9 @@
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
|
||||
},
|
||||
"simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
@ -10475,9 +10417,9 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.11.1.tgz",
|
||||
"integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA=="
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "6.1.3",
|
||||
@ -10511,12 +10453,6 @@
|
||||
"resolved": "https://verdaccio.lossless.one/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.13.0.tgz",
|
||||
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -6,8 +6,8 @@
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "tstest test/",
|
||||
"build": "tsbuild"
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -60,5 +60,8 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
|
21
readme.md
21
readme.md
@ -8,13 +8,20 @@ unofficial docker engine api abstraction package written in TypeScript
|
||||
* [docs (typedoc)](https://mojoio.gitlab.io/docker/)
|
||||
|
||||
## Status for master
|
||||
[![pipeline status](https://gitlab.com/mojoio/docker/badges/master/pipeline.svg)](https://gitlab.com/mojoio/docker/commits/master)
|
||||
[![coverage report](https://gitlab.com/mojoio/docker/badges/master/coverage.svg)](https://gitlab.com/mojoio/docker/commits/master)
|
||||
[![npm downloads per month](https://img.shields.io/npm/dm/@mojoio/docker.svg)](https://www.npmjs.com/package/@mojoio/docker)
|
||||
[![Known Vulnerabilities](https://snyk.io/test/npm/@mojoio/docker/badge.svg)](https://snyk.io/test/npm/@mojoio/docker)
|
||||
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/mojoio/docker/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/mojoio/docker/badges/master/coverage.svg)](https://lossless.cloud)
|
||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@mojoio/docker)](https://lossless.cloud)
|
||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/mojoio/docker)](https://lossless.cloud)
|
||||
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
||||
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@mojoio/docker)](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@mojoio/docker)](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@mojoio/docker)](https://lossless.cloud)
|
||||
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
|
20
test/test.ts
20
test/test.ts
@ -26,7 +26,7 @@ tap.test('should list networks', async () => {
|
||||
|
||||
tap.test('should create a network', async () => {
|
||||
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||
Name: 'webgateway'
|
||||
Name: 'webgateway',
|
||||
});
|
||||
expect(newNetwork).to.be.instanceOf(docker.DockerNetwork);
|
||||
expect(newNetwork.Name).to.equal('webgateway');
|
||||
@ -41,15 +41,15 @@ tap.test('should remove a network', async () => {
|
||||
tap.test('should pull an image from imagetag', async () => {
|
||||
const image = await docker.DockerImage.createFromRegistry(testDockerHost, {
|
||||
imageUrl: 'hosttoday/ht-docker-node',
|
||||
imageTag: 'alpine'
|
||||
imageTag: 'alpine',
|
||||
});
|
||||
expect(image).to.be.instanceOf(docker.DockerImage);
|
||||
console.log(image);
|
||||
});
|
||||
|
||||
tap.test('should return a change Observable', async tools => {
|
||||
tap.test('should return a change Observable', async (tools) => {
|
||||
const testObservable = await testDockerHost.getEventObservable();
|
||||
const subscription = testObservable.subscribe(changeObject => {
|
||||
const subscription = testObservable.subscribe((changeObject) => {
|
||||
console.log(changeObject);
|
||||
});
|
||||
await tools.delayFor(2000);
|
||||
@ -62,7 +62,7 @@ tap.test('should create a secret', async () => {
|
||||
name: 'testSecret',
|
||||
version: '1.0.3',
|
||||
contentArg: `{ "hi": "wow"}`,
|
||||
labels: {}
|
||||
labels: {},
|
||||
});
|
||||
console.log(mySecret);
|
||||
});
|
||||
@ -77,23 +77,23 @@ tap.test('should activate swarm mode', async () => {
|
||||
await testDockerHost.activateSwarm();
|
||||
});
|
||||
|
||||
tap.test('should list all services', async tools => {
|
||||
tap.test('should list all services', async (tools) => {
|
||||
const services = await testDockerHost.getServices();
|
||||
console.log(services);
|
||||
});
|
||||
|
||||
tap.test('should create a service', async () => {
|
||||
const testNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||
Name: 'testNetwork'
|
||||
Name: 'testNetwork',
|
||||
});
|
||||
const testSecret = await docker.DockerSecret.createSecret(testDockerHost, {
|
||||
name: 'testSecret',
|
||||
version: '0.0.1',
|
||||
labels: {},
|
||||
contentArg: '{"hi": "wow"}'
|
||||
contentArg: '{"hi": "wow"}',
|
||||
});
|
||||
const testImage = await docker.DockerImage.createFromRegistry(testDockerHost, {
|
||||
imageUrl: 'registry.gitlab.com/hosttoday/ht-docker-static'
|
||||
imageUrl: 'registry.gitlab.com/hosttoday/ht-docker-static',
|
||||
});
|
||||
const testService = await docker.DockerService.createService(testDockerHost, {
|
||||
image: testImage,
|
||||
@ -102,7 +102,7 @@ tap.test('should create a service', async () => {
|
||||
networks: [testNetwork],
|
||||
networkAlias: 'testService',
|
||||
secrets: [testSecret],
|
||||
ports: ['3000:80']
|
||||
ports: ['3000:80'],
|
||||
});
|
||||
|
||||
await testService.remove();
|
||||
|
@ -38,22 +38,19 @@ export class DockerContainer {
|
||||
) {
|
||||
// check for unique hostname
|
||||
const existingContainers = await DockerContainer.getContainers(dockerHost);
|
||||
const sameHostNameContainer = existingContainers.find(container => {
|
||||
const sameHostNameContainer = existingContainers.find((container) => {
|
||||
// TODO implement HostName Detection;
|
||||
return false;
|
||||
});
|
||||
const response = await dockerHost.request('POST', '/containers/create', {
|
||||
Hostname: containerCreationDescriptor.Hostname,
|
||||
Domainname: containerCreationDescriptor.Domainname,
|
||||
User: 'root'
|
||||
User: 'root',
|
||||
});
|
||||
if (response.statusCode < 300) {
|
||||
logger.log('info', 'Container created successfully');
|
||||
} else {
|
||||
logger.log(
|
||||
'error',
|
||||
'There has been a problem when creating the container'
|
||||
);
|
||||
logger.log('error', 'There has been a problem when creating the container');
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +92,7 @@ export class DockerContainer {
|
||||
public Mounts: any;
|
||||
constructor(dockerHostArg: DockerHost, dockerContainerObjectArg: any) {
|
||||
this.dockerHost = dockerHostArg;
|
||||
Object.keys(dockerContainerObjectArg).forEach(keyArg => {
|
||||
Object.keys(dockerContainerObjectArg).forEach((keyArg) => {
|
||||
this[keyArg] = dockerContainerObjectArg[keyArg];
|
||||
});
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export class DockerHost {
|
||||
await this.auth({
|
||||
username: gitlabAuthArray[0],
|
||||
password: gitlabAuthArray[1],
|
||||
serveraddress: 'registry.gitlab.com'
|
||||
serveraddress: 'registry.gitlab.com',
|
||||
});
|
||||
}
|
||||
|
||||
@ -98,8 +98,8 @@ export class DockerHost {
|
||||
*/
|
||||
public async getEventObservable(): Promise<plugins.rxjs.Observable<any>> {
|
||||
const response = await this.requestStreaming('GET', '/events');
|
||||
return plugins.rxjs.Observable.create(observer => {
|
||||
response.on('data', data => {
|
||||
return plugins.rxjs.Observable.create((observer) => {
|
||||
response.on('data', (data) => {
|
||||
const eventString = data.toString();
|
||||
try {
|
||||
const eventObject = JSON.parse(eventString);
|
||||
@ -136,7 +136,7 @@ export class DockerHost {
|
||||
DataPathPort: 4789,
|
||||
DefaultAddrPool: ['10.10.0.0/8', '20.20.0.0/8'],
|
||||
SubnetSize: 24,
|
||||
ForceNewCluster: false
|
||||
ForceNewCluster: false,
|
||||
});
|
||||
if (response.statusCode === 200) {
|
||||
logger.log('info', 'created Swam succesfully');
|
||||
@ -155,10 +155,10 @@ export class DockerHost {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Registry-Auth': this.registryToken,
|
||||
Host: 'docker.sock'
|
||||
Host: 'docker.sock',
|
||||
},
|
||||
requestBody: dataArg,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
});
|
||||
if (response.statusCode !== 200) {
|
||||
console.log(response.body);
|
||||
@ -175,10 +175,10 @@ export class DockerHost {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Registry-Auth': this.registryToken,
|
||||
Host: 'docker.sock'
|
||||
Host: 'docker.sock',
|
||||
},
|
||||
requestBody: null,
|
||||
keepAlive: false
|
||||
keepAlive: false,
|
||||
},
|
||||
true
|
||||
);
|
||||
|
@ -16,7 +16,7 @@ export class DockerImage {
|
||||
|
||||
public static async findImageByName(dockerHost: DockerHost, imageNameArg: string) {
|
||||
const images = await this.getImages(dockerHost);
|
||||
const result = images.find(image => {
|
||||
const result = images.find((image) => {
|
||||
if (image.RepoTags) {
|
||||
return image.RepoTags.includes(imageNameArg);
|
||||
} else {
|
||||
@ -38,7 +38,7 @@ export class DockerImage {
|
||||
} = {
|
||||
imageUrl: creationObject.imageUrl,
|
||||
imageTag: creationObject.imageTag,
|
||||
imageOriginTag: null
|
||||
imageOriginTag: null,
|
||||
};
|
||||
if (imageUrlObject.imageUrl.includes(':')) {
|
||||
const imageUrl = imageUrlObject.imageUrl.split(':')[0];
|
||||
@ -64,10 +64,7 @@ export class DockerImage {
|
||||
)}&tag=${encodeURIComponent(imageUrlObject.imageTag)}`
|
||||
);
|
||||
if (response.statusCode < 300) {
|
||||
logger.log(
|
||||
'info',
|
||||
`Successfully pulled image ${imageUrlObject.imageUrl} from the registry`
|
||||
);
|
||||
logger.log('info', `Successfully pulled image ${imageUrlObject.imageUrl} from the registry`);
|
||||
const image = await DockerImage.findImageByName(dockerHostArg, imageUrlObject.imageOriginTag);
|
||||
return image;
|
||||
} else {
|
||||
@ -111,7 +108,7 @@ export class DockerImage {
|
||||
|
||||
constructor(dockerHostArg, dockerImageObjectArg: any) {
|
||||
this.dockerHost = dockerHostArg;
|
||||
Object.keys(dockerImageObjectArg).forEach(keyArg => {
|
||||
Object.keys(dockerImageObjectArg).forEach((keyArg) => {
|
||||
this[keyArg] = dockerImageObjectArg[keyArg];
|
||||
});
|
||||
}
|
||||
@ -129,7 +126,7 @@ export class DockerImage {
|
||||
*/
|
||||
public async pullLatestImageFromRegistry(): Promise<boolean> {
|
||||
const updatedImage = await DockerImage.createFromRegistry(this.dockerHost, {
|
||||
imageUrl: this.RepoTags[0]
|
||||
imageUrl: this.RepoTags[0],
|
||||
});
|
||||
Object.assign(this, updatedImage);
|
||||
// TODO: Compare image digists before and after
|
||||
|
@ -19,7 +19,7 @@ export class DockerNetwork {
|
||||
|
||||
public static async getNetworkByName(dockerHost: DockerHost, dockerNetworkNameArg: string) {
|
||||
const networks = await DockerNetwork.getNetworks(dockerHost);
|
||||
return networks.find(dockerNetwork => dockerNetwork.Name === dockerNetworkNameArg);
|
||||
return networks.find((dockerNetwork) => dockerNetwork.Name === dockerNetworkNameArg);
|
||||
}
|
||||
|
||||
public static async createNetwork(
|
||||
@ -43,16 +43,13 @@ export class DockerNetwork {
|
||||
}, */
|
||||
Internal: false,
|
||||
Attachable: true,
|
||||
Ingress: false
|
||||
Ingress: false,
|
||||
});
|
||||
if (response.statusCode < 300) {
|
||||
logger.log('info', 'Created network successfully');
|
||||
return await DockerNetwork.getNetworkByName(dockerHost, networkCreationDescriptor.Name);
|
||||
} else {
|
||||
logger.log(
|
||||
'error',
|
||||
'There has been an error creating the wanted network'
|
||||
);
|
||||
logger.log('error', 'There has been an error creating the wanted network');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -113,7 +110,7 @@ export class DockerNetwork {
|
||||
|
||||
public async getContainersOnNetworkForService(serviceArg: DockerService) {
|
||||
const containersOnNetwork = await this.getContainersOnNetwork();
|
||||
const containersOfService = containersOnNetwork.filter(container => {
|
||||
const containersOfService = containersOnNetwork.filter((container) => {
|
||||
return container.Name.startsWith(serviceArg.Spec.Name);
|
||||
});
|
||||
return containersOfService;
|
||||
|
@ -19,12 +19,12 @@ export class DockerSecret {
|
||||
|
||||
public static async getSecretByID(dockerHostArg: DockerHost, idArg: string) {
|
||||
const secrets = await this.getSecrets(dockerHostArg);
|
||||
return secrets.find(secret => secret.ID === idArg);
|
||||
return secrets.find((secret) => secret.ID === idArg);
|
||||
}
|
||||
|
||||
public static async getSecretByName(dockerHostArg: DockerHost, nameArg: string) {
|
||||
const secrets = await this.getSecrets(dockerHostArg);
|
||||
return secrets.find(secret => secret.Spec.Name === nameArg);
|
||||
return secrets.find((secret) => secret.Spec.Name === nameArg);
|
||||
}
|
||||
|
||||
public static async createSecret(
|
||||
@ -33,12 +33,12 @@ export class DockerSecret {
|
||||
) {
|
||||
const labels: interfaces.TLabels = {
|
||||
...secretDescriptor.labels,
|
||||
version: secretDescriptor.version
|
||||
version: secretDescriptor.version,
|
||||
};
|
||||
const response = await dockerHostArg.request('POST', '/secrets/create', {
|
||||
Name: secretDescriptor.name,
|
||||
Labels: labels,
|
||||
Data: plugins.smartstring.base64.encode(secretDescriptor.contentArg)
|
||||
Data: plugins.smartstring.base64.encode(secretDescriptor.contentArg),
|
||||
});
|
||||
|
||||
const newSecretInstance = new DockerSecret(dockerHostArg);
|
||||
@ -76,7 +76,7 @@ export class DockerSecret {
|
||||
{
|
||||
Name: this.Spec.Name,
|
||||
Labels: this.Spec.Labels,
|
||||
Data: plugins.smartstring.base64.encode(contentArg)
|
||||
Data: plugins.smartstring.base64.encode(contentArg),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ export class DockerService {
|
||||
networkName: string
|
||||
): Promise<DockerService> {
|
||||
const allServices = await DockerService.getServices(dockerHost);
|
||||
const wantedService = allServices.find(service => {
|
||||
const wantedService = allServices.find((service) => {
|
||||
return service.Spec.Name === networkName;
|
||||
});
|
||||
return wantedService;
|
||||
@ -38,17 +38,14 @@ export class DockerService {
|
||||
serviceCreationDescriptor: interfaces.IServiceCreationDescriptor
|
||||
): Promise<DockerService> {
|
||||
// lets get the image
|
||||
logger.log(
|
||||
'info',
|
||||
`now creating service ${serviceCreationDescriptor.name}`
|
||||
);
|
||||
logger.log('info', `now creating service ${serviceCreationDescriptor.name}`);
|
||||
|
||||
// await serviceCreationDescriptor.image.pullLatestImageFromRegistry();
|
||||
const serviceVersion = await serviceCreationDescriptor.image.getVersion();
|
||||
|
||||
const labels: interfaces.TLabels = {
|
||||
...serviceCreationDescriptor.labels,
|
||||
version: serviceVersion
|
||||
version: serviceVersion,
|
||||
};
|
||||
|
||||
const mounts: Array<{
|
||||
@ -70,18 +67,18 @@ export class DockerService {
|
||||
Source: '/var/run/docker.sock',
|
||||
Consistency: 'default',
|
||||
ReadOnly: false,
|
||||
Type: 'bind'
|
||||
Type: 'bind',
|
||||
});
|
||||
}
|
||||
|
||||
if (serviceCreationDescriptor.resources && serviceCreationDescriptor.resources.volumeMounts) {
|
||||
for(const volumeMount of serviceCreationDescriptor.resources.volumeMounts) {
|
||||
for (const volumeMount of serviceCreationDescriptor.resources.volumeMounts) {
|
||||
mounts.push({
|
||||
Target: volumeMount.containerFsPath,
|
||||
Source: volumeMount.hostFsPath,
|
||||
Consistency: 'default',
|
||||
ReadOnly: false,
|
||||
Type: 'bind'
|
||||
Type: 'bind',
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -94,7 +91,7 @@ export class DockerService {
|
||||
for (const network of serviceCreationDescriptor.networks) {
|
||||
networkArray.push({
|
||||
Target: network.Name,
|
||||
Aliases: [serviceCreationDescriptor.networkAlias]
|
||||
Aliases: [serviceCreationDescriptor.networkAlias],
|
||||
});
|
||||
}
|
||||
|
||||
@ -106,7 +103,7 @@ export class DockerService {
|
||||
ports.push({
|
||||
Protocol: 'tcp',
|
||||
PublishedPort: parseInt(hostPort, 10),
|
||||
TargetPort: parseInt(containerPort, 10)
|
||||
TargetPort: parseInt(containerPort, 10),
|
||||
});
|
||||
}
|
||||
|
||||
@ -118,10 +115,10 @@ export class DockerService {
|
||||
Name: 'secret.json', // TODO: make sure that works with multiple secrets
|
||||
UID: '33',
|
||||
GID: '33',
|
||||
Mode: 384
|
||||
Mode: 384,
|
||||
},
|
||||
SecretID: secret.ID,
|
||||
SecretName: secret.Spec.Name
|
||||
SecretName: secret.Spec.Name,
|
||||
});
|
||||
}
|
||||
|
||||
@ -133,7 +130,7 @@ export class DockerService {
|
||||
: 1000;
|
||||
|
||||
const limits = {
|
||||
MemoryBytes: memoryLimitMB * 1000000
|
||||
MemoryBytes: memoryLimitMB * 1000000,
|
||||
};
|
||||
|
||||
if (serviceCreationDescriptor.resources) {
|
||||
@ -147,7 +144,7 @@ export class DockerService {
|
||||
Image: serviceCreationDescriptor.image.RepoTags[0],
|
||||
Labels: labels,
|
||||
Secrets: secretArray,
|
||||
Mounts: mounts
|
||||
Mounts: mounts,
|
||||
/* DNSConfig: {
|
||||
Nameservers: ['1.1.1.1']
|
||||
} */
|
||||
@ -157,25 +154,25 @@ export class DockerService {
|
||||
Delay: 0,
|
||||
FailureAction: 'pause',
|
||||
Monitor: 15000000000,
|
||||
MaxFailureRatio: 0.15
|
||||
MaxFailureRatio: 0.15,
|
||||
},
|
||||
ForceUpdate: 1,
|
||||
Resources: {
|
||||
Limits: limits
|
||||
Limits: limits,
|
||||
},
|
||||
LogDriver: {
|
||||
Name: 'json-file',
|
||||
Options: {
|
||||
'max-file': '3',
|
||||
'max-size': '10M'
|
||||
}
|
||||
}
|
||||
'max-size': '10M',
|
||||
},
|
||||
},
|
||||
},
|
||||
Labels: labels,
|
||||
Networks: networkArray,
|
||||
EndpointSpec: {
|
||||
Ports: ports
|
||||
}
|
||||
Ports: ports,
|
||||
},
|
||||
});
|
||||
|
||||
const createdService = await DockerService.getServiceByName(
|
||||
@ -235,7 +232,7 @@ export class DockerService {
|
||||
|
||||
await this.reReadFromDockerEngine();
|
||||
const dockerImage = await DockerImage.createFromRegistry(this.dockerHostRef, {
|
||||
imageUrl: this.Spec.TaskTemplate.ContainerSpec.Image
|
||||
imageUrl: this.Spec.TaskTemplate.ContainerSpec.Image,
|
||||
});
|
||||
|
||||
const imageVersion = new plugins.smartversion.SmartVersion(dockerImage.Labels.version);
|
||||
|
@ -25,15 +25,13 @@ export {
|
||||
smartpromise,
|
||||
smartrequest,
|
||||
smartstring,
|
||||
smartversion
|
||||
smartversion,
|
||||
};
|
||||
|
||||
// @tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
};
|
||||
export { tsclass };
|
||||
|
||||
// third party
|
||||
import * as rxjs from 'rxjs';
|
||||
|
@ -16,6 +16,6 @@ export interface IServiceCreationDescriptor {
|
||||
accessHostDockerSock?: boolean;
|
||||
resources?: {
|
||||
memorySizeMB?: number;
|
||||
volumeMounts?: plugins.tsclass.container.IVolumeMount[]
|
||||
volumeMounts?: plugins.tsclass.container.IVolumeMount[];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user