@forzalabs/remora 1.0.2 → 1.0.4

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.
@@ -47,8 +47,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
48
  const cron = __importStar(require("node-cron"));
49
49
  const Environment_1 = __importDefault(require("../Environment"));
50
- const UserManager_1 = __importDefault(require("../UserManager"));
51
50
  const ExecutorOrchestrator_1 = __importDefault(require("../../executors/ExecutorOrchestrator"));
51
+ const settings_1 = require("../../settings");
52
52
  class CronScheduler {
53
53
  constructor() {
54
54
  this.scheduledJobs = new Map();
@@ -124,7 +124,7 @@ class CronScheduler {
124
124
  return __awaiter(this, void 0, void 0, function* () {
125
125
  try {
126
126
  console.log(`Executing CRON job for consumer "${consumer.name}" output ${outputIndex}`);
127
- const user = UserManager_1.default.getRemoraWorkerUser();
127
+ const user = settings_1.REMORA_WORKER_USER;
128
128
  const runner = { _id: user._id, name: user.name, type: 'actor' };
129
129
  const result = yield ExecutorOrchestrator_1.default.launch({
130
130
  consumer,
@@ -14,9 +14,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const client_sqs_1 = require("@aws-sdk/client-sqs");
16
16
  const Environment_1 = __importDefault(require("../Environment"));
17
- const UserManager_1 = __importDefault(require("../UserManager"));
18
17
  const SecretManager_1 = __importDefault(require("../SecretManager"));
19
18
  const ExecutorOrchestrator_1 = __importDefault(require("../../executors/ExecutorOrchestrator"));
19
+ const settings_1 = require("../../settings");
20
20
  class QueueManager {
21
21
  constructor() {
22
22
  this.queueMappings = new Map();
@@ -198,7 +198,7 @@ class QueueManager {
198
198
  }
199
199
  }
200
200
  console.log(`Processing queue message for consumer "${mapping.consumer.name}" output ${mapping.outputIndex}`);
201
- const user = UserManager_1.default.getRemoraWorkerUser();
201
+ const user = settings_1.REMORA_WORKER_USER;
202
202
  const result = yield ExecutorOrchestrator_1.default.launch({
203
203
  consumer: mapping.consumer,
204
204
  details: {
@@ -226,9 +226,9 @@ class ExecutorOrchestratorClass {
226
226
  // Check if we're in a published npm package (no .build in path)
227
227
  if (!currentDir.includes('.build')) {
228
228
  // We're in the published package, workers are relative to package root
229
- // __dirname is something like: /path/to/package/engines/dataset
230
- // We need to go up to package root and then to workers
231
- return path_1.default.join(__dirname, '../../workers');
229
+ // __dirname is something like: /path/to/package/executors
230
+ // Workers are at /path/to/package/workers (sibling folder)
231
+ return path_1.default.join(__dirname, '../workers');
232
232
  }
233
233
  else {
234
234
  // We're in development, workers are in ./.build/workers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,
package/settings.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMORA_WORKER_USER = void 0;
4
+ exports.REMORA_WORKER_USER = {
5
+ _id: '__remora_worker__',
6
+ auth: { oid: '', provider: 'internal' },
7
+ email: '',
8
+ name: 'Remora Worker',
9
+ roles: ['root'],
10
+ _signature: '',
11
+ lastLogin: new Date().toJSON()
12
+ };