fix(deps): Update dependencies to latest versions

This commit is contained in:
2024-08-25 14:29:26 +02:00
parent acc642adf9
commit 0ec665516d
25 changed files with 1661 additions and 1404 deletions

View File

@@ -1,8 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@serve.zone/cloudly',
version: '1.1.6',
version: '1.1.7',
description: 'A comprehensive multi-cloud manager leveraging Docker Swarmkit to orchestrate containerized applications across various cloud services and provide robust configuration and API integration.'
}

View File

@@ -3,11 +3,11 @@ import * as domtools from '@design.estate/dees-domtools';
const appstate = new plugins.deesDomtools.plugins.smartstate.Smartstate();
export interface ILoginState {
jwt: string;
identity: plugins.interfaces.data.IIdentity;
}
export const loginStatePart: plugins.smartstate.StatePart<unknown, ILoginState> = await appstate.getStatePart<ILoginState>(
'login',
{ jwt: null },
{ identity: null },
'persistent'
);
@@ -25,7 +25,7 @@ export const loginAction = loginStatePart.createAction<{ username: string; passw
});
return {
...currentState,
...(response.jwt ? { jwt: response.jwt } : {}),
...(response.identity ? { identity: response.identity } : {}),
};
}
);
@@ -34,7 +34,7 @@ export const logoutAction = loginStatePart.createAction(async (statePartArg) =>
const currentState = statePartArg.getState();
return {
...currentState,
jwt: null,
identity: null,
};
});
@@ -81,7 +81,7 @@ export const getAllDataAction = dataState.createAction(async (statePartArg, part
'adminGetConfigBundlesAndSecretGroups'
);
const response = await trGetSecrets.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
@@ -95,7 +95,7 @@ export const getAllDataAction = dataState.createAction(async (statePartArg, part
'getAllImages'
);
const responseImages = await trGetImages.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
@@ -109,7 +109,7 @@ export const getAllDataAction = dataState.createAction(async (statePartArg, part
'getAllClusters'
);
const responseClusters = await trGetClusters.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
});
currentState = {
@@ -130,7 +130,7 @@ export const createSecretGroupAction = dataState.createAction(
'adminCreateConfigBundlesAndSecretGroups'
);
const response = await trCreateSecretGroup.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
secretBundles: [],
secretGroups: [payloadArg],
});
@@ -149,7 +149,7 @@ export const deleteSecretGroupAction = dataState.createAction(
'adminDeleteConfigBundlesAndSecretGroups'
);
const response = await trDeleteSecretGroup.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
secretBundleIds: [],
secretGroupIds: [payloadArg.secretGroupId],
});
@@ -168,7 +168,7 @@ export const deleteSecretBundleAction = dataState.createAction(
'adminDeleteConfigBundlesAndSecretGroups'
);
const response = await trDeleteConfigBundle.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
secretBundleIds: [payloadArg.configBundleId],
secretGroupIds: [],
});
@@ -187,7 +187,7 @@ export const createImageAction = dataState.createAction(
'createImage'
);
const response = await trCreateImage.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
name: payloadArg.imageName,
description: payloadArg.description,
});
@@ -210,7 +210,7 @@ export const deleteImageAction = dataState.createAction(
'deleteImage'
);
const response = await trDeleteImage.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
imageId: payloadArg.imageId,
});
currentState = {
@@ -238,7 +238,7 @@ export const addClusterAction = dataState.createAction(
'createCluster'
);
const response = await trAddCluster.fire({
jwt: loginStatePart.getState().jwt,
identity: loginStatePart.getState().identity,
...payloadArg,
});
currentState = {

View File

@@ -33,7 +33,7 @@ declare global {
@customElement('cloudly-dashboard')
export class CloudlyDashboard extends DeesElement {
@state() private jwt: string;
@state() private identity: plugins.interfaces.data.IIdentity;
@state() private data: appstate.IDataState = {
secretGroups: [],
secretBundles: [],
@@ -169,8 +169,8 @@ export class CloudlyDashboard extends DeesElement {
const domtools = await this.domtoolsPromise;
const loginState = appstate.loginStatePart.getState();
console.log(loginState);
if (loginState.jwt) {
this.jwt = loginState.jwt;
if (loginState.identity) {
this.identity = loginState.identity;
await simpleLogin.switchToSlottedContent();
await appstate.dataState.dispatchAction(appstate.getAllDataAction, null);
}
@@ -186,9 +186,9 @@ export class CloudlyDashboard extends DeesElement {
username,
password,
});
if (state.jwt) {
if (state.identity) {
console.log('got jwt');
this.jwt = state.jwt;
this.identity = state.identity;
form.setStatus('success', 'Logged in!');
await simpleLogin.switchToSlottedContent();
await appstate.dataState.dispatchAction(appstate.getAllDataAction, null);