fix(core): update
This commit is contained in:
parent
40cfe5b60e
commit
b3f24012da
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: Default (not tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags-ignore:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm and npmci
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
- name: Run npm prepare
|
||||||
|
run: npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
name: Default (tags)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||||
|
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||||
|
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||||
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
|
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Audit production dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --prod
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Audit development dependencies
|
||||||
|
run: |
|
||||||
|
npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
npmci command pnpm audit --audit-level=high --dev
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
test:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs: security
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Test stable
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm test
|
||||||
|
|
||||||
|
- name: Test build
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
npmci npm build
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm publish
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
needs: test
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
pnpm install -g pnpm
|
||||||
|
pnpm install -g @shipzone/npmci
|
||||||
|
npmci npm prepare
|
||||||
|
|
||||||
|
- name: Code quality
|
||||||
|
run: |
|
||||||
|
npmci command npm install -g typescript
|
||||||
|
npmci npm install
|
||||||
|
|
||||||
|
- name: Trigger
|
||||||
|
run: npmci trigger
|
||||||
|
|
||||||
|
- name: Build docs and upload artifacts
|
||||||
|
run: |
|
||||||
|
npmci node install stable
|
||||||
|
npmci npm install
|
||||||
|
pnpm install -g @git.zone/tsdoc
|
||||||
|
npmci command tsdoc
|
||||||
|
continue-on-error: true
|
@ -5,7 +5,7 @@
|
|||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "serve.zone",
|
"gitscope": "serve.zone",
|
||||||
"gitrepo": "interfaces",
|
"gitrepo": "interfaces",
|
||||||
"shortDescription": "interfaces for working with containers",
|
"description": "interfaces for working with containers",
|
||||||
"npmPackagename": "@serve.zone/interfaces",
|
"npmPackagename": "@serve.zone/interfaces",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "serve.zone"
|
"projectDomain": "serve.zone"
|
||||||
|
26984
package-lock.json
generated
26984
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@servezone/interfaces",
|
"name": "@serve.zone/interfaces",
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "interfaces for working with containers",
|
"description": "interfaces for working with containers",
|
||||||
@ -9,7 +9,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild --web)"
|
"build": "(tsbuild --web)",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
@ -38,5 +39,14 @@
|
|||||||
"cli.js",
|
"cli.js",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
]
|
],
|
||||||
}
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://gitlab.com/serve.zone/interfaces.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://gitlab.com/serve.zone/interfaces/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://gitlab.com/serve.zone/interfaces#readme",
|
||||||
|
"type": "module"
|
||||||
|
}
|
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: '@serve.zone/interfaces',
|
||||||
|
version: '1.0.4',
|
||||||
|
description: 'interfaces for working with containers'
|
||||||
|
}
|
30
ts/config/cluster.ts
Normal file
30
ts/config/cluster.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { type IDockerRegistryInfo, type IServiceRessources } from './docker.js';
|
||||||
|
|
||||||
|
export interface IClusterConfig {
|
||||||
|
name: string;
|
||||||
|
zone: 'servezone' | 'gitzone' | 'shipzone' | 'umbrellazone' | 'trafficzone' | 'proxyzone';
|
||||||
|
type: 'cluster';
|
||||||
|
secretKey: string;
|
||||||
|
jumpCode: string;
|
||||||
|
jumpCodeUsedAt: number;
|
||||||
|
manager_domain: string;
|
||||||
|
manager_ip: string;
|
||||||
|
containers: IClusterConfigContainer[];
|
||||||
|
acmeInfo: {
|
||||||
|
serverAddress: string;
|
||||||
|
serverSecret: string;
|
||||||
|
};
|
||||||
|
registryInfo: IDockerRegistryInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IClusterConfigContainer {
|
||||||
|
name: string;
|
||||||
|
image: string;
|
||||||
|
ports: {
|
||||||
|
web: number;
|
||||||
|
custom?: { [domain: string]: string };
|
||||||
|
};
|
||||||
|
resources?: IServiceRessources;
|
||||||
|
domains: string[];
|
||||||
|
secrets: { [key: string]: string };
|
||||||
|
}
|
12
ts/config/docker.ts
Normal file
12
ts/config/docker.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
export interface IDockerRegistryInfo {
|
||||||
|
serveraddress: string;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IServiceRessources {
|
||||||
|
memorySizeMB?: number;
|
||||||
|
volumeMounts?: plugins.tsclass.container.IVolumeMount[];
|
||||||
|
}
|
23
ts/config/server.ts
Normal file
23
ts/config/server.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { type IDockerRegistryInfo } from './docker.js';
|
||||||
|
|
||||||
|
export interface IServerConfig {
|
||||||
|
type: 'server';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a list of debian packages to be installed
|
||||||
|
*/
|
||||||
|
requiredDebianPackages: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a list of SSH keys to deploy
|
||||||
|
*/
|
||||||
|
sshKeys: IServezoneSshKey[];
|
||||||
|
|
||||||
|
dockerRegistryInfo: IDockerRegistryInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IServezoneSshKey {
|
||||||
|
keyName: string;
|
||||||
|
public: string;
|
||||||
|
private?: string;
|
||||||
|
}
|
4
ts/data/cluster.ts
Normal file
4
ts/data/cluster.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface IClusterIdentifier {
|
||||||
|
clusterName: string;
|
||||||
|
secretKey: string;
|
||||||
|
}
|
7
ts/data/config.ts
Normal file
7
ts/data/config.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* ==========
|
||||||
|
This file exports all config interfaces for easier access under module.config.[anyconfig]
|
||||||
|
// ========== */
|
||||||
|
|
||||||
|
export * from '../config/cluster.js';
|
||||||
|
export * from '../config/server.js';
|
||||||
|
export type TConfigType = 'server' | 'cluster' | 'coreflow' | 'service';
|
11
ts/data/event.ts
Normal file
11
ts/data/event.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
export interface IEvent_Cloudly_ContainerVersionNotification
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedEvent<plugins.tsclass.container.IContainer>,
|
||||||
|
IEvent_Cloudly_ContainerVersionNotification
|
||||||
|
> {
|
||||||
|
name: 'newContainerVersion';
|
||||||
|
uniqueEventId: string;
|
||||||
|
payload: plugins.tsclass.container.IContainer;
|
||||||
|
}
|
7
ts/data/index.ts
Normal file
7
ts/data/index.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export * from './cluster.js';
|
||||||
|
export * from './config.js';
|
||||||
|
export * from './event.js';
|
||||||
|
export * from './loint-cloudly.request.js';
|
||||||
|
export * from './loint-cloudly.status.js';
|
||||||
|
export * from './loint-cloudly.traffic.js';
|
||||||
|
export * from './loint-cloudly.version.js';
|
21
ts/data/loint-cloudly.request.ts
Normal file
21
ts/data/loint-cloudly.request.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
import * as certificateRequests from './request/loint-cloudly.request.certificate.js';
|
||||||
|
import * as configRequests from './request/loint-cloudly.request.config.js';
|
||||||
|
import * as identityRequests from './request/loint-cloudly.request.identity.js';
|
||||||
|
import * as networkRequests from './request/loint-cloudly.request.network.js';
|
||||||
|
import * as routingRequests from './request/loint-cloudly.request.routing.js';
|
||||||
|
import * as serverRequests from './request/loint-cloudly.request.server.js';
|
||||||
|
import * as statusRequests from './request/loint-cloudly.request.status.js';
|
||||||
|
import * as versionRequests from './request/loint-cloudly.request.version.js';
|
||||||
|
|
||||||
|
export {
|
||||||
|
certificateRequests as certificate,
|
||||||
|
configRequests as config,
|
||||||
|
identityRequests as identity,
|
||||||
|
networkRequests as network,
|
||||||
|
routingRequests as routing,
|
||||||
|
serverRequests as server,
|
||||||
|
statusRequests as status,
|
||||||
|
versionRequests as version,
|
||||||
|
};
|
20
ts/data/loint-cloudly.status.ts
Normal file
20
ts/data/loint-cloudly.status.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
export interface IClusterStatus {
|
||||||
|
name: string;
|
||||||
|
ip: string;
|
||||||
|
nodesCount: number;
|
||||||
|
containersUnderManagementCount: number;
|
||||||
|
nodeStatusId: string;
|
||||||
|
containerStatusArray: IContainerStatus[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface INodeStatus {
|
||||||
|
nodeId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IContainerStatus {
|
||||||
|
serviceName: string;
|
||||||
|
dockerImageUrl: string;
|
||||||
|
dockerImageVersion: string;
|
||||||
|
}
|
5
ts/data/loint-cloudly.traffic.ts
Normal file
5
ts/data/loint-cloudly.traffic.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
interface IReverseProxyConfig extends plugins.tsclass.network.IReverseProxyConfig {}
|
||||||
|
|
||||||
|
export { type IReverseProxyConfig };
|
11
ts/data/loint-cloudly.version.ts
Normal file
11
ts/data/loint-cloudly.version.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export interface IContainerVersionData {
|
||||||
|
/**
|
||||||
|
* the docker image url
|
||||||
|
* example: registry.gitlab.com/hosttoday/ht-docker-node:latest
|
||||||
|
*/
|
||||||
|
dockerImageUrl: string;
|
||||||
|
/**
|
||||||
|
* the docker image version. Note: This is different from docker tags that are often used for versions.
|
||||||
|
*/
|
||||||
|
dockerImageVersion: string;
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
import * as requests from './requests';
|
import * as data from './data/index.js';
|
||||||
|
import * as requests from './requests/index.js';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
data,
|
||||||
requests
|
requests
|
||||||
}
|
}
|
||||||
|
16
ts/requests/certificate.ts
Normal file
16
ts/requests/certificate.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import * as plugins from '../loint-cloudly.plugins.js';
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_GetSslCertificate
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Any_Cloudly_GetSslCertificate
|
||||||
|
> {
|
||||||
|
method: 'getSslCertificate';
|
||||||
|
request: {
|
||||||
|
authToken: string;
|
||||||
|
requiredCertName: string;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
certificate: plugins.tsclass.network.ICert;
|
||||||
|
};
|
||||||
|
}
|
56
ts/requests/config.ts
Normal file
56
ts/requests/config.ts
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
import * as plugins from '../loint-cloudly.plugins.js';
|
||||||
|
import * as clusterInterfaces from '../loint-cloudly.cluster.js';
|
||||||
|
import * as configInterfaces from '../loint-cloudly.config.js';
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_GetServerConfig
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Any_Cloudly_GetServerConfig
|
||||||
|
> {
|
||||||
|
method: 'getServerConfig';
|
||||||
|
request: {
|
||||||
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
configData: configInterfaces.IServerConfig;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_GetClusterConfig
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Any_Cloudly_GetClusterConfig
|
||||||
|
> {
|
||||||
|
method: 'getClusterConfig';
|
||||||
|
request: {
|
||||||
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
configData: configInterfaces.IClusterConfig;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||||
|
> {
|
||||||
|
method: 'pushClusterConfig';
|
||||||
|
request: {
|
||||||
|
configData: configInterfaces.IClusterConfig;
|
||||||
|
};
|
||||||
|
response: {};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRequest_Cloudly_Coreflow_PushContainerUpdate
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Cloudly_Coreflow_PushContainerUpdate
|
||||||
|
> {
|
||||||
|
method: 'pushContainerUpdate'
|
||||||
|
request: {
|
||||||
|
configData: configInterfaces.IClusterConfig;
|
||||||
|
specificContainerConfigToUpdate: configInterfaces.IClusterConfigContainer;
|
||||||
|
};
|
||||||
|
response: {}
|
||||||
|
}
|
23
ts/requests/identity.ts
Normal file
23
ts/requests/identity.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import * as plugins from '../loint-cloudly.plugins.js';
|
||||||
|
import * as clusterInterfaces from '../loint-cloudly.cluster.js';
|
||||||
|
|
||||||
|
// ========
|
||||||
|
// IDENTITY
|
||||||
|
// ========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get the identity that then will be used to get the config
|
||||||
|
*/
|
||||||
|
export interface IRequest_Any_Cloudly_CoreflowManager_GetIdentityByJumpCode
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Any_Cloudly_CoreflowManager_GetIdentityByJumpCode
|
||||||
|
> {
|
||||||
|
method: 'getIdentityByJumpCode';
|
||||||
|
request: {
|
||||||
|
jumpCode: string;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
||||||
|
};
|
||||||
|
}
|
@ -1 +1,23 @@
|
|||||||
export * from './inform';
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
import * as certificateRequests from './certificate.js';
|
||||||
|
import * as configRequests from './config.js';
|
||||||
|
import * as identityRequests from './identity.js';
|
||||||
|
import * as networkRequests from './network.js';
|
||||||
|
import * as routingRequests from './routing.js';
|
||||||
|
import * as serverRequests from './server.js';
|
||||||
|
import * as statusRequests from './status.js';
|
||||||
|
import * as versionRequests from './version.js';
|
||||||
|
|
||||||
|
export {
|
||||||
|
certificateRequests as certificate,
|
||||||
|
configRequests as config,
|
||||||
|
identityRequests as identity,
|
||||||
|
networkRequests as network,
|
||||||
|
routingRequests as routing,
|
||||||
|
serverRequests as server,
|
||||||
|
statusRequests as status,
|
||||||
|
versionRequests as version,
|
||||||
|
};
|
||||||
|
|
||||||
|
export * from './inform.js';
|
9
ts/requests/network.ts
Normal file
9
ts/requests/network.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import * as plugins from '../loint-cloudly.plugins.js';
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_GetNetworkNodes {
|
||||||
|
method: 'getNetworkNodes';
|
||||||
|
request: {};
|
||||||
|
response: {
|
||||||
|
networkNodes: plugins.tsclass.network.INetworkNode[];
|
||||||
|
};
|
||||||
|
}
|
12
ts/requests/routing.ts
Normal file
12
ts/requests/routing.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { IReverseProxyConfig } from '../loint-cloudly.traffic.js';
|
||||||
|
|
||||||
|
export interface IRequest_Coreflow_Coretraffic_RoutingUpdate {
|
||||||
|
method: 'updateRouting';
|
||||||
|
request: {
|
||||||
|
reverseConfigs: IReverseProxyConfig[];
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
status: 'ok' | 'error';
|
||||||
|
errorText: string;
|
||||||
|
};
|
||||||
|
}
|
19
ts/requests/server.ts
Normal file
19
ts/requests/server.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// link external types for reference
|
||||||
|
import { IRequest_Any_Cloudly_GetServerConfig } from './config.js'
|
||||||
|
|
||||||
|
import * as plugins from '../loint-cloudly.plugins.js';
|
||||||
|
|
||||||
|
export interface IRequest_Cloudly_ServerConfig_TriggerAction
|
||||||
|
extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_Cloudly_ServerConfig_TriggerAction
|
||||||
|
> {
|
||||||
|
method: 'serverConfigTriggerAction';
|
||||||
|
request: {
|
||||||
|
actionName: 'reboot' | 'rebuild';
|
||||||
|
payload: any;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
actionConfirmed: boolean;
|
||||||
|
};
|
||||||
|
}
|
12
ts/requests/status.ts
Normal file
12
ts/requests/status.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import * as clusterInterfaces from '../loint-cloudly.cluster.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a status update dashboard
|
||||||
|
*/
|
||||||
|
export interface IRequest_Coreflow_Cloudly_CoreflowManagerStatusupdate {
|
||||||
|
method: 'cloudlyStatus';
|
||||||
|
request: {
|
||||||
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
||||||
|
};
|
||||||
|
response: {};
|
||||||
|
}
|
29
ts/requests/version.ts
Normal file
29
ts/requests/version.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import * as versionInterfaces from '../loint-cloudly.version.js';
|
||||||
|
|
||||||
|
// Containers
|
||||||
|
export interface IRequest_Any_Cloudly_VersionManager_InformCloudlyAboutNewContainerVersion {
|
||||||
|
method: 'informCloudlyAboutNewContainerVersion';
|
||||||
|
request: versionInterfaces.IContainerVersionData;
|
||||||
|
response: {};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Containers
|
||||||
|
export interface IRequest_Cloudly_Coreflow_VersionManager_InformCoreflowAboutNewContainerVersion {
|
||||||
|
method: 'informCoreflowAboutNewContainerVersion';
|
||||||
|
request: versionInterfaces.IContainerVersionData;
|
||||||
|
response: {};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_VersionManager_GetLatestContainerVersion {
|
||||||
|
method: 'getLatestContainerVersion';
|
||||||
|
request: {
|
||||||
|
dockerImageUrl: string;
|
||||||
|
};
|
||||||
|
response: versionInterfaces.IContainerVersionData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRequest_Any_Cloudly_VersionManager_ListAllContainerVersions {
|
||||||
|
method: 'listAllContainerVersions';
|
||||||
|
request: {};
|
||||||
|
response: versionInterfaces.IContainerVersionData[];
|
||||||
|
}
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"useDefineForClassFields": false,
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"dist_*/**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user