@futo-org/backups-orchestrator-api 0.1.72 → 0.4.0
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/backends/backend.d.ts +2 -2
- package/dist/backends/backend.js +2 -5
- package/dist/backends/backend.js.map +1 -1
- package/dist/backends/local.backend.d.ts +1 -0
- package/dist/backends/local.backend.js +3 -0
- package/dist/backends/local.backend.js.map +1 -1
- package/dist/backends/s3.backend.d.ts +1 -0
- package/dist/backends/s3.backend.js +3 -0
- package/dist/backends/s3.backend.js.map +1 -1
- package/dist/backends/yucca.backend.d.ts +19 -3
- package/dist/backends/yucca.backend.js +47 -22
- package/dist/backends/yucca.backend.js.map +1 -1
- package/dist/const.d.ts +2 -1
- package/dist/const.js +3 -2
- package/dist/const.js.map +1 -1
- package/dist/controllers/onboarding.controller.d.ts +2 -0
- package/dist/controllers/onboarding.controller.js +18 -0
- package/dist/controllers/onboarding.controller.js.map +1 -1
- package/dist/controllers/repository.controller.d.ts +3 -2
- package/dist/controllers/repository.controller.js +17 -3
- package/dist/controllers/repository.controller.js.map +1 -1
- package/dist/dto/backend.dto.d.ts +1 -0
- package/dist/dto/backend.dto.js +5 -0
- package/dist/dto/backend.dto.js.map +1 -1
- package/dist/dto/onboarding.dto.d.ts +4 -0
- package/dist/dto/onboarding.dto.js +16 -0
- package/dist/dto/onboarding.dto.js.map +1 -1
- package/dist/dto/repository.dto.d.ts +9 -0
- package/dist/dto/repository.dto.js +33 -1
- package/dist/dto/repository.dto.js.map +1 -1
- package/dist/enum.d.ts +10 -0
- package/dist/enum.js +13 -1
- package/dist/enum.js.map +1 -1
- package/dist/interceptors/telemetry-error.interceptor.d.ts +8 -0
- package/dist/interceptors/telemetry-error.interceptor.js +47 -0
- package/dist/interceptors/telemetry-error.interceptor.js.map +1 -0
- package/dist/moduleConfig.d.ts +1 -1
- package/dist/orchestrationApi.module.d.ts +40 -1
- package/dist/orchestrationApi.module.js +18 -9
- package/dist/orchestrationApi.module.js.map +1 -1
- package/dist/repositories/backend.repository.d.ts +2 -0
- package/dist/repositories/backend.repository.js +8 -3
- package/dist/repositories/backend.repository.js.map +1 -1
- package/dist/repositories/bootstrap.repository.d.ts +9 -0
- package/dist/repositories/bootstrap.repository.js +33 -0
- package/dist/repositories/bootstrap.repository.js.map +1 -0
- package/dist/repositories/config.repository.d.ts +2 -0
- package/dist/repositories/config.repository.js +6 -0
- package/dist/repositories/config.repository.js.map +1 -1
- package/dist/repositories/repository.repository.d.ts +2 -1
- package/dist/repositories/repository.repository.js +9 -9
- package/dist/repositories/repository.repository.js.map +1 -1
- package/dist/repositories/restic.repository.d.ts +32 -3
- package/dist/repositories/restic.repository.js +3 -7
- package/dist/repositories/restic.repository.js.map +1 -1
- package/dist/repositories/runHistory.repository.d.ts +2 -2
- package/dist/repositories/schedule.repository.d.ts +2 -2
- package/dist/schema/migrations/20260603120000-AddRepositoryRemoteId.js +13 -0
- package/dist/schema/migrations/20260603120000-AddRepositoryRemoteId.js.map +1 -0
- package/dist/schema/tables/backend.table.d.ts +1 -0
- package/dist/schema/tables/backend.table.js.map +1 -1
- package/dist/schema/tables/repository.table.d.ts +1 -0
- package/dist/schema/tables/repository.table.js +1 -0
- package/dist/schema/tables/repository.table.js.map +1 -1
- package/dist/services/auth.service.d.ts +3 -1
- package/dist/services/auth.service.js +20 -7
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/backend.service.d.ts +3 -3
- package/dist/services/backend.service.js +18 -8
- package/dist/services/backend.service.js.map +1 -1
- package/dist/services/bootstrap.service.d.ts +3 -1
- package/dist/services/bootstrap.service.js +16 -6
- package/dist/services/bootstrap.service.js.map +1 -1
- package/dist/services/integrations.service.d.ts +3 -1
- package/dist/services/integrations.service.js +10 -2
- package/dist/services/integrations.service.js.map +1 -1
- package/dist/services/onboarding.service.d.ts +7 -1
- package/dist/services/onboarding.service.js +37 -2
- package/dist/services/onboarding.service.js.map +1 -1
- package/dist/services/repository.service.d.ts +6 -3
- package/dist/services/repository.service.js +252 -79
- package/dist/services/repository.service.js.map +1 -1
- package/dist/services/schedule.service.d.ts +4 -1
- package/dist/services/schedule.service.js +38 -2
- package/dist/services/schedule.service.js.map +1 -1
- package/dist/services/telemetry.service.d.ts +9 -0
- package/dist/services/telemetry.service.js +59 -0
- package/dist/services/telemetry.service.js.map +1 -0
- package/package.json +6 -4
- package/dist/schema/migrations/20260512120000-AddRepositoryRetentionPreset.js +0 -18
- package/dist/schema/migrations/20260512120000-AddRepositoryRetentionPreset.js.map +0 -1
- package/dist/services/database.service.d.ts +0 -11
- package/dist/services/database.service.js +0 -39
- package/dist/services/database.service.js.map +0 -1
- /package/dist/schema/migrations/{20260512120000-AddRepositoryRetentionPreset.d.ts → 20260603120000-AddRepositoryRemoteId.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.dto.js","sourceRoot":"","sources":["../../src/dto/repository.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAqF;AACrF,kCAA4D;AAG5D,MAAa,kBAAkB;IAE7B,QAAQ,CAAU;IAGlB,UAAU,CAAU;IAGpB,gBAAgB,CAAU;IAG1B,eAAe,CAAU;IAGzB,gBAAgB,CAAU;IAG1B,iBAAiB,CAAU;IAG3B,gBAAgB,CAAU;CAC3B;AArBD,gDAqBC;AAnBC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oDAC7B;AAGlB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sDAC3B;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4DACrB;AAG1B;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,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,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;6EACN;AAGrB,MAAa,cAAc;IAEzB,KAAK,CAAU;CAChB;AAHD,wCAGC;AADC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACf;AAGjB,MAAa,2BAA4B,SAAQ,kBAAkB;IAEjE,SAAS,CAAiB;CAC3B;AAHD,kEAGC;AADC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;;8DACX;AAG5B,MAAa,4BAA4B;IAEvC,YAAY,CAAiC;CAC9C;AAHD,oEAGC;AADC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,2BAA2B,CAAC,EAAE,CAAC;;kEACR"}
|
package/dist/enum.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare enum CookieName {
|
|
|
9
9
|
export declare enum ConfigurationKey {
|
|
10
10
|
EncryptionKey = "encryption-key",
|
|
11
11
|
OnboardedKey = "onboarded-key",
|
|
12
|
+
Telemetry = "telemetry",
|
|
12
13
|
SkippedOnboardingExtraConfig = "skipped-onboarding-extra-config"
|
|
13
14
|
}
|
|
14
15
|
export declare enum BackendType {
|
|
@@ -30,3 +31,12 @@ export declare enum TaskType {
|
|
|
30
31
|
export declare enum InternalEvent {
|
|
31
32
|
ModuleConfigUpdated = "yucca.moduleConfig.updated"
|
|
32
33
|
}
|
|
34
|
+
export declare enum BootstrapStatus {
|
|
35
|
+
NotReady = "not-ready",
|
|
36
|
+
Ready = "ready",
|
|
37
|
+
Error = "error"
|
|
38
|
+
}
|
|
39
|
+
export declare enum TelemetryLevel {
|
|
40
|
+
Full = "full",
|
|
41
|
+
None = "none"
|
|
42
|
+
}
|
package/dist/enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalEvent = exports.TaskType = exports.TaskStatus = exports.BackendType = exports.ConfigurationKey = exports.CookieName = void 0;
|
|
3
|
+
exports.TelemetryLevel = exports.BootstrapStatus = exports.InternalEvent = exports.TaskType = exports.TaskStatus = exports.BackendType = exports.ConfigurationKey = exports.CookieName = void 0;
|
|
4
4
|
var CookieName;
|
|
5
5
|
(function (CookieName) {
|
|
6
6
|
CookieName["NextUrl"] = "sdk-next";
|
|
@@ -14,6 +14,7 @@ var ConfigurationKey;
|
|
|
14
14
|
(function (ConfigurationKey) {
|
|
15
15
|
ConfigurationKey["EncryptionKey"] = "encryption-key";
|
|
16
16
|
ConfigurationKey["OnboardedKey"] = "onboarded-key";
|
|
17
|
+
ConfigurationKey["Telemetry"] = "telemetry";
|
|
17
18
|
ConfigurationKey["SkippedOnboardingExtraConfig"] = "skipped-onboarding-extra-config";
|
|
18
19
|
})(ConfigurationKey || (exports.ConfigurationKey = ConfigurationKey = {}));
|
|
19
20
|
var BackendType;
|
|
@@ -39,4 +40,15 @@ var InternalEvent;
|
|
|
39
40
|
(function (InternalEvent) {
|
|
40
41
|
InternalEvent["ModuleConfigUpdated"] = "yucca.moduleConfig.updated";
|
|
41
42
|
})(InternalEvent || (exports.InternalEvent = InternalEvent = {}));
|
|
43
|
+
var BootstrapStatus;
|
|
44
|
+
(function (BootstrapStatus) {
|
|
45
|
+
BootstrapStatus["NotReady"] = "not-ready";
|
|
46
|
+
BootstrapStatus["Ready"] = "ready";
|
|
47
|
+
BootstrapStatus["Error"] = "error";
|
|
48
|
+
})(BootstrapStatus || (exports.BootstrapStatus = BootstrapStatus = {}));
|
|
49
|
+
var TelemetryLevel;
|
|
50
|
+
(function (TelemetryLevel) {
|
|
51
|
+
TelemetryLevel["Full"] = "full";
|
|
52
|
+
TelemetryLevel["None"] = "none";
|
|
53
|
+
})(TelemetryLevel || (exports.TelemetryLevel = TelemetryLevel = {}));
|
|
42
54
|
//# sourceMappingURL=enum.js.map
|
package/dist/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,kCAAoB,CAAA;IACpB,0CAA4B,CAAA;IAC5B,yDAA2C,CAAA;IAC3C,qDAAuC,CAAA;IACvC,iDAAmC,CAAA;IACnC,gEAAkD,CAAA;AACpD,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../src/enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,kCAAoB,CAAA;IACpB,0CAA4B,CAAA;IAC5B,yDAA2C,CAAA;IAC3C,qDAAuC,CAAA;IACvC,iDAAmC,CAAA;IACnC,gEAAkD,CAAA;AACpD,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,oDAAgC,CAAA;IAChC,kDAA8B,CAAA;IAC9B,2CAAuB,CAAA;IACvB,oFAAgE,CAAA;AAClE,CAAC,EALW,gBAAgB,gCAAhB,gBAAgB,QAK3B;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,wBAAS,CAAA;AACX,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;AACnB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB;AAED,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,mEAAkD,CAAA;AACpD,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { TelemetryService } from '../services/telemetry.service';
|
|
4
|
+
export declare class TelemetryErrorInterceptor implements NestInterceptor {
|
|
5
|
+
private readonly telemetry;
|
|
6
|
+
constructor(telemetry: TelemetryService);
|
|
7
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.TelemetryErrorInterceptor = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const constants_1 = require("@nestjs/common/constants");
|
|
15
|
+
const rxjs_1 = require("rxjs");
|
|
16
|
+
const telemetry_service_1 = require("../services/telemetry.service");
|
|
17
|
+
let TelemetryErrorInterceptor = class TelemetryErrorInterceptor {
|
|
18
|
+
telemetry;
|
|
19
|
+
constructor(telemetry) {
|
|
20
|
+
this.telemetry = telemetry;
|
|
21
|
+
}
|
|
22
|
+
intercept(context, next) {
|
|
23
|
+
const controllerPath = Reflect.getMetadata(constants_1.PATH_METADATA, context.getClass());
|
|
24
|
+
const isYuccaRoute = typeof controllerPath === 'string' && controllerPath.replace(/^\/+/, '').startsWith('yucca');
|
|
25
|
+
if (!isYuccaRoute) {
|
|
26
|
+
return next.handle();
|
|
27
|
+
}
|
|
28
|
+
return next.handle().pipe((0, rxjs_1.catchError)((error) => {
|
|
29
|
+
const status = error instanceof common_1.HttpException ? error.getStatus() : 500;
|
|
30
|
+
if (status >= 500) {
|
|
31
|
+
const request = context.switchToHttp().getRequest();
|
|
32
|
+
this.telemetry.submitStructuredLog('Unhandled request error', {
|
|
33
|
+
method: request?.method,
|
|
34
|
+
path: request?.url,
|
|
35
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return (0, rxjs_1.throwError)(() => error);
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.TelemetryErrorInterceptor = TelemetryErrorInterceptor;
|
|
43
|
+
exports.TelemetryErrorInterceptor = TelemetryErrorInterceptor = __decorate([
|
|
44
|
+
(0, common_1.Injectable)(),
|
|
45
|
+
__metadata("design:paramtypes", [telemetry_service_1.TelemetryService])
|
|
46
|
+
], TelemetryErrorInterceptor);
|
|
47
|
+
//# sourceMappingURL=telemetry-error.interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-error.interceptor.js","sourceRoot":"","s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ED,OAAO,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAA;AA7BY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAE6B,oCAAgB;GAD7C,yBAAyB,CA6BrC"}
|
package/dist/moduleConfig.d.ts
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { AuthController } from './controllers/auth.controller';
|
|
3
|
+
import { BackendController } from './controllers/backend.controller';
|
|
4
|
+
import { DevelopmentController } from './controllers/development.controller';
|
|
5
|
+
import { FilesystemController } from './controllers/filesystem.controller';
|
|
6
|
+
import { IntegrationsController } from './controllers/integrations.controller';
|
|
7
|
+
import { OnboardingController } from './controllers/onboarding.controller';
|
|
8
|
+
import { RepositoryController } from './controllers/repository.controller';
|
|
9
|
+
import { RunHistoryController } from './controllers/runHistory.controller';
|
|
10
|
+
import { RunningTasksController } from './controllers/runningTasks.controller';
|
|
11
|
+
import { ScheduleController } from './controllers/schedule.controller';
|
|
2
12
|
import { type ModuleConfig } from './moduleConfig';
|
|
13
|
+
import { BackendRepository } from './repositories/backend.repository';
|
|
14
|
+
import { BootstrapRepository } from './repositories/bootstrap.repository';
|
|
15
|
+
import { ConfigRepository } from './repositories/config.repository';
|
|
16
|
+
import { DatabaseRepository } from './repositories/database.repository';
|
|
17
|
+
import { ModuleConfigRepository } from './repositories/moduleConfig.repository';
|
|
18
|
+
import { RepositoryRepository } from './repositories/repository.repository';
|
|
19
|
+
import { RepositoryIntegrationImmichRepository } from './repositories/repositoryIntegrationImmich.repository';
|
|
20
|
+
import { RepositoryLocalMetricsRepository } from './repositories/repositoryLocalMetrics.repository';
|
|
21
|
+
import { RepositoryPathRepository } from './repositories/repositoryPath.repository';
|
|
22
|
+
import { ResticRepository } from './repositories/restic.repository';
|
|
23
|
+
import { RunHistoryRepository } from './repositories/runHistory.repository';
|
|
24
|
+
import { RunningTasksRepository } from './repositories/runningTasks.repository';
|
|
25
|
+
import { ScheduleRepository } from './repositories/schedule.repository';
|
|
26
|
+
import { StorageRepository } from './repositories/storage.repository';
|
|
27
|
+
import { AuthService } from './services/auth.service';
|
|
28
|
+
import { BackendService } from './services/backend.service';
|
|
29
|
+
import { BootstrapService } from './services/bootstrap.service';
|
|
30
|
+
import { DevelopmentService } from './services/development.service';
|
|
31
|
+
import { FilesystemService } from './services/filesystem.service';
|
|
32
|
+
import { IntegrationsService } from './services/integrations.service';
|
|
33
|
+
import { OnboardingService } from './services/onboarding.service';
|
|
34
|
+
import { RepositoryService } from './services/repository.service';
|
|
35
|
+
import { RunHistoryService } from './services/runHistory.service';
|
|
36
|
+
import { RunningTasksService } from './services/runningTasks.service';
|
|
37
|
+
import { ScheduleService } from './services/schedule.service';
|
|
38
|
+
import { TelemetryService } from './services/telemetry.service';
|
|
39
|
+
export declare const controllers: (typeof AuthController | typeof BackendController | typeof DevelopmentController | typeof FilesystemController | typeof IntegrationsController | typeof OnboardingController | typeof RepositoryController | typeof RunHistoryController | typeof RunningTasksController | typeof ScheduleController)[];
|
|
40
|
+
export declare const repositories: (typeof ModuleConfigRepository | typeof BackendRepository | typeof ConfigRepository | typeof BootstrapRepository | typeof StorageRepository | typeof DatabaseRepository | typeof RunHistoryRepository | typeof RepositoryIntegrationImmichRepository | typeof RunningTasksRepository | typeof ScheduleRepository | typeof RepositoryRepository | typeof RepositoryLocalMetricsRepository | typeof RepositoryPathRepository | typeof ResticRepository)[];
|
|
41
|
+
export declare const services: (typeof TelemetryService | typeof AuthService | typeof BackendService | typeof RepositoryService | typeof BootstrapService | typeof ScheduleService | typeof DevelopmentService | typeof FilesystemService | typeof IntegrationsService | typeof OnboardingService | typeof RunningTasksService | typeof RunHistoryService)[];
|
|
3
42
|
export declare class OrchestrationApiModule {
|
|
4
|
-
static forRoot(config: Partial<ModuleConfig>
|
|
43
|
+
static forRoot(config: Partial<ModuleConfig>): DynamicModule;
|
|
5
44
|
}
|
|
@@ -10,8 +10,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
};
|
|
11
11
|
var OrchestrationApiModule_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.OrchestrationApiModule = void 0;
|
|
13
|
+
exports.OrchestrationApiModule = exports.services = exports.repositories = exports.controllers = void 0;
|
|
14
14
|
const common_1 = require("@nestjs/common");
|
|
15
|
+
const core_1 = require("@nestjs/core");
|
|
15
16
|
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
16
17
|
const schedule_1 = require("@nestjs/schedule");
|
|
17
18
|
const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
|
|
@@ -31,8 +32,10 @@ const runHistory_controller_1 = require("./controllers/runHistory.controller");
|
|
|
31
32
|
const runningTasks_controller_1 = require("./controllers/runningTasks.controller");
|
|
32
33
|
const schedule_controller_1 = require("./controllers/schedule.controller");
|
|
33
34
|
const events_gateway_1 = require("./events/events.gateway");
|
|
35
|
+
const telemetry_error_interceptor_1 = require("./interceptors/telemetry-error.interceptor");
|
|
34
36
|
const moduleConfig_1 = require("./moduleConfig");
|
|
35
37
|
const backend_repository_1 = require("./repositories/backend.repository");
|
|
38
|
+
const bootstrap_repository_1 = require("./repositories/bootstrap.repository");
|
|
36
39
|
const config_repository_1 = require("./repositories/config.repository");
|
|
37
40
|
const database_repository_1 = require("./repositories/database.repository");
|
|
38
41
|
const moduleConfig_repository_1 = require("./repositories/moduleConfig.repository");
|
|
@@ -56,7 +59,8 @@ const repository_service_1 = require("./services/repository.service");
|
|
|
56
59
|
const runHistory_service_1 = require("./services/runHistory.service");
|
|
57
60
|
const runningTasks_service_1 = require("./services/runningTasks.service");
|
|
58
61
|
const schedule_service_1 = require("./services/schedule.service");
|
|
59
|
-
const
|
|
62
|
+
const telemetry_service_1 = require("./services/telemetry.service");
|
|
63
|
+
exports.controllers = [
|
|
60
64
|
auth_controller_1.AuthController,
|
|
61
65
|
backend_controller_1.BackendController,
|
|
62
66
|
development_controller_1.DevelopmentController,
|
|
@@ -68,8 +72,9 @@ const controllers = [
|
|
|
68
72
|
runningTasks_controller_1.RunningTasksController,
|
|
69
73
|
schedule_controller_1.ScheduleController,
|
|
70
74
|
];
|
|
71
|
-
|
|
75
|
+
exports.repositories = [
|
|
72
76
|
backend_repository_1.BackendRepository,
|
|
77
|
+
bootstrap_repository_1.BootstrapRepository,
|
|
73
78
|
config_repository_1.ConfigRepository,
|
|
74
79
|
database_repository_1.DatabaseRepository,
|
|
75
80
|
moduleConfig_repository_1.ModuleConfigRepository,
|
|
@@ -83,7 +88,7 @@ const repositories = [
|
|
|
83
88
|
schedule_repository_1.ScheduleRepository,
|
|
84
89
|
storage_repository_1.StorageRepository,
|
|
85
90
|
];
|
|
86
|
-
|
|
91
|
+
exports.services = [
|
|
87
92
|
auth_service_1.AuthService,
|
|
88
93
|
backend_service_1.BackendService,
|
|
89
94
|
bootstrap_service_1.BootstrapService,
|
|
@@ -95,13 +100,11 @@ const services = [
|
|
|
95
100
|
runHistory_service_1.RunHistoryService,
|
|
96
101
|
runningTasks_service_1.RunningTasksService,
|
|
97
102
|
schedule_service_1.ScheduleService,
|
|
103
|
+
telemetry_service_1.TelemetryService,
|
|
98
104
|
];
|
|
99
105
|
let OrchestrationApiModule = OrchestrationApiModule_1 = class OrchestrationApiModule {
|
|
100
106
|
static forRoot(config) {
|
|
101
107
|
config.statePath ??= (0, node_path_1.resolve)((0, node_os_1.homedir)(), '.yucca');
|
|
102
|
-
if (!config.yuccaProductionApi) {
|
|
103
|
-
throw new Error('config.yuccaProductionApi is missing');
|
|
104
|
-
}
|
|
105
108
|
return {
|
|
106
109
|
module: OrchestrationApiModule_1,
|
|
107
110
|
imports: [
|
|
@@ -121,8 +124,14 @@ let OrchestrationApiModule = OrchestrationApiModule_1 = class OrchestrationApiMo
|
|
|
121
124
|
event_emitter_1.EventEmitterModule.forRoot(),
|
|
122
125
|
schedule_1.ScheduleModule.forRoot(),
|
|
123
126
|
],
|
|
124
|
-
controllers,
|
|
125
|
-
providers: [
|
|
127
|
+
controllers: exports.controllers,
|
|
128
|
+
providers: [
|
|
129
|
+
{ provide: moduleConfig_1.ModuleConfigProvider, useValue: config },
|
|
130
|
+
{ provide: core_1.APP_INTERCEPTOR, useClass: telemetry_error_interceptor_1.TelemetryErrorInterceptor },
|
|
131
|
+
events_gateway_1.EventsGateway,
|
|
132
|
+
...exports.repositories,
|
|
133
|
+
...exports.services,
|
|
134
|
+
],
|
|
126
135
|
exports: [events_gateway_1.EventsGateway, moduleConfig_repository_1.ModuleConfigRepository],
|
|
127
136
|
};
|
|
128
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrationApi.module.js","sourceRoot":"","sources":["../src/orchestrationApi.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAuD;AACvD,yDAA2D;AAC3D,+CAAkD;AAClD,oEAAsC;AACtC,mCAAuC;AACvC,iDAA6C;AAC7C,qCAAgD;AAChD,qCAAkC;AAClC,yCAAoC;AACpC,mEAA+D;AAC/D,yEAAqE;AACrE,iFAA6E;AAC7E,+EAA2E;AAC3E,mFAA+E;AAC/E,+EAA2E;AAC3E,+EAA2E;AAC3E,+EAA2E;AAC3E,mFAA+E;AAC/E,2EAAuE;AACvE,4DAAwD;AACxD,iDAAyE;AACzE,0EAAsE;AACtE,wEAAoE;AACpE,4EAAwE;AACxE,oFAAgF;AAChF,gFAA4E;AAC5E,kHAA8G;AAC9G,wGAAoG;AACpG,wFAAoF;AACpF,wEAAoE;AACpE,gFAA4E;AAC5E,oFAAgF;AAChF,4EAAwE;AACxE,0EAAsE;AACtE,0DAAsD;AACtD,gEAA4D;AAC5D,oEAAgE;AAChE,wEAAoE;AACpE,sEAAkE;AAClE,0EAAsE;AACtE,sEAAkE;AAClE,sEAAkE;AAClE,sEAAkE;AAClE,0EAAsE;AACtE,kEAA8D;
|
|
1
|
+
{"version":3,"file":"orchestrationApi.module.js","sourceRoot":"","sources":["../src/orchestrationApi.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAuD;AACvD,uCAA+C;AAC/C,yDAA2D;AAC3D,+CAAkD;AAClD,oEAAsC;AACtC,mCAAuC;AACvC,iDAA6C;AAC7C,qCAAgD;AAChD,qCAAkC;AAClC,yCAAoC;AACpC,mEAA+D;AAC/D,yEAAqE;AACrE,iFAA6E;AAC7E,+EAA2E;AAC3E,mFAA+E;AAC/E,+EAA2E;AAC3E,+EAA2E;AAC3E,+EAA2E;AAC3E,mFAA+E;AAC/E,2EAAuE;AACvE,4DAAwD;AACxD,4FAAuF;AACvF,iDAAyE;AACzE,0EAAsE;AACtE,8EAA0E;AAC1E,wEAAoE;AACpE,4EAAwE;AACxE,oFAAgF;AAChF,gFAA4E;AAC5E,kHAA8G;AAC9G,wGAAoG;AACpG,wFAAoF;AACpF,wEAAoE;AACpE,gFAA4E;AAC5E,oFAAgF;AAChF,4EAAwE;AACxE,0EAAsE;AACtE,0DAAsD;AACtD,gEAA4D;AAC5D,oEAAgE;AAChE,wEAAoE;AACpE,sEAAkE;AAClE,0EAAsE;AACtE,sEAAkE;AAClE,sEAAkE;AAClE,sEAAkE;AAClE,0EAAsE;AACtE,kEAA8D;AAC9D,oEAAgE;AAEnD,QAAA,WAAW,GAAG;IACzB,gCAAc;IACd,sCAAiB;IACjB,8CAAqB;IACrB,4CAAoB;IACpB,gDAAsB;IACtB,4CAAoB;IACpB,4CAAoB;IACpB,4CAAoB;IACpB,gDAAsB;IACtB,wCAAkB;CACnB,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,sCAAiB;IACjB,0CAAmB;IACnB,oCAAgB;IAChB,wCAAkB;IAClB,gDAAsB;IACtB,4CAAoB;IACpB,8EAAqC;IACrC,oEAAgC;IAChC,oDAAwB;IACxB,oCAAgB;IAChB,4CAAoB;IACpB,gDAAsB;IACtB,wCAAkB;IAClB,sCAAiB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yB,EAAE;gBACjE,8BAAa;gBACb,GAAG,oBAAY;gBACf,GAAG,gBAAQ;aACZ;YACD,OAAO,EAAE,CAAC,8BAAa,EAAE,gDAAsB,CAAC;SACjD,CAAC;IACJ,CAAC;CACF,CAAA;AApCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,sBAAsB,CAoClC"}
|
|
@@ -11,9 +11,11 @@ export declare class BackendRepository {
|
|
|
11
11
|
getBackends(): Promise<{
|
|
12
12
|
id: string;
|
|
13
13
|
configuration: BackendConfiguration;
|
|
14
|
+
backend: import("../backends/local.backend").LocalBackend | import("../backends/s3.backend").S3Backend | import("../backends/yucca.backend").YuccaBackend;
|
|
14
15
|
}[]>;
|
|
15
16
|
getBackend(id: string): Promise<{
|
|
16
17
|
id: string;
|
|
17
18
|
configuration: BackendConfiguration;
|
|
19
|
+
backend: import("../backends/local.backend").LocalBackend | import("../backends/s3.backend").S3Backend | import("../backends/yucca.backend").YuccaBackend;
|
|
18
20
|
}>;
|
|
19
21
|
}
|
|
@@ -16,6 +16,7 @@ exports.BackendRepository = void 0;
|
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const kysely_1 = require("kysely");
|
|
18
18
|
const nestjs_kysely_1 = require("nestjs-kysely");
|
|
19
|
+
const backend_1 = require("../backends/backend");
|
|
19
20
|
let BackendRepository = class BackendRepository {
|
|
20
21
|
db;
|
|
21
22
|
constructor(db) {
|
|
@@ -34,10 +35,12 @@ let BackendRepository = class BackendRepository {
|
|
|
34
35
|
}
|
|
35
36
|
async getBackends() {
|
|
36
37
|
const backends = await this.db.selectFrom('backends').selectAll('backends').execute();
|
|
37
|
-
return backends
|
|
38
|
+
return backends
|
|
39
|
+
.map(({ id, configuration }) => ({
|
|
38
40
|
id,
|
|
39
41
|
configuration: JSON.parse(configuration),
|
|
40
|
-
}))
|
|
42
|
+
}))
|
|
43
|
+
.map(({ id, configuration }) => ({ id, configuration, backend: backend_1.Backend.from(configuration) }));
|
|
41
44
|
}
|
|
42
45
|
async getBackend(id) {
|
|
43
46
|
const backend = await this.db
|
|
@@ -45,9 +48,11 @@ let BackendRepository = class BackendRepository {
|
|
|
45
48
|
.selectAll('backends')
|
|
46
49
|
.where('id', '=', id)
|
|
47
50
|
.executeTakeFirstOrThrow();
|
|
51
|
+
const configuration = JSON.parse(backend.configuration);
|
|
48
52
|
return {
|
|
49
53
|
id: backend.id,
|
|
50
|
-
configuration
|
|
54
|
+
configuration,
|
|
55
|
+
backend: backend_1.Backend.from(configuration),
|
|
51
56
|
};
|
|
52
57
|
}
|
|
53
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.repository.js","sourceRoot":"","sources":["../../src/repositories/backend.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAgC;AAChC,iDAA6C;
|
|
1
|
+
{"version":3,"file":"backend.repository.js","sourceRoot":"","sources":["../../src/repositories/backend.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAgC;AAChC,iDAA6C;AAC7C,iDAA8C;AAKvC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IACsB;IAAlD,YAAkD,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;IAAG,CAAC;IAEpE,KAAK,CAAC,aAAa,CAAC,EAAU,EAAE,aAAmC;QACjE,OAAO,MAAM,IAAI,CAAC,EAAE;aACjB,UAAU,CAAC,UAAU,CAAC;aACtB,MAAM,CAAC;YACN,EAAE;YACF,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;SAC7C,CAAC;aACD,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;aACpF,YAAY,EAAE;aACd,uBAAuB,EAAE,CAAC;I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, 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BootstrapRepository = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const enum_1 = require("../enum");
|
|
12
|
+
let BootstrapRepository = class BootstrapRepository {
|
|
13
|
+
status = enum_1.BootstrapStatus.NotReady;
|
|
14
|
+
error;
|
|
15
|
+
markReady() {
|
|
16
|
+
this.status = enum_1.BootstrapStatus.Ready;
|
|
17
|
+
}
|
|
18
|
+
markFailed(error) {
|
|
19
|
+
this.status = enum_1.BootstrapStatus.Error;
|
|
20
|
+
this.error = error;
|
|
21
|
+
}
|
|
22
|
+
getStatus() {
|
|
23
|
+
return this.status;
|
|
24
|
+
}
|
|
25
|
+
getError() {
|
|
26
|
+
return this.error;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.BootstrapRepository = BootstrapRepository;
|
|
30
|
+
exports.BootstrapRepository = BootstrapRepository = __decorate([
|
|
31
|
+
(0, common_1.Injectable)()
|
|
32
|
+
], BootstrapRepository);
|
|
33
|
+
//# sourceMappingURL=bootstrap.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.repository.js","sourceRoot":"","sources":["../../src/repositories/bootstrap.repository.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,kCAA0C;AAGnC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IACtB,MAAM,GAAoB,sBAAe,CAAC,QAAQ,CAAC;IACnD,KAAK,CAAM;IAEnB,SAAS;QACP,IAAI,CAAC,MAAM,GAAG,sBAAe,CAAC,KAAK,CAAC;IACtC,CAAC;IAED,UAAU,CAAC,KAAU;QACnB,IAAI,CAAC,MAAM,GAAG,sBAAe,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF,CAAA;AApBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;GACA,mBAAmB,CAoB/B"}
|
|
@@ -13,6 +13,8 @@ export declare class ConfigRepository {
|
|
|
13
13
|
importEncryptionKey(key: string): Promise<void>;
|
|
14
14
|
hasOnboardedKey(): Promise<boolean>;
|
|
15
15
|
confirmKeyOnboarded(): Promise<void>;
|
|
16
|
+
hasTelemetry(): Promise<boolean>;
|
|
17
|
+
enableTelemetry(): Promise<void>;
|
|
16
18
|
hasSkippedExtraConfig(): Promise<boolean>;
|
|
17
19
|
skipExtraConfig(): Promise<void>;
|
|
18
20
|
}
|
|
@@ -77,6 +77,12 @@ let ConfigRepository = class ConfigRepository {
|
|
|
77
77
|
async confirmKeyOnboarded() {
|
|
78
78
|
return this.set(enum_1.ConfigurationKey.OnboardedKey, '1');
|
|
79
79
|
}
|
|
80
|
+
async hasTelemetry() {
|
|
81
|
+
return this.has(enum_1.ConfigurationKey.Telemetry);
|
|
82
|
+
}
|
|
83
|
+
async enableTelemetry() {
|
|
84
|
+
return this.set(enum_1.ConfigurationKey.Telemetry, 'full');
|
|
85
|
+
}
|
|
80
86
|
async hasSkippedExtraConfig() {
|
|
81
87
|
return this.has(enum_1.ConfigurationKey.SkippedOnboardingExtraConfig);
|
|
82
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{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AC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAgB,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,mBAAmB;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAgB,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAgB,CAAC,4BAA4B,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAgB,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IACtE,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"config.repository.js","sourceRoot":"","sources":["../../src/repositories/config.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAgC;AAChC,iDAA6C;AAC7C,6CAA0C;AAC1C,kCAA2C;AAIpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACuB;IAAlD,YAAkD,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;IAAG,CAAC;IAEpE,KAAK,CAAC,SAAS;QACb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE7C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,CAAC,GAAG,CAAC,uBAAgB,CAAC,aAAa,EAAE,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,GAAG,CAAC,GAAqB,EAAE,KAAa;QACpD,MAAM,IAAI,CAAC,EAAE;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC;YACN,GAAG;YACH,KAAK;SACN,CAAC;aACD,UAAU,CAAC,CAAC,EAA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AU,GAAE;IAEE,WAAA,IAAA,4BAAY,EAAC,cAAc,CAAC,CAAA;qCAAa,eAAM;GADjD,gBAAgB,CA6F5B"}
|
|
@@ -3,6 +3,7 @@ import { DB } from '../schema';
|
|
|
3
3
|
import { RetentionPolicy } from '../utils/restic';
|
|
4
4
|
type RepositoryRow = {
|
|
5
5
|
id: string;
|
|
6
|
+
remoteId: string;
|
|
6
7
|
backendId: string;
|
|
7
8
|
retentionPolicy: RetentionPolicy | null;
|
|
8
9
|
};
|
|
@@ -10,7 +11,7 @@ export declare class RepositoryRepository {
|
|
|
10
11
|
private db;
|
|
11
12
|
constructor(db: Kysely<DB>);
|
|
12
13
|
create(repository: RepositoryRow): Promise<RepositoryRow>;
|
|
13
|
-
update(id: string, patch: Partial<
|
|
14
|
+
update(id: string, patch: Partial<Omit<RepositoryRow, 'id'>>): Promise<void>;
|
|
14
15
|
get(id: string): Promise<RepositoryRow>;
|
|
15
16
|
getAll(): Promise<RepositoryRow[]>;
|
|
16
17
|
delete(id: string): Promise<void>;
|
|
@@ -26,6 +26,7 @@ let RepositoryRepository = class RepositoryRepository {
|
|
|
26
26
|
.insertInto('repositories')
|
|
27
27
|
.values({
|
|
28
28
|
id: repository.id,
|
|
29
|
+
remoteId: repository.remoteId,
|
|
29
30
|
backendId: repository.backendId,
|
|
30
31
|
retentionPolicy: repository.retentionPolicy === null ? null : JSON.stringify(repository.retentionPolicy),
|
|
31
32
|
})
|
|
@@ -34,15 +35,12 @@ let RepositoryRepository = class RepositoryRepository {
|
|
|
34
35
|
return repository;
|
|
35
36
|
}
|
|
36
37
|
async update(id, patch) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
.where('id', '=', id)
|
|
45
|
-
.execute();
|
|
38
|
+
const { retentionPolicy, ...rest } = patch;
|
|
39
|
+
const set = { ...rest };
|
|
40
|
+
if ('retentionPolicy' in patch) {
|
|
41
|
+
set.retentionPolicy = retentionPolicy === null ? null : JSON.stringify(retentionPolicy);
|
|
42
|
+
}
|
|
43
|
+
await this.db.updateTable('repositories').set(set).where('id', '=', id).execute();
|
|
46
44
|
}
|
|
47
45
|
async get(id) {
|
|
48
46
|
const row = await this.db
|
|
@@ -52,6 +50,7 @@ let RepositoryRepository = class RepositoryRepository {
|
|
|
52
50
|
.executeTakeFirstOrThrow();
|
|
53
51
|
return {
|
|
54
52
|
id: row.id,
|
|
53
|
+
remoteId: row.remoteId,
|
|
55
54
|
backendId: row.backendId,
|
|
56
55
|
retentionPolicy: row.retentionPolicy === null ? null : JSON.parse(row.retentionPolicy),
|
|
57
56
|
};
|
|
@@ -60,6 +59,7 @@ let RepositoryRepository = class RepositoryRepository {
|
|
|
60
59
|
const rows = await this.db.selectFrom('repositories').selectAll('repositories').execute();
|
|
61
60
|
return rows.map((row) => ({
|
|
62
61
|
id: row.id,
|
|
62
|
+
remoteId: row.remoteId,
|
|
63
63
|
backendId: row.backendId,
|
|
64
64
|
retentionPolicy: row.retentionPolicy === null ? null : JSON.parse(row.retentionPolicy),
|
|
65
65
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.repository.js","sourceRoot":"","sources":["../../src/repositories/repository.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"repository.repository.js","sourceRoot":"","sources":["../../src/repositories/repository.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAA4C;AAC5C,iDAA6C;AAatC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACmB;IAAlD,YAAkD,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;IAAG,CAAC;IAEpE,KAAK,CAAC,MAAM,CAAC,UAAyB;QACpC,MAAM,IAAI,CAAC,EAAE;aACV,UAAU,CAAC,cAAc,CAAC;aAC1B,MAAM,CAAC;YACN,EAAE,EAAE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CAAC,OAAO,EAAE,CAAC;QAChF,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC1E,CAAC;CACF,CAAA;AA5DY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,4BAAY,EAAC,cAAc,CAAC,CAAA;qCAAa,eAAM;GADjD,oBAAoB,CA4DhC"}
|
|
@@ -3,8 +3,37 @@ import { RepositorySnapshotRestoreRequestDto } from '../dto/repository.dto';
|
|
|
3
3
|
import { RetentionPolicy } from '../utils/restic';
|
|
4
4
|
export declare class ResticRepository {
|
|
5
5
|
init(repository: string, key: Uint8Array): Promise<void>;
|
|
6
|
-
backup(repository: string, key: Uint8Array, paths: string[], logStream?: Writable, signal?: AbortSignal): Promise<
|
|
7
|
-
|
|
6
|
+
backup(repository: string, key: Uint8Array, paths: string[], logStream?: Writable, signal?: AbortSignal): Promise<{
|
|
7
|
+
message_type: "summary";
|
|
8
|
+
dry_run: boolean;
|
|
9
|
+
files_new: number;
|
|
10
|
+
files_changed: number;
|
|
11
|
+
files_unmodified: number;
|
|
12
|
+
dirs_new: number;
|
|
13
|
+
dirs_changed: number;
|
|
14
|
+
dirs_unmodified: number;
|
|
15
|
+
data_blobs: number;
|
|
16
|
+
tree_blobs: number;
|
|
17
|
+
data_added: number;
|
|
18
|
+
data_added_packed: number;
|
|
19
|
+
total_files_processed: number;
|
|
20
|
+
total_bytes_processed: number;
|
|
21
|
+
backup_start: Date;
|
|
22
|
+
backup_end: Date;
|
|
23
|
+
total_duration: number;
|
|
24
|
+
snapshot_id?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
restore(repository: string, key: Uint8Array, snapshotId: string, { include, target }: RepositorySnapshotRestoreRequestDto, logStream?: Writable, signal?: AbortSignal): Promise<{
|
|
27
|
+
message_type: "summary";
|
|
28
|
+
seconds_elapsed?: number | undefined;
|
|
29
|
+
total_files?: number | undefined;
|
|
30
|
+
files_restored?: number | undefined;
|
|
31
|
+
files_skipped?: number | undefined;
|
|
32
|
+
files_deleted?: number | undefined;
|
|
33
|
+
total_bytes?: number | undefined;
|
|
34
|
+
bytes_restored?: number | undefined;
|
|
35
|
+
bytes_skipped?: number | undefined;
|
|
36
|
+
}>;
|
|
8
37
|
ls(repository: string, key: Uint8Array, snapshotId: string, path: string): Promise<({
|
|
9
38
|
time: Date;
|
|
10
39
|
tree: string;
|
|
@@ -203,5 +232,5 @@ export declare class ResticRepository {
|
|
|
203
232
|
hostName: string;
|
|
204
233
|
created: Date;
|
|
205
234
|
}[]>;
|
|
206
|
-
unlockAll(repository: string, key: Uint8Array): Promise<
|
|
235
|
+
unlockAll(repository: string, key: Uint8Array): Promise<void>;
|
|
207
236
|
}
|
|
@@ -16,7 +16,7 @@ let ResticRepository = class ResticRepository {
|
|
|
16
16
|
}
|
|
17
17
|
async backup(repository, key, paths, logStream, signal) {
|
|
18
18
|
const write = (0, restic_1.createSampledLogWriter)(logStream);
|
|
19
|
-
await (0, restic_wrapper_1.backup)()
|
|
19
|
+
return await (0, restic_wrapper_1.backup)()
|
|
20
20
|
.repository(repository)
|
|
21
21
|
.password(Buffer.from(key).toString('hex'))
|
|
22
22
|
.addFile(...paths)
|
|
@@ -36,7 +36,7 @@ let ResticRepository = class ResticRepository {
|
|
|
36
36
|
if (include) {
|
|
37
37
|
command = command.include(...include);
|
|
38
38
|
}
|
|
39
|
-
await command.run();
|
|
39
|
+
return await command.run();
|
|
40
40
|
}
|
|
41
41
|
async ls(repository, key, snapshotId, path) {
|
|
42
42
|
return await (0, restic_wrapper_1.ls)()
|
|
@@ -82,11 +82,7 @@ let ResticRepository = class ResticRepository {
|
|
|
82
82
|
return await (0, restic_wrapper_1.keyList)().repository(repository).password(Buffer.from(key).toString('hex')).run();
|
|
83
83
|
}
|
|
84
84
|
async unlockAll(repository, key) {
|
|
85
|
-
return await (0, restic_wrapper_1.unlock)()
|
|
86
|
-
.removeAll()
|
|
87
|
-
.repository(repository)
|
|
88
|
-
.password(Buffer.from(key).toString('hex'))
|
|
89
|
-
.run();
|
|
85
|
+
return await (0, restic_wrapper_1.unlock)().removeAll().repository(repository).password(Buffer.from(key).toString('hex')).run();
|
|
90
86
|
}
|
|
91
87
|
};
|
|
92
88
|
exports.ResticRepository = ResticRepository;
|