@outputai/core 0.1.7-dev.b392109.0 → 0.1.7-dev.ee88974.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/package.json +3 -3
- package/src/worker/loader.js +3 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/core",
|
|
3
|
-
"version": "0.1.7-dev.
|
|
3
|
+
"version": "0.1.7-dev.ee88974.0",
|
|
4
4
|
"description": "The core module of the output framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"output-healthcheck": "./bin/healthcheck.mjs"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@aws-sdk/client-s3": "3.
|
|
34
|
+
"@aws-sdk/client-s3": "3.1015.0",
|
|
35
35
|
"@babel/generator": "7.29.1",
|
|
36
36
|
"@babel/parser": "7.29.2",
|
|
37
37
|
"@babel/traverse": "7.29.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@temporalio/workflow": "1.15.0",
|
|
44
44
|
"redis": "5.11.0",
|
|
45
45
|
"stacktrace-parser": "0.1.11",
|
|
46
|
-
"undici": "7.24.
|
|
46
|
+
"undici": "7.24.5",
|
|
47
47
|
"winston": "3.19.0",
|
|
48
48
|
"zod": "4.3.6"
|
|
49
49
|
},
|
package/src/worker/loader.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { dirname, join } from 'node:path';
|
|
2
2
|
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { createRequire } from 'node:module';
|
|
4
3
|
import { EOL } from 'node:os';
|
|
5
4
|
import { fileURLToPath } from 'url';
|
|
6
5
|
import { getTraceDestinations, sendHttpRequest } from '#internal_activities';
|
|
@@ -121,23 +120,14 @@ export async function loadWorkflows( rootDir ) {
|
|
|
121
120
|
* @param {string} rootDir
|
|
122
121
|
* @returns {void}
|
|
123
122
|
*/
|
|
124
|
-
const resolveHookFile = ( specifier, rootDir ) => {
|
|
125
|
-
const require = createRequire( join( rootDir, 'package.json' ) );
|
|
126
|
-
try {
|
|
127
|
-
return require.resolve( specifier );
|
|
128
|
-
} catch {
|
|
129
|
-
return join( rootDir, specifier );
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
|
|
133
123
|
export async function loadHooks( rootDir ) {
|
|
134
124
|
const packageFile = join( rootDir, 'package.json' );
|
|
135
125
|
if ( existsSync( packageFile ) ) {
|
|
136
126
|
const pkg = await import( packageFile, { with: { type: 'json' } } );
|
|
137
|
-
for ( const
|
|
138
|
-
const hookFile =
|
|
127
|
+
for ( const path of pkg.default.output?.hookFiles ?? [] ) {
|
|
128
|
+
const hookFile = join( rootDir, path );
|
|
139
129
|
await import( hookFile );
|
|
140
|
-
log.info( 'Hook file loaded', {
|
|
130
|
+
log.info( 'Hook file loaded', { path } );
|
|
141
131
|
}
|
|
142
132
|
}
|
|
143
133
|
};
|