@futo-org/backups-orchestrator-api 0.9.0 → 0.10.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.
@@ -55,13 +55,10 @@ export type GatewayEvent = {
55
55
  };
56
56
  export declare class EventsGateway implements OnGatewayConnection {
57
57
  private readonly moduleConfig;
58
- private emitter;
59
58
  constructor(moduleConfig: ModuleConfigRepository);
60
59
  server?: Server;
61
60
  publish(event: GatewayEvent): void;
62
61
  emit(event: GatewayEvent): void;
63
- on(listener: (event: GatewayEvent) => void): void;
64
- off(listener: (event: GatewayEvent) => void): void;
65
62
  handleConnection(client: Socket): Promise<void>;
66
63
  private authenticate;
67
64
  }
@@ -11,29 +11,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EventsGateway = void 0;
13
13
  const websockets_1 = require("@nestjs/websockets");
14
- const node_events_1 = require("node:events");
15
14
  const socket_io_1 = require("socket.io");
16
15
  const moduleConfig_repository_1 = require("../repositories/moduleConfig.repository");
17
16
  let EventsGateway = class EventsGateway {
18
17
  moduleConfig;
19
- emitter = new node_events_1.EventEmitter();
20
18
  constructor(moduleConfig) {
21
19
  this.moduleConfig = moduleConfig;
22
20
  }
23
21
  server;
24
22
  publish(event) {
25
23
  this.server?.emit(JSON.stringify(event));
26
- this.emitter.emit('event', event);
24
+ this.moduleConfig.get().onInternalEvent?.(event);
27
25
  }
28
26
  emit(event) {
29
27
  this.server?.emit(JSON.stringify(event));
30
28
  }
31
- on(listener) {
32
- this.emitter.on('event', listener);
33
- }
34
- off(listener) {
35
- this.emitter.off('event', listener);
36
- }
37
29
  async handleConnection(client) {
38
30
  try {
39
31
  const { user } = await this.authenticate(client);
@@ -1 +1 @@
1
- {"version":3,"file":"events.gateway.js","sourceRoot":"","sources":["../../src/events/events.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAA4F;AAC5F,6CAA2C;AAC3C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AM,CAAC,CAAC;YACjD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,YAAY,CAAC,MAAc;QACvC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAEhE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,IAAI,aAAa,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YAED,OAAO;gBACL,IAAI,EAAE;oBACJ,OAAO,EAAE,IAAI;iBACd;aACF,CAAC;QACJ,CAAC;QAED,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACF,CAAA;AA3CY,sCAAa;AAIxB;IADC,IAAA,4BAAe,GAAE;8BACT,kBAAM;6CAAC;wBAJL,aAAa;IALzB,IAAA,6BAAgB,EAAC;QAChB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,CAAC,WAAW,CAAC;KAC1B,CAAC;qCAE2C,gDAAsB;GADtD,aAAa,CA2CzB"}
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export { EventsGateway, type GatewayEvent } from './events/events.gateway';
3
3
  export * from './orchestrationApi.module';
4
4
  export { LoggingRepository } from './repositories/logging.repository';
5
5
  export { ModuleConfigRepository } from './repositories/moduleConfig.repository';
6
+ export { YuccaService } from './services/yucca.service';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ModuleConfigRepository = exports.LoggingRepository = exports.EventsGateway = void 0;
17
+ exports.YuccaService = exports.ModuleConfigRepository = exports.LoggingRepository = exports.EventsGateway = void 0;
18
18
  __exportStar(require("./const"), exports);
19
19
  var events_gateway_1 = require("./events/events.gateway");
20
20
  Object.defineProperty(exports, "EventsGateway", { enumerable: true, get: function () { return events_gateway_1.EventsGateway; } });
@@ -23,4 +23,6 @@ var logging_repository_1 = require("./repositories/logging.repository");
23
23
  Object.defineProperty(exports, "LoggingRepository", { enumerable: true, get: function () { return logging_repository_1.LoggingRepository; } });
24
24
  var moduleConfig_repository_1 = require("./repositories/moduleConfig.repository");
25
25
  Object.defineProperty(exports, "ModuleConfigRepository", { enumerable: true, get: function () { return moduleConfig_repository_1.ModuleConfigRepository; } });
26
+ var yucca_service_1 = require("./services/yucca.service");
27
+ Object.defineProperty(exports, "YuccaService", { enumerable: true, get: function () { return yucca_service_1.YuccaService; } });
26
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0DAA2E;AAAlE,+GAAA,aAAa,OAAA;AACtB,4DAA0C;AAC1C,wEAAsE;AAA7D,uHAAA,iBAAiB,OAAA;AAC1B,kFAAgF;AAAvE,iIAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0DAA2E;AAAlE,+GAAA,aAAa,OAAA;AACtB,4DAA0C;AAC1C,wEAAsE;AAA7D,uHAAA,iBAAiB,OAAA;AAC1B,kFAAgF;AAAvE,iIAAA,sBAAsB,OAAA;AAC/B,0DAAwD;AAA/C,6GAAA,YAAY,OAAA"}
@@ -1,4 +1,5 @@
1
1
  import type { Socket } from 'socket.io';
2
+ import { GatewayEvent } from './events/events.gateway';
2
3
  export declare const ModuleConfigProvider: unique symbol;
3
4
  export type AuthenticatedUser = {
4
5
  user: {
@@ -24,5 +25,6 @@ export type ModuleConfig = {
24
25
  requireLock?: boolean;
25
26
  developmentMode?: boolean;
26
27
  authenticate?: AuthenticateFn;
28
+ onInternalEvent?: (event: GatewayEvent) => void;
27
29
  immichIntegration?: ImmichIntegration;
28
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"moduleConfig.js","sourceRoot":"","sources":["../src/moduleConfig.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"moduleConfig.js","sourceRoot":"","sources":["../src/moduleConfig.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC"}
@@ -37,9 +37,10 @@ import { RunHistoryService } from './services/runHistory.service';
37
37
  import { RunningTasksService } from './services/runningTasks.service';
38
38
  import { ScheduleService } from './services/schedule.service';
39
39
  import { TelemetryService } from './services/telemetry.service';
40
+ import { YuccaService } from './services/yucca.service';
40
41
  export declare const controllers: (typeof AuthController | typeof BackendController | typeof DevelopmentController | typeof FilesystemController | typeof IntegrationsController | typeof OnboardingController | typeof RepositoryController | typeof RunHistoryController | typeof RunningTasksController | typeof ScheduleController)[];
41
42
  export declare const repositories: (typeof ModuleConfigRepository | typeof LoggingRepository | 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)[];
42
- 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)[];
43
+ 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 | typeof YuccaService)[];
43
44
  export interface OrchestrationApiModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
44
45
  inject?: FactoryProvider['inject'];
45
46
  useFactory: (...args: any[]) => Promise<Partial<ModuleConfig>> | Partial<ModuleConfig>;
@@ -61,6 +61,7 @@ const runHistory_service_1 = require("./services/runHistory.service");
61
61
  const runningTasks_service_1 = require("./services/runningTasks.service");
62
62
  const schedule_service_1 = require("./services/schedule.service");
63
63
  const telemetry_service_1 = require("./services/telemetry.service");
64
+ const yucca_service_1 = require("./services/yucca.service");
64
65
  exports.controllers = [
65
66
  auth_controller_1.AuthController,
66
67
  backend_controller_1.BackendController,
@@ -103,6 +104,7 @@ exports.services = [
103
104
  runningTasks_service_1.RunningTasksService,
104
105
  schedule_service_1.ScheduleService,
105
106
  telemetry_service_1.TelemetryService,
107
+ yucca_service_1.YuccaService,
106
108
  ];
107
109
  let OrchestrationConfigModule = OrchestrationConfigModule_1 = class OrchestrationConfigModule {
108
110
  static forRootAsync(options) {
@@ -159,7 +161,7 @@ let OrchestrationApiModule = OrchestrationApiModule_1 = class OrchestrationApiMo
159
161
  ...exports.repositories,
160
162
  ...exports.services,
161
163
  ],
162
- exports: [events_gateway_1.EventsGateway, moduleConfig_repository_1.ModuleConfigRepository],
164
+ exports: [yucca_service_1.YuccaService],
163
165
  };
164
166
  }
165
167
  };
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrationApi.module.js","sourceRoot":"","sources":["../src/orchestrationApi.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwF;AACxF,uCAA+C;AAC/C,yDAA2D;AAC3D,+CAAkD;AAClD,oEAAsC;AACtC,mC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AC,CAAC;wBAC1E,QAAQ,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;wBAEtC,OAAO;4BACL,OAAO,EAAE,IAAI,sBAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;yBACzC,CAAC;oBACJ,CAAC;iBACF,CAAC;gBACF,kCAAkB,CAAC,OAAO,EAAE;gBAC5B,yBAAc,CAAC,OAAO,EAAE;aACzB;YACD,WAAW,EAAX,mBAAW;YACX,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,sBAAe,EAAE,QAAQ,EAAE,uDAAyB,EAAE;gBACjE,8BAAa;gBACb,GAAG,oBAAY;gBACf,GAAG,gBAAQ;aACZ;YACD,OAAO,EAAE,CAAC,4BAAY,CAAC;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AAtCY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,sBAAsB,CAsClC"}
@@ -0,0 +1,12 @@
1
+ import { EventsGateway, GatewayEvent } from '../events/events.gateway';
2
+ import type { ImmichIntegration } from '../moduleConfig';
3
+ import { ModuleConfigRepository } from '../repositories/moduleConfig.repository';
4
+ export declare class YuccaService {
5
+ private readonly moduleConfig;
6
+ private readonly events;
7
+ constructor(moduleConfig: ModuleConfigRepository, events: EventsGateway);
8
+ setExternalBaseUrl(externalBaseUrl: string): void;
9
+ setImmichIntegration(immichIntegration: ImmichIntegration): void;
10
+ acquireLock(): void;
11
+ emit(event: GatewayEvent): void;
12
+ }
@@ -0,0 +1,42 @@
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.YuccaService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const events_gateway_1 = require("../events/events.gateway");
15
+ const moduleConfig_repository_1 = require("../repositories/moduleConfig.repository");
16
+ let YuccaService = class YuccaService {
17
+ moduleConfig;
18
+ events;
19
+ constructor(moduleConfig, events) {
20
+ this.moduleConfig = moduleConfig;
21
+ this.events = events;
22
+ }
23
+ setExternalBaseUrl(externalBaseUrl) {
24
+ this.moduleConfig.update({ externalBaseUrl });
25
+ }
26
+ setImmichIntegration(immichIntegration) {
27
+ this.moduleConfig.update({ immichIntegration });
28
+ }
29
+ acquireLock() {
30
+ this.moduleConfig.acquireLock();
31
+ }
32
+ emit(event) {
33
+ this.events.emit(event);
34
+ }
35
+ };
36
+ exports.YuccaService = YuccaService;
37
+ exports.YuccaService = YuccaService = __decorate([
38
+ (0, common_1.Injectable)(),
39
+ __metadata("design:paramtypes", [moduleConfig_repository_1.ModuleConfigRepository,
40
+ events_gateway_1.EventsGateway])
41
+ ], YuccaService);
42
+ //# sourceMappingURL=yucca.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yucca.service.js","sourceRoot":"","sources":["../../src/services/yucca.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6DAAuE;AAEvE,qFAAiF;AAG1E,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEJ;IACA;IAFnB,YACmB,YAAoC,EACpC,MAAqB;QADrB,iBAAY,GAAZ,YAAY,CAAwB;QACpC,WAAM,GAAN,MAAM,CAAe;IACrC,CAAC;IAEJ,kBAAkB,CAAC,eAAuB;QACxC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC;IAChD,CAAC;IAED,oBAAoB,CAAC,iBAAoC;QACvD,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,WAAW;QACT,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,KAAmB;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AArBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAGsB,gDAAsB;QAC5B,8BAAa;GAH7B,YAAY,CAqBxB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@futo-org/backups-orchestrator-api",
3
3
  "repository": "https://github.com/immich-app/yucca",
4
- "version": "0.9.0",
4
+ "version": "0.10.0",
5
5
  "description": "Backups orchestrator (API)",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "rxjs": "^7.8.2",
32
32
  "socket.io": "^4.8.3",
33
33
  "tail": "^2.2.6",
34
- "@futo-org/backups-api-client": "^0.9.0"
34
+ "@futo-org/backups-api-client": "^0.10.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@nestjs/cli": "^11.0.14",