Compare commits

...

6 Commits

Author SHA1 Message Date
a08c11838f 1.2.2 2024-06-10 00:15:10 +02:00
7c5225125c fix(core): update 2024-06-10 00:15:10 +02:00
bc4778f7db 1.2.1 2024-06-10 00:15:02 +02:00
2e7e8ae5cf fix(core): update 2024-06-10 00:15:01 +02:00
054585c7f5 1.2.0 2024-06-08 15:03:20 +02:00
c0cebbe614 feat(imagestore): now processing images with extraction, retagging, repackaging and long term storage 2024-06-08 15:03:19 +02:00
14 changed files with 336 additions and 112 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@apiclient.xyz/docker", "name": "@apiclient.xyz/docker",
"version": "1.1.4", "version": "1.2.2",
"description": "Provides easy communication with Docker remote API from Node.js, with TypeScript support.", "description": "Provides easy communication with Docker remote API from Node.js, with TypeScript support.",
"private": false, "private": false,
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -34,27 +34,29 @@
"homepage": "https://gitlab.com/mojoio/docker#readme", "homepage": "https://gitlab.com/mojoio/docker#readme",
"dependencies": { "dependencies": {
"@push.rocks/lik": "^6.0.15", "@push.rocks/lik": "^6.0.15",
"@push.rocks/smartarchive": "^4.0.22", "@push.rocks/smartarchive": "^4.0.37",
"@push.rocks/smartbucket": "^3.0.10", "@push.rocks/smartbucket": "^3.0.13",
"@push.rocks/smartfile": "^11.0.16", "@push.rocks/smartfile": "^11.0.20",
"@push.rocks/smartjson": "^5.0.20", "@push.rocks/smartjson": "^5.0.20",
"@push.rocks/smartlog": "^3.0.6", "@push.rocks/smartlog": "^3.0.7",
"@push.rocks/smartnetwork": "^3.0.0", "@push.rocks/smartnetwork": "^3.0.0",
"@push.rocks/smartpath": "^5.0.18", "@push.rocks/smartpath": "^5.0.18",
"@push.rocks/smartpromise": "^4.0.3", "@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartrequest": "^2.0.22", "@push.rocks/smartrequest": "^2.0.22",
"@push.rocks/smartstream": "^3.0.44", "@push.rocks/smartstream": "^3.0.44",
"@push.rocks/smartstring": "^4.0.15", "@push.rocks/smartstring": "^4.0.15",
"@push.rocks/smartunique": "^3.0.9",
"@push.rocks/smartversion": "^3.0.5", "@push.rocks/smartversion": "^3.0.5",
"@tsclass/tsclass": "^4.0.54", "@tsclass/tsclass": "^4.0.55",
"rxjs": "^7.5.7" "rxjs": "^7.5.7"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.1.80", "@git.zone/tsbuild": "^2.1.80",
"@git.zone/tsrun": "^1.2.12", "@git.zone/tsrun": "^1.2.12",
"@git.zone/tstest": "^1.0.90", "@git.zone/tstest": "^1.0.90",
"@push.rocks/qenv": "^6.0.5",
"@push.rocks/tapbundle": "^5.0.23", "@push.rocks/tapbundle": "^5.0.23",
"@types/node": "20.14.1" "@types/node": "20.14.2"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

217
pnpm-lock.yaml generated
View File

@ -12,20 +12,20 @@ importers:
specifier: ^6.0.15 specifier: ^6.0.15
version: 6.0.15 version: 6.0.15
'@push.rocks/smartarchive': '@push.rocks/smartarchive':
specifier: ^4.0.22 specifier: ^4.0.37
version: 4.0.22 version: 4.0.37
'@push.rocks/smartbucket': '@push.rocks/smartbucket':
specifier: ^3.0.10 specifier: ^3.0.13
version: 3.0.10 version: 3.0.13
'@push.rocks/smartfile': '@push.rocks/smartfile':
specifier: ^11.0.16 specifier: ^11.0.20
version: 11.0.16 version: 11.0.20
'@push.rocks/smartjson': '@push.rocks/smartjson':
specifier: ^5.0.20 specifier: ^5.0.20
version: 5.0.20 version: 5.0.20
'@push.rocks/smartlog': '@push.rocks/smartlog':
specifier: ^3.0.6 specifier: ^3.0.7
version: 3.0.6 version: 3.0.7
'@push.rocks/smartnetwork': '@push.rocks/smartnetwork':
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.2 version: 3.0.2
@ -44,12 +44,15 @@ importers:
'@push.rocks/smartstring': '@push.rocks/smartstring':
specifier: ^4.0.15 specifier: ^4.0.15
version: 4.0.15 version: 4.0.15
'@push.rocks/smartunique':
specifier: ^3.0.9
version: 3.0.9
'@push.rocks/smartversion': '@push.rocks/smartversion':
specifier: ^3.0.5 specifier: ^3.0.5
version: 3.0.5 version: 3.0.5
'@tsclass/tsclass': '@tsclass/tsclass':
specifier: ^4.0.54 specifier: ^4.0.55
version: 4.0.54 version: 4.0.55
rxjs: rxjs:
specifier: ^7.5.7 specifier: ^7.5.7
version: 7.8.1 version: 7.8.1
@ -59,19 +62,25 @@ importers:
version: 2.1.80 version: 2.1.80
'@git.zone/tsrun': '@git.zone/tsrun':
specifier: ^1.2.12 specifier: ^1.2.12
version: 1.2.46(@types/node@20.14.1) version: 1.2.46(@types/node@20.14.2)
'@git.zone/tstest': '@git.zone/tstest':
specifier: ^1.0.90 specifier: ^1.0.90
version: 1.0.90(@types/node@20.14.1) version: 1.0.90(@types/node@20.14.2)
'@push.rocks/qenv':
specifier: ^6.0.5
version: 6.0.5
'@push.rocks/tapbundle': '@push.rocks/tapbundle':
specifier: ^5.0.23 specifier: ^5.0.23
version: 5.0.23 version: 5.0.23
'@types/node': '@types/node':
specifier: 20.14.1 specifier: 20.14.2
version: 20.14.1 version: 20.14.2
packages: packages:
'@api.global/typedrequest-interfaces@2.0.2':
resolution: {integrity: sha512-D+mkr4IiUZ/eUgrdp5jXjBKOW/iuMcl0z2ZLQsLLypKX/psFGD3viZJ58FNRa+/1OSM38JS5wFyoWl8oPEFLrw==}
'@api.global/typedrequest-interfaces@3.0.19': '@api.global/typedrequest-interfaces@3.0.19':
resolution: {integrity: sha512-uuHUXJeOy/inWSDrwD0Cwax2rovpxYllDhM2RWh+6mVpQuNmZ3uw6IVg6dA2G1rOe24Ebs+Y9SzEogo+jYN7vw==} resolution: {integrity: sha512-uuHUXJeOy/inWSDrwD0Cwax2rovpxYllDhM2RWh+6mVpQuNmZ3uw6IVg6dA2G1rOe24Ebs+Y9SzEogo+jYN7vw==}
@ -102,6 +111,9 @@ packages:
resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
'@configvault.io/interfaces@1.0.17':
resolution: {integrity: sha512-bEcCUR2VBDJsTin8HQh8Uw/mlYl2v8A3jMIaQ+MTB9Hrqd6CZL2dL7iJdWyFl/3EIX+LDxWFR+Oq7liIq7w+1Q==}
'@cspotcode/source-map-support@0.8.1': '@cspotcode/source-map-support@0.8.1':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'} engines: {node: '>=12'}
@ -338,14 +350,17 @@ packages:
'@push.rocks/lik@6.0.15': '@push.rocks/lik@6.0.15':
resolution: {integrity: sha512-rZxln6l4NAU931MTxnsjy1pue+S3AXtDCidHH/tbkqBtrWIzWuXduo6Nz3zYkndbD64Knyta7F60JRvcOe4XqA==} resolution: {integrity: sha512-rZxln6l4NAU931MTxnsjy1pue+S3AXtDCidHH/tbkqBtrWIzWuXduo6Nz3zYkndbD64Knyta7F60JRvcOe4XqA==}
'@push.rocks/smartarchive@4.0.22': '@push.rocks/qenv@6.0.5':
resolution: {integrity: sha512-8bj+J962edFUgdNh/951gkOD3gjQHgbwvMFxePWbJm5hXM9MOH7VgWA8XeNBUMnHrEHAlx/D5VYe1qulxF8lEA==} resolution: {integrity: sha512-Id/eSKKqSDUGe+0Cp5HEJ58J1iVv1jQseLUMs9kFTPYwG+NJSETUCRsJV50w5cPv8bRFcSkSU+xVbUbOc1p29A==}
'@push.rocks/smartarchive@4.0.37':
resolution: {integrity: sha512-pqAEZZY5uoZV9g1/8dPys4vQTCtSpOBf46+NcR1F+/RJCtqhg+emLeFXJDO+mBU/u8+upEfbQDACp5p/GvW1PA==}
'@push.rocks/smartbrowser@2.0.6': '@push.rocks/smartbrowser@2.0.6':
resolution: {integrity: sha512-Ne+KCVhV/DROc1rHRRw59K6h0+LpQAK9fdOUtgDZ7laLPmB/tmnbUh3IuRDNcIY1iVA9pydoobwjnTjVgio9eQ==} resolution: {integrity: sha512-Ne+KCVhV/DROc1rHRRw59K6h0+LpQAK9fdOUtgDZ7laLPmB/tmnbUh3IuRDNcIY1iVA9pydoobwjnTjVgio9eQ==}
'@push.rocks/smartbucket@3.0.10': '@push.rocks/smartbucket@3.0.13':
resolution: {integrity: sha512-KzEDWtrZbs5gD042LGa61jtIgOz6+MmQIIccPO0d2YQRNpgrO+CAAKyhOHgvWaPPTlaj72XGM8pBhn/2hCdSUA==} resolution: {integrity: sha512-pw0l6ymgXMx/xxRxSd2Ha3M+vtgU/vh0BiD+blGBgiNLzysqKItuecES/oCdElfdpVkeTN++XfGJ1FunyLAq9A==}
'@push.rocks/smartbuffer@3.0.4': '@push.rocks/smartbuffer@3.0.4':
resolution: {integrity: sha512-TLfhx/JD61YC8XGO9TI6Ux6US38R14HaIM84QT8hZZod8axfXrg+h8xA8tMUBpSV8PXsQy9LzxmOq0Il1fmDXw==} resolution: {integrity: sha512-TLfhx/JD61YC8XGO9TI6Ux6US38R14HaIM84QT8hZZod8axfXrg+h8xA8tMUBpSV8PXsQy9LzxmOq0Il1fmDXw==}
@ -383,8 +398,8 @@ packages:
'@push.rocks/smartfile@10.0.41': '@push.rocks/smartfile@10.0.41':
resolution: {integrity: sha512-xOOy0duI34M2qrJZggpk51EHGXmg9+mBL1Q55tNiQKXzfx89P3coY1EAZG8tvmep3qB712QEKe7T+u04t42Kjg==} resolution: {integrity: sha512-xOOy0duI34M2qrJZggpk51EHGXmg9+mBL1Q55tNiQKXzfx89P3coY1EAZG8tvmep3qB712QEKe7T+u04t42Kjg==}
'@push.rocks/smartfile@11.0.16': '@push.rocks/smartfile@11.0.20':
resolution: {integrity: sha512-tl0IJj1mWqNUkqZLjlFKR0OEixhX8cafws7WcxuhNZymkK9axo03O9DiFbUZb4XUbcfYaYNWGTqHUyppWpwRHQ==} resolution: {integrity: sha512-gJERlNE2fNah9HLq6W3srcl1GZwlz2vFVZRmb50TQLabmWF4qyTlaMYAwY8ffgf8np4TsHAa4s+kL5F0zUfUUg==}
'@push.rocks/smarthash@3.0.4': '@push.rocks/smarthash@3.0.4':
resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==} resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==}
@ -401,8 +416,11 @@ packages:
'@push.rocks/smartlog-interfaces@3.0.0': '@push.rocks/smartlog-interfaces@3.0.0':
resolution: {integrity: sha512-dfRqiSolGQwaF9gWmkixWOoXZxcWBjK3u6A1CpcfhCbVr2VSUMIrZ5t74/DgdfedsTrhDqoD0NGezsMXF2pFHQ==} resolution: {integrity: sha512-dfRqiSolGQwaF9gWmkixWOoXZxcWBjK3u6A1CpcfhCbVr2VSUMIrZ5t74/DgdfedsTrhDqoD0NGezsMXF2pFHQ==}
'@push.rocks/smartlog@3.0.6': '@push.rocks/smartlog-interfaces@3.0.2':
resolution: {integrity: sha512-HvZtgur6PY+n6skw5Jx+KWwHciCiWNm+WNLkqRreuLXJrWKknwYvy/Ea+f61RqJBHEkOYTYxRoddBuC+6HAoWw==} resolution: {integrity: sha512-8hGRTJehbsFSJxLhCQkA018mZtXVPxPTblbg9VaE/EqISRzUw+eosJ2EJV7M4Qu0eiTJZjnWnNLn8CkD77ziWw==}
'@push.rocks/smartlog@3.0.7':
resolution: {integrity: sha512-WHOw0iHHjCEbYY4KGX40iFtLI11QJvvWIbC9yFn3Mt+nrdupMnry7Ztc5v/PqO8lu33Q6xDBMXiNQ9yNY0HVGw==}
'@push.rocks/smartmanifest@2.0.2': '@push.rocks/smartmanifest@2.0.2':
resolution: {integrity: sha512-QGc5C9vunjfUbYsPGz5bynV/mVmPHkrQDkWp8ZO8VJtK1GZe+njgbrNyxn2SUHR0IhSAbSXl1j4JvBqYf5eTVg==} resolution: {integrity: sha512-QGc5C9vunjfUbYsPGz5bynV/mVmPHkrQDkWp8ZO8VJtK1GZe+njgbrNyxn2SUHR0IhSAbSXl1j4JvBqYf5eTVg==}
@ -606,8 +624,8 @@ packages:
'@tsclass/tsclass@3.0.48': '@tsclass/tsclass@3.0.48':
resolution: {integrity: sha512-hC65UvDlp9qvsl6OcIZXz0JNiWZ0gyzsTzbXpg215sGxopgbkOLCr6E0s4qCTnweYm95gt2AdY95uP7M7kExaQ==} resolution: {integrity: sha512-hC65UvDlp9qvsl6OcIZXz0JNiWZ0gyzsTzbXpg215sGxopgbkOLCr6E0s4qCTnweYm95gt2AdY95uP7M7kExaQ==}
'@tsclass/tsclass@4.0.54': '@tsclass/tsclass@4.0.55':
resolution: {integrity: sha512-v+Xc7M0BKNT79/kx7S5Jsc17zj+acUuMDxJtKbQgdU4H8ke3aHAHJr2KicXJeXDTcn41ZEbwJPQ1cc+bjy8bZw==} resolution: {integrity: sha512-zg774JF90/3/rJ7xk4LyGgxcUzxdKIQcwtBVxez4LhvegESxvHiFmX42WL105iBpE53ISJ8sctLWlwG1JQZdlA==}
'@tsconfig/node10@1.0.11': '@tsconfig/node10@1.0.11':
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
@ -735,8 +753,8 @@ packages:
'@types/minimatch@5.1.2': '@types/minimatch@5.1.2':
resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==}
'@types/node@20.14.1': '@types/node@20.14.2':
resolution: {integrity: sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA==} resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==}
'@types/parse5@6.0.3': '@types/parse5@6.0.3':
resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==}
@ -1355,6 +1373,10 @@ packages:
resolution: {integrity: sha512-M2SovcRxD4+vC493Uc2GZVcZaj66CCJhWurC4viynVSTvrpErCShNcDz1lAho6n9REQKvL/ll4A4/fw6Y9z8nw==} resolution: {integrity: sha512-M2SovcRxD4+vC493Uc2GZVcZaj66CCJhWurC4viynVSTvrpErCShNcDz1lAho6n9REQKvL/ll4A4/fw6Y9z8nw==}
hasBin: true hasBin: true
fast-xml-parser@4.4.0:
resolution: {integrity: sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==}
hasBin: true
fastq@1.17.1: fastq@1.17.1:
resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==}
@ -1708,8 +1730,8 @@ packages:
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
engines: {node: '>=14'} engines: {node: '>=14'}
jackspeak@3.2.3: jackspeak@3.4.0:
resolution: {integrity: sha512-htOzIMPbpLid/Gq9/zaz9SfExABxqRe1sSCdxntlO/aMD6u0issZQiY25n2GKQUtJ02j7z5sfptlAOMpWWOmvw==} resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==}
engines: {node: '>=14'} engines: {node: '>=14'}
js-base64@3.7.7: js-base64@3.7.7:
@ -2508,8 +2530,8 @@ packages:
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
engines: {node: '>=12.20'} engines: {node: '>=12.20'}
type-fest@4.18.2: type-fest@4.20.0:
resolution: {integrity: sha512-+suCYpfJLAe4OXS6+PPXjW3urOS4IoP9waSiLuXfLgqZODKw/aWwASvzqE886wA0kQgGy0mIWyhd87VpqIy6Xg==} resolution: {integrity: sha512-MBh+PHUHHisjXf4tlx0CFWoMdjx8zCMLJHOjnV1prABYZFHqtFOyauCIK2/7w4oIfwkF8iNhLtnJEfVY2vn3iw==}
engines: {node: '>=16'} engines: {node: '>=16'}
type-is@1.6.18: type-is@1.6.18:
@ -2707,6 +2729,8 @@ packages:
snapshots: snapshots:
'@api.global/typedrequest-interfaces@2.0.2': {}
'@api.global/typedrequest-interfaces@3.0.19': {} '@api.global/typedrequest-interfaces@3.0.19': {}
'@api.global/typedrequest@3.0.23': '@api.global/typedrequest@3.0.23':
@ -2730,9 +2754,9 @@ snapshots:
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartenv': 5.0.12 '@push.rocks/smartenv': 5.0.12
'@push.rocks/smartfeed': 1.0.11 '@push.rocks/smartfeed': 1.0.11
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartjson': 5.0.20 '@push.rocks/smartjson': 5.0.20
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartlog-destination-devtools': 1.0.10 '@push.rocks/smartlog-destination-devtools': 1.0.10
'@push.rocks/smartmanifest': 2.0.2 '@push.rocks/smartmanifest': 2.0.2
'@push.rocks/smartmime': 1.0.6 '@push.rocks/smartmime': 1.0.6
@ -2745,7 +2769,7 @@ snapshots:
'@push.rocks/smartstream': 3.0.44 '@push.rocks/smartstream': 3.0.44
'@push.rocks/smarttime': 4.0.6 '@push.rocks/smarttime': 4.0.6
'@push.rocks/webstore': 2.0.14 '@push.rocks/webstore': 2.0.14
'@tsclass/tsclass': 4.0.54 '@tsclass/tsclass': 4.0.55
'@types/express': 4.17.21 '@types/express': 4.17.21
body-parser: 1.20.2 body-parser: 1.20.2
cors: 2.8.5 cors: 2.8.5
@ -2790,6 +2814,10 @@ snapshots:
js-tokens: 4.0.0 js-tokens: 4.0.0
picocolors: 1.0.0 picocolors: 1.0.0
'@configvault.io/interfaces@1.0.17':
dependencies:
'@api.global/typedrequest-interfaces': 3.0.19
'@cspotcode/source-map-support@0.8.1': '@cspotcode/source-map-support@0.8.1':
dependencies: dependencies:
'@jridgewell/trace-mapping': 0.3.9 '@jridgewell/trace-mapping': 0.3.9
@ -2872,8 +2900,8 @@ snapshots:
'@push.rocks/early': 4.0.4 '@push.rocks/early': 4.0.4
'@push.rocks/smartcli': 4.0.11 '@push.rocks/smartcli': 4.0.11
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpath': 5.0.18 '@push.rocks/smartpath': 5.0.18
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
typescript: 5.4.5 typescript: 5.4.5
@ -2883,8 +2911,8 @@ snapshots:
'@push.rocks/early': 4.0.4 '@push.rocks/early': 4.0.4
'@push.rocks/smartcli': 4.0.10 '@push.rocks/smartcli': 4.0.10
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartlog-destination-local': 9.0.2 '@push.rocks/smartlog-destination-local': 9.0.2
'@push.rocks/smartpath': 5.0.18 '@push.rocks/smartpath': 5.0.18
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
@ -2896,27 +2924,27 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@git.zone/tsrun@1.2.46(@types/node@20.14.1)': '@git.zone/tsrun@1.2.46(@types/node@20.14.2)':
dependencies: dependencies:
'@push.rocks/smartfile': 10.0.41 '@push.rocks/smartfile': 10.0.41
'@push.rocks/smartshell': 3.0.5 '@push.rocks/smartshell': 3.0.5
ts-node: 10.9.2(@types/node@20.14.1)(typescript@5.1.6) ts-node: 10.9.2(@types/node@20.14.2)(typescript@5.1.6)
typescript: 5.1.6 typescript: 5.1.6
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/core' - '@swc/core'
- '@swc/wasm' - '@swc/wasm'
- '@types/node' - '@types/node'
'@git.zone/tstest@1.0.90(@types/node@20.14.1)': '@git.zone/tstest@1.0.90(@types/node@20.14.2)':
dependencies: dependencies:
'@api.global/typedserver': 3.0.29 '@api.global/typedserver': 3.0.29
'@git.zone/tsbundle': 2.0.15 '@git.zone/tsbundle': 2.0.15
'@git.zone/tsrun': 1.2.46(@types/node@20.14.1) '@git.zone/tsrun': 1.2.46(@types/node@20.14.2)
'@push.rocks/consolecolor': 2.0.2 '@push.rocks/consolecolor': 2.0.2
'@push.rocks/smartbrowser': 2.0.6 '@push.rocks/smartbrowser': 2.0.6
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartshell': 3.0.5 '@push.rocks/smartshell': 3.0.5
'@push.rocks/tapbundle': 5.0.23 '@push.rocks/tapbundle': 5.0.23
@ -3043,10 +3071,18 @@ snapshots:
'@types/symbol-tree': 3.2.5 '@types/symbol-tree': 3.2.5
symbol-tree: 3.2.4 symbol-tree: 3.2.4
'@push.rocks/smartarchive@4.0.22': '@push.rocks/qenv@6.0.5':
dependencies:
'@api.global/typedrequest': 3.0.23
'@configvault.io/interfaces': 1.0.17
'@push.rocks/smartfile': 11.0.20
'@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpath': 5.0.18
'@push.rocks/smartarchive@4.0.37':
dependencies: dependencies:
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartpath': 5.0.18 '@push.rocks/smartpath': 5.0.18
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrequest': 2.0.22 '@push.rocks/smartrequest': 2.0.22
@ -3072,7 +3108,7 @@ snapshots:
- supports-color - supports-color
- utf-8-validate - utf-8-validate
'@push.rocks/smartbucket@3.0.10': '@push.rocks/smartbucket@3.0.13':
dependencies: dependencies:
'@push.rocks/smartmime': 2.0.2 '@push.rocks/smartmime': 2.0.2
'@push.rocks/smartpath': 5.0.18 '@push.rocks/smartpath': 5.0.18
@ -3080,7 +3116,7 @@ snapshots:
'@push.rocks/smartrx': 3.0.7 '@push.rocks/smartrx': 3.0.7
'@push.rocks/smartstream': 3.0.44 '@push.rocks/smartstream': 3.0.44
'@push.rocks/smartunique': 3.0.9 '@push.rocks/smartunique': 3.0.9
'@tsclass/tsclass': 4.0.54 '@tsclass/tsclass': 4.0.55
minio: 8.0.0 minio: 8.0.0
'@push.rocks/smartbuffer@3.0.4': '@push.rocks/smartbuffer@3.0.4':
@ -3105,7 +3141,7 @@ snapshots:
'@push.rocks/smartcli@4.0.10': '@push.rocks/smartcli@4.0.10':
dependencies: dependencies:
'@push.rocks/lik': 6.0.15 '@push.rocks/lik': 6.0.15
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartparam': 1.1.10 '@push.rocks/smartparam': 1.1.10
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7 '@push.rocks/smartrx': 3.0.7
@ -3114,7 +3150,7 @@ snapshots:
'@push.rocks/smartcli@4.0.11': '@push.rocks/smartcli@4.0.11':
dependencies: dependencies:
'@push.rocks/lik': 6.0.15 '@push.rocks/lik': 6.0.15
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartobject': 1.0.12 '@push.rocks/smartobject': 1.0.12
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7 '@push.rocks/smartrx': 3.0.7
@ -3168,7 +3204,7 @@ snapshots:
glob: 10.3.12 glob: 10.3.12
js-yaml: 4.1.0 js-yaml: 4.1.0
'@push.rocks/smartfile@11.0.16': '@push.rocks/smartfile@11.0.20':
dependencies: dependencies:
'@push.rocks/lik': 6.0.15 '@push.rocks/lik': 6.0.15
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
@ -3215,10 +3251,15 @@ snapshots:
dependencies: dependencies:
'@apiglobal/typedrequest-interfaces': 2.0.1 '@apiglobal/typedrequest-interfaces': 2.0.1
'@push.rocks/smartlog@3.0.6': '@push.rocks/smartlog-interfaces@3.0.2':
dependencies:
'@api.global/typedrequest-interfaces': 2.0.2
'@tsclass/tsclass': 4.0.55
'@push.rocks/smartlog@3.0.7':
dependencies: dependencies:
'@push.rocks/isounique': 1.0.5 '@push.rocks/isounique': 1.0.5
'@push.rocks/smartlog-interfaces': 3.0.0 '@push.rocks/smartlog-interfaces': 3.0.2
'@push.rocks/smartmanifest@2.0.2': {} '@push.rocks/smartmanifest@2.0.2': {}
@ -3267,13 +3308,13 @@ snapshots:
dependencies: dependencies:
'@push.rocks/smartbuffer': 3.0.4 '@push.rocks/smartbuffer': 3.0.4
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile': 11.0.16 '@push.rocks/smartfile': 11.0.20
'@push.rocks/smartnetwork': 3.0.2 '@push.rocks/smartnetwork': 3.0.2
'@push.rocks/smartpath': 5.0.18 '@push.rocks/smartpath': 5.0.18
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartpuppeteer': 2.0.2 '@push.rocks/smartpuppeteer': 2.0.2
'@push.rocks/smartunique': 3.0.9 '@push.rocks/smartunique': 3.0.9
'@tsclass/tsclass': 4.0.54 '@tsclass/tsclass': 4.0.55
'@types/express': 4.17.21 '@types/express': 4.17.21
express: 4.19.2 express: 4.19.2
pdf-lib: 1.17.1 pdf-lib: 1.17.1
@ -3327,7 +3368,7 @@ snapshots:
'@push.rocks/smartxml': 1.0.8 '@push.rocks/smartxml': 1.0.8
'@push.rocks/smartyaml': 2.0.5 '@push.rocks/smartyaml': 2.0.5
'@push.rocks/webrequest': 3.0.37 '@push.rocks/webrequest': 3.0.37
'@tsclass/tsclass': 4.0.54 '@tsclass/tsclass': 4.0.55
'@push.rocks/smartsocket@2.0.27': '@push.rocks/smartsocket@2.0.27':
dependencies: dependencies:
@ -3339,7 +3380,7 @@ snapshots:
'@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartenv': 5.0.12 '@push.rocks/smartenv': 5.0.12
'@push.rocks/smartjson': 5.0.20 '@push.rocks/smartjson': 5.0.20
'@push.rocks/smartlog': 3.0.6 '@push.rocks/smartlog': 3.0.7
'@push.rocks/smartpromise': 4.0.3 '@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.7 '@push.rocks/smartrx': 3.0.7
'@push.rocks/smarttime': 4.0.6 '@push.rocks/smarttime': 4.0.6
@ -3614,9 +3655,9 @@ snapshots:
dependencies: dependencies:
type-fest: 2.19.0 type-fest: 2.19.0
'@tsclass/tsclass@4.0.54': '@tsclass/tsclass@4.0.55':
dependencies: dependencies:
type-fest: 4.18.2 type-fest: 4.20.0
'@tsconfig/node10@1.0.11': {} '@tsconfig/node10@1.0.11': {}
@ -3628,14 +3669,14 @@ snapshots:
'@types/accepts@1.3.7': '@types/accepts@1.3.7':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/babel__code-frame@7.0.6': {} '@types/babel__code-frame@7.0.6': {}
'@types/body-parser@1.19.5': '@types/body-parser@1.19.5':
dependencies: dependencies:
'@types/connect': 3.4.38 '@types/connect': 3.4.38
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/buffer-json@2.0.3': {} '@types/buffer-json@2.0.3': {}
@ -3647,17 +3688,17 @@ snapshots:
'@types/clean-css@4.2.11': '@types/clean-css@4.2.11':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
source-map: 0.6.1 source-map: 0.6.1
'@types/co-body@6.1.3': '@types/co-body@6.1.3':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/qs': 6.9.15 '@types/qs': 6.9.15
'@types/connect@3.4.38': '@types/connect@3.4.38':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/content-disposition@0.5.8': {} '@types/content-disposition@0.5.8': {}
@ -3670,11 +3711,11 @@ snapshots:
'@types/connect': 3.4.38 '@types/connect': 3.4.38
'@types/express': 4.17.21 '@types/express': 4.17.21
'@types/keygrip': 1.0.6 '@types/keygrip': 1.0.6
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/cors@2.8.17': '@types/cors@2.8.17':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/debounce@1.2.4': {} '@types/debounce@1.2.4': {}
@ -3682,7 +3723,7 @@ snapshots:
'@types/express-serve-static-core@4.19.0': '@types/express-serve-static-core@4.19.0':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/qs': 6.9.15 '@types/qs': 6.9.15
'@types/range-parser': 1.2.7 '@types/range-parser': 1.2.7
'@types/send': 0.17.4 '@types/send': 0.17.4
@ -3696,17 +3737,17 @@ snapshots:
'@types/from2@2.3.5': '@types/from2@2.3.5':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/fs-extra@11.0.4': '@types/fs-extra@11.0.4':
dependencies: dependencies:
'@types/jsonfile': 6.1.4 '@types/jsonfile': 6.1.4
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/glob@8.1.0': '@types/glob@8.1.0':
dependencies: dependencies:
'@types/minimatch': 5.1.2 '@types/minimatch': 5.1.2
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/html-minifier@4.0.5': '@types/html-minifier@4.0.5':
dependencies: dependencies:
@ -3736,7 +3777,7 @@ snapshots:
'@types/jsonfile@6.1.4': '@types/jsonfile@6.1.4':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/keygrip@1.0.6': {} '@types/keygrip@1.0.6': {}
@ -3753,7 +3794,7 @@ snapshots:
'@types/http-errors': 2.0.4 '@types/http-errors': 2.0.4
'@types/keygrip': 1.0.6 '@types/keygrip': 1.0.6
'@types/koa-compose': 3.2.8 '@types/koa-compose': 3.2.8
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/mime-types@2.1.4': {} '@types/mime-types@2.1.4': {}
@ -3763,7 +3804,7 @@ snapshots:
'@types/minimatch@5.1.2': {} '@types/minimatch@5.1.2': {}
'@types/node@20.14.1': '@types/node@20.14.2':
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
@ -3784,12 +3825,12 @@ snapshots:
'@types/send@0.17.4': '@types/send@0.17.4':
dependencies: dependencies:
'@types/mime': 1.3.5 '@types/mime': 1.3.5
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/serve-static@1.15.7': '@types/serve-static@1.15.7':
dependencies: dependencies:
'@types/http-errors': 2.0.4 '@types/http-errors': 2.0.4
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/send': 0.17.4 '@types/send': 0.17.4
'@types/sinon-chai@3.2.12': '@types/sinon-chai@3.2.12':
@ -3807,11 +3848,11 @@ snapshots:
'@types/tar-stream@3.1.3': '@types/tar-stream@3.1.3':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/through2@2.0.41': '@types/through2@2.0.41':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/trusted-types@2.0.7': {} '@types/trusted-types@2.0.7': {}
@ -3827,15 +3868,15 @@ snapshots:
'@types/ws@7.4.7': '@types/ws@7.4.7':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/ws@8.5.10': '@types/ws@8.5.10':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
'@types/yauzl@2.10.3': '@types/yauzl@2.10.3':
dependencies: dependencies:
'@types/node': 20.14.1 '@types/node': 20.14.2
optional: true optional: true
'@web/browser-logs@0.4.0': '@web/browser-logs@0.4.0':
@ -4323,7 +4364,7 @@ snapshots:
dependencies: dependencies:
'@types/cookie': 0.4.1 '@types/cookie': 0.4.1
'@types/cors': 2.8.17 '@types/cors': 2.8.17
'@types/node': 20.14.1 '@types/node': 20.14.2
accepts: 1.3.8 accepts: 1.3.8
base64id: 2.0.0 base64id: 2.0.0
cookie: 0.4.2 cookie: 0.4.2
@ -4460,6 +4501,10 @@ snapshots:
dependencies: dependencies:
strnum: 1.0.5 strnum: 1.0.5
fast-xml-parser@4.4.0:
dependencies:
strnum: 1.0.5
fastq@1.17.1: fastq@1.17.1:
dependencies: dependencies:
reusify: 1.0.4 reusify: 1.0.4
@ -4582,7 +4627,7 @@ snapshots:
glob@10.4.1: glob@10.4.1:
dependencies: dependencies:
foreground-child: 3.1.1 foreground-child: 3.1.1
jackspeak: 3.2.3 jackspeak: 3.4.0
minimatch: 9.0.4 minimatch: 9.0.4
minipass: 7.1.2 minipass: 7.1.2
path-scurry: 1.11.1 path-scurry: 1.11.1
@ -4828,7 +4873,7 @@ snapshots:
optionalDependencies: optionalDependencies:
'@pkgjs/parseargs': 0.11.0 '@pkgjs/parseargs': 0.11.0
jackspeak@3.2.3: jackspeak@3.4.0:
dependencies: dependencies:
'@isaacs/cliui': 8.0.2 '@isaacs/cliui': 8.0.2
optionalDependencies: optionalDependencies:
@ -5070,7 +5115,7 @@ snapshots:
browser-or-node: 2.1.1 browser-or-node: 2.1.1
buffer-crc32: 1.0.0 buffer-crc32: 1.0.0
eventemitter3: 5.0.1 eventemitter3: 5.0.1
fast-xml-parser: 4.3.6 fast-xml-parser: 4.4.0
ipaddr.js: 2.2.0 ipaddr.js: 2.2.0
lodash: 4.17.21 lodash: 4.17.21
mime-types: 2.1.35 mime-types: 2.1.35
@ -5646,14 +5691,14 @@ snapshots:
tree-kill@1.2.2: {} tree-kill@1.2.2: {}
ts-node@10.9.2(@types/node@20.14.1)(typescript@5.1.6): ts-node@10.9.2(@types/node@20.14.2)(typescript@5.1.6):
dependencies: dependencies:
'@cspotcode/source-map-support': 0.8.1 '@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.11 '@tsconfig/node10': 1.0.11
'@tsconfig/node12': 1.0.11 '@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3 '@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4 '@tsconfig/node16': 1.0.4
'@types/node': 20.14.1 '@types/node': 20.14.2
acorn: 8.11.3 acorn: 8.11.3
acorn-walk: 8.3.2 acorn-walk: 8.3.2
arg: 4.1.3 arg: 4.1.3
@ -5674,7 +5719,7 @@ snapshots:
type-fest@2.19.0: {} type-fest@2.19.0: {}
type-fest@4.18.2: {} type-fest@4.20.0: {}
type-is@1.6.18: type-is@1.6.18:
dependencies: dependencies:

