Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/stale-walls-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/apps-engine': patch
'@rocket.chat/meteor': patch
---

Fixes the Apps-Engine package installation, removing the dependency on an internal package
8 changes: 5 additions & 3 deletions apps/meteor/ee/server/apps/storage/AppRealStorage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage';
import { AppMetadataStorage } from '@rocket.chat/apps-engine/server/storage';
import type { Apps } from '@rocket.chat/models';
import { removeEmpty } from '@rocket.chat/tools';
import type { UpdateFilter } from 'mongodb';

export class AppRealStorage extends AppMetadataStorage {
Expand All @@ -18,10 +19,11 @@ export class AppRealStorage extends AppMetadataStorage {
throw new Error('App already exists.');
}

const id = (await this.db.insertOne(item)).insertedId as unknown as string;
item._id = id;
const nonEmptyItem = removeEmpty(item);
const id = (await this.db.insertOne(nonEmptyItem)).insertedId as unknown as string;
nonEmptyItem._id = id;

return item;
return nonEmptyItem;
}

public async retrieveOne(id: string): Promise<IAppStorageItem> {
Expand Down
1 change: 0 additions & 1 deletion packages/apps-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
},
"dependencies": {
"@msgpack/msgpack": "3.0.0-beta2",
"@rocket.chat/tools": "workspace:^",
"adm-zip": "^0.5.16",
"debug": "^4.3.7",
"esbuild": "^0.25.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/apps-engine/src/server/AppManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Buffer } from 'buffer';

import { removeEmpty } from '@rocket.chat/tools';

import type { IGetAppsFilter } from './IGetAppsFilter';
import { ProxiedApp } from './ProxiedApp';
import type { PersistenceBridge, UserBridge } from './bridges';
Expand Down Expand Up @@ -609,7 +607,7 @@ export class AppManager {
}

descriptor.signature = await this.getSignatureManager().signApp(descriptor);
const created = await this.appMetadataStorage.create(removeEmpty(descriptor));
const created = await this.appMetadataStorage.create(descriptor);

if (!created) {
aff.setStorageError('Failed to create the App, the storage did not return it.');
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7999,7 +7999,6 @@ __metadata:
dependencies:
"@msgpack/msgpack": "npm:3.0.0-beta2"
"@rocket.chat/eslint-config": "workspace:~"
"@rocket.chat/tools": "workspace:^"
"@rocket.chat/ui-kit": "workspace:~"
"@types/adm-zip": "npm:^0.5.6"
"@types/debug": "npm:^4.1.12"
Expand Down
Loading