@pgflow/edge-worker 0.1.12 → 0.1.14
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/CHANGELOG.md +16 -0
- package/dist/EdgeWorker.d.ts.map +1 -1
- package/dist/EdgeWorker.js +10 -2
- package/dist/package.json +1 -1
- package/dist/platform/DenoAdapter.d.ts.map +1 -1
- package/dist/platform/DenoAdapter.js +3 -0
- package/dist/platform/logging.d.ts.map +1 -1
- package/dist/platform/logging.js +5 -2
- package/package.json +3 -3
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @pgflow/edge-worker
|
|
2
2
|
|
|
3
|
+
## 0.1.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 956224b: Add debug statements in EdgeWorker
|
|
8
|
+
- @pgflow/core@0.1.14
|
|
9
|
+
- @pgflow/dsl@0.1.14
|
|
10
|
+
|
|
11
|
+
## 0.1.13
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 2a2a7bc: Add debug statements to find logger issue
|
|
16
|
+
- @pgflow/core@0.1.13
|
|
17
|
+
- @pgflow/dsl@0.1.13
|
|
18
|
+
|
|
3
19
|
## 0.1.12
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/EdgeWorker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeWorker.d.ts","sourceRoot":"","sources":["../src/EdgeWorker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OA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B,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GAC9B,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgC;IACvD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAS;IAEjC;;;;;OAKG;WACU,KAAK,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC7C,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EACnC,MAAM,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GACtC,OAAO,CAAC,eAAe,CAAC;IAE3B;;;;;OAKG;WACU,KAAK,CAAC,KAAK,SAAS,OAAO,EACtC,IAAI,EAAE,KAAK,EACX,MAAM,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,GACrC,OAAO,CAAC,eAAe,CAAC;IAgC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;WACU,gBAAgB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EACxD,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EACnC,MAAM,GAAE,iBAAsB;IA8BhC;;;;;;;;;;;;;;;;;;;OAmBG;WACU,eAAe,CAAC,KAAK,SAAS,OAAO,EAChD,IAAI,EAAE,KAAK,EACX,MAAM,GAAE,gBAAqB;IAyB/B;;OAEG;WACU,IAAI;IAQjB,OAAO,CAAC,MAAM,CAAC,eAAe;CAM/B"}
|
package/dist/EdgeWorker.js
CHANGED
|
@@ -43,9 +43,11 @@ export class EdgeWorker {
|
|
|
43
43
|
*/
|
|
44
44
|
static async start(handlerOrFlow, config = {}) {
|
|
45
45
|
if (typeof handlerOrFlow === 'function') {
|
|
46
|
+
console.log('start() if typeof handlerOrFlow is function');
|
|
46
47
|
return this.startQueueWorker(handlerOrFlow, config);
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
50
|
+
console.log('start() if typeof handlerOrFlow is FLOW');
|
|
49
51
|
return this.startFlowWorker(handlerOrFlow, config);
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -102,7 +104,10 @@ export class EdgeWorker {
|
|
|
102
104
|
visibilityTimeout: config.visibilityTimeout ?? 3,
|
|
103
105
|
connectionString: config.connectionString || this.platform.getConnectionString(),
|
|
104
106
|
};
|
|
105
|
-
await this.platform.startWorker((createLoggerFn) =>
|
|
107
|
+
await this.platform.startWorker((createLoggerFn) => {
|
|
108
|
+
console.log('QUEUE: platform.startWorker callback');
|
|
109
|
+
return createQueueWorker(handler, workerConfig, createLoggerFn);
|
|
110
|
+
});
|
|
106
111
|
return this.platform;
|
|
107
112
|
}
|
|
108
113
|
/**
|
|
@@ -137,7 +142,10 @@ export class EdgeWorker {
|
|
|
137
142
|
batchSize: config.batchSize ?? 10,
|
|
138
143
|
connectionString: config.connectionString || this.platform.getConnectionString(),
|
|
139
144
|
};
|
|
140
|
-
await this.platform.startWorker((createLoggerFn) =>
|
|
145
|
+
await this.platform.startWorker((createLoggerFn) => {
|
|
146
|
+
console.log('FLOW: platform.startWorker callback');
|
|
147
|
+
return createFlowWorker(flow, workerConfig, createLoggerFn);
|
|
148
|
+
});
|
|
141
149
|
return this.platform;
|
|
142
150
|
}
|
|
143
151
|
/**
|
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DenoAdapter.d.ts","sourceRoot":"","sources":["../../src/platform/DenoAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI1E;;GAEG;AACH,qBAAa,WAAY,YAAW,eAAe;IACjD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAS;IAGvB,OAAO,CAAC,cAAc,CAA0B;;
|
|
1
|
+
{"version":3,"file":"DenoAdapter.d.ts","sourceRoot":"","sources":["../../src/platform/DenoAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAI1E;;GAEG;AACH,qBAAa,WAAY,YAAW,eAAe;IACjD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAS;IAGvB,OAAO,CAAC,cAAc,CAA0B;;IAuBhD;;;OAGG;IACG,WAAW,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAM1D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAMjC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIpC;;OAEG;IACH,mBAAmB,IAAI,MAAM;IAI7B;;OAEG;IACH,OAAO,CAAC,gBAAgB;YAcV,oBAAoB;IA8BlC,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,oBAAoB;IAY5B;;;;;;OAMG;IACH,OAAO,CAAC,4BAA4B;IAMpC,OAAO,CAAC,mBAAmB;CAwB5B"}
|
|
@@ -18,9 +18,12 @@ export class DenoAdapter {
|
|
|
18
18
|
}
|
|
19
19
|
// Set initial log level
|
|
20
20
|
const logLevel = this.getEnvVarOrThrow('EDGE_WORKER_LOG_LEVEL') || 'info';
|
|
21
|
+
console.log(`--- DenoAdapter: Raw log level from env: ${logLevel} ---`); // Raw console log
|
|
21
22
|
this.loggingFactory.setLogLevel(logLevel);
|
|
23
|
+
console.log('--- DenoAdapter: Log level set in factory ---'); // Raw console log
|
|
22
24
|
// startWorker logger with a default module name
|
|
23
25
|
this.logger = this.loggingFactory.createLogger('DenoAdapter');
|
|
26
|
+
this.logger.info('DenoAdapter logger instance created and working.'); // Use the created logger
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
26
29
|
* startWorker the platform adapter with a worker factory function
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/platform/logging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;GAEG;AACH,wBAAgB,oBAAoB;2BAcJ,MAAM,KAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/platform/logging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;GAEG;AACH,wBAAgB,oBAAoB;2BAcJ,MAAM,KAAG,MAAM;4BA2Dd,MAAM,KAAG,IAAI;+BAOV,MAAM,KAAG,IAAI;EAShD"}
|
package/dist/platform/logging.js
CHANGED
|
@@ -13,18 +13,21 @@ export function createLoggingFactory() {
|
|
|
13
13
|
* Creates a new logger for a specific module
|
|
14
14
|
*/
|
|
15
15
|
const createLogger = (module) => {
|
|
16
|
+
console.log('--- createLoggingFactory CALLED ---'); // See how many times this appears
|
|
16
17
|
// Create a logger that directly references the shared state
|
|
17
18
|
const logger = {
|
|
18
19
|
debug: (message, ...args) => {
|
|
19
20
|
const levelValue = levels[logLevel] ?? levels.info;
|
|
20
21
|
if (levelValue >= levels.debug) {
|
|
21
|
-
console.debug
|
|
22
|
+
// Use console.log for debug messages since console.debug isn't available in Supabase
|
|
23
|
+
console.log(`[DEBUG] worker_id=${sharedWorkerId} module=${module} ${message}`, ...args);
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
26
|
info: (message, ...args) => {
|
|
25
27
|
const levelValue = levels[logLevel] ?? levels.info;
|
|
26
28
|
if (levelValue >= levels.info) {
|
|
27
|
-
console.info
|
|
29
|
+
// Use console.log for info messages since console.info isn't available in Supabase
|
|
30
|
+
console.log(`[INFO] worker_id=${sharedWorkerId} module=${module} ${message}`, ...args);
|
|
28
31
|
}
|
|
29
32
|
},
|
|
30
33
|
warn: (message, ...args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgflow/edge-worker",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@henrygd/queue": "^1.0.7",
|
|
21
21
|
"postgres": "3.4.5",
|
|
22
|
-
"@pgflow/core": "0.1.
|
|
23
|
-
"@pgflow/dsl": "0.1.
|
|
22
|
+
"@pgflow/core": "0.1.14",
|
|
23
|
+
"@pgflow/dsl": "0.1.14"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/deno": "npm:@teidesu/deno-types@1.45.2",
|