feat(opsserver,web): replace the Angular UI and REST management layer with a TypedRequest-based ops server and bundled web frontend
This commit is contained in:
@@ -30,7 +30,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
* Called before a package is stored
|
||||
*/
|
||||
public async beforePut(
|
||||
context: plugins.smartregistry.IStorageHookContext
|
||||
context: plugins.smartregistry.IStorageHookContext,
|
||||
): Promise<plugins.smartregistry.IBeforePutResult> {
|
||||
// Validate organization exists and has quota
|
||||
const orgId = context.actor?.orgId;
|
||||
@@ -54,7 +54,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
* Called after a package is successfully stored
|
||||
*/
|
||||
public async afterPut(
|
||||
context: plugins.smartregistry.IStorageHookContext
|
||||
context: plugins.smartregistry.IStorageHookContext,
|
||||
): Promise<void> {
|
||||
const protocol = context.protocol as TRegistryProtocol;
|
||||
const packageName = context.metadata?.packageName || context.key;
|
||||
@@ -115,7 +115,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
* Called after a package is fetched
|
||||
*/
|
||||
public async afterGet(
|
||||
context: plugins.smartregistry.IStorageHookContext
|
||||
context: plugins.smartregistry.IStorageHookContext,
|
||||
): Promise<void> {
|
||||
const protocol = context.protocol as TRegistryProtocol;
|
||||
const packageName = context.metadata?.packageName || context.key;
|
||||
@@ -134,7 +134,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
* Called before a package is deleted
|
||||
*/
|
||||
public async beforeDelete(
|
||||
context: plugins.smartregistry.IStorageHookContext
|
||||
context: plugins.smartregistry.IStorageHookContext,
|
||||
): Promise<plugins.smartregistry.IBeforeDeleteResult> {
|
||||
return { allowed: true };
|
||||
}
|
||||
@@ -143,7 +143,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
* Called after a package is deleted
|
||||
*/
|
||||
public async afterDelete(
|
||||
context: plugins.smartregistry.IStorageHookContext
|
||||
context: plugins.smartregistry.IStorageHookContext,
|
||||
): Promise<void> {
|
||||
const protocol = context.protocol as TRegistryProtocol;
|
||||
const packageName = context.metadata?.packageName || context.key;
|
||||
@@ -216,7 +216,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
organizationName: string,
|
||||
packageName: string,
|
||||
version: string,
|
||||
filename: string
|
||||
filename: string,
|
||||
): string {
|
||||
return `${this.config.basePath}/${protocol}/${organizationName}/${packageName}/${version}/${filename}`;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ export class StackGalleryStorageHooks implements plugins.smartregistry.IStorageH
|
||||
public async storeArtifact(
|
||||
path: string,
|
||||
data: Uint8Array,
|
||||
contentType?: string
|
||||
contentType?: string,
|
||||
): Promise<string> {
|
||||
const bucket = await this.config.bucket.getBucketByName(this.config.bucketName);
|
||||
await bucket.fastPut({
|
||||
|
||||
Reference in New Issue
Block a user