6
qenv.yml Normal file
View File

@ -0,0 +1,6 @@
required:
- S3_ENDPOINT
- S3_ACCESSKEY
- S3_ACCESSSECRET
- S3_BUCKET

View File

@ -1,4 +1,7 @@
import { expect, tap } from '@push.rocks/tapbundle'; import { expect, tap } from '@push.rocks/tapbundle';
import { Qenv } from '@push.rocks/qenv';
const testQenv = new Qenv('./', './.nogit/');
import * as plugins from '../ts/plugins.js'; import * as plugins from '../ts/plugins.js';
import * as paths from '../ts/paths.js'; import * as paths from '../ts/paths.js';
@ -9,6 +12,7 @@ let testDockerHost: docker.DockerHost;
tap.test('should create a new Dockersock instance', async () => { tap.test('should create a new Dockersock instance', async () => {
testDockerHost = new docker.DockerHost({}); testDockerHost = new docker.DockerHost({});
await testDockerHost.start();
return expect(testDockerHost).toBeInstanceOf(docker.DockerHost); return expect(testDockerHost).toBeInstanceOf(docker.DockerHost);
}); });
@ -118,7 +122,7 @@ tap.test('should create a service', async () => {
await testSecret.remove(); await testSecret.remove();
}); });
tap.test('should export images', async (toolsArg) => { tap.skip.test('should export images', async (toolsArg) => {
const done = toolsArg.defer(); const done = toolsArg.defer();
const testImage = await docker.DockerImage.createFromRegistry(testDockerHost, { const testImage = await docker.DockerImage.createFromRegistry(testDockerHost, {
creationObject: { creationObject: {
@ -146,6 +150,20 @@ tap.test('should import images', async (toolsArg) => {
imageUrl: 'code.foss.global/host.today/ht-docker-node:latest', imageUrl: 'code.foss.global/host.today/ht-docker-node:latest',
} }
}) })
});
tap.test('should expose a working DockerImageStore', async () => {
// lets first add am s3 target
const s3Descriptor = {
endpoint: await testQenv.getEnvVarOnDemand('S3_ENDPOINT'),
accessKey: await testQenv.getEnvVarOnDemand('S3_ACCESSKEY'),
accessSecret: await testQenv.getEnvVarOnDemand('S3_ACCESSSECRET'),
bucketName: await testQenv.getEnvVarOnDemand('S3_BUCKET'),
};
await testDockerHost.addS3Storage(s3Descriptor);
//
await testDockerHost.imageStore.storeImage('hello', plugins.smartfile.fsStream.createReadStream(plugins.path.join(paths.nogitDir, 'testimage.tar')));
}) })
export default tap.start(); export default tap.start();

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@apiclient.xyz/docker', name: '@apiclient.xyz/docker',
version: '1.1.4', version: '1.2.2',
description: 'Provides easy communication with Docker remote API from Node.js, with TypeScript support.' description: 'Provides easy communication with Docker remote API from Node.js, with TypeScript support.'
} }

