@douglasneuroinformatics/libjs 2.4.0 → 2.6.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/dist/exception.d.ts +10 -3
- package/dist/exception.d.ts.map +1 -1
- package/dist/exception.js +6 -2
- package/dist/http.d.ts +38 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/result.d.ts +3 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +4 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/exception.d.ts
CHANGED
|
@@ -26,7 +26,14 @@ type ExceptionStatic<TParams extends ExceptionParams, TOptions extends Exception
|
|
|
26
26
|
};
|
|
27
27
|
type ExceptionConstructor<TParams extends ExceptionParams, TOptions extends ExceptionOptions> = new (...args: ExceptionConstructorArgs<TParams, TOptions>) => BaseException<TParams, TOptions>;
|
|
28
28
|
type ExceptionType<TParams extends ExceptionParams = ExceptionParams, TOptions extends ExceptionOptions = ExceptionOptions, TStaticProps = unknown> = ExceptionConstructor<TParams, TOptions> & ExceptionStatic<TParams, TOptions> & TStaticProps;
|
|
29
|
-
|
|
29
|
+
interface ExceptionLike extends Error, ExceptionOptions {
|
|
30
|
+
name: string;
|
|
31
|
+
toAsyncErr(): ResultAsync<never, this>;
|
|
32
|
+
toErr(): Result<never, this>;
|
|
33
|
+
toString(): string;
|
|
34
|
+
}
|
|
35
|
+
declare function parseStack(error: Error): string[];
|
|
36
|
+
declare abstract class BaseException<TParams extends ExceptionParams, TOptions extends ExceptionOptions> extends Error implements ExceptionLike {
|
|
30
37
|
cause: TOptions['cause'];
|
|
31
38
|
details: TOptions['details'];
|
|
32
39
|
abstract name: TParams['name'];
|
|
@@ -117,6 +124,6 @@ export declare const ValidationException: ExceptionType<{
|
|
|
117
124
|
}, {
|
|
118
125
|
[key: string]: unknown;
|
|
119
126
|
}>;
|
|
120
|
-
export type { ExceptionConstructor, ExceptionConstructorArgs, ExceptionName, ExceptionOptions, ExceptionParams, ExceptionStatic, ExceptionType };
|
|
121
|
-
export { BaseException, ExceptionBuilder, OutOfRangeException, RuntimeException, ValueException };
|
|
127
|
+
export type { ExceptionConstructor, ExceptionConstructorArgs, ExceptionLike, ExceptionName, ExceptionOptions, ExceptionParams, ExceptionStatic, ExceptionType };
|
|
128
|
+
export { BaseException, ExceptionBuilder, OutOfRangeException, parseStack, RuntimeException, ValueException };
|
|
122
129
|
//# sourceMappingURL=exception.d.ts.map
|
package/dist/exception.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exception.d.ts","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"AAMA,OAAO,EAAiB,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEtE,KAAK,aAAa,GAAG,GAAG,MAAM,WAAW,CAAC;AAE1C,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,KAAK,eAAe,CAAC,QAAQ,GAAG,GAAG,IAAI;IACrC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,QAAQ,KAAK,MAAM,CAAC,GAAG,MAAM,CAAC;IACnD,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,KA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AAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;eAKlB,MAAM;;iBALxB,MAAM;iBAAO,MAAM;mBAAS,MAAM;;;;iBAAzC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;;EAQ9D,CAAC;AAEX,eAAO,MAAQ,mBAAmB;;;;aACL;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAA;KAAE;;;EAE1D,CAAC;AAEX,YAAY,EACV,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACd,CAAC;AACF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/exception.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
2
3
|
/* eslint-disable no-dupe-class-members */
|
|
3
4
|
import cleanStack from 'clean-stack';
|
|
@@ -6,6 +7,9 @@ import { err, errAsync, Result, ResultAsync } from 'neverthrow';
|
|
|
6
7
|
import stringifyObject from 'stringify-object';
|
|
7
8
|
import { objectify } from './object.js';
|
|
8
9
|
import { indentLines } from './string.js';
|
|
10
|
+
function parseStack(error) {
|
|
11
|
+
return extractStack.lines(cleanStack(error.stack, { pretty: true }));
|
|
12
|
+
}
|
|
9
13
|
class BaseException extends Error {
|
|
10
14
|
cause;
|
|
11
15
|
details;
|
|
@@ -40,7 +44,7 @@ class BaseException extends Error {
|
|
|
40
44
|
}
|
|
41
45
|
formatError(error) {
|
|
42
46
|
const result = [`${error.name}: ${error.message}`];
|
|
43
|
-
|
|
47
|
+
parseStack(error).forEach((line) => {
|
|
44
48
|
result.push(` at ${line}`);
|
|
45
49
|
});
|
|
46
50
|
if (error.details) {
|
|
@@ -115,4 +119,4 @@ export const { ValidationException } = new ExceptionBuilder()
|
|
|
115
119
|
.setOptionsType()
|
|
116
120
|
.setParams({ message: 'Zod schema validation failed', name: 'ValidationException' })
|
|
117
121
|
.build();
|
|
118
|
-
export { BaseException, ExceptionBuilder, OutOfRangeException, RuntimeException, ValueException };
|
|
122
|
+
export { BaseException, ExceptionBuilder, OutOfRangeException, parseStack, RuntimeException, ValueException };
|
package/dist/http.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ResultAsync } from 'neverthrow';
|
|
2
|
+
import type { ExceptionLike } from './exception.js';
|
|
3
|
+
type NetworkErrorOptions = {
|
|
4
|
+
cause: unknown;
|
|
5
|
+
details: {
|
|
6
|
+
kind: 'NETWORK_ERROR';
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type HttpErrorOptions = {
|
|
11
|
+
details: {
|
|
12
|
+
kind: 'HTTP_ERROR';
|
|
13
|
+
status: number;
|
|
14
|
+
statusText: string;
|
|
15
|
+
url: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const FetchException: import("./exception.js").ExceptionType<{
|
|
19
|
+
readonly message: (details: {
|
|
20
|
+
kind: "NETWORK_ERROR";
|
|
21
|
+
url: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: "HTTP_ERROR";
|
|
24
|
+
status: number;
|
|
25
|
+
statusText: string;
|
|
26
|
+
url: string;
|
|
27
|
+
}) => string;
|
|
28
|
+
readonly name: "FetchException";
|
|
29
|
+
}, NetworkErrorOptions | HttpErrorOptions, {
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function safeFetch(url: string, init: RequestInit): ResultAsync<Response, typeof FetchException.Instance>;
|
|
33
|
+
export declare function waitForServer(url: string, { interval, timeout }?: {
|
|
34
|
+
interval?: number;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
}): ResultAsync<void, ExceptionLike>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,WAAW,EAAE,MAAM,YAAY,CAAC;AAM7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE;QACP,IAAI,EAAE,eAAe,CAAC;QACtB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE;QACP,IAAI,EAAE,YAAY,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,eAAO,MAAQ,cAAc;;cAdnB,eAAe;aAChB,MAAM;;cAML,YAAY;gBACV,MAAM;oBACF,MAAM;aACb,MAAM;;;;;EAUL,CAAC;AAEX,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,QAAQ,CAAC,CAyB/G;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,EAAE,QAAY,EAAE,OAAY,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC3E,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,CAmBlC"}
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ok, ResultAsync } from 'neverthrow';
|
|
2
|
+
import { sleep } from './datetime.js';
|
|
3
|
+
import { ExceptionBuilder, RuntimeException } from './exception.js';
|
|
4
|
+
import { asyncResultify } from './result.js';
|
|
5
|
+
export const { FetchException } = new ExceptionBuilder()
|
|
6
|
+
.setOptionsType()
|
|
7
|
+
.setParams({
|
|
8
|
+
message: (details) => `HTTP request to '${details.url}' failed`,
|
|
9
|
+
name: 'FetchException'
|
|
10
|
+
})
|
|
11
|
+
.build();
|
|
12
|
+
export function safeFetch(url, init) {
|
|
13
|
+
return asyncResultify(async () => {
|
|
14
|
+
try {
|
|
15
|
+
const response = await fetch(url, init);
|
|
16
|
+
if (response.ok) {
|
|
17
|
+
return ok(response);
|
|
18
|
+
}
|
|
19
|
+
return FetchException.asErr({
|
|
20
|
+
details: {
|
|
21
|
+
kind: 'HTTP_ERROR',
|
|
22
|
+
status: response.status,
|
|
23
|
+
statusText: response.statusText,
|
|
24
|
+
url
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return FetchException.asErr({
|
|
30
|
+
cause: err,
|
|
31
|
+
details: {
|
|
32
|
+
kind: 'NETWORK_ERROR',
|
|
33
|
+
url
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export function waitForServer(url, { interval = 1, timeout = 10 } = {}) {
|
|
40
|
+
return asyncResultify(async () => {
|
|
41
|
+
let secondsElapsed = 0;
|
|
42
|
+
while (secondsElapsed < timeout) {
|
|
43
|
+
const fetchResult = await safeFetch(url, { method: 'GET' });
|
|
44
|
+
if (fetchResult.isOk()) {
|
|
45
|
+
return ok();
|
|
46
|
+
}
|
|
47
|
+
const { error } = fetchResult;
|
|
48
|
+
if (error.details.kind === 'HTTP_ERROR') {
|
|
49
|
+
return RuntimeException.asErr(`Request to '${url}' returned status code ${error.details.status}`, {
|
|
50
|
+
cause: fetchResult.error
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
await sleep(interval);
|
|
54
|
+
secondsElapsed += interval;
|
|
55
|
+
}
|
|
56
|
+
return RuntimeException.asErr(`Failed to connect to '${url}' after timeout of ${timeout}s`);
|
|
57
|
+
});
|
|
58
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export * from './array.js';
|
|
2
2
|
export * from './datetime.js';
|
|
3
3
|
export * from './exception.js';
|
|
4
|
+
export * from './http.js';
|
|
4
5
|
export * from './json.js';
|
|
5
6
|
export * from './number.js';
|
|
6
7
|
export * from './object.js';
|
|
7
8
|
export * from './random.js';
|
|
8
9
|
export * from './range.js';
|
|
10
|
+
export * from './result.js';
|
|
9
11
|
export * from './string.js';
|
|
10
12
|
export * from './types.js';
|
|
11
13
|
export * from './zod.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export * from './array.js';
|
|
2
2
|
export * from './datetime.js';
|
|
3
3
|
export * from './exception.js';
|
|
4
|
+
export * from './http.js';
|
|
4
5
|
export * from './json.js';
|
|
5
6
|
export * from './number.js';
|
|
6
7
|
export * from './object.js';
|
|
7
8
|
export * from './random.js';
|
|
8
9
|
export * from './range.js';
|
|
10
|
+
export * from './result.js';
|
|
9
11
|
export * from './string.js';
|
|
10
12
|
export * from './types.js';
|
|
11
13
|
export * from './zod.js';
|
package/dist/result.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../src/result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEjD,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAEvF"}
|
package/dist/result.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/array.ts","../src/datetime.ts","../src/exception.ts","../src/index.ts","../src/json.ts","../src/number.ts","../src/object.ts","../src/random.ts","../src/range.ts","../src/string.ts","../src/types.ts","../src/zod.ts"],"version":"5.6.3"}
|
|
1
|
+
{"root":["../src/array.ts","../src/datetime.ts","../src/exception.ts","../src/http.ts","../src/index.ts","../src/json.ts","../src/number.ts","../src/object.ts","../src/random.ts","../src/range.ts","../src/result.ts","../src/string.ts","../src/types.ts","../src/zod.ts"],"version":"5.6.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douglasneuroinformatics/libjs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"packageManager": "pnpm@10.3.0",
|
|
6
6
|
"description": "A collection of utility functions and types for Node.js and the browser",
|
|
7
7
|
"author": "Joshua Unrau",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"type-fest": "^4.34.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@douglasneuroinformatics/eslint-config": "^5.3.
|
|
43
|
+
"@douglasneuroinformatics/eslint-config": "^5.3.2",
|
|
44
44
|
"@douglasneuroinformatics/prettier-config": "^0.0.1",
|
|
45
45
|
"@douglasneuroinformatics/semantic-release": "^0.2.1",
|
|
46
46
|
"@douglasneuroinformatics/tsconfig": "^1.0.2",
|