@effect/platform-node-shared 0.12.3 → 0.12.4
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.
|
@@ -5,20 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.runMain = void 0;
|
|
7
7
|
var _Runtime = require("@effect/platform/Runtime");
|
|
8
|
-
var Cause = _interopRequireWildcard(require("effect/Cause"));
|
|
9
|
-
var Effect = _interopRequireWildcard(require("effect/Effect"));
|
|
10
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
8
|
/** @internal */
|
|
13
|
-
const runMain = (
|
|
14
|
-
|
|
9
|
+
const runMain = exports.runMain = /*#__PURE__*/(0, _Runtime.makeRunMain)(({
|
|
10
|
+
fiber,
|
|
11
|
+
teardown
|
|
12
|
+
}) => {
|
|
15
13
|
const keepAlive = setInterval(() => {}, 2 ** 31 - 1);
|
|
16
|
-
const fiber = Effect.runFork(options?.disableErrorReporting === true ? effect : Effect.tapErrorCause(effect, cause => {
|
|
17
|
-
if (Cause.isInterruptedOnly(cause)) {
|
|
18
|
-
return Effect.void;
|
|
19
|
-
}
|
|
20
|
-
return Effect.logError(cause);
|
|
21
|
-
}));
|
|
22
14
|
fiber.addObserver(exit => {
|
|
23
15
|
clearInterval(keepAlive);
|
|
24
16
|
teardown(exit, code => {
|
|
@@ -32,6 +24,5 @@ const runMain = (effect, options) => {
|
|
|
32
24
|
}
|
|
33
25
|
process.once("SIGINT", onSigint);
|
|
34
26
|
process.once("SIGTERM", onSigint);
|
|
35
|
-
};
|
|
36
|
-
exports.runMain = runMain;
|
|
27
|
+
});
|
|
37
28
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["_Runtime","require","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["_Runtime","require","runMain","exports","makeRunMain","fiber","teardown","keepAlive","setInterval","addObserver","exit","clearInterval","code","process","onSigint","removeListener","unsafeInterruptAsFork","id","once"],"sources":["../../../src/internal/runtime.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA;AACO,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,oBAAW,EAAC,CAAC;EAClCC,KAAK;EACLC;AAAQ,CACT,KAAI;EACH,MAAMC,SAAS,GAAGC,WAAW,CAAC,MAAK,CAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;EAEpDH,KAAK,CAACI,WAAW,CAAEC,IAAI,IAAI;IACzBC,aAAa,CAACJ,SAAS,CAAC;IACxBD,QAAQ,CAACI,IAAI,EAAGE,IAAI,IAAI;MACtBC,OAAO,CAACH,IAAI,CAACE,IAAI,CAAC;IACpB,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,SAASE,QAAQA,CAAA;IACfD,OAAO,CAACE,cAAc,CAAC,QAAQ,EAAED,QAAQ,CAAC;IAC1CD,OAAO,CAACE,cAAc,CAAC,SAAS,EAAED,QAAQ,CAAC;IAC3CT,KAAK,CAACW,qBAAqB,CAACX,KAAK,CAACY,EAAE,EAAE,CAAC;EACzC;EAEAJ,OAAO,CAACK,IAAI,CAAC,QAAQ,EAAEJ,QAAQ,CAAC;EAChCD,OAAO,CAACK,IAAI,CAAC,SAAS,EAAEJ,QAAQ,CAAC;AACnC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as Cause from "effect/Cause";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
1
|
+
import { makeRunMain } from "@effect/platform/Runtime";
|
|
4
2
|
/** @internal */
|
|
5
|
-
export const runMain = (
|
|
6
|
-
|
|
3
|
+
export const runMain = /*#__PURE__*/makeRunMain(({
|
|
4
|
+
fiber,
|
|
5
|
+
teardown
|
|
6
|
+
}) => {
|
|
7
7
|
const keepAlive = setInterval(() => {}, 2 ** 31 - 1);
|
|
8
|
-
const fiber = Effect.runFork(options?.disableErrorReporting === true ? effect : Effect.tapErrorCause(effect, cause => {
|
|
9
|
-
if (Cause.isInterruptedOnly(cause)) {
|
|
10
|
-
return Effect.void;
|
|
11
|
-
}
|
|
12
|
-
return Effect.logError(cause);
|
|
13
|
-
}));
|
|
14
8
|
fiber.addObserver(exit => {
|
|
15
9
|
clearInterval(keepAlive);
|
|
16
10
|
teardown(exit, code => {
|
|
@@ -24,5 +18,5 @@ export const runMain = (effect, options) => {
|
|
|
24
18
|
}
|
|
25
19
|
process.once("SIGINT", onSigint);
|
|
26
20
|
process.once("SIGTERM", onSigint);
|
|
27
|
-
};
|
|
21
|
+
});
|
|
28
22
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["makeRunMain","runMain","fiber","teardown","keepAlive","setInterval","addObserver","exit","clearInterval","code","process","onSigint","removeListener","unsafeInterruptAsFork","id","once"],"sources":["../../../src/internal/runtime.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAW,QAAQ,0BAA0B;AAEtD;AACA,OAAO,MAAMC,OAAO,gBAAGD,WAAW,CAAC,CAAC;EAClCE,KAAK;EACLC;AAAQ,CACT,KAAI;EACH,MAAMC,SAAS,GAAGC,WAAW,CAAC,MAAK,CAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;EAEpDH,KAAK,CAACI,WAAW,CAAEC,IAAI,IAAI;IACzBC,aAAa,CAACJ,SAAS,CAAC;IACxBD,QAAQ,CAACI,IAAI,EAAGE,IAAI,IAAI;MACtBC,OAAO,CAACH,IAAI,CAACE,IAAI,CAAC;IACpB,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,SAASE,QAAQA,CAAA;IACfD,OAAO,CAACE,cAAc,CAAC,QAAQ,EAAED,QAAQ,CAAC;IAC1CD,OAAO,CAACE,cAAc,CAAC,SAAS,EAAED,QAAQ,CAAC;IAC3CT,KAAK,CAACW,qBAAqB,CAACX,KAAK,CAACY,EAAE,EAAE,CAAC;EACzC;EAEAJ,OAAO,CAACK,IAAI,CAAC,QAAQ,EAAEJ,QAAQ,CAAC;EAChCD,OAAO,CAACK,IAAI,CAAC,SAAS,EAAEJ,QAAQ,CAAC;AACnC,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform-node-shared",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"description": "Unified interfaces for common platform-specific services",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"multipasta": "^0.2.5"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@effect/platform": "^0.62.
|
|
18
|
-
"effect": "^3.6.
|
|
17
|
+
"@effect/platform": "^0.62.4",
|
|
18
|
+
"effect": "^3.6.7"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"provenance": true
|
package/src/internal/runtime.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as Cause from "effect/Cause"
|
|
3
|
-
import * as Effect from "effect/Effect"
|
|
1
|
+
import { makeRunMain } from "@effect/platform/Runtime"
|
|
4
2
|
|
|
5
3
|
/** @internal */
|
|
6
|
-
export const runMain
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
) => {
|
|
10
|
-
const teardown = options?.teardown ?? defaultTeardown
|
|
4
|
+
export const runMain = makeRunMain(({
|
|
5
|
+
fiber,
|
|
6
|
+
teardown
|
|
7
|
+
}) => {
|
|
11
8
|
const keepAlive = setInterval(() => {}, 2 ** 31 - 1)
|
|
12
9
|
|
|
13
|
-
const fiber = Effect.runFork(
|
|
14
|
-
options?.disableErrorReporting === true ?
|
|
15
|
-
effect :
|
|
16
|
-
Effect.tapErrorCause(effect, (cause) => {
|
|
17
|
-
if (Cause.isInterruptedOnly(cause)) {
|
|
18
|
-
return Effect.void
|
|
19
|
-
}
|
|
20
|
-
return Effect.logError(cause)
|
|
21
|
-
})
|
|
22
|
-
)
|
|
23
|
-
|
|
24
10
|
fiber.addObserver((exit) => {
|
|
25
11
|
clearInterval(keepAlive)
|
|
26
12
|
teardown(exit, (code) => {
|
|
@@ -36,4 +22,4 @@ export const runMain: RunMain = (
|
|
|
36
22
|
|
|
37
23
|
process.once("SIGINT", onSigint)
|
|
38
24
|
process.once("SIGTERM", onSigint)
|
|
39
|
-
}
|
|
25
|
+
})
|