View File

@ -2,7 +2,7 @@ import * as plugins from './plugins.js';
import * as interfaces from './interfaces/index.js'; import * as interfaces from './interfaces/index.js';
import { DockerHost } from './classes.host.js'; import { DockerHost } from './classes.host.js';
import { logger } from './logging.js'; import { logger } from './logger.js';
export class DockerContainer { export class DockerContainer {
// STATIC // STATIC

View File

@ -1,10 +1,12 @@
import * as plugins from './plugins.js'; import * as plugins from './plugins.js';
import * as paths from './paths.js';
import { DockerContainer } from './classes.container.js'; import { DockerContainer } from './classes.container.js';
import { DockerNetwork } from './classes.network.js'; import { DockerNetwork } from './classes.network.js';
import { DockerService } from './classes.service.js'; import { DockerService } from './classes.service.js';
import { logger } from './logging.js'; import { logger } from './logger.js';
import path from 'path'; import path from 'path';
import type { DockerImageStore } from './classes.imagestore.js'; import { DockerImageStore } from './classes.imagestore.js';
import { DockerImage } from './classes.image.js';
export interface IAuthData { export interface IAuthData {
serveraddress: string; serveraddress: string;
@ -18,18 +20,27 @@ export interface IDockerHostConstructorOptions {
} }
export class DockerHost { export class DockerHost {
public options: IDockerHostConstructorOptions;
/** /**
* the path where the docker sock can be found * the path where the docker sock can be found
*/ */
public socketPath: string; public socketPath: string;
private registryToken: string = ''; private registryToken: string = '';
public imageStore: DockerImageStore; public imageStore: DockerImageStore;
public smartBucket: plugins.smartbucket.SmartBucket;
/** /**
* the constructor to instantiate a new docker sock instance * the constructor to instantiate a new docker sock instance
* @param pathArg * @param pathArg
*/ */
constructor(optionsArg: IDockerHostConstructorOptions) { constructor(optionsArg: IDockerHostConstructorOptions) {
this.options = {
...{
imageStoreDir: plugins.path.join(paths.nogitDir, 'temp-docker-image-store'),
},
...optionsArg,
}
let pathToUse: string; let pathToUse: string;
if (optionsArg.dockerSockPath) { if (optionsArg.dockerSockPath) {
pathToUse = optionsArg.dockerSockPath; pathToUse = optionsArg.dockerSockPath;
@ -48,6 +59,17 @@ export class DockerHost {
} }
console.log(`using docker sock at ${pathToUse}`); console.log(`using docker sock at ${pathToUse}`);
this.socketPath = pathToUse; this.socketPath = pathToUse;
this.imageStore = new DockerImageStore(this, {
bucketDir: null,
localDirPath: this.options.imageStoreDir,
})
}
public async start() {
await this.imageStore.start();
}
public async stop() {
await this.imageStore.stop();
} }
/** /**
@ -81,6 +103,9 @@ export class DockerHost {
}); });
} }
// ==============
// NETWORKS
// ==============
/** /**
* gets all networks * gets all networks
*/ */
@ -89,9 +114,23 @@ export class DockerHost {
} }
/** /**
* * create a network
*/ */
public async createNetwork(optionsArg: Parameters<typeof DockerNetwork.createNetwork>[1]) {
return await DockerNetwork.createNetwork(this, optionsArg);
}
/**
* get a network by name
*/
public async getNetworkByName(networkNameArg: string) {
return await DockerNetwork.getNetworkByName(this, networkNameArg);
}
// ==============
// CONTAINERS
// ==============
/** /**
* gets all containers * gets all containers
*/ */
@ -100,6 +139,10 @@ export class DockerHost {
return containerArray; return containerArray;
} }
// ==============
// SERVICES
// ==============
/** /**
* gets all services * gets all services
*/ */
@ -108,6 +151,24 @@ export class DockerHost {
return serviceArray; return serviceArray;
} }
// ==============
// IMAGES
// ==============
/**
* get all images
*/
public async getImages() {
return await DockerImage.getImages(this);
}
/**
* get an image by name
*/
public async getImageByName(imageNameArg: string) {
return await DockerImage.getImageByName(this, imageNameArg);
}
/** /**
* *
*/ */
@ -214,4 +275,21 @@ export class DockerHost {
console.log(response.body); console.log(response.body);
return response; return response;
} }
/**
* add s3 storage
* @param optionsArg
*/
public async addS3Storage(optionsArg: plugins.tsclass.storage.IS3Descriptor) {
this.smartBucket = new plugins.smartbucket.SmartBucket(optionsArg);
if (!optionsArg.bucketName) {
throw new Error('bucketName is required');
}
const bucket = await this.smartBucket.getBucketByName(optionsArg.bucketName);
let wantedDirectory = await bucket.getBaseDirectory();
if (optionsArg.directoryPath) {
wantedDirectory = await wantedDirectory.getSubDirectoryByName(optionsArg.directoryPath);
}
this.imageStore.options.bucketDir = wantedDirectory;
}
} }

