fix(core): update
This commit is contained in:
parent
4569bffc37
commit
daa97c68d9
@ -12,40 +12,36 @@ stages:
|
||||
- release
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- pnpm install -g pnpm
|
||||
- pnpm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
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
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command pnpm audit --audit-level=high --prod
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
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 --only=dev
|
||||
- npmci command pnpm audit --audit-level=high --dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
@ -56,7 +52,6 @@ auditDevDependencies:
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
@ -67,7 +62,6 @@ testStable:
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
@ -96,10 +90,9 @@ codequality:
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci command npm install -g typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
@ -119,11 +112,9 @@ trigger:
|
||||
pages:
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
- npmci command npm run buildDocs
|
||||
tags:
|
||||
- lossless
|
||||
- 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",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${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"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "mojoio",
|
||||
"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",
|
||||
"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,
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -27,27 +29,25 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/dockersock#README",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartfile": "^8.0.4",
|
||||
"@pushrocks/smartjson": "^4.0.2",
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartnetwork": "^1.1.22",
|
||||
"@pushrocks/smartpath": "^4.0.3",
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
"@pushrocks/smartfile": "^10.0.5",
|
||||
"@pushrocks/smartjson": "^5.0.2",
|
||||
"@pushrocks/smartlog": "^3.0.1",
|
||||
"@pushrocks/smartnetwork": "^3.0.0",
|
||||
"@pushrocks/smartpath": "^5.0.5",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"@pushrocks/smartstring": "^3.0.18",
|
||||
"@pushrocks/smartversion": "^2.0.4",
|
||||
"@tsclass/tsclass": "^3.0.25",
|
||||
"rxjs": "^6.6.3"
|
||||
"@pushrocks/smartrequest": "^2.0.11",
|
||||
"@pushrocks/smartstring": "^4.0.5",
|
||||
"@pushrocks/smartversion": "^3.0.2",
|
||||
"@tsclass/tsclass": "^4.0.24",
|
||||
"rxjs": "^7.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@gitzone/tstest": "^1.0.52",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@types/node": "^14.11.2",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
"@pushrocks/tapbundle": "^5.0.4",
|
||||
"@types/node": "^18.11.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@ -64,4 +64,4 @@
|
||||
"browserslist": [
|
||||
"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 * as docker from '../ts/index';
|
||||
import * as docker from '../ts/index.js';
|
||||
|
||||
let testDockerHost: docker.DockerHost;
|
||||
|
||||
tap.test('should create a new Dockersock instance', async () => {
|
||||
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 () => {
|
||||
@ -28,8 +28,8 @@ tap.test('should create a network', async () => {
|
||||
const newNetwork = await docker.DockerNetwork.createNetwork(testDockerHost, {
|
||||
Name: 'webgateway',
|
||||
});
|
||||
expect(newNetwork).to.be.instanceOf(docker.DockerNetwork);
|
||||
expect(newNetwork.Name).to.equal('webgateway');
|
||||
expect(newNetwork).toBeInstanceOf(docker.DockerNetwork);
|
||||
expect(newNetwork.Name).toEqual('webgateway');
|
||||
});
|
||||
|
||||
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',
|
||||
imageTag: 'alpine',
|
||||
});
|
||||
expect(image).to.be.instanceOf(docker.DockerImage);
|
||||
expect(image).toBeInstanceOf(docker.DockerImage);
|
||||
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 interfaces from './interfaces';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import * as interfaces from './interfaces/index.js';
|
||||
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { logger } from './docker.logging';
|
||||
import { DockerHost } from './docker.classes.host.js';
|
||||
import { logger } from './docker.logging.js';
|
||||
|
||||
export class DockerContainer {
|
||||
// STATIC
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
import { DockerContainer } from './docker.classes.container';
|
||||
import { DockerNetwork } from './docker.classes.network';
|
||||
import { DockerService } from './docker.classes.service';
|
||||
import { logger } from './docker.logging';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import { DockerContainer } from './docker.classes.container.js';
|
||||
import { DockerNetwork } from './docker.classes.network.js';
|
||||
import { DockerService } from './docker.classes.service.js';
|
||||
import { logger } from './docker.logging.js';
|
||||
|
||||
export interface IAuthData {
|
||||
serveraddress: string;
|
||||
@ -46,7 +46,7 @@ export class DockerHost {
|
||||
}
|
||||
console.log(response.body.Status);
|
||||
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 interfaces from './interfaces';
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { logger } from './docker.logging';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import * as interfaces from './interfaces/index.js';
|
||||
import { DockerHost } from './docker.classes.host.js';
|
||||
import { logger } from './docker.logging.js';
|
||||
|
||||
export class DockerImage {
|
||||
// STATIC
|
||||
|
@ -1,9 +1,9 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
import * as interfaces from './interfaces';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import * as interfaces from './interfaces/index.js';
|
||||
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { DockerService } from './docker.classes.service';
|
||||
import { logger } from './docker.logging';
|
||||
import { DockerHost } from './docker.classes.host.js';
|
||||
import { DockerService } from './docker.classes.service.js';
|
||||
import { logger } from './docker.logging.js';
|
||||
|
||||
export class DockerNetwork {
|
||||
public static async getNetworks(dockerHost: DockerHost): Promise<DockerNetwork[]> {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import { DockerHost } from './docker.classes.host.js';
|
||||
|
||||
// interfaces
|
||||
import * as interfaces from './interfaces';
|
||||
import * as interfaces from './interfaces/index.js';
|
||||
|
||||
export class DockerSecret {
|
||||
// STATIC
|
||||
|
@ -1,10 +1,10 @@
|
||||
import * as plugins from './docker.plugins';
|
||||
import * as interfaces from './interfaces';
|
||||
import * as plugins from './docker.plugins.js';
|
||||
import * as interfaces from './interfaces/index.js';
|
||||
|
||||
import { DockerHost } from './docker.classes.host';
|
||||
import { DockerImage } from './docker.classes.image';
|
||||
import { DockerSecret } from './docker.classes.secret';
|
||||
import { logger } from './docker.logging';
|
||||
import { DockerHost } from './docker.classes.host.js';
|
||||
import { DockerImage } from './docker.classes.image.js';
|
||||
import { DockerSecret } from './docker.classes.secret.js';
|
||||
import { logger } from './docker.logging.js';
|
||||
|
||||
export class DockerService {
|
||||
// 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();
|
||||
|
12
ts/index.ts
12
ts/index.ts
@ -1,6 +1,6 @@
|
||||
export * from './docker.classes.host';
|
||||
export * from './docker.classes.container';
|
||||
export * from './docker.classes.image';
|
||||
export * from './docker.classes.network';
|
||||
export * from './docker.classes.secret';
|
||||
export * from './docker.classes.service';
|
||||
export * from './docker.classes.host.js';
|
||||
export * from './docker.classes.container.js';
|
||||
export * from './docker.classes.image.js';
|
||||
export * from './docker.classes.network.js';
|
||||
export * from './docker.classes.secret.js';
|
||||
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 {
|
||||
Hostname: string;
|
||||
|
@ -1,7 +1,7 @@
|
||||
export * from './container';
|
||||
export * from './image';
|
||||
export * from './label';
|
||||
export * from './network';
|
||||
export * from './port';
|
||||
export * from './secret';
|
||||
export * from './service';
|
||||
export * from './container.js';
|
||||
export * from './image.js';
|
||||
export * from './label.js';
|
||||
export * from './network.js';
|
||||
export * from './port.js';
|
||||
export * from './secret.js';
|
||||
export * from './service.js';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as interfaces from './';
|
||||
import * as interfaces from './index.js';
|
||||
|
||||
export interface ISecretCreationDescriptor {
|
||||
name: string;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import * as plugins from '../docker.plugins';
|
||||
import * as plugins from '../docker.plugins.js';
|
||||
|
||||
import * as interfaces from './';
|
||||
import { DockerNetwork } from '../docker.classes.network';
|
||||
import { DockerSecret } from '../docker.classes.secret';
|
||||
import { DockerImage } from '../docker.classes.image';
|
||||
import * as interfaces from './index.js';
|
||||
import { DockerNetwork } from '../docker.classes.network.js';
|
||||
import { DockerSecret } from '../docker.classes.secret.js';
|
||||
import { DockerImage } from '../docker.classes.image.js';
|
||||
|
||||
export interface IServiceCreationDescriptor {
|
||||
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