fix(switch to unified package for cloudly + api + cli): update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as plugins from '../cloudly.plugins.js';
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { ImageManager } from './classes.imagemanager.js';
|
||||
|
||||
@plugins.smartdata.Manager()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import type { Cloudly } from '../cloudly.classes.cloudly.js';
|
||||
import * as plugins from '../cloudly.plugins.js';
|
||||
import type { Cloudly } from '../classes.cloudly.js';
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import { Image } from './classes.image.js';
|
||||
|
||||
@@ -49,11 +49,14 @@ export class ImageManager {
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler(
|
||||
new plugins.typedrequest.TypedHandler<plugins.servezoneInterfaces.requests.image.IRequest_PushImage>('pushImage', async (reqArg) => {
|
||||
const pushStream = reqArg.imageStream;
|
||||
return {}
|
||||
})
|
||||
)
|
||||
new plugins.typedrequest.TypedHandler<plugins.servezoneInterfaces.requests.image.IRequest_PushImage>(
|
||||
'pushImage',
|
||||
async (reqArg) => {
|
||||
const pushStream = reqArg.imageStream;
|
||||
return {};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler(
|
||||
new plugins.typedrequest.TypedHandler<plugins.servezoneInterfaces.requests.image.IRequest_PullImage>(
|
||||
@@ -62,13 +65,13 @@ export class ImageManager {
|
||||
const image = await this.CImage.getInstance({
|
||||
data: {
|
||||
name: reqArg.name,
|
||||
}
|
||||
},
|
||||
});
|
||||
const imageVersion = null;
|
||||
const imageVirtualStream = new plugins.typedrequest.VirtualStream();
|
||||
return {
|
||||
imageStream: imageVirtualStream,
|
||||
}
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -82,7 +85,7 @@ export class ImageManager {
|
||||
this.cloudlyRef.config.data.s3Descriptor
|
||||
);
|
||||
const bucket = await this.smartbucketInstance.getBucketByName('cloudly-test');
|
||||
await bucket.fastStore('test/test.txt', 'hello');
|
||||
await bucket.fastPut({ path: 'test/test.txt', contents: 'hello' });
|
||||
}
|
||||
|
||||
public async createImage(nameArg: string) {
|
||||
|
Reference in New Issue
Block a user