View File

@ -1,8 +1,11 @@
import * as plugins from './plugins.js'; import * as plugins from './plugins.js';
import * as interfaces from './interfaces/index.js'; import * as interfaces from './interfaces/index.js';
import { DockerHost } from './classes.host.js'; import { DockerHost } from './classes.host.js';
import { logger } from './logging.js'; import { logger } from './logger.js';
/**
* represents a docker image on the remote docker host
*/
export class DockerImage { export class DockerImage {
// STATIC // STATIC
public static async getImages(dockerHost: DockerHost) { public static async getImages(dockerHost: DockerHost) {
@ -14,7 +17,7 @@ export class DockerImage {
return images; return images;
} }
public static async findImageByName(dockerHost: DockerHost, imageNameArg: string) { public static async getImageByName(dockerHost: DockerHost, imageNameArg: string) {
const images = await this.getImages(dockerHost); const images = await this.getImages(dockerHost);
const result = images.find((image) => { const result = images.find((image) => {
if (image.RepoTags) { if (image.RepoTags) {
@ -67,7 +70,7 @@ export class DockerImage {
); );
if (response.statusCode < 300) { 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); const image = await DockerImage.getImageByName(dockerHostArg, imageUrlObject.imageOriginTag);
return image; return image;
} else { } else {
logger.log('error', `Failed at the attempt of creating a new image`); logger.log('error', `Failed at the attempt of creating a new image`);
@ -163,7 +166,7 @@ export class DockerImage {
* exports an image to a tar ball * exports an image to a tar ball
*/ */
public async exportToTarStream(): Promise<plugins.smartstream.stream.Readable> { public async exportToTarStream(): Promise<plugins.smartstream.stream.Readable> {
console.log(`Exporting image ${this.RepoTags[0]} to tar stream.`); logger.log('info', `Exporting image ${this.RepoTags[0]} to tar stream.`);
const response = await this.dockerHost.requestStreaming('GET', `/images/${encodeURIComponent(this.RepoTags[0])}/get`); const response = await this.dockerHost.requestStreaming('GET', `/images/${encodeURIComponent(this.RepoTags[0])}/get`);
let counter = 0; let counter = 0;
const webduplexStream = new plugins.smartstream.SmartDuplex({ const webduplexStream = new plugins.smartstream.SmartDuplex({

View File

@ -1,5 +1,6 @@
import * as plugins from './plugins.js'; import * as plugins from './plugins.js';
import * as paths from './paths.js'; import * as paths from './paths.js';
import { logger } from './logger.js';
import type { DockerHost } from './classes.host.js'; import type { DockerHost } from './classes.host.js';
export interface IDockerImageStoreConstructorOptions { export interface IDockerImageStoreConstructorOptions {
@ -22,19 +23,84 @@ export class DockerImageStore {
// Method to store tar stream // Method to store tar stream
public async storeImage(imageName: string, tarStream: plugins.smartstream.stream.Readable): Promise<void> { public async storeImage(imageName: string, tarStream: plugins.smartstream.stream.Readable): Promise<void> {
const imagePath = plugins.path.join(this.options.localDirPath, `${imageName}.tar`); logger.log('info', `Storing image ${imageName}...`);
const uniqueProcessingId = plugins.smartunique.shortId();
const initialTarDownloadPath = plugins.path.join(this.options.localDirPath, `${uniqueProcessingId}.tar`);
const extractionDir = plugins.path.join(this.options.localDirPath, uniqueProcessingId);
// Create a write stream to store the tar file // Create a write stream to store the tar file
const writeStream = plugins.smartfile.fsStream.createWriteStream(imagePath); const writeStream = plugins.smartfile.fsStream.createWriteStream(initialTarDownloadPath);
return new Promise((resolve, reject) => { // lets wait for the write stream to finish
await new Promise((resolve, reject) => {
tarStream.pipe(writeStream); tarStream.pipe(writeStream);
writeStream.on('finish', resolve); writeStream.on('finish', resolve);
writeStream.on('error', reject); writeStream.on('error', reject);
}); });
logger.log('info', `Image ${imageName} stored locally for processing. Extracting...`);
// lets process the image
const tarArchive = await plugins.smartarchive.SmartArchive.fromArchiveFile(initialTarDownloadPath);
await tarArchive.exportToFs(extractionDir);
logger.log('info', `Image ${imageName} extracted.`);
await plugins.smartfile.fs.remove(initialTarDownloadPath);
logger.log('info', `deleted original tar to save space.`);
logger.log('info', `now repackaging for s3...`);
const smartfileIndexJson = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(extractionDir, 'index.json'));
const smartfileManifestJson = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(extractionDir, 'manifest.json'));
const smartfileOciLayoutJson = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(extractionDir, 'oci-layout'));
const smartfileRepositoriesJson = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(extractionDir, 'repositories'));
const indexJson = JSON.parse(smartfileIndexJson.contents.toString());
const manifestJson = JSON.parse(smartfileManifestJson.contents.toString());
const ociLayoutJson = JSON.parse(smartfileOciLayoutJson.contents.toString());
const repositoriesJson = JSON.parse(smartfileRepositoriesJson.contents.toString());
indexJson.manifests[0].annotations['io.containerd.image.name'] = imageName;
manifestJson[0].RepoTags[0] = imageName;
const repoFirstKey = Object.keys(repositoriesJson)[0];
const repoFirstValue = repositoriesJson[repoFirstKey];
repositoriesJson[imageName] = repoFirstValue;
delete repositoriesJson[repoFirstKey];
smartfileIndexJson.contents = Buffer.from(JSON.stringify(indexJson, null, 2));
smartfileManifestJson.contents = Buffer.from(JSON.stringify(manifestJson, null, 2));
smartfileOciLayoutJson.contents = Buffer.from(JSON.stringify(ociLayoutJson, null, 2));
smartfileRepositoriesJson.contents = Buffer.from(JSON.stringify(repositoriesJson, null, 2));
await Promise.all([
smartfileIndexJson.write(),
smartfileManifestJson.write(),
smartfileOciLayoutJson.write(),
smartfileRepositoriesJson.write(),
]);
logger.log('info', 'repackaging archive for s3...');
const tartools = new plugins.smartarchive.TarTools();
const newTarPack = await tartools.packDirectory(extractionDir);
const finalTarName = `${uniqueProcessingId}.processed.tar`;
const finalTarPath = plugins.path.join(this.options.localDirPath, finalTarName);
const finalWriteStream = plugins.smartfile.fsStream.createWriteStream(finalTarPath);
await new Promise((resolve, reject) => {
newTarPack.finalize();
newTarPack.pipe(finalWriteStream);
finalWriteStream.on('finish', resolve);
finalWriteStream.on('error', reject);
});
logger.log('ok', `Repackaged image ${imageName} for s3.`);
await plugins.smartfile.fs.remove(extractionDir);
const finalTarReadStream = plugins.smartfile.fsStream.createReadStream(finalTarPath);
await this.options.bucketDir.fastPutStream({
stream: finalTarReadStream,
path: `${imageName}.tar`,
});
await plugins.smartfile.fs.remove(finalTarPath);
} }
public async start() {
await plugins.smartfile.fs.ensureEmptyDir(this.options.localDirPath);
}
public async stop() {}
// Method to retrieve tar stream // Method to retrieve tar stream
public async getImage(imageName: string): Promise<plugins.smartstream.stream.Readable> { public async getImage(imageName: string): Promise<plugins.smartstream.stream.Readable> {
const imagePath = plugins.path.join(this.options.localDirPath, `${imageName}.tar`); const imagePath = plugins.path.join(this.options.localDirPath, `${imageName}.tar`);

View File

@ -3,7 +3,7 @@ import * as interfaces from './interfaces/index.js';
import { DockerHost } from './classes.host.js'; import { DockerHost } from './classes.host.js';
import { DockerService } from './classes.service.js'; import { DockerService } from './classes.service.js';
import { logger } from './logging.js'; import { logger } from './logger.js';
export class DockerNetwork { export class DockerNetwork {
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> { public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {

View File

@ -4,7 +4,7 @@ import * as interfaces from './interfaces/index.js';
import { DockerHost } from './classes.host.js'; import { DockerHost } from './classes.host.js';
import { DockerImage } from './classes.image.js'; import { DockerImage } from './classes.image.js';
import { DockerSecret } from './classes.secret.js'; import { DockerSecret } from './classes.secret.js';
import { logger } from './logging.js'; import { logger } from './logger.js';
export class DockerService { export class DockerService {
// STATIC // STATIC

5
ts/logger.ts Normal file
View File

@ -0,0 +1,5 @@
import * as plugins from './plugins.js';
import { commitinfo } from './00_commitinfo_data.js';
export const logger = plugins.smartlog.Smartlog.createForCommitinfo(commitinfo);
logger.enableConsole();

View File

@ -1,3 +0,0 @@
import * as plugins from './plugins.js';
export const logger = new plugins.smartlog.ConsoleLog();

View File

@ -5,6 +5,7 @@ export { path };
// @pushrocks scope // @pushrocks scope
import * as lik from '@push.rocks/lik'; import * as lik from '@push.rocks/lik';
import * as smartarchive from '@push.rocks/smartarchive';
import * as smartbucket from '@push.rocks/smartbucket'; import * as smartbucket from '@push.rocks/smartbucket';
import * as smartfile from '@push.rocks/smartfile'; import * as smartfile from '@push.rocks/smartfile';
import * as smartjson from '@push.rocks/smartjson'; import * as smartjson from '@push.rocks/smartjson';
@ -15,10 +16,12 @@ import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrequest from '@push.rocks/smartrequest'; import * as smartrequest from '@push.rocks/smartrequest';
import * as smartstring from '@push.rocks/smartstring'; import * as smartstring from '@push.rocks/smartstring';
import * as smartstream from '@push.rocks/smartstream'; import * as smartstream from '@push.rocks/smartstream';
import * as smartunique from '@push.rocks/smartunique';
import * as smartversion from '@push.rocks/smartversion'; import * as smartversion from '@push.rocks/smartversion';
export { export {
lik, lik,
smartarchive,
smartbucket, smartbucket,
smartfile, smartfile,
smartjson, smartjson,
@ -29,6 +32,7 @@ export {
smartrequest, smartrequest,
smartstring, smartstring,
smartstream, smartstream,
smartunique,
smartversion, smartversion,
}; };