@gershy/util-try-with-healing 0.0.4 → 0.0.6
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/cmp/cjs/main.d.ts +0 -1
- package/cmp/cjs/main.js +30 -10
- package/cmp/{mjs → esm}/main.d.ts +0 -1
- package/cmp/esm/main.js +12 -0
- package/cmp/esm/sideEffects.d.ts +2 -0
- package/package.json +10 -20
- package/cmp/mjs/main.js +0 -10
- /package/cmp/{sideEffects.d.ts → cjs/sideEffects.d.ts} +0 -0
- /package/cmp/{mjs → esm}/package.json +0 -0
package/cmp/cjs/main.d.ts
CHANGED
package/cmp/cjs/main.js
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var main_exports = {};
|
|
20
|
+
__export(main_exports, {
|
|
21
|
+
default: () => main_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(main_exports);
|
|
24
|
+
var import_clearing = require("@gershy/clearing");
|
|
25
|
+
var main_default = async (args) => {
|
|
26
|
+
const { fn, heal, canHeal } = args;
|
|
27
|
+
return fn().catch(async (err) => {
|
|
28
|
+
if (!canHeal(err)) throw err;
|
|
29
|
+
await heal();
|
|
30
|
+
return fn();
|
|
31
|
+
});
|
|
12
32
|
};
|
package/cmp/esm/main.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "@gershy/clearing";
|
|
2
|
+
var main_default = async (args) => {
|
|
3
|
+
const { fn, heal, canHeal } = args;
|
|
4
|
+
return fn().catch(async (err) => {
|
|
5
|
+
if (!canHeal(err)) throw err;
|
|
6
|
+
await heal();
|
|
7
|
+
return fn();
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
main_default as default
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gershy/util-try-with-healing",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"author": "Gershom Maes",
|
|
4
5
|
"description": "TODO",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"TODO"
|
|
7
8
|
],
|
|
8
|
-
"author": "Gershom Maes",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/gershy/utilTryWithHealing.git"
|
|
@@ -14,36 +14,26 @@
|
|
|
14
14
|
"url": "https://github.com/gershy/utilTryWithHealing/issues"
|
|
15
15
|
},
|
|
16
16
|
"homepage": "https://github.com/gershy/utilTryWithHealing#readme",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"files": [
|
|
19
|
+
"cmp"
|
|
20
|
+
],
|
|
17
21
|
"license": "ISC",
|
|
18
22
|
"peerDependencies": {
|
|
19
|
-
"@gershy/clearing": "^0.0.
|
|
23
|
+
"@gershy/clearing": "^0.0.42"
|
|
20
24
|
},
|
|
21
25
|
"devDependencies": {
|
|
22
|
-
"@types/node": "^24.10.1"
|
|
23
|
-
"tsx": "^4.21.0",
|
|
24
|
-
"typescript": "^5.9.3"
|
|
26
|
+
"@types/node": "^24.10.1"
|
|
25
27
|
},
|
|
26
28
|
"dependencies": {},
|
|
27
|
-
"type": "module",
|
|
28
|
-
"files": [
|
|
29
|
-
"cmp"
|
|
30
|
-
],
|
|
31
|
-
"sideEffects": false,
|
|
32
|
-
"types": "./cmp/mjs/main.d.ts",
|
|
33
29
|
"exports": {
|
|
34
30
|
".": {
|
|
35
|
-
"import": "./cmp/
|
|
31
|
+
"import": "./cmp/esm/main.js",
|
|
36
32
|
"require": "./cmp/cjs/main.js"
|
|
37
33
|
}
|
|
38
34
|
},
|
|
39
35
|
"scripts": {
|
|
40
36
|
"test": "npm run ts.check && npx tsx ./src/main.test.ts",
|
|
41
|
-
"ts.check": "npx tsc --noEmit"
|
|
42
|
-
"build.cjs": "tsc -p build/tsconfig.cjs.json",
|
|
43
|
-
"build.mjs": "tsc -p build/tsconfig.mjs.json",
|
|
44
|
-
"build": "node ./build/act.js removeCmp && npm run build.cjs && npm run build.mjs && node ./build/act.js finalizeExportVariants",
|
|
45
|
-
"git.pub": "npm run test && git add --all && git commit -m \"automated\" && git push",
|
|
46
|
-
"npm.login": "npm login",
|
|
47
|
-
"npm.pub": "npm run test && npm run build && npm publish --access public"
|
|
37
|
+
"ts.check": "npx tsc --noEmit"
|
|
48
38
|
}
|
|
49
39
|
}
|
package/cmp/mjs/main.js
DELETED
|
File without changes
|
|
File without changes
|