@output.ai/core 0.1.1 → 0.1.3

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.
@@ -1,35 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { getInvocationDir } from './utils.js';
3
-
4
- describe( 'interface/utils', () => {
5
- describe( 'getInvocationDir', () => {
6
- it( 'returns the caller directory from stack trace', () => {
7
- const fakeCaller = '/tmp/project/src/caller/file.js';
8
- const OriginalError = Error;
9
- // Provide a deterministic stack shape for the function under test
10
- // Lines: 1) Error, 2) getInvocationDir, 3) step/workflow, 4) actual caller
11
- // Include typical V8 formatting with leading spaces and without function name
12
- // for the caller line
13
-
14
- Error = class extends OriginalError {
15
- constructor( ...args ) {
16
- super( ...args );
17
- this.stack = [
18
- 'Error',
19
- ' at getInvocationDir (a:1:1)',
20
- ' at step (b:1:1)',
21
- ` at ${fakeCaller}:10:20`
22
- ].join( '\n' );
23
- }
24
- };
25
- try {
26
- const dir = getInvocationDir();
27
- expect( dir ).toBe( '/tmp/project/src/caller' );
28
- } finally {
29
-
30
- Error = OriginalError;
31
- }
32
- } );
33
- } );
34
- } );
35
-
package/src/utils.js DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Throw given error
3
- * @param {Error} e
4
- * @throws {e}
5
- */
6
- export const throws = e => {
7
- throw e;
8
- };