fix(core): update
This commit is contained in:
parent
4569bffc37
commit
daa97c68d9
@ -12,40 +12,36 @@ stages:
|
|||||||
- release
|
- release
|
||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- pnpm install -g pnpm
|
||||||
|
- pnpm install -g @shipzone/npmci
|
||||||
|
- npmci npm prepare
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# security stage
|
||||||
|
# ====================
|
||||||
# ====================
|
# ====================
|
||||||
# security stage
|
# security stage
|
||||||
# ====================
|
# ====================
|
||||||
mirror:
|
|
||||||
stage: security
|
|
||||||
script:
|
|
||||||
- npmci git mirror
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
tags:
|
|
||||||
- lossless
|
|
||||||
- docker
|
|
||||||
- notpriv
|
|
||||||
|
|
||||||
auditProductionDependencies:
|
auditProductionDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command npm install --production --ignore-scripts
|
- npmci command pnpm audit --audit-level=high --prod
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
|
||||||
- npmci command npm audit --audit-level=high --only=prod --production
|
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
auditDevDependencies:
|
auditDevDependencies:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command npm config set registry https://registry.npmjs.org
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
- npmci command npm audit --audit-level=high --only=dev
|
- npmci command pnpm audit --audit-level=high --dev
|
||||||
tags:
|
tags:
|
||||||
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
@ -56,7 +52,6 @@ auditDevDependencies:
|
|||||||
testStable:
|
testStable:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@ -67,7 +62,6 @@ testStable:
|
|||||||
testBuild:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run build
|
- npmci command npm run build
|
||||||
@ -96,10 +90,9 @@ codequality:
|
|||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g tslint typescript
|
- npmci command npm install -g typescript
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
@ -119,11 +112,9 @@ trigger:
|
|||||||
pages:
|
pages:
|
||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci node install lts
|
- npmci node install stable
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
|
||||||
- npmci npm prepare
|
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command tsdoc
|
- npmci command npm run buildDocs
|
||||||
tags:
|
tags:
|
||||||
- lossless
|
- lossless
|
||||||
- docker
|
- docker
|
||||||
|
9
.snyk
9
.snyk
@ -1,9 +0,0 @@
|
|||||||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
|
||||||
version: v1.13.5
|
|
||||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
|
||||||
ignore:
|
|
||||||
SNYK-JS-HTTPSPROXYAGENT-469131:
|
|
||||||
- '@pushrocks/smartnetwork > speedtest-net > https-proxy-agent':
|
|
||||||
reason: None given
|
|
||||||
expires: '2019-11-04T13:59:28.695Z'
|
|
||||||
patch: {}
|
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "current file",
|
"command": "npm test",
|
||||||
"type": "node",
|
"name": "Run npm test",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"args": [
|
"type": "node-terminal"
|
||||||
"${relativeFile}"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "test.ts",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"args": [
|
|
||||||
"test/test.ts"
|
|
||||||
],
|
|
||||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
|
||||||
"cwd": "${workspaceRoot}",
|
|
||||||
"protocol": "inspector",
|
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "mojoio",
|
"gitscope": "mojoio",
|
||||||
"gitrepo": "docker",
|
"gitrepo": "docker",
|
||||||
"shortDescription": "unofficial docker engine api abstraction package written in TypeScript",
|
"description": "unofficial docker engine api abstraction package written in TypeScript",
|
||||||
"npmPackagename": "@mojoio/docker",
|
"npmPackagename": "@mojoio/docker",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
10587
package-lock.json
generated
10587
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@ -5,9 +5,11 @@
|
|||||||
"private": false,
|
"private": false,
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web --allowimplicitany)",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -27,27 +29,25 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^4.0.17",
|
"@pushrocks/lik": "^6.0.0",
|
||||||
"@pushrocks/smartfile": "^8.0.4",
|
"@pushrocks/smartfile": "^10.0.5",
|
||||||
"@pushrocks/smartjson": "^4.0.2",
|
"@pushrocks/smartjson": "^5.0.2",
|
||||||
"@pushrocks/smartlog": "^2.0.39",
|
"@pushrocks/smartlog": "^3.0.1",
|
||||||
"@pushrocks/smartnetwork": "^1.1.22",
|
"@pushrocks/smartnetwork": "^3.0.0",
|
||||||
"@pushrocks/smartpath": "^4.0.3",
|
"@pushrocks/smartpath": "^5.0.5",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrequest": "^1.1.51",
|
"@pushrocks/smartrequest": "^2.0.11",
|
||||||
"@pushrocks/smartstring": "^3.0.18",
|
"@pushrocks/smartstring": "^4.0.5",
|
||||||
"@pushrocks/smartversion": "^2.0.4",
|
"@pushrocks/smartversion": "^3.0.2",
|
||||||
"@tsclass/tsclass": "^3.0.25",
|
"@tsclass/tsclass": "^4.0.24",
|
||||||
"rxjs": "^6.6.3"
|
"rxjs": "^7.5.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.52",
|
"@gitzone/tstest": "^1.0.52",
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
"@pushrocks/tapbundle": "^5.0.4",
|
||||||
"@types/node": "^14.11.2",
|
"@types/node": "^18.11.0"
|
||||||
"tslint": "^6.1.3",
|
|
||||||
"tslint-config-prettier": "^1.18.0"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
@ -64,4 +64,4 @@
|
|||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
4204
pnpm-lock.yaml
generated
Normal file
4204
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import * as docker from '../ts/index';
|
import * as docker from '../ts/index.js';
|
||||||
|
|
||||||
let testDockerHost: docker.DockerHost;
|
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('http://unix:/var/run/docker.sock:');
|
testDockerHost = new docker.DockerHost('http://unix:/var/run/docker.sock:');
|
||||||
return expect(testDockerHost).to.be.instanceof(docker.DockerHost);
|
return expect(testDockerHost).toBeInstanceOf(docker.DockerHost);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should create a docker swarm', async () => {
|
tap.test('should create a docker swarm', async () => {
|
||||||
@ -28,8 +28,8 @@ tap.test('should create a network', async () => {
|
|||||||
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||||
Name: 'webgateway',
|
Name: 'webgateway',
|
||||||
});
|
});
|
||||||
expect(newNetwork).to.be.instanceOf(docker.DockerNetwork);
|
expect(newNetwork).toBeInstanceOf(docker.DockerNetwork);
|
||||||
expect(newNetwork.Name).to.equal('webgateway');
|
expect(newNetwork.Name).toEqual('webgateway');
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should remove a network', async () => {
|
tap.test('should remove a network', async () => {
|
||||||
@ -43,7 +43,7 @@ tap.test('should pull an image from imagetag', async () => {
|
|||||||
imageUrl: 'hosttoday/ht-docker-node',
|
imageUrl: 'hosttoday/ht-docker-node',
|
||||||
imageTag: 'alpine',
|
imageTag: 'alpine',
|
||||||
});
|
});
|
||||||
expect(image).to.be.instanceOf(docker.DockerImage);
|
expect(image).toBeInstanceOf(docker.DockerImage);
|
||||||
console.log(image);
|
console.log(image);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
|
*/
|
||||||
|
export const commitinfo = {
|
||||||
|
name: '@mojoio/docker',
|
||||||
|
version: '1.0.104',
|
||||||
|
description: 'easy communication with docker remote api from node, TypeScript ready'
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
import { DockerHost } from './docker.classes.host';
|
import { DockerHost } from './docker.classes.host.js';
|
||||||
import { logger } from './docker.logging';
|
import { logger } from './docker.logging.js';
|
||||||
|
|
||||||
export class DockerContainer {
|
export class DockerContainer {
|
||||||
// STATIC
|
// STATIC
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import { DockerContainer } from './docker.classes.container';
|
import { DockerContainer } from './docker.classes.container.js';
|
||||||
import { DockerNetwork } from './docker.classes.network';
|
import { DockerNetwork } from './docker.classes.network.js';
|
||||||
import { DockerService } from './docker.classes.service';
|
import { DockerService } from './docker.classes.service.js';
|
||||||
import { logger } from './docker.logging';
|
import { logger } from './docker.logging.js';
|
||||||
|
|
||||||
export interface IAuthData {
|
export interface IAuthData {
|
||||||
serveraddress: string;
|
serveraddress: string;
|
||||||
@ -46,7 +46,7 @@ export class DockerHost {
|
|||||||
}
|
}
|
||||||
console.log(response.body.Status);
|
console.log(response.body.Status);
|
||||||
this.registryToken = plugins.smartstring.base64.encode(
|
this.registryToken = plugins.smartstring.base64.encode(
|
||||||
plugins.smartjson.stringify(authData, {})
|
plugins.smartjson.stringify(authData)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
import { DockerHost } from './docker.classes.host';
|
import { DockerHost } from './docker.classes.host.js';
|
||||||
import { logger } from './docker.logging';
|
import { logger } from './docker.logging.js';
|
||||||
|
|
||||||
export class DockerImage {
|
export class DockerImage {
|
||||||
// STATIC
|
// STATIC
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
import { DockerHost } from './docker.classes.host';
|
import { DockerHost } from './docker.classes.host.js';
|
||||||
import { DockerService } from './docker.classes.service';
|
import { DockerService } from './docker.classes.service.js';
|
||||||
import { logger } from './docker.logging';
|
import { logger } from './docker.logging.js';
|
||||||
|
|
||||||
export class DockerNetwork {
|
export class DockerNetwork {
|
||||||
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {
|
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import { DockerHost } from './docker.classes.host';
|
import { DockerHost } from './docker.classes.host.js';
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
export class DockerSecret {
|
export class DockerSecret {
|
||||||
// STATIC
|
// STATIC
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
import * as interfaces from './interfaces';
|
import * as interfaces from './interfaces/index.js';
|
||||||
|
|
||||||
import { DockerHost } from './docker.classes.host';
|
import { DockerHost } from './docker.classes.host.js';
|
||||||
import { DockerImage } from './docker.classes.image';
|
import { DockerImage } from './docker.classes.image.js';
|
||||||
import { DockerSecret } from './docker.classes.secret';
|
import { DockerSecret } from './docker.classes.secret.js';
|
||||||
import { logger } from './docker.logging';
|
import { logger } from './docker.logging.js';
|
||||||
|
|
||||||
export class DockerService {
|
export class DockerService {
|
||||||
// STATIC
|
// STATIC
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
import * as plugins from './docker.plugins';
|
import * as plugins from './docker.plugins.js';
|
||||||
|
|
||||||
export const logger = new plugins.smartlog.ConsoleLog();
|
export const logger = new plugins.smartlog.ConsoleLog();
|
||||||
|
12
ts/index.ts
12
ts/index.ts
@ -1,6 +1,6 @@
|
|||||||
export * from './docker.classes.host';
|
export * from './docker.classes.host.js';
|
||||||
export * from './docker.classes.container';
|
export * from './docker.classes.container.js';
|
||||||
export * from './docker.classes.image';
|
export * from './docker.classes.image.js';
|
||||||
export * from './docker.classes.network';
|
export * from './docker.classes.network.js';
|
||||||
export * from './docker.classes.secret';
|
export * from './docker.classes.secret.js';
|
||||||
export * from './docker.classes.service';
|
export * from './docker.classes.service.js';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DockerNetwork } from '../docker.classes.network';
|
import { DockerNetwork } from '../docker.classes.network.js';
|
||||||
|
|
||||||
export interface IContainerCreationDescriptor {
|
export interface IContainerCreationDescriptor {
|
||||||
Hostname: string;
|
Hostname: string;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
export * from './container';
|
export * from './container.js';
|
||||||
export * from './image';
|
export * from './image.js';
|
||||||
export * from './label';
|
export * from './label.js';
|
||||||
export * from './network';
|
export * from './network.js';
|
||||||
export * from './port';
|
export * from './port.js';
|
||||||
export * from './secret';
|
export * from './secret.js';
|
||||||
export * from './service';
|
export * from './service.js';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as interfaces from './';
|
import * as interfaces from './index.js';
|
||||||
|
|
||||||
export interface ISecretCreationDescriptor {
|
export interface ISecretCreationDescriptor {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import * as plugins from '../docker.plugins';
|
import * as plugins from '../docker.plugins.js';
|
||||||
|
|
||||||
import * as interfaces from './';
|
import * as interfaces from './index.js';
|
||||||
import { DockerNetwork } from '../docker.classes.network';
|
import { DockerNetwork } from '../docker.classes.network.js';
|
||||||
import { DockerSecret } from '../docker.classes.secret';
|
import { DockerSecret } from '../docker.classes.secret.js';
|
||||||
import { DockerImage } from '../docker.classes.image';
|
import { DockerImage } from '../docker.classes.image.js';
|
||||||
|
|
||||||
export interface IServiceCreationDescriptor {
|
export interface IServiceCreationDescriptor {
|
||||||
name: string;
|
name: string;
|
||||||
|
10
tsconfig.json
Normal file
10
tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ES2022",
|
||||||
|
"moduleResolution": "nodenext",
|
||||||
|
"esModuleInterop": true
|
||||||
|
}
|
||||||
|
}
|
17
tslint.json
17
tslint.json
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
|
||||||
"rules": {
|
|
||||||
"semicolon": [true, "always"],
|
|
||||||
"no-console": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"member-ordering": {
|
|
||||||
"options":{
|
|
||||||
"order": [
|
|
||||||
"static-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaultSeverity": "warning"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user