@n8n/backend-module-apps 0.0.0-stage → 0.0.0-tp-setup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-artifact.entity.d.ts +10 -0
- package/dist/app-artifact.entity.js +48 -0
- package/dist/app-artifact.entity.js.map +1 -0
- package/dist/app-artifact.repository.d.ts +15 -0
- package/dist/app-artifact.repository.js +104 -0
- package/dist/app-artifact.repository.js.map +1 -0
- package/dist/app-artifact.service.d.ts +20 -0
- package/dist/app-artifact.service.js +118 -0
- package/dist/app-artifact.service.js.map +1 -0
- package/dist/app-retention.service.d.ts +16 -0
- package/dist/app-retention.service.js +74 -0
- package/dist/app-retention.service.js.map +1 -0
- package/dist/app-storage-cleanup.task.d.ts +17 -0
- package/dist/app-storage-cleanup.task.js +57 -0
- package/dist/app-storage-cleanup.task.js.map +1 -0
- package/dist/app-storage-lock.d.ts +1 -0
- package/dist/app-storage-lock.js +8 -0
- package/dist/app-storage-lock.js.map +1 -0
- package/dist/app-version.entity.d.ts +12 -0
- package/dist/app-version.entity.js +56 -0
- package/dist/app-version.entity.js.map +1 -0
- package/dist/app-version.repository.d.ts +18 -0
- package/dist/app-version.repository.js +90 -0
- package/dist/app-version.repository.js.map +1 -0
- package/dist/app-version.service.d.ts +30 -0
- package/dist/app-version.service.js +124 -0
- package/dist/app-version.service.js.map +1 -0
- package/dist/app.entity.d.ts +11 -0
- package/dist/app.entity.js +53 -0
- package/dist/app.entity.js.map +1 -0
- package/dist/app.repository.d.ts +19 -0
- package/dist/app.repository.js +116 -0
- package/dist/app.repository.js.map +1 -0
- package/dist/apps-list.controller.d.ts +9 -0
- package/dist/apps-list.controller.js +39 -0
- package/dist/apps-list.controller.js.map +1 -0
- package/dist/apps.config.d.ts +8 -0
- package/dist/apps.config.js +54 -0
- package/dist/apps.config.js.map +1 -0
- package/dist/apps.controller.d.ts +48 -0
- package/dist/apps.controller.js +82 -0
- package/dist/apps.controller.js.map +1 -0
- package/dist/apps.module.d.ts +9 -0
- package/dist/apps.module.js +43 -0
- package/dist/apps.module.js.map +1 -0
- package/dist/apps.service.d.ts +18 -0
- package/dist/apps.service.js +93 -0
- package/dist/apps.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/storage/app-archive.d.ts +16 -0
- package/dist/storage/app-archive.js +180 -0
- package/dist/storage/app-archive.js.map +1 -0
- package/dist/storage/app-blob-store.d.ts +21 -0
- package/dist/storage/app-blob-store.js +93 -0
- package/dist/storage/app-blob-store.js.map +1 -0
- package/dist/storage/app-version-stores.d.ts +20 -0
- package/dist/storage/app-version-stores.js +10 -0
- package/dist/storage/app-version-stores.js.map +1 -0
- package/dist/storage/snapshot-app-version-stores.d.ts +30 -0
- package/dist/storage/snapshot-app-version-stores.js +122 -0
- package/dist/storage/snapshot-app-version-stores.js.map +1 -0
- package/package.json +67 -4
- package/README.md +0 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AppVersionRepository = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const di_1 = require("@n8n/di");
|
|
15
|
+
const errors_1 = require("@n8n/errors");
|
|
16
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
17
|
+
const app_version_entity_1 = require("./app-version.entity");
|
|
18
|
+
let AppVersionRepository = class AppVersionRepository extends db_1.BaseRepository {
|
|
19
|
+
constructor(dataSource, txRunner) {
|
|
20
|
+
super(app_version_entity_1.AppVersion, dataSource.manager, txRunner);
|
|
21
|
+
}
|
|
22
|
+
async insertVersion(data, ctx) {
|
|
23
|
+
try {
|
|
24
|
+
await this.managerFor(ctx).insert(app_version_entity_1.AppVersion, {
|
|
25
|
+
...data,
|
|
26
|
+
bundleArtifactId: null,
|
|
27
|
+
buildStatus: 'queued',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if ((0, db_1.isUniqueConstraintError)(error)) {
|
|
32
|
+
throw new errors_1.ConflictError('App version already exists. Save the source as a new version.');
|
|
33
|
+
}
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async findVersionById(versionId, ctx = {}) {
|
|
38
|
+
return await this.managerFor(ctx).findOneBy(app_version_entity_1.AppVersion, { id: versionId });
|
|
39
|
+
}
|
|
40
|
+
async listForApp(appId, ctx = {}) {
|
|
41
|
+
return await this.managerFor(ctx).find(app_version_entity_1.AppVersion, {
|
|
42
|
+
where: { appId },
|
|
43
|
+
order: { createdAt: 'DESC', id: 'DESC' },
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async listForRetention(appId, ctx) {
|
|
47
|
+
const versions = await this.managerFor(ctx).find(app_version_entity_1.AppVersion, {
|
|
48
|
+
select: { id: true, buildStatus: true, bundleArtifactId: true },
|
|
49
|
+
where: { appId },
|
|
50
|
+
order: { createdAt: 'DESC', id: 'DESC' },
|
|
51
|
+
});
|
|
52
|
+
return versions.map(({ id, buildStatus, bundleArtifactId }) => ({
|
|
53
|
+
id,
|
|
54
|
+
buildStatus,
|
|
55
|
+
hasBundle: bundleArtifactId !== null,
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
async attachBundle(versionId, artifactId, ctx) {
|
|
59
|
+
const result = await this.managerFor(ctx).update(app_version_entity_1.AppVersion, {
|
|
60
|
+
id: versionId,
|
|
61
|
+
bundleArtifactId: (0, typeorm_1.IsNull)(),
|
|
62
|
+
buildStatus: (0, typeorm_1.In)(['queued', 'running']),
|
|
63
|
+
}, { bundleArtifactId: artifactId, buildStatus: 'succeeded' });
|
|
64
|
+
return result.affected === 1;
|
|
65
|
+
}
|
|
66
|
+
async setLabel(versionId, label, ctx = {}) {
|
|
67
|
+
return await this.runInTransaction(ctx, async (manager) => {
|
|
68
|
+
const where = { id: versionId };
|
|
69
|
+
const result = await manager.update(app_version_entity_1.AppVersion, where, { label });
|
|
70
|
+
if (!result.affected)
|
|
71
|
+
return null;
|
|
72
|
+
return await manager.findOneBy(app_version_entity_1.AppVersion, where);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
async clearBundles(versionIds, ctx) {
|
|
76
|
+
for (const ids of (0, db_1.chunkIds)(versionIds)) {
|
|
77
|
+
await this.managerFor(ctx).update(app_version_entity_1.AppVersion, { id: (0, typeorm_1.In)(ids) }, { bundleArtifactId: null });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async removeVersions(versionIds, ctx) {
|
|
81
|
+
for (const ids of (0, db_1.chunkIds)(versionIds))
|
|
82
|
+
await this.managerFor(ctx).delete(app_version_entity_1.AppVersion, { id: (0, typeorm_1.In)(ids) });
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
exports.AppVersionRepository = AppVersionRepository;
|
|
86
|
+
exports.AppVersionRepository = AppVersionRepository = __decorate([
|
|
87
|
+
(0, di_1.Service)(),
|
|
88
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource, db_1.TransactionRunner])
|
|
89
|
+
], AppVersionRepository);
|
|
90
|
+
//# sourceMappingURL=app-version.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-version.repository.js","sourceRoot":"","sources":["../src/app-version.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAMiB;AACjB,gCAAkC;AAClC,wCAA4C;AAC5C,0CAAsD;AAEtD,6DAAkD;AAG3C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,mBAA0B;IACnE,YAAY,UAAsB,EAAE,QAA2B;QAC9D,KAAK,CAAC,+BAAU,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,aAAa,CAClB,IAAqE,EACrE,GAAqB;QAErB,IAAI,CAAC;YACJ,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,+BAAU,EAAE;gBAC7C,GAAG,IAAI;gBACP,gBAAgB,EAAE,IAAI;gBACtB,WAAW,EAAE,QAAQ;aACrB,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAA,4BAAuB,EAAC,KAAK,CAAC,EAAE,CAAC;gBACpC,MAAM,IAAI,sBAAa,CAAC,+DAA+D,CAAC,CAAC;YAC1F,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,SAAiB,EAAE,GAAG,GAAqB,EAAE;QAClE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,+BAAU,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa,EAAE,GAAG,GAAqB,EAAE;QACzD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,+BAAU,EAAE;YAClD,KAAK,EAAE,EAAE,KAA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Service } from './app-retention.service';
|
|
4
|
+
import type { AppVersion } from './app-version.entity';
|
|
5
|
+
import { AppVersionRepository } from './app-version.repository';
|
|
6
|
+
import { AppRepository } from './app.repository';
|
|
7
|
+
import { AppSourceVersionStore, AppBuildResultStore, type AppFiles } from './storage/app-version-stores';
|
|
8
|
+
export declare class AppVersionService {
|
|
9
|
+
private readonly apps;
|
|
10
|
+
private readonly versions;
|
|
11
|
+
private readonly sourceVersions;
|
|
12
|
+
private readonly buildResults;
|
|
13
|
+
private readonly retention;
|
|
14
|
+
private readonly logger;
|
|
15
|
+
constructor(apps: AppRepository, versions: AppVersionRepository, sourceVersions: AppSourceVersionStore, buildResults: AppBuildResultStore, retention: AppRetentionService, logger: Logger);
|
|
16
|
+
saveSource(projectId: string, appId: string, expectedDraftVersionId: string | null, files: AppFiles, label?: string | null): Promise<AppVersion>;
|
|
17
|
+
attachBundle(projectId: string, appId: string, versionId: string, files: AppFiles): Promise<AppVersion>;
|
|
18
|
+
listVersions(projectId: string, appId: string): Promise<AppVersion[]>;
|
|
19
|
+
getVersion(projectId: string, appId: string, versionId: string, ctx?: OperationContext): Promise<AppVersion>;
|
|
20
|
+
readSource(projectId: string, appId: string, versionId: string): Promise<AppFiles>;
|
|
21
|
+
readBundle(projectId: string, appId: string, versionId: string): Promise<AppFiles>;
|
|
22
|
+
restoreSource(projectId: string, appId: string, versionId: string, expectedDraftVersionId: string | null): Promise<AppVersion>;
|
|
23
|
+
setLabel(projectId: string, appId: string, versionId: string, label: string | null): Promise<AppVersion>;
|
|
24
|
+
private requireApp;
|
|
25
|
+
private requireVersion;
|
|
26
|
+
private checkVersionId;
|
|
27
|
+
private checkDraft;
|
|
28
|
+
private checkLabel;
|
|
29
|
+
private prune;
|
|
30
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AppVersionService = void 0;
|
|
13
|
+
const api_types_1 = require("@n8n/api-types");
|
|
14
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const di_1 = require("@n8n/di");
|
|
16
|
+
const errors_1 = require("@n8n/errors");
|
|
17
|
+
const uuid_1 = require("uuid");
|
|
18
|
+
const app_retention_service_1 = require("./app-retention.service");
|
|
19
|
+
const app_version_repository_1 = require("./app-version.repository");
|
|
20
|
+
const app_repository_1 = require("./app.repository");
|
|
21
|
+
const app_version_stores_1 = require("./storage/app-version-stores");
|
|
22
|
+
let AppVersionService = class AppVersionService {
|
|
23
|
+
constructor(apps, versions, sourceVersions, buildResults, retention, logger) {
|
|
24
|
+
this.apps = apps;
|
|
25
|
+
this.versions = versions;
|
|
26
|
+
this.sourceVersions = sourceVersions;
|
|
27
|
+
this.buildResults = buildResults;
|
|
28
|
+
this.retention = retention;
|
|
29
|
+
this.logger = logger;
|
|
30
|
+
}
|
|
31
|
+
async saveSource(projectId, appId, expectedDraftVersionId, files, label = null) {
|
|
32
|
+
const app = await this.requireApp(projectId, appId);
|
|
33
|
+
this.checkDraft(app.draftVersionId, expectedDraftVersionId);
|
|
34
|
+
this.checkLabel(label);
|
|
35
|
+
const versionId = (0, uuid_1.v7)();
|
|
36
|
+
await this.sourceVersions.createVersion({ id: versionId, appId, expectedDraftVersionId, label }, files);
|
|
37
|
+
const version = await this.requireVersion(versionId);
|
|
38
|
+
await this.prune(appId);
|
|
39
|
+
return version;
|
|
40
|
+
}
|
|
41
|
+
async attachBundle(projectId, appId, versionId, files) {
|
|
42
|
+
const target = await this.getVersion(projectId, appId, versionId);
|
|
43
|
+
if (target.buildStatus !== 'queued' && target.buildStatus !== 'running') {
|
|
44
|
+
throw new errors_1.ConflictError('This app version cannot accept a bundle. Check its build status.');
|
|
45
|
+
}
|
|
46
|
+
await this.buildResults.recordSuccess(appId, versionId, files);
|
|
47
|
+
const version = await this.requireVersion(versionId);
|
|
48
|
+
await this.prune(appId);
|
|
49
|
+
return version;
|
|
50
|
+
}
|
|
51
|
+
async listVersions(projectId, appId) {
|
|
52
|
+
await this.requireApp(projectId, appId);
|
|
53
|
+
return await this.versions.listForApp(appId);
|
|
54
|
+
}
|
|
55
|
+
async getVersion(projectId, appId, versionId, ctx = {}) {
|
|
56
|
+
await this.requireApp(projectId, appId, ctx);
|
|
57
|
+
const version = await this.requireVersion(versionId, ctx);
|
|
58
|
+
if (version.appId !== appId)
|
|
59
|
+
throw new errors_1.NotFoundError('App version not found.');
|
|
60
|
+
return version;
|
|
61
|
+
}
|
|
62
|
+
async readSource(projectId, appId, versionId) {
|
|
63
|
+
const version = await this.getVersion(projectId, appId, versionId);
|
|
64
|
+
return await this.sourceVersions.readSource(version.id);
|
|
65
|
+
}
|
|
66
|
+
async readBundle(projectId, appId, versionId) {
|
|
67
|
+
const version = await this.getVersion(projectId, appId, versionId);
|
|
68
|
+
return await this.buildResults.readBundle(version.id);
|
|
69
|
+
}
|
|
70
|
+
async restoreSource(projectId, appId, versionId, expectedDraftVersionId) {
|
|
71
|
+
const version = await this.getVersion(projectId, appId, versionId);
|
|
72
|
+
const files = await this.sourceVersions.readSource(version.id);
|
|
73
|
+
return await this.saveSource(projectId, appId, expectedDraftVersionId, files, version.label);
|
|
74
|
+
}
|
|
75
|
+
async setLabel(projectId, appId, versionId, label) {
|
|
76
|
+
this.checkLabel(label);
|
|
77
|
+
await this.getVersion(projectId, appId, versionId);
|
|
78
|
+
const version = await this.versions.setLabel(versionId, label);
|
|
79
|
+
if (!version)
|
|
80
|
+
throw new errors_1.NotFoundError('App version not found.');
|
|
81
|
+
return version;
|
|
82
|
+
}
|
|
83
|
+
async requireApp(projectId, appId, ctx = {}) {
|
|
84
|
+
if (!api_types_1.appSchema.shape.id.safeParse(appId).success)
|
|
85
|
+
throw new errors_1.NotFoundError('App not found.');
|
|
86
|
+
const app = await this.apps.findInProject(projectId, appId, ctx);
|
|
87
|
+
if (!app)
|
|
88
|
+
throw new errors_1.NotFoundError('App not found.');
|
|
89
|
+
return app;
|
|
90
|
+
}
|
|
91
|
+
async requireVersion(versionId, ctx = {}) {
|
|
92
|
+
this.checkVersionId(versionId);
|
|
93
|
+
const version = await this.versions.findVersionById(versionId, ctx);
|
|
94
|
+
if (!version)
|
|
95
|
+
throw new errors_1.NotFoundError('App version not found.');
|
|
96
|
+
return version;
|
|
97
|
+
}
|
|
98
|
+
checkVersionId(versionId) {
|
|
99
|
+
if (!api_types_1.appVersionSchema.shape.id.safeParse(versionId).success)
|
|
100
|
+
throw new errors_1.NotFoundError('App version not found.');
|
|
101
|
+
}
|
|
102
|
+
checkDraft(actual, expected) {
|
|
103
|
+
if (actual !== expected)
|
|
104
|
+
throw new errors_1.ConflictError('The app draft changed. Reload the source before saving.');
|
|
105
|
+
}
|
|
106
|
+
checkLabel(label) {
|
|
107
|
+
if (!api_types_1.appVersionSchema.shape.label.safeParse(label).success)
|
|
108
|
+
throw new errors_1.BadRequestError('App version labels must contain at most 255 characters.');
|
|
109
|
+
}
|
|
110
|
+
async prune(appId) {
|
|
111
|
+
try {
|
|
112
|
+
await this.retention.prune(appId);
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
this.logger.warn('Could not prune app history.', { appId, error });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
exports.AppVersionService = AppVersionService;
|
|
120
|
+
exports.AppVersionService = AppVersionService = __decorate([
|
|
121
|
+
(0, di_1.Service)(),
|
|
122
|
+
__metadata("design:paramtypes", [app_repository_1.AppRepository, app_version_repository_1.AppVersionRepository, app_version_stores_1.AppSourceVersionStore, app_version_stores_1.AppBuildResultStore, app_retention_service_1.AppRetentionService, backend_common_1.Logger])
|
|
123
|
+
], AppVersionService);
|
|
124
|
+
//# sourceMappingURL=app-version.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-version.service.js","sourceRoot":"","sources":["../src/app-version.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA6D;AAC7D,wDAA6C;AAE7C,gCAAkC;AAClC,wCAA4E;AAC5E,+BAAoC;AAEpC,mEAA8D;AAE9D,qEAAgE;AAChE,qDAAiD;AACjD,qEAIsC;AAG/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,YACkB,IAAmB,EACnB,QAA8B,EAC9B,cAAqC,EACrC,YAAiC,EACjC,SAA8B,EAC9B,MAAc;oBALd,IAAI;wBACJ,QAAQ;8BACR,cAAc;4BACd,YAAY;yBACZ,SAAS;sBACT,MAAM;IACrB,CAAC;IAEJ,KAAK,CAAC,UAAU,CACf,SAAiB,EACjB,KAAa,EACb,sBAAqC,EACrC,KAAe,EACf,KAAK,GAAkB,IAAI;QAE3B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC;QAC5D,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvB,MAAM,SAAS,GAAG,IAAA,SAAM,GAAE,CAAC;QAC3B,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CACtC,EAAE,EAAE,EAAE,SAAS,EA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E,IAAI,MAAM,KAAK,QAAQ;YACtB,MAAM,IAAI,sBAAa,CAAC,yDAAyD,CAAC,CAAC;IACrF,CAAC;IAEO,UAAU,CAAC,KAAoB;QACtC,IAAI,CAAC,4BAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO;YACzD,MAAM,IAAI,wBAAe,CAAC,yDAAyD,CAAC,CAAC;IACvF,CAAC;IAEO,KAAK,CAAC,KAAK,CAAC,KAAa;QAChC,IAAI,CAAC;YACJ,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEhB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;CACD,CAAA;;4BAtIY,iBAAiB;IAD7B,IAAA,YAAO,GAAE;qCAGe,8BAAa,EACT,6CAAoB,EACd,0CAAqB,EACvB,wCAAmB,EACtB,2CAAmB,EACtB,uBAAM;GAPpB,iBAAiB,CAsI7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AppVisibility } from '@n8n/api-types';
|
|
2
|
+
import { WithTimestamps } from '@n8n/db';
|
|
3
|
+
export declare class App extends WithTimestamps {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
namespace: string;
|
|
7
|
+
visibility: AppVisibility;
|
|
8
|
+
projectId: string;
|
|
9
|
+
draftVersionId: string | null;
|
|
10
|
+
publishedVersionId: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.App = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
let App = class App extends db_1.WithTimestamps {
|
|
16
|
+
};
|
|
17
|
+
exports.App = App;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], App.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 128 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], App.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 128 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], App.prototype, "namespace", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16, default: 'project' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], App.prototype, "visibility", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Index)(),
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], App.prototype, "projectId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Index)(),
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], App.prototype, "draftVersionId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Index)(),
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], App.prototype, "publishedVersionId", void 0);
|
|
49
|
+
exports.App = App = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)({ name: 'app' }),
|
|
51
|
+
(0, typeorm_1.Index)(['namespace'], { unique: true })
|
|
52
|
+
], App);
|
|
53
|
+
//# sourceMappingURL=app.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../src/app.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAyC;AACzC,0CAAoE;AAI7D,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,mBAAc;CAwBtC,CAAA;;AAtBA;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;+BACX;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;iCAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;sCACvB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;;uCAClC;AAI1B;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;sCACtB;AAIlB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACX;AAI9B;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;cAvBtB,GAAG;IAFf,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvB,IAAA,eAAK,EAAC,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC1B,GAAG,CAwBf"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CreateAppDto, ListAppsQueryDto, UpdateAppDto } from '@n8n/api-types';
|
|
2
|
+
import { BaseRepository, TransactionRunner, type OperationContext } from '@n8n/db';
|
|
3
|
+
import { DataSource } from '@n8n/typeorm';
|
|
4
|
+
import { App } from './app.entity';
|
|
5
|
+
export declare class AppRepository extends BaseRepository<App> {
|
|
6
|
+
constructor(dataSource: DataSource, transactionRunner: TransactionRunner);
|
|
7
|
+
findInProject(projectId: string, appId: string, ctx?: OperationContext): Promise<App | null>;
|
|
8
|
+
findById(appId: string, ctx: OperationContext): Promise<App | null>;
|
|
9
|
+
advanceDraft(appId: string, expectedVersionId: string | null, versionId: string, ctx: OperationContext): Promise<boolean>;
|
|
10
|
+
listIdsAfter(after: string | undefined, ctx?: OperationContext): Promise<string[]>;
|
|
11
|
+
deleteInProject(projectId: string, appId: string, ctx: OperationContext): Promise<boolean>;
|
|
12
|
+
projectExists(projectId: string, ctx?: OperationContext): Promise<boolean>;
|
|
13
|
+
createApp(projectId: string, dto: CreateAppDto, ctx?: OperationContext): Promise<App>;
|
|
14
|
+
list(projectIds: string[] | null, { skip, take, name, sortBy }: ListAppsQueryDto, ctx?: OperationContext): Promise<{
|
|
15
|
+
data: App[];
|
|
16
|
+
count: number;
|
|
17
|
+
}>;
|
|
18
|
+
updateApp(projectId: string, appId: string, dto: UpdateAppDto, ctx?: OperationContext): Promise<App | null>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AppRepository = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const di_1 = require("@n8n/di");
|
|
15
|
+
const errors_1 = require("@n8n/errors");
|
|
16
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
17
|
+
const uuid_1 = require("uuid");
|
|
18
|
+
const app_entity_1 = require("./app.entity");
|
|
19
|
+
let AppRepository = class AppRepository extends db_1.BaseRepository {
|
|
20
|
+
constructor(dataSource, transactionRunner) {
|
|
21
|
+
super(app_entity_1.App, dataSource.manager, transactionRunner);
|
|
22
|
+
}
|
|
23
|
+
async findInProject(projectId, appId, ctx = {}) {
|
|
24
|
+
return await this.managerFor(ctx).findOneBy(app_entity_1.App, { id: appId, projectId });
|
|
25
|
+
}
|
|
26
|
+
async findById(appId, ctx) {
|
|
27
|
+
return await this.managerFor(ctx).findOneBy(app_entity_1.App, { id: appId });
|
|
28
|
+
}
|
|
29
|
+
async advanceDraft(appId, expectedVersionId, versionId, ctx) {
|
|
30
|
+
const result = await this.managerFor(ctx).update(app_entity_1.App, {
|
|
31
|
+
id: appId,
|
|
32
|
+
draftVersionId: expectedVersionId ?? (0, typeorm_1.IsNull)(),
|
|
33
|
+
}, { draftVersionId: versionId });
|
|
34
|
+
return result.affected === 1;
|
|
35
|
+
}
|
|
36
|
+
async listIdsAfter(after, ctx = {}) {
|
|
37
|
+
const query = this.managerFor(ctx)
|
|
38
|
+
.createQueryBuilder(app_entity_1.App, 'app')
|
|
39
|
+
.select(['app.id'])
|
|
40
|
+
.orderBy('app.id', 'ASC')
|
|
41
|
+
.take(100);
|
|
42
|
+
if (after)
|
|
43
|
+
query.where('app.id > :after', { after });
|
|
44
|
+
return (await query.getMany()).map((app) => app.id);
|
|
45
|
+
}
|
|
46
|
+
async deleteInProject(projectId, appId, ctx) {
|
|
47
|
+
const result = await this.managerFor(ctx).delete(app_entity_1.App, { id: appId, projectId });
|
|
48
|
+
return result.affected === 1;
|
|
49
|
+
}
|
|
50
|
+
async projectExists(projectId, ctx = {}) {
|
|
51
|
+
return await this.managerFor(ctx).existsBy(db_1.Project, { id: projectId });
|
|
52
|
+
}
|
|
53
|
+
async createApp(projectId, dto, ctx = {}) {
|
|
54
|
+
try {
|
|
55
|
+
return await this.managerFor(ctx).save(app_entity_1.App, {
|
|
56
|
+
...dto,
|
|
57
|
+
id: (0, uuid_1.v7)(),
|
|
58
|
+
projectId,
|
|
59
|
+
draftVersionId: null,
|
|
60
|
+
publishedVersionId: null,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if ((0, db_1.isUniqueConstraintError)(error)) {
|
|
65
|
+
throw new errors_1.ConflictError('An app already uses this namespace. Choose another namespace.');
|
|
66
|
+
}
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async list(projectIds, { skip, take, name, sortBy }, ctx = {}) {
|
|
71
|
+
if (projectIds?.length === 0)
|
|
72
|
+
return { data: [], count: 0 };
|
|
73
|
+
const where = {};
|
|
74
|
+
if (projectIds !== null)
|
|
75
|
+
where.projectId = (0, typeorm_1.In)(projectIds);
|
|
76
|
+
if (name) {
|
|
77
|
+
where.name = (0, typeorm_1.Raw)((alias) => `LOWER(${alias}) LIKE LOWER(:name) ${db_1.LIKE_ESCAPE_CLAUSE}`, {
|
|
78
|
+
name: `%${(0, db_1.escapeLike)(name)}%`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const { column, direction } = (0, db_1.parseListQuerySortBy)(sortBy);
|
|
82
|
+
const manager = this.managerFor(ctx);
|
|
83
|
+
if (take === 0)
|
|
84
|
+
return { data: [], count: await manager.countBy(app_entity_1.App, where) };
|
|
85
|
+
const [data, count] = await manager.findAndCount(app_entity_1.App, {
|
|
86
|
+
where,
|
|
87
|
+
order: { [column]: direction, id: 'ASC' },
|
|
88
|
+
skip,
|
|
89
|
+
take,
|
|
90
|
+
});
|
|
91
|
+
return { data, count };
|
|
92
|
+
}
|
|
93
|
+
async updateApp(projectId, appId, dto, ctx = {}) {
|
|
94
|
+
const where = { id: appId, projectId };
|
|
95
|
+
try {
|
|
96
|
+
return await this.runInTransaction(ctx, async (manager) => {
|
|
97
|
+
const result = await manager.update(app_entity_1.App, where, dto);
|
|
98
|
+
if (!result.affected)
|
|
99
|
+
return null;
|
|
100
|
+
return await manager.findOneBy(app_entity_1.App, where);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if ((0, db_1.isUniqueConstraintError)(error)) {
|
|
105
|
+
throw new errors_1.ConflictError('An app already uses this namespace. Choose another namespace.');
|
|
106
|
+
}
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
exports.AppRepository = AppRepository;
|
|
112
|
+
exports.AppRepository = AppRepository = __decorate([
|
|
113
|
+
(0, di_1.Service)(),
|
|
114
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource, db_1.TransactionRunner])
|
|
115
|
+
], AppRepository);
|
|
116
|
+
//# sourceMappingURL=app.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.repository.js","sourceRoot":"","sources":["../src/app.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCASiB;AACjB,gCAAkC;AAClC,wCAA4C;AAC5C,0CAAkF;AAClF,+BAAoC;AAEpC,6CAAmC;AAG5B,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,mBAAmB;IACrD,YAAY,UAAsB,EAAE,iBAAoC;QACvE,KAAK,CAAC,gBAAG,EAAE,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,SAAiB,EAAE,KAAa,EAAE,GAAG,GAAqB,EAAE;QAC/E,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,gBAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,KAAa,EAAE,GAAqB;QAClD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,gBAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,YAAY,CACjB,KAAa,EACb,iBAAgC,EAChC,SAAiB,EACjB,GAAqB;QAErB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,CAC/C,gBAAG,EACH;YACC,EAAE,EAAE,KAAK;YACT,cAAc,EAAE,iBAAiB,IAAI,IAAA,gBAAM,GAAE;SAC7C,EACD,EAAE,cAAc,EAAE,SAAS,EAAE,CAC7B,CAAC;QACF,OAAO,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,K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
+
import type { Response } from 'express';
|
|
4
|
+
import { AppsService } from './apps.service';
|
|
5
|
+
export declare class AppsListController {
|
|
6
|
+
private readonly appsService;
|
|
7
|
+
constructor(appsService: AppsService);
|
|
8
|
+
list(req: AuthenticatedRequest, res: Response, query: ListAppsQueryDto): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AppsListController = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const decorators_1 = require("@n8n/decorators");
|
|
18
|
+
const apps_service_1 = require("./apps.service");
|
|
19
|
+
let AppsListController = class AppsListController {
|
|
20
|
+
constructor(appsService) {
|
|
21
|
+
this.appsService = appsService;
|
|
22
|
+
}
|
|
23
|
+
async list(req, res, query) {
|
|
24
|
+
res.json(await this.appsService.listAppsForUser(req.user, query));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.AppsListController = AppsListController;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, decorators_1.Get)('/'),
|
|
30
|
+
__param(2, decorators_1.Query),
|
|
31
|
+
__metadata("design:type", Function),
|
|
32
|
+
__metadata("design:paramtypes", [Object, Object, api_types_1.ListAppsQueryDto]),
|
|
33
|
+
__metadata("design:returntype", Promise)
|
|
34
|
+
], AppsListController.prototype, "list", null);
|
|
35
|
+
exports.AppsListController = AppsListController = __decorate([
|
|
36
|
+
(0, decorators_1.RestController)('/apps'),
|
|
37
|
+
__metadata("design:paramtypes", [apps_service_1.AppsService])
|
|
38
|
+
], AppsListController);
|
|
39
|
+
//# sourceMappingURL=apps-list.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps-list.controller.js","sourceRoot":"","sources":["../src/apps-list.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAAkD;AAElD,gDAA6D;AAG7D,iDAA6C;AAGtC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YAA6B,WAAwB;2BAAxB,WAAW;IAAgB,CAAC;IAInD,AAAN,KAAK,CAAC,IAAI,CAAC,GAAyB,EAAE,GAAa,EAAS,KAAuB;QAClF,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACnE,CAAC;CACD,CAAA;;AAHM;IAFL,IAAA,gBAAG,EAAC,GAAG,CAAC;IAE6C,WAAA,kBAAK,CAAA;;qDAAQ,4BAAgB;;8CAElF;6BAPW,kBAAkB;IAD9B,IAAA,2BAAc,EAAC,OAAO,CAAC;qCAEmB,0BAAW;GADzC,kBAAkB,CAQ9B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AppsConfig = void 0;
|
|
13
|
+
const config_1 = require("@n8n/config");
|
|
14
|
+
const zod_1 = require("zod");
|
|
15
|
+
const positiveInteger = zod_1.z.coerce.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
16
|
+
let AppsConfig = class AppsConfig {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.maxVersionsPerApp = 20;
|
|
19
|
+
this.maxBundlesPerApp = 5;
|
|
20
|
+
this.maxStorageBytes = 1024 * 1024 * 1024;
|
|
21
|
+
this.maxArtifactSizeBytes = 20 * 1024 * 1024;
|
|
22
|
+
this.maxArtifactUnpackedSizeBytes = 200 * 1024 * 1024;
|
|
23
|
+
this.maxArtifactEntries = 20_000;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.AppsConfig = AppsConfig;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, config_1.Env)('N8N_APPS_MAX_VERSIONS_PER_APP', positiveInteger),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], AppsConfig.prototype, "maxVersionsPerApp", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, config_1.Env)('N8N_APPS_MAX_BUNDLES_PER_APP', positiveInteger),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], AppsConfig.prototype, "maxBundlesPerApp", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, config_1.Env)('N8N_APPS_MAX_STORAGE_BYTES', positiveInteger),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], AppsConfig.prototype, "maxStorageBytes", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, config_1.Env)('N8N_APPS_MAX_ARTIFACT_SIZE_BYTES', positiveInteger.max(2 ** 31 - 1)),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], AppsConfig.prototype, "maxArtifactSizeBytes", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, config_1.Env)('N8N_APPS_MAX_ARTIFACT_UNPACKED_SIZE_BYTES', positiveInteger),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], AppsConfig.prototype, "maxArtifactUnpackedSizeBytes", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, config_1.Env)('N8N_APPS_MAX_ARTIFACT_ENTRIES', positiveInteger),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], AppsConfig.prototype, "maxArtifactEntries", void 0);
|
|
51
|
+
exports.AppsConfig = AppsConfig = __decorate([
|
|
52
|
+
config_1.Config
|
|
53
|
+
], AppsConfig);
|
|
54
|
+
//# sourceMappingURL=apps.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.config.js","sourceRoot":"","sources":["../src/apps.config.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAA0C;AAC1C,6BAAwB;AAExB,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAGjF,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QAGN,sBAAiB,GAAW,EAAE,CAAC;QAI/B,qBAAgB,GAAW,CAAC,CAAC;QAI7B,oBAAe,GAAW,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAI7C,yBAAoB,GAAW,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;QAIhD,iCAA4B,GAAW,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;QAIzD,uBAAkB,GAAW,MAAM,CAAC;IACrC,CAAC;CAAA,CAAA;;AArBA;IADC,IAAA,YAAG,EAAC,+BAA+B,EAAE,eAAe,CAAC;;qDACvB;AAI/B;IADC,IAAA,YAAG,EAAC,8BAA8B,EAAE,eAAe,CAAC;;oDACxB;AAI7B;IADC,IAAA,YAAG,EAAC,4BAA4B,EAAE,eAAe,CAAC;;mDACN;AAI7C;IADC,IAAA,YAAG,EAAC,kCAAkC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;;wDAC1B;AAIhD;IADC,IAAA,YAAG,EAAC,2CAA2C,EAAE,eAAe,CAAC;;gEACT;AAIzD;IADC,IAAA,YAAG,EAAC,+BAA+B,EAAE,eAAe,CAAC;;sDAClB;qBAvBxB,UAAU;IADtB,eAAM;GACM,UAAU,CAwBtB"}
|