@art-ws/common 2.0.9 → 2.0.10
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/es/cancellation/cancellation-token-source.d.ts +1 -1
- package/dist/es/cancellation/cancellation-token-source.js +1 -1
- package/dist/es/cancellation/cancellation-token.d.ts +1 -1
- package/dist/es/cancellation/cancellation-token.js +1 -1
- package/dist/es/cancellation/index.d.ts +3 -3
- package/dist/es/cancellation/index.js +3 -3
- package/dist/es/heart-beat/heart-beat.class.d.ts +1 -1
- package/dist/es/heart-beat/index.d.ts +2 -2
- package/dist/es/heart-beat/index.js +2 -2
- package/dist/es/index.d.ts +11 -11
- package/dist/es/index.js +11 -11
- package/dist/es/json-file-loader.d.ts +4 -2
- package/dist/es/json-file-loader.js +2 -2
- package/dist/es/json-refs-resolver.js +1 -1
- package/dist/es/managed-pool/index.d.ts +1 -1
- package/dist/es/managed-pool/index.js +1 -1
- package/dist/es/managed-pool/managed-pool.d.ts +1 -1
- package/dist/es/managed-pool/managed-pool.js +1 -1
- package/dist/es/mem-cache/index.d.ts +2 -2
- package/dist/es/mem-cache/index.js +2 -2
- package/dist/es/mem-cache/memory-cache.d.ts +2 -2
- package/dist/es/mem-cache/memory-cache.js +2 -2
- package/dist/es/object-hash/index.d.ts +1 -1
- package/dist/es/object-hash/index.js +1 -1
- package/dist/es/shared/api-client/decorators.d.ts +1 -1
- package/dist/es/shared/api-client/decorators.js +1 -1
- package/dist/es/shared/api-client/index.d.ts +2 -2
- package/dist/es/shared/api-client/index.js +2 -2
- package/dist/es/shared/index.d.ts +8 -8
- package/dist/es/shared/index.js +8 -8
- package/package.json +4 -4
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ICancellationToken, ICancellationTokenSource, OnCancelCallback } from "./interfaces";
|
1
|
+
import type { ICancellationToken, ICancellationTokenSource, OnCancelCallback } from "./interfaces.js";
|
2
2
|
export declare class CancellationTokenSource implements ICancellationTokenSource {
|
3
3
|
private _token;
|
4
4
|
isCancellationRequested: boolean;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ICancellationToken, ICancellationTokenSource, OnCancelCallback } from "./interfaces";
|
1
|
+
import type { ICancellationToken, ICancellationTokenSource, OnCancelCallback } from "./interfaces.js";
|
2
2
|
export declare class CancellationToken implements ICancellationToken {
|
3
3
|
private readonly source;
|
4
4
|
constructor(source: ICancellationTokenSource);
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from "./cancellation-token-source";
|
2
|
-
export * from "./cancellation-token";
|
3
|
-
export * from "./interfaces";
|
1
|
+
export * from "./cancellation-token-source.js";
|
2
|
+
export * from "./cancellation-token.js";
|
3
|
+
export * from "./interfaces.js";
|
@@ -1,4 +1,4 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./cancellation-token-source";
|
3
|
-
export * from "./cancellation-token";
|
4
|
-
export * from "./interfaces";
|
2
|
+
export * from "./cancellation-token-source.js";
|
3
|
+
export * from "./cancellation-token.js";
|
4
|
+
export * from "./interfaces.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./heart-beat.class";
|
2
|
-
export * from "./heart-beat.types";
|
1
|
+
export * from "./heart-beat.class.js";
|
2
|
+
export * from "./heart-beat.types.js";
|
@@ -1,3 +1,3 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./heart-beat.class";
|
3
|
-
export * from "./heart-beat.types";
|
2
|
+
export * from "./heart-beat.class.js";
|
3
|
+
export * from "./heart-beat.types.js";
|
package/dist/es/index.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
export * from "./cancellation";
|
2
|
-
export * from "./heart-beat";
|
3
|
-
export * from "./hr-time";
|
4
|
-
export * from "./interpolate";
|
5
|
-
export * from "./json-file-loader";
|
6
|
-
export * from "./json-refs-resolver";
|
7
|
-
export * from "./managed-pool";
|
8
|
-
export * from "./managed-promise";
|
9
|
-
export * from "./mem-cache";
|
10
|
-
export * from "./object-hash";
|
11
|
-
export * from "./shared";
|
1
|
+
export * from "./cancellation/index.js";
|
2
|
+
export * from "./heart-beat/index.js";
|
3
|
+
export * from "./hr-time.js";
|
4
|
+
export * from "./interpolate.js";
|
5
|
+
export * from "./json-file-loader.js";
|
6
|
+
export * from "./json-refs-resolver.js";
|
7
|
+
export * from "./managed-pool/index.js";
|
8
|
+
export * from "./managed-promise.js";
|
9
|
+
export * from "./mem-cache/index.js";
|
10
|
+
export * from "./object-hash/index.js";
|
11
|
+
export * from "./shared/index.js";
|
package/dist/es/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./cancellation";
|
3
|
-
export * from "./heart-beat";
|
4
|
-
export * from "./hr-time";
|
5
|
-
export * from "./interpolate";
|
6
|
-
export * from "./json-file-loader";
|
7
|
-
export * from "./json-refs-resolver";
|
8
|
-
export * from "./managed-pool";
|
9
|
-
export * from "./managed-promise";
|
10
|
-
export * from "./mem-cache";
|
11
|
-
export * from "./object-hash";
|
12
|
-
export * from "./shared";
|
2
|
+
export * from "./cancellation/index.js";
|
3
|
+
export * from "./heart-beat/index.js";
|
4
|
+
export * from "./hr-time.js";
|
5
|
+
export * from "./interpolate.js";
|
6
|
+
export * from "./json-file-loader.js";
|
7
|
+
export * from "./json-refs-resolver.js";
|
8
|
+
export * from "./managed-pool/index.js";
|
9
|
+
export * from "./managed-promise.js";
|
10
|
+
export * from "./mem-cache/index.js";
|
11
|
+
export * from "./object-hash/index.js";
|
12
|
+
export * from "./shared/index.js";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { ResolveVarFunction } from "./interpolate";
|
2
|
-
import type { DeReferenceOptions } from "./json-refs-resolver";
|
1
|
+
import type { ResolveVarFunction } from "./interpolate.js";
|
2
|
+
import type { DeReferenceOptions } from "./json-refs-resolver.js";
|
3
3
|
export declare const YAML_EXT: string[];
|
4
4
|
export declare const JSON_EXT: string[];
|
5
5
|
export declare const JS_EXT: string[];
|
@@ -15,6 +15,8 @@ export declare function lookupAndLoadJsonableFile<T>(cwd: string, candidates: st
|
|
15
15
|
data: T;
|
16
16
|
}>;
|
17
17
|
export interface JsonableDataDeReferenceOptions extends DeReferenceOptions {
|
18
|
+
data: Record<string, any>;
|
19
|
+
baseUrl: string;
|
18
20
|
resolveVar?: ResolveVarFunction;
|
19
21
|
}
|
20
22
|
export declare function resolveJsonableData<T>(args: JsonableDataDeReferenceOptions): Promise<T>;
|
@@ -3,8 +3,8 @@ import yaml from "js-yaml";
|
|
3
3
|
import JSON5 from "json5";
|
4
4
|
import _ from "lodash";
|
5
5
|
import path from "path";
|
6
|
-
import { iterpolateObjectAsync } from "./interpolate";
|
7
|
-
import { resolveJsonRefs } from "./json-refs-resolver";
|
6
|
+
import { iterpolateObjectAsync } from "./interpolate.js";
|
7
|
+
import { resolveJsonRefs } from "./json-refs-resolver.js";
|
8
8
|
export const YAML_EXT = ["yaml", "yml"];
|
9
9
|
export const JSON_EXT = ["json", "json5"];
|
10
10
|
export const JS_EXT = ["js"];
|
@@ -43,7 +43,7 @@ export async function doDereference(args) {
|
|
43
43
|
const { data, baseUrl = "" } = args;
|
44
44
|
if ((baseUrl && SUPPORTED_EXTENSIONS.find((x) => baseUrl.includes(x))) ||
|
45
45
|
baseUrl === "") {
|
46
|
-
const rp =
|
46
|
+
const rp = $RefParser;
|
47
47
|
if (data) {
|
48
48
|
return await rp.dereference(baseUrl, data, {});
|
49
49
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export * from "./managed-pool";
|
1
|
+
export * from "./managed-pool.js";
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./managed-pool";
|
2
|
+
export * from "./managed-pool.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./cache-stat";
|
2
|
-
export * from "./memory-cache";
|
1
|
+
export * from "./cache-stat.js";
|
2
|
+
export * from "./memory-cache.js";
|
@@ -1,3 +1,3 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./cache-stat";
|
3
|
-
export * from "./memory-cache";
|
2
|
+
export * from "./cache-stat.js";
|
3
|
+
export * from "./memory-cache.js";
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { HeartBeat } from "../heart-beat";
|
2
|
-
import { CacheStat } from "./cache-stat";
|
1
|
+
import type { HeartBeat } from "../heart-beat/index.js";
|
2
|
+
import { CacheStat } from "./cache-stat.js";
|
3
3
|
export type CacheCanRemoveCallback = (value?: unknown, key?: string) => boolean;
|
4
4
|
export type CacheOnRemoveCallback = (value?: unknown, key?: string) => void;
|
5
5
|
export interface CacheItemOptions {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { getLogger } from "@art-ws/slf";
|
2
|
-
import { synchronized } from "../shared/promise-race";
|
3
|
-
import { CacheStat } from "./cache-stat";
|
2
|
+
import { synchronized } from "../shared/promise-race.js";
|
3
|
+
import { CacheStat } from "./cache-stat.js";
|
4
4
|
function now() {
|
5
5
|
return new Date().valueOf();
|
6
6
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export * from "./object-hash";
|
1
|
+
export * from "./object-hash.js";
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./object-hash";
|
2
|
+
export * from "./object-hash.js";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import "reflect-metadata";
|
2
|
-
import type { IApiClientRequestOptions as RequestOptions, TApiClientConstructor } from "./api-client.interface";
|
2
|
+
import type { IApiClientRequestOptions as RequestOptions, TApiClientConstructor } from "./api-client.interface.js";
|
3
3
|
export declare function ApiGet(url?: string, options?: Partial<RequestOptions>): (target: any, property: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
4
4
|
export declare function ApiPost(url?: string, options?: Partial<RequestOptions>): (target: any, property: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
5
5
|
export declare function ApiPut(url?: string, options?: Partial<RequestOptions>): (target: any, property: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from "./api-client.interface";
|
2
|
-
export * from "./decorators";
|
1
|
+
export * from "./api-client.interface.js";
|
2
|
+
export * from "./decorators.js";
|
@@ -1,3 +1,3 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./api-client.interface";
|
3
|
-
export * from "./decorators";
|
2
|
+
export * from "./api-client.interface.js";
|
3
|
+
export * from "./decorators.js";
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from "./api-client";
|
2
|
-
export * from "./assert-dsl";
|
3
|
-
export * from "./await-if-async";
|
4
|
-
export * from "./disposable";
|
5
|
-
export * from "./optional";
|
6
|
-
export * from "./promise-race";
|
7
|
-
export * from "./runnable";
|
8
|
-
export * from "./safe-call";
|
1
|
+
export * from "./api-client/index.js";
|
2
|
+
export * from "./assert-dsl.js";
|
3
|
+
export * from "./await-if-async.js";
|
4
|
+
export * from "./disposable.js";
|
5
|
+
export * from "./optional.js";
|
6
|
+
export * from "./promise-race.js";
|
7
|
+
export * from "./runnable.js";
|
8
|
+
export * from "./safe-call.js";
|
package/dist/es/shared/index.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
// created from 'create-ts-index'
|
2
|
-
export * from "./api-client";
|
3
|
-
export * from "./assert-dsl";
|
4
|
-
export * from "./await-if-async";
|
5
|
-
export * from "./disposable";
|
6
|
-
export * from "./optional";
|
7
|
-
export * from "./promise-race";
|
8
|
-
export * from "./runnable";
|
9
|
-
export * from "./safe-call";
|
2
|
+
export * from "./api-client/index.js";
|
3
|
+
export * from "./assert-dsl.js";
|
4
|
+
export * from "./await-if-async.js";
|
5
|
+
export * from "./disposable.js";
|
6
|
+
export * from "./optional.js";
|
7
|
+
export * from "./promise-race.js";
|
8
|
+
export * from "./runnable.js";
|
9
|
+
export * from "./safe-call.js";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@art-ws/common",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.10",
|
4
4
|
"description": "common",
|
5
5
|
"license": "UNLICENSED",
|
6
6
|
"type": "module",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"reflect-metadata": "^0.2.2",
|
21
21
|
"rxjs": "^7.8.2",
|
22
22
|
"tslib": "^2.8.1",
|
23
|
-
"@art-ws/slf": "2.0.
|
23
|
+
"@art-ws/slf": "2.0.4"
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
26
|
"@types/bluebird": "^3.5.42",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
"eslint": "^9.34.0",
|
33
33
|
"typescript": "^5.9.2",
|
34
34
|
"vitest": "^3.2.4",
|
35
|
-
"@art-ws/config-
|
36
|
-
"@art-ws/config-
|
35
|
+
"@art-ws/config-eslint": "2.0.3",
|
36
|
+
"@art-ws/config-ts": "2.0.6"
|
37
37
|
},
|
38
38
|
"scripts": {
|
39
39
|
"build": "tsc",
|