@neovici/cosmoz-utils 6.21.0 → 6.22.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/promise.d.ts +1 -0
- package/dist/promise.js +2 -0
- package/package.json +4 -2
package/dist/promise.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export declare const limit$: <T extends unknown[], P>(fn: (...args: T) => Promis
|
|
|
10
10
|
export declare const debounce$: <T extends unknown[], P>(fn: (...args: T) => P | PromiseLike<P>, ms?: number) => (...args: T) => Promise<P>;
|
|
11
11
|
export declare const log$: <T extends unknown[], P>(fn: (...args: T) => PromiseLike<P>) => (...args: T) => PromiseLike<P>;
|
|
12
12
|
export declare const retry$: <T extends unknown[], P>(fn: (...args: T) => P | PromiseLike<P>, n: number) => (...args: T) => Promise<P>;
|
|
13
|
+
export declare const invoke$: <T, A extends unknown[]>(fn: T | ((...args: A) => T | PromiseLike<T>), ...args: A) => Promise<Awaited<T> | Awaited<T>>;
|
|
13
14
|
export {};
|
package/dist/promise.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { invoke } from './function';
|
|
1
2
|
export class ManagedPromise extends Promise {
|
|
2
3
|
constructor(callback) {
|
|
3
4
|
const handles = {};
|
|
@@ -84,3 +85,4 @@ export const retry$ = (fn, n) => async (...args) => {
|
|
|
84
85
|
}
|
|
85
86
|
throw error;
|
|
86
87
|
};
|
|
88
|
+
export const invoke$ = (fn, ...args) => Promise.resolve(invoke(fn, ...args));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-utils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.22.0",
|
|
4
4
|
"description": "Date, money and template management functions commonly needed in Cosmoz views.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polymer",
|
|
@@ -75,12 +75,14 @@
|
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@commitlint/cli": "^19.0.0",
|
|
77
77
|
"@commitlint/config-conventional": "^19.0.0",
|
|
78
|
-
"@neovici/cfg": "^2.
|
|
78
|
+
"@neovici/cfg": "^2.13.0",
|
|
79
79
|
"@open-wc/testing": "^4.0.0",
|
|
80
|
+
"@playwright/test": "^1.60.0",
|
|
80
81
|
"@polymer/polymer": "^3.3.1",
|
|
81
82
|
"@semantic-release/changelog": "^6.0.0",
|
|
82
83
|
"@semantic-release/git": "^10.0.0",
|
|
83
84
|
"@types/mocha": "^10.0.3",
|
|
85
|
+
"@web/test-runner-playwright": "^0.11.1",
|
|
84
86
|
"husky": "^8.0.0",
|
|
85
87
|
"lint-staged": "^16.2.7",
|
|
86
88
|
"lit-html": "^2.0.0 || ^3.0.0",
|