@effect/io
Advanced tools
Comparing version 0.32.0 to 0.32.1
@@ -32,4 +32,32 @@ "use strict"; | ||
const allFlags = [None, Interruption, OpSupervision, RuntimeMetrics, WindDown, CooperativeYielding]; | ||
exports.allFlags = allFlags; | ||
const print = flag => { | ||
switch (flag) { | ||
case CooperativeYielding: | ||
{ | ||
return "CooperativeYielding"; | ||
} | ||
case WindDown: | ||
{ | ||
return "WindDown"; | ||
} | ||
case RuntimeMetrics: | ||
{ | ||
return "RuntimeMetrics"; | ||
} | ||
case OpSupervision: | ||
{ | ||
return "OpSupervision"; | ||
} | ||
case Interruption: | ||
{ | ||
return "Interruption"; | ||
} | ||
case None: | ||
{ | ||
return "None"; | ||
} | ||
} | ||
}; | ||
/** @internal */ | ||
exports.allFlags = allFlags; | ||
const cooperativeYielding = self => isEnabled(self, CooperativeYielding); | ||
@@ -75,3 +103,3 @@ /** @internal */ | ||
if (isEnabled(self, flag)) { | ||
active.push(`${flag}`); | ||
active.push(`${print(flag)}`); | ||
} | ||
@@ -104,7 +132,5 @@ }); | ||
exports.patch = patch; | ||
const renderFlag = a => `${allFlags.find(b => a === b)}`; | ||
/** @internal */ | ||
const renderPatch = self => { | ||
const enabled = Array.from(enabledSet(self)).map(flag => renderFlag(flag)).join(", "); | ||
const disabled = Array.from(disabledSet(self)).map(flag => renderFlag(flag)).join(", "); | ||
const enabled = Array.from(enabledSet(self)).map(flag => print(flag)).join(", "); | ||
const disabled = Array.from(disabledSet(self)).map(flag => print(flag)).join(", "); | ||
return `RuntimeFlagsPatch(enabled = (${enabled}), disabled = (${disabled}))`; | ||
@@ -111,0 +137,0 @@ }; |
{ | ||
"name": "@effect/io", | ||
"version": "0.32.0", | ||
"version": "0.32.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -35,2 +35,25 @@ import * as Differ from "@effect/data/Differ" | ||
const print = (flag: RuntimeFlags.RuntimeFlag) => { | ||
switch (flag) { | ||
case CooperativeYielding: { | ||
return "CooperativeYielding" | ||
} | ||
case WindDown: { | ||
return "WindDown" | ||
} | ||
case RuntimeMetrics: { | ||
return "RuntimeMetrics" | ||
} | ||
case OpSupervision: { | ||
return "OpSupervision" | ||
} | ||
case Interruption: { | ||
return "Interruption" | ||
} | ||
case None: { | ||
return "None" | ||
} | ||
} | ||
} | ||
/** @internal */ | ||
@@ -96,3 +119,3 @@ export const cooperativeYielding = (self: RuntimeFlags.RuntimeFlags): boolean => isEnabled(self, CooperativeYielding) | ||
if (isEnabled(self, flag)) { | ||
active.push(`${flag}`) | ||
active.push(`${print(flag)}`) | ||
} | ||
@@ -139,11 +162,8 @@ }) | ||
/** @internal */ | ||
const renderFlag = (a: RuntimeFlags.RuntimeFlag): string => `${allFlags.find((b) => a === b)!}` | ||
/** @internal */ | ||
export const renderPatch = (self: RuntimeFlagsPatch.RuntimeFlagsPatch): string => { | ||
const enabled = Array.from(enabledSet(self)) | ||
.map((flag) => renderFlag(flag)) | ||
.map((flag) => print(flag)) | ||
.join(", ") | ||
const disabled = Array.from(disabledSet(self)) | ||
.map((flag) => renderFlag(flag)) | ||
.map((flag) => print(flag)) | ||
.join(", ") | ||
@@ -150,0 +170,0 @@ return `RuntimeFlagsPatch(enabled = (${enabled}), disabled = (${disabled}))` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6373823
113819