@deslop/coding-standards 0.1.1083 → 0.1.1086

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/README.md CHANGED
@@ -1,24 +1,11 @@
1
- # Coding standards
1
+ # @deslop/coding-standards
2
2
 
3
- A strict Oxlint preset and an installer for the engineering, design and review skills. Requires Node 26+.
4
-
5
- ## Install the skills
6
-
7
- Run inside a Git repository, including a linked worktree:
8
-
9
- ```bash
10
- vpx @deslop/coding-standards@latest
11
- ```
12
-
13
- It copies all package-owned skills into the repository's existing `.agents`, `.claude` and `.codex` directories. It always writes `.claude`, which Claude Code reads, and writes `.agents` when no `.codex` exists. A refresh replaces only those names; destinations outside the repository or inside global agent configuration are rejected. Other skills, sign-ins, manifests, lockfiles and lint configuration stay unchanged. Edit package sources, then refresh installed copies with the CLI.
14
-
15
- Use engineering for mechanisms, code, tests and proof, design for visible behavior and review for independent critique and cleanup. Refer to another skill by name, not its installation path. Personal orchestration, delivery, machine commands and reply preferences stay outside this package.
16
-
17
- ## Use the lint preset
3
+ A strict Oxlint preset, and the engineering, design and review skills for Claude Code and Codex.
18
4
 
19
5
  ```bash
6
+ vpx @deslop/coding-standards@latest # copy the skills into the repository's .claude, .codex or .agents
20
7
  vp add -D @deslop/coding-standards @effect/tsgo
21
- vp exec effect-tsgo patch --no-typescript --oxlint
8
+ vp exec effect-tsgo patch --no-typescript --oxlint # the preset needs the patched Oxlint; keep this in `prepare`
22
9
  ```
23
10
 
24
11
  ```ts
@@ -29,64 +16,4 @@ import {oxlint} from '@deslop/coding-standards'
29
16
  export default defineConfig({lint: {extends: [oxlint]}})
30
17
  ```
31
18
 
32
- The preset needs Effect-tsgo's patched Oxlint, so keep the patch command in the project's `prepare` script. Its fixes leave redundant parentheses and blank lines for the formatter, so the project's fix script runs `vp fmt` after `vp check --fix`, even when diagnostics remain, and exits with the status of the check.
33
-
34
- <details>
35
- <summary>For agents</summary>
36
-
37
- ### Decisions
38
-
39
- | Owner | Decision |
40
- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | `src/` | Flat package structure; rules in `src/rules`, no separate plugin or install-test harness |
42
- | `skills/` | Maintained engineering, design and review sources; refresh repository copies from the TypeScript CLI, no build needed |
43
- | Lint rules | Prefer an equivalent maintained rule before custom enforcement; consumer code conforms to strict standards, not the reverse. Fix broken or imprecise rules, not inconvenient valid diagnostics. A rule targets code the engineering skill and the other rules allow; an edge case that only unusual code reaches takes an inline disable with its reason, never a looser rule |
44
- | Rule proof | Public CLI cases with accepted and rejected inputs; no severity or exclusion workaround |
45
-
46
- With workspace dependencies installed, from the repository root:
47
-
48
- ```bash
49
- vp test run tools/coding-standards/src/rules/rules.test.ts
50
- node tools/coding-standards/src/install.ts
51
- ```
52
-
53
- ### Rejected shortcuts
54
-
55
- | Candidate | Reason |
56
- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
57
- | Blanket `unknown` type ban | Opaque SDK and framework contracts legitimately need it; narrow or decode before use instead of fabricating a shape |
58
- | Functional preset or dependency just to replace `no-let` | The preset conflicts; a selective plugin adds dependencies for a tiny rule |
59
- | Syntax-only generator-failure rule | Factory-call syntax does not establish yieldability; the existing type-aware Effect rule owns that check |
60
-
61
- ### Skill sources
62
-
63
- | Source | Used and boundary |
64
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
65
- | [Matt Pocock's engineering skills](https://github.com/mattpocock/skills/tree/d81f3a183412e71a5b1e84ca21bc1a35eea03a60/skills/engineering) | Caller-first contracts, causal debugging and one uncertain behavior at a time; no universal TDD |
66
- | [Cursor / pstack](https://github.com/cursor/plugins/tree/e43c7ee26e0038c6c1fa8380dd34ce86ff94cb2a/pstack) | Interface rationale, focused bug replay and defensible benchmarks; no playbook-stage machinery |
67
- | [Kit Langton's Effect skill](https://github.com/kitlangton/skills/tree/71195e36024ebd2e66c5beac946e81eafd5abc43/skills/effect) | Schema construction/optionality, checked against actual [Effect 4 source](https://github.com/Effect-TS/effect/tree/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src) |
68
- | [Vercel's agent skills](https://github.com/vercel-labs/agent-skills/tree/063bee94c3f4df8453406c830b0a7df0f2860278/skills) | Independent I/O and narrow subscriptions, translated to Effect/atoms; no manual React memoization |
69
- | [Anthropic frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) and [Vercel design guidelines](https://vercel.com/design/guidelines) | Task-led composition, copy and interaction contracts (targets, focus, URL state, forms); Critique keeps the generated-default list, not a studio persona |
70
- | [Emil Kowalski's skills](https://github.com/emilkowalski/skills/tree/e8a175de22ae1e49370fc144c1f3bb9aeedf988d/skills) | Realistic layout stress, interruptible motion and mobile checks; no fixed variant picker or audit fan-out. Performance caveats checked against [Motion docs](https://motion.dev/docs/performance) |
71
- | [Dillon Mulroy's skills](https://github.com/dmmulroy/skills/tree/8603380821fee6a77c82639f364ce8fe4f5a92be) and [anti-slop](https://github.com/dmmulroy/anti-slop/tree/c44ef22ca116d0ba62a3ff663a0bd13a3f3fa40b) | Reviewed Effect/error and cleanup approaches; retain our own service layout and ownership |
72
- | [Interface Craft](https://www.interfacecraft.dev/library), the user's licensed library | Before-the-first-draft steps, range and depth, agent-run tuning, the four-pass critique, optical, color, type and motion values; ideas adapted in our words, no files copied |
73
- | [Apple HIG](https://developer.apple.com/design/human-interface-guidelines), [Linear](https://linear.app/now/how-we-redesigned-the-linear-ui), [Rauno Freiberg](https://rauno.me/craft/interaction-design), [Geist](https://vercel.com/geist), [Radix](https://www.radix-ui.com/primitives/docs/overview/accessibility) and [WCAG](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html) | The quality bar, platform conventions, semantic type and glass, gesture behavior, border and shadow roles, dialog contracts and contrast ratios |
74
-
75
- Additional sources for this refinement:
76
-
77
- - [OpenClaw test audit](https://github.com/openclaw/openclaw/blob/main/.agents/skills/test-audit/SKILL.md): deletion of tautological tests; retain independent boundary contracts.
78
- - [Trail of Bits](https://github.com/trailofbits/skills): reproduce the strongest reachable counterexample and inspect variants of a known root cause; no routine security-audit machinery.
79
- - [Bret Victor](https://worrydream.com/ExplorableExplanations/) and [Nicky Case](https://blog.ncase.me/how-i-make-an-explorable-explanation/): concrete cause and consequence, with optional exploration rather than mandatory navigation.
80
- - [Taste skill](https://github.com/Leonxlnx/taste-skill/tree/a60a36dc2bb3bb77ccf17f2f62041f5ca8a458b9): real subject inventory and screenshot critique; no mandatory image, motion or component quotas.
81
- - [Anatomy](https://github.com/wheresryan22/anatomy): physical and isometric explanations when their relationships are the concept; no mandatory dense machine or separate card frame.
82
- - [Antfu design](https://github.com/antfu/design): native token hierarchy, density and affordance; no Vue or UnoCSS dependency added.
83
- - [Animated sprites](https://github.com/elithrar/dotfiles/tree/main/.agents/skills/animated-sprites): separate structural validity from perceptual motion and actual timing; no character assets required.
84
- - [pstack correct](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/correct/SKILL.md), [caller migration](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md) and [design red flags](https://github.com/cursor/plugins/blob/e5136d82418d2db3165ea1050d17577cd618cc05/pstack/skills/architect/references/design-red-flags.md): engineering's Patterns, with a canonical example per shape, whole-repository pattern changes and enforcement of repeated corrections above prose; no rule table beside the Patterns rows, no expiry dates on exceptions.
85
-
86
- - [obra/superpowers](https://github.com/obra/superpowers/tree/bb92a77741419a4ab5f06e711a283343f1ada0c3), [Matt Pocock](https://github.com/mattpocock/skills/tree/49dd158d1076134a641b33efb035946536778336) and [pstack](https://github.com/cursor/plugins/tree/09d06eb4b97a1020ab31e84030e38baf1099c7dc/pstack): recipes over prohibitions, requirement-to-proof mapping, domain-concept search, shrunk reproductions, the shared premise after two failed fixes, a behavior capture before refactors and three similar lines over an abstraction; no approval gates, test-first rituals or verification quotas.
87
- - [Felix Rieseberg, How to be more ambitious](https://felixrieseberg.com/how-to-be-more-ambitious-a-tutorial-for-humans-with-models/): adversarial review by activity, never persona, from raw evidence, and the expert's unrequested check.
88
- - [Emil Kowalski's animate skill](https://github.com/emilkowalski/skills/tree/2d228630ba1446365f614a108cb8252f1feda202/skills/animate) and [Taste v2](https://github.com/Leonxlnx/taste-skill/tree/f624f37a8c650b9cc550253104925efe4c8de246): a slower pace for explanatory motion and measured overflow, clipping and font checks before visual critique.
89
-
90
- These are selectively adapted ideas, not imported frameworks. Concrete behavior, existing stack and settled user decisions govern the maintained skills. Source inspection does not establish a model-quality improvement.
91
-
92
- </details>
19
+ The preset's fixes leave work for the formatter, so run `vp fmt` after `vp check --fix`. Your own `ignorePatterns` replace the preset's, so repeat `**/*.gen.ts`.
@@ -2494,7 +2494,7 @@ const EffectProto = {
2494
2494
  return {
2495
2495
  _id: "Effect",
2496
2496
  op: this[identifier],
2497
- ...args in this ? { args: this[args] } : void 0
2497
+ ..."~effect/Effect/args" in this ? { args: this[args] } : void 0
2498
2498
  };
2499
2499
  }
2500
2500
  };
@@ -2677,7 +2677,7 @@ function defaultEvaluate(_fiber) {
2677
2677
  const makePrimitiveProto = (options) => ({
2678
2678
  ...EffectProto,
2679
2679
  [identifier]: options.op,
2680
- [evaluate]: options[evaluate] ?? defaultEvaluate,
2680
+ [evaluate]: options["~effect/Effect/evaluate"] ?? defaultEvaluate,
2681
2681
  [contA]: options[contA],
2682
2682
  [contE]: options[contE],
2683
2683
  [contAll]: options[contAll]
@@ -2713,7 +2713,7 @@ const makeExit = (options) => {
2713
2713
  };
2714
2714
  },
2715
2715
  [symbol](that) {
2716
- return isExit(that) && that._tag === this._tag && equals(this[args], that[args]);
2716
+ return isExit(that) && that._tag === this._tag && equals(this["~effect/Effect/args"], that["~effect/Effect/args"]);
2717
2717
  },
2718
2718
  [symbol$1]() {
2719
2719
  return combine(string(options.op), hash(this[args]));
@@ -5408,6 +5408,46 @@ const take$1 = /*#__PURE__*/ dual(2, (self, n) => {
5408
5408
  return input.slice(0, clampCount(n, input.length));
5409
5409
  });
5410
5410
  /**
5411
+ * Takes elements from the start while the predicate holds, stopping at the
5412
+ * first element that fails.
5413
+ *
5414
+ * **When to use**
5415
+ *
5416
+ * Use to keep the leading elements of an iterable while each element satisfies
5417
+ * a predicate, returning the retained prefix as an array.
5418
+ *
5419
+ * **Details**
5420
+ *
5421
+ * Supports refinements for type narrowing. The predicate receives
5422
+ * `(element, index)`.
5423
+ *
5424
+ * **Example** (Taking while condition holds)
5425
+ *
5426
+ * ```ts import.meta.vitest
5427
+ * import { Array } from "effect"
5428
+ *
5429
+ * Array.takeWhile([1, 3, 2, 4, 1, 2], (x) => x < 4) // => [1, 3, 2]
5430
+ * ```
5431
+ *
5432
+ * @see {@link take} for keeping a fixed number of leading elements
5433
+ * @see {@link dropWhile} for removing the matching prefix and keeping the rest
5434
+ * @see {@link span} for splitting the matching prefix from the remaining elements
5435
+ *
5436
+ * @stability stable
5437
+ * @category getters
5438
+ * @since 2.0.0
5439
+ */
5440
+ const takeWhile = /*#__PURE__*/ dual(2, (self, predicate) => {
5441
+ let i = 0;
5442
+ const out = [];
5443
+ for (const a of self) {
5444
+ if (!predicate(a, i)) break;
5445
+ out.push(a);
5446
+ i++;
5447
+ }
5448
+ return out;
5449
+ });
5450
+ /**
5411
5451
  * Removes the last `n` elements, creating a new array.
5412
5452
  *
5413
5453
  * **When to use**
@@ -6352,27 +6392,22 @@ globalThis.String;
6352
6392
  */
6353
6393
  const Order = String$2;
6354
6394
  /**
6355
- * Replaces matches in a string using `String.prototype.replace`.
6356
- *
6357
- * **Details**
6358
- *
6359
- * String search values and non-global regular expressions replace the first
6360
- * match; global regular expressions replace every match.
6395
+ * Converts a string to uppercase.
6361
6396
  *
6362
- * **Example** (Replacing a substring)
6397
+ * **Example** (Converting strings to uppercase)
6363
6398
  *
6364
6399
  * ```ts import.meta.vitest
6365
6400
  * import { pipe, String } from "effect"
6366
6401
  *
6367
- * pipe("abc", String.replace("b", "d")) // => "adc"
6368
- * pipe("hello world", String.replace("world", "Effect")) // => "hello Effect"
6402
+ * pipe("a", String.toUpperCase) // => "A"
6403
+ * String.toUpperCase("hello") // => "HELLO"
6369
6404
  * ```
6370
6405
  *
6371
6406
  * @stability stable
6372
6407
  * @category transforming
6373
6408
  * @since 2.0.0
6374
6409
  */
6375
- const replace = (searchValue, replaceValue) => (self) => self.replace(searchValue, replaceValue);
6410
+ const toUpperCase = (self) => self.toUpperCase();
6376
6411
  /**
6377
6412
  * Removes whitespace from both ends of a string.
6378
6413
  *
@@ -6995,4 +7030,4 @@ const toArrayN = (self, n) => {
6995
7030
  */
6996
7031
  const toArray = (self) => toArrayN(self, self.length);
6997
7032
  //#endregion
6998
- export { makeEquivalence as $, formatDate as $n, isLessThanOrEqualTo as $t, dedupeWith as A, evaluate as An, isObject as Ar, flatMap$2 as At, flatMap as B, isFailReason as Bn, constTrue as Br, match$4 as Bt, TaggedError as C, causeFail as Cn, isFunction as Cr, succeed as Ct, contains as D, contAll as Dn, isNotUndefined as Dr, exists as Dt, appendAll as E, contA as En, isNotNullish as Er, contains$1 as Et, filter as F, isCause as Fn, isString as Fr, getOrUndefined as Ft, getSomes as G, assignProperty as Gn, identity as Gr, zipWith as Gt, forEach as H, makePrimitive as Hn, constVoid as Hr, orElse as Ht, filterMap as I, isDieReason as In, isTagged as Ir, isNone as It, isArrayNonEmpty as J, setStackTraceLimit as Jn, pipe as Jr, Number$2 as Jt, head as K, internalCall as Kn, memoize as Kr, BigInt$1 as Kt, findFirst as L, isDone as Ln, isUndefined as Lr, isSome as Lt, empty as M, exitFail as Mn, isPropertyKey as Mr, fromNullishOr as Mt, ensure as N, exitFailCause as Nn, isReadonlyObject as Nr, fromUndefinedOr as Nt, containsWith as O, contE as On, isNullish as Or, filter$1 as Ot, every as P, exitSucceed as Pn, isRegExp as Pr, getOrElse as Pt, last as Q, format as Qn, isLessThan as Qt, findFirstIndex as R, isEffect as Rn, isUnknown as Rr, liftThrowable as Rt, Error$1 as S, causeEmpty as Sn, isError as Sr, match$3 as St, append$1 as T, constEmptyAnnotations as Tn, isNotNull as Tr, all as Tt, fromIterable as U, makePrimitiveProto as Un, constant as Ur, some$1 as Ut, flatten as V, isInterruptReason as Vn, constUndefined as Vr, none as Vt, get$1 as W, withFiber as Wn, dual as Wr, toArray$1 as Wt, isReadonlyArrayNonEmpty as X, NodeInspectSymbol as Xn, Prototype as Xr, isGreaterThan as Xt, isCanonicalArrayIndex as Y, BaseProto as Yn, Class$1 as Yr, String$2 as Yt, join as Z, toStringUnknown as Zn, pipeArguments as Zr, isGreaterThanOrEqualTo as Zt, startsWith as _, args as _n, structureKeys as _r, fromOption as _t, takeN as a, CauseImpl as an, symbolRedactable as ar, reduce as at, parse as b, causeCombine as bn, isBigInt as br, isSuccess as bt, make$1 as c, Error$2 as cn, equals as cr, take$1 as ct, Order as d, InterruptorStackTrace as dn, combine as dr, makeEquivalence$1 as dt, make$2 as en, formatJson as er, map as et, includes as f, PipeInspectableProto as fn, hash as fr, map$1 as ft, split as g, Yield as gn, structure as gr, flatMap$1 as gt, replaceAll as h, TaggedError$1 as hn, string as hr, fail as ht, take as i, strictEqual as in, redact as ir, prepend as it, dropRight as j, exitDie as jn, isObjectKeyword as jr, flatten$1 as jt, dedupe as k, done as kn, isNumber as kr, firstSomeOf as kt, update as l, ExitTypeId as ln, symbol as lr, fromEntries as lt, replace as m, StackTraceKey as mn, optimize as mr, values as mt, clear as n, Tuple as nn, formatPropertyKey as nr, matchRight as nt, toArray as o, Die as on, asEquivalence as or, some as ot, match$1 as p, ReasonBase as pn, number as pr, remove as pt, isArrayEmpty as q, getStackTraceLimit as qn, memoizeIdempotent as qr, Date$1 as qt, make as r, make$3 as rn, currentFiberTypeId as rr, of as rt, get as s, Done as sn, byReferenceUnsafe as sr, sort as st, append as t, mapInput as tn, formatPath as tr, match$2 as tt, match as u, Fail as un, array as ur, get$2 as ut, trim as v, causeAddInterrupts as vn, symbol$1 as vr, getOrThrow as vt, taggedEnum as w, causeFromReasons as wn, isIterable as wr, normalize as wt, round as x, causeDie as xn, isBoolean as xr, map$2 as xt, trimEnd as y, causeAnnotate as yn, hasProperty as yr, isFailure as yt, findLast as z, isExit as zn, constFalse as zr, map$3 as zt };
7033
+ export { makeEquivalence as $, format as $n, isLessThan as $t, dedupeWith as A, done as An, isNumber as Ar, firstSomeOf as At, flatMap as B, isExit as Bn, constFalse as Br, map$3 as Bt, TaggedError as C, causeEmpty as Cn, isError as Cr, match$3 as Ct, contains as D, contA as Dn, isNotNullish as Dr, contains$1 as Dt, appendAll as E, constEmptyAnnotations as En, isNotNull as Er, all as Et, filter as F, exitSucceed as Fn, isRegExp as Fr, getOrElse as Ft, getSomes as G, withFiber as Gn, dual as Gr, toArray$1 as Gt, forEach as H, isInterruptReason as Hn, constUndefined as Hr, none as Ht, filterMap as I, isCause as In, isString as Ir, getOrUndefined as It, isArrayNonEmpty as J, getStackTraceLimit as Jn, memoizeIdempotent as Jr, Date$1 as Jt, head as K, assignProperty as Kn, identity as Kr, zipWith as Kt, findFirst as L, isDieReason as Ln, isTagged as Lr, isNone as Lt, empty as M, exitDie as Mn, isObjectKeyword as Mr, flatten$1 as Mt, ensure as N, exitFail as Nn, isPropertyKey as Nr, fromNullishOr as Nt, containsWith as O, contAll as On, isNotUndefined as Or, exists as Ot, every as P, exitFailCause as Pn, isReadonlyObject as Pr, fromUndefinedOr as Pt, last as Q, toStringUnknown as Qn, pipeArguments as Qr, isGreaterThanOrEqualTo as Qt, findFirstIndex as R, isDone as Rn, isUndefined as Rr, isSome as Rt, Error$1 as S, causeDie as Sn, isBoolean as Sr, map$2 as St, append$1 as T, causeFromReasons as Tn, isIterable as Tr, normalize as Tt, fromIterable as U, makePrimitive as Un, constVoid as Ur, orElse as Ut, flatten as V, isFailReason as Vn, constTrue as Vr, match$4 as Vt, get$1 as W, makePrimitiveProto as Wn, constant as Wr, some$1 as Wt, isReadonlyArrayNonEmpty as X, BaseProto as Xn, Class$1 as Xr, String$2 as Xt, isCanonicalArrayIndex as Y, setStackTraceLimit as Yn, pipe as Yr, Number$2 as Yt, join as Z, NodeInspectSymbol as Zn, Prototype as Zr, isGreaterThan as Zt, toUpperCase as _, Yield as _n, structure as _r, flatMap$1 as _t, takeN as a, strictEqual as an, redact as ar, reduce as at, parse as b, causeAnnotate as bn, hasProperty as br, isFailure as bt, make$1 as c, Done as cn, byReferenceUnsafe as cr, take$1 as ct, Order as d, Fail as dn, array as dr, get$2 as dt, isLessThanOrEqualTo as en, formatDate as er, map as et, includes as f, InterruptorStackTrace as fn, combine as fr, makeEquivalence$1 as ft, startsWith as g, TaggedError$1 as gn, string as gr, fail as gt, split as h, StackTraceKey as hn, optimize as hr, values as ht, take as i, make$3 as in, currentFiberTypeId as ir, prepend as it, dropRight as j, evaluate as jn, isObject as jr, flatMap$2 as jt, dedupe as k, contE as kn, isNullish as kr, filter$1 as kt, update as l, Error$2 as ln, equals as lr, takeWhile as lt, replaceAll as m, ReasonBase as mn, number as mr, remove as mt, clear as n, mapInput as nn, formatPath as nr, matchRight as nt, toArray as o, CauseImpl as on, symbolRedactable as or, some as ot, match$1 as p, PipeInspectableProto as pn, hash as pr, map$1 as pt, isArrayEmpty as q, internalCall as qn, memoize as qr, BigInt$1 as qt, make as r, Tuple as rn, formatPropertyKey as rr, of as rt, get as s, Die as sn, asEquivalence as sr, sort as st, append as t, make$2 as tn, formatJson as tr, match$2 as tt, match as u, ExitTypeId as un, symbol as ur, fromEntries as ut, trim as v, args as vn, structureKeys as vr, fromOption as vt, taggedEnum as w, causeFail as wn, isFunction as wr, succeed as wt, round as x, causeCombine as xn, isBigInt as xr, isSuccess as xt, trimEnd as y, causeAddInterrupts as yn, symbol$1 as yr, getOrThrow as yt, findLast as z, isEffect as zn, isUnknown as zr, liftThrowable as zt };
package/dist/install.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { An as evaluate, Ar as isObject, At as flatMap$4, Bn as isFailReason$1, Br as constTrue, Bt as match$4, C as TaggedError$1, Cn as causeFail, Cr as isFunction, Ct as succeed$6, D as contains, Dn as contAll, Dr as isNotUndefined, Dt as exists, En as contA, Er as isNotNullish, F as filter, Fn as isCause, Fr as isString$1, Ft as getOrUndefined$1, Gn as assignProperty, Gr as identity, Hn as makePrimitive$1, Hr as constVoid, Ht as orElse, In as isDieReason$1, Ir as isTagged, It as isNone, J as isArrayNonEmpty, Jn as setStackTraceLimit, Jr as pipe, Jt as Number$5, Kn as internalCall, Kr as memoize, L as findFirst, Ln as isDone$2, Lr as isUndefined, Lt as isSome, M as empty$3, Mn as exitFail, Mt as fromNullishOr, Nn as exitFailCause, Nt as fromUndefinedOr, On as contE, Or as isNullish, Pn as exitSucceed, Pt as getOrElse, Qn as format$1, R as findFirstIndex, Rn as isEffect$1, Rr as isUnknown, S as Error$2, Sn as causeEmpty, Sr as isError, St as match$3, T as append, Tn as constEmptyAnnotations, Tr as isNotNull, U as fromIterable$1, Un as makePrimitiveProto, Ur as constant, Ut as some, Vn as isInterruptReason, Vr as constUndefined, Vt as none, Wn as withFiber$1, Wr as dual, X as isReadonlyArrayNonEmpty, Xn as NodeInspectSymbol, Xr as Prototype$1, Xt as isGreaterThan$1, Y as isCanonicalArrayIndex, Yn as BaseProto, Yr as Class, Yt as String$6, Z as join$1, Zn as toStringUnknown, Zr as pipeArguments, _ as startsWith, _n as args, a as takeN, an as CauseImpl, at as reduce, bn as causeCombine, c as make$30, cn as Error$3, cr as equals$1, dn as InterruptorStackTrace, dr as combine$1, er as formatJson, et as map$8, fn as PipeInspectableProto, fr as hash, gn as Yield, gr as structure, hn as TaggedError$2, hr as string$1, ht as fail$5, i as take$1, jn as exitDie, jr as isObjectKeyword, k as dedupe, kn as done$1, kr as isNumber, ln as ExitTypeId, lr as symbol, mn as StackTraceKey, n as clear, nr as formatPropertyKey, on as Die, ot as some$1, pn as ReasonBase, pr as number$1, qn as getStackTraceLimit, qr as memoizeIdempotent, r as make$29, rr as currentFiberTypeId, rt as of, sn as Done$1, t as append$1, tn as mapInput, tr as formatPath, tt as match$5, u as match$6, un as Fail, vn as causeAddInterrupts, vr as symbol$1, w as taggedEnum, wn as causeFromReasons, wr as isIterable, wt as normalize$1, x as round, xn as causeDie, xr as isBoolean$1, y as trimEnd, yn as causeAnnotate, yr as hasProperty, yt as isFailure$1, z as findLast, zn as isExit, zr as constFalse, zt as map$10 } from "./MutableList-Cpkiw3Cl.mjs";
2
+ import { $n as format$1, An as done$1, Ar as isNumber, Bn as isExit, Br as constFalse, Bt as map$10, C as TaggedError$1, Cn as causeEmpty, Cr as isError, Ct as match$3, D as contains, Dn as contA, Dr as isNotNullish, En as constEmptyAnnotations, Er as isNotNull, F as filter, Fn as exitSucceed, Ft as getOrElse, Gn as withFiber$1, Gr as dual, Hn as isInterruptReason, Hr as constUndefined, Ht as none, In as isCause, Ir as isString$1, It as getOrUndefined$1, J as isArrayNonEmpty, Jn as getStackTraceLimit, Jr as memoizeIdempotent, Kn as assignProperty, Kr as identity, L as findFirst, Ln as isDieReason$1, Lr as isTagged, Lt as isNone, M as empty$3, Mn as exitDie, Mr as isObjectKeyword, Nn as exitFail, Nt as fromNullishOr, On as contAll, Or as isNotUndefined, Ot as exists, Pn as exitFailCause, Pt as fromUndefinedOr, Qn as toStringUnknown, Qr as pipeArguments, R as findFirstIndex, Rn as isDone$2, Rr as isUndefined, Rt as isSome, S as Error$2, Sn as causeDie, Sr as isBoolean$1, T as append, Tn as causeFromReasons, Tr as isIterable, Tt as normalize$1, U as fromIterable$1, Un as makePrimitive$1, Ur as constVoid, Ut as orElse, Vn as isFailReason$1, Vr as constTrue, Vt as match$4, Wn as makePrimitiveProto, Wr as constant, Wt as some, X as isReadonlyArrayNonEmpty, Xn as BaseProto, Xr as Class, Xt as String$6, Y as isCanonicalArrayIndex, Yn as setStackTraceLimit, Yr as pipe, Yt as Number$5, Z as join$1, Zn as NodeInspectSymbol, Zr as Prototype$1, Zt as isGreaterThan$1, _n as Yield, _r as structure, a as takeN, at as reduce, bn as causeAnnotate, br as hasProperty, bt as isFailure$1, c as make$30, cn as Done$1, dn as Fail, et as map$8, fn as InterruptorStackTrace, fr as combine$1, g as startsWith, gn as TaggedError$2, gr as string$1, gt as fail$5, hn as StackTraceKey, i as take$1, ir as currentFiberTypeId, jn as evaluate, jr as isObject, jt as flatMap$4, k as dedupe, kn as contE, kr as isNullish, ln as Error$3, lr as equals$1, mn as ReasonBase, mr as number$1, n as clear, nn as mapInput, nr as formatPath, on as CauseImpl, ot as some$1, pn as PipeInspectableProto, pr as hash, qn as internalCall, qr as memoize, r as make$29, rr as formatPropertyKey, rt as of, sn as Die, t as append$1, tr as formatJson, tt as match$5, u as match$6, un as ExitTypeId, ur as symbol, vn as args, w as taggedEnum, wn as causeFail, wr as isFunction, wt as succeed$6, x as round, xn as causeCombine, y as trimEnd, yn as causeAddInterrupts, yr as symbol$1, z as findLast, zn as isEffect$1, zr as isUnknown } from "./MutableList-CnvD7fcZ.mjs";
3
3
  import * as OS from "node:os";
4
4
  import * as NodeChildProcess from "node:child_process";
5
5
  import { PassThrough } from "node:stream";
@@ -1835,7 +1835,7 @@ var FiberImpl = class {
1835
1835
  current = cache.tracerContext ? cache.tracerContext(current, this) : current[evaluate](this);
1836
1836
  if (current === Yield) {
1837
1837
  const yielded = this._yielded;
1838
- if (ExitTypeId in yielded) {
1838
+ if ("~effect/Exit" in yielded) {
1839
1839
  this._deferredInterrupt = false;
1840
1840
  this._yielded = void 0;
1841
1841
  return yielded;
@@ -1847,7 +1847,7 @@ var FiberImpl = class {
1847
1847
  return Yield;
1848
1848
  }
1849
1849
  } catch (error) {
1850
- if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
1850
+ if (!hasProperty(current, "~effect/Effect/evaluate")) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
1851
1851
  current = exitDie(error);
1852
1852
  }
1853
1853
  } finally {
@@ -2031,7 +2031,7 @@ const yieldNow = /*#__PURE__*/ (/* @__PURE__ */ makePrimitive$1({
2031
2031
  fiber.currentDispatcher.scheduleTask(() => {
2032
2032
  if (resumed) return;
2033
2033
  fiber.evaluate(exitVoid);
2034
- }, this[args] ?? 0);
2034
+ }, this["~effect/Effect/args"] ?? 0);
2035
2035
  return fiber.yieldWith(() => {
2036
2036
  resumed = true;
2037
2037
  });
@@ -2816,14 +2816,14 @@ const whileLoop$1 = /*#__PURE__*/ makePrimitive$1({
2816
2816
  op: "While",
2817
2817
  [contA](value, fiber) {
2818
2818
  this[args].step(value);
2819
- if (this[args].while()) {
2819
+ if (this["~effect/Effect/args"].while()) {
2820
2820
  fiber._stack.push(this);
2821
2821
  return this[args].body();
2822
2822
  }
2823
2823
  return exitVoid;
2824
2824
  },
2825
2825
  [evaluate](fiber) {
2826
- if (this[args].while()) {
2826
+ if (this["~effect/Effect/args"].while()) {
2827
2827
  fiber._stack.push(this);
2828
2828
  return this[args].body();
2829
2829
  }
@@ -11985,7 +11985,7 @@ function run$4(ast) {
11985
11985
  function parserResult(result, input) {
11986
11986
  if (result === sameExit) return succeed$2(input);
11987
11987
  if (!effectIsExit(result)) return flatMapEager(result, getValue);
11988
- return result[args] === missing ? getValue(missing) : result;
11988
+ return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
11989
11989
  }
11990
11990
  function runWithCompiler(compiler, ast) {
11991
11991
  let parser;
@@ -11993,7 +11993,7 @@ function runWithCompiler(compiler, ast) {
11993
11993
  const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
11994
11994
  if (result === sameExit) return succeed$2(input);
11995
11995
  if (!effectIsExit(result)) return flatMapEager(result, getValue);
11996
- return result[args] === missing ? getValue(missing) : result;
11996
+ return result["~effect/Effect/args"] === missing ? getValue(missing) : result;
11997
11997
  };
11998
11998
  }
11999
11999
  function asExit(parser) {
@@ -19948,18 +19948,6 @@ const cursorHide = `${ESC}?25l`;
19948
19948
  /**
19949
19949
  * @internal
19950
19950
  */
19951
- const cursorLeft = `${ESC}G`;
19952
- /**
19953
- * @internal
19954
- */
19955
- const cursorSavePosition = `${ESC}s`;
19956
- /**
19957
- * @internal
19958
- */
19959
- const cursorRestorePosition = `${ESC}u`;
19960
- /**
19961
- * @internal
19962
- */
19963
19951
  const eraseLine = `${ESC}2K`;
19964
19952
  /**
19965
19953
  * @internal
@@ -20544,7 +20532,7 @@ const handleConfirmClear = (options) => {
20544
20532
  const figures = yield* getTheme(options);
20545
20533
  const confirmMessage = state.value ? options.placeholder.defaultConfirm : options.placeholder.defaultDeny;
20546
20534
  const promptText = renderPrompt(confirmMessage, options.message, figures.prefix, figures.pointerSmall, figures, { plain: true });
20547
- return eraseText(promptText, columns) + (eraseLine + cursorLeft);
20535
+ return eraseText(promptText, columns) + (eraseLine + "\x1B[G");
20548
20536
  });
20549
20537
  };
20550
20538
  const renderConfirmNextFrame = /*#__PURE__*/ fnUntraced(function* (state, options) {
@@ -20585,7 +20573,7 @@ const handleDateClear = (options) => {
20585
20573
  return fnUntraced(function* (state, _) {
20586
20574
  const columns = yield* (yield* Terminal).columns;
20587
20575
  const figures = yield* getTheme(options);
20588
- const resetCurrentLine = eraseLine + cursorLeft;
20576
+ const resetCurrentLine = eraseLine + "\x1B[G";
20589
20577
  const parts = reduce(state.dateParts, "", (doc, part) => doc + part.toString());
20590
20578
  const promptText = renderPrompt(parts, options.message, figures.prefix, figures.pointerSmall, figures, { plain: true });
20591
20579
  const errorText = isSome(state.error) ? match$5(state.error.value.split(NEWLINE_REGEXP), {
@@ -20601,7 +20589,7 @@ const renderDateError = (state, pointer, theme) => {
20601
20589
  if (isReadonlyArrayNonEmpty(errorLines)) {
20602
20590
  const prefix = annotateSymbol(theme, pointer, theme.errorColor);
20603
20591
  const lines = map$8(errorLines, (str) => annotateErrorLine(theme, str));
20604
- return cursorSavePosition + "\n" + separateSymbol(prefix, lines.join("\n")) + cursorRestorePosition;
20592
+ return "\x1B[s\n" + separateSymbol(prefix, lines.join("\n")) + "\x1B[u";
20605
20593
  }
20606
20594
  }
20607
20595
  return "";
@@ -21028,7 +21016,7 @@ const handleNumberClear = (options) => {
21028
21016
  return fnUntraced(function* (state, _) {
21029
21017
  const columns = yield* (yield* Terminal).columns;
21030
21018
  const figures = yield* getTheme(options);
21031
- const resetCurrentLine = eraseLine + cursorLeft;
21019
+ const resetCurrentLine = eraseLine + "\x1B[G";
21032
21020
  const errorText = renderNumberError(state, figures.pointerSmall, figures, { plain: true });
21033
21021
  const promptText = renderNumberOutput(state, figures.prefix, figures.pointerSmall, options, figures, { plain: true });
21034
21022
  return clearOutputWithError(promptText, columns, errorText) + resetCurrentLine;
@@ -21047,7 +21035,7 @@ const renderNumberError = (state, pointer, theme, renderOptions) => {
21047
21035
  if (renderOptions?.plain === true) return separateSymbol(pointer, errorLines.join("\n"));
21048
21036
  const prefix = annotateSymbol(theme, pointer, theme.errorColor);
21049
21037
  const lines = map$8(errorLines, (str) => annotateErrorLine(theme, str));
21050
- return cursorSavePosition + "\n" + separateSymbol(prefix, lines.join("\n")) + cursorRestorePosition;
21038
+ return "\x1B[s\n" + separateSymbol(prefix, lines.join("\n")) + "\x1B[u";
21051
21039
  }
21052
21040
  });
21053
21041
  return "";
@@ -21272,7 +21260,7 @@ const handleSelectRender = (options) => {
21272
21260
  const handleSelectClear = (options) => fnUntraced(function* (state, _) {
21273
21261
  const columns = yield* (yield* Terminal).columns;
21274
21262
  const figures = yield* getTheme(options);
21275
- const clearPrompt = eraseLine + cursorLeft;
21263
+ const clearPrompt = eraseLine + "\x1B[G";
21276
21264
  const promptText = renderSelectOutput(figures.prefix, figures.pointerSmall, options, figures, { plain: true });
21277
21265
  const choicesText = renderSelectChoices(state, options, figures, { plain: true });
21278
21266
  return eraseText(withSelectHeader(promptText, choicesText), columns) + clearPrompt;
@@ -21298,7 +21286,7 @@ const handleSelectProcess = (options) => {
21298
21286
  const renderClearScreen = /*#__PURE__*/ fnUntraced(function* (state, options) {
21299
21287
  const columns = yield* (yield* Terminal).columns;
21300
21288
  const figures = yield* getTheme(options);
21301
- const resetCurrentLine = eraseLine + cursorLeft;
21289
+ const resetCurrentLine = eraseLine + "\x1B[G";
21302
21290
  const errorText = renderTextError(state, figures.pointerSmall, figures, { plain: true });
21303
21291
  return clearOutputWithError(renderTextOutput(state, figures.prefix, figures.pointerSmall, options, figures, { plain: true }), columns, errorText) + resetCurrentLine;
21304
21292
  });
@@ -21324,7 +21312,7 @@ const renderTextError = (nextState, pointer, theme, renderOptions) => {
21324
21312
  if (renderOptions?.plain === true) return separateSymbol(pointer, errorLines.join("\n"));
21325
21313
  const prefix = annotateSymbol(theme, pointer, theme.errorColor);
21326
21314
  const lines = map$8(errorLines, (str) => annotateErrorLine(theme, str));
21327
- return cursorSavePosition + "\n" + separateSymbol(prefix, lines.join("\n")) + cursorRestorePosition;
21315
+ return "\x1B[s\n" + separateSymbol(prefix, lines.join("\n")) + "\x1B[u";
21328
21316
  }
21329
21317
  });
21330
21318
  return "";
@@ -21482,7 +21470,7 @@ const basePrompt = (options, type) => {
21482
21470
  const handleToggleClear = /*#__PURE__*/ fnUntraced(function* (options) {
21483
21471
  const columns = yield* (yield* Terminal).columns;
21484
21472
  const figures = yield* getTheme(options);
21485
- const clearPrompt = eraseLine + cursorLeft;
21473
+ const clearPrompt = eraseLine + "\x1B[G";
21486
21474
  const toggleText = options.active + " " + separateSymbol(figures.toggleSeparator, options.inactive);
21487
21475
  const promptText = renderPrompt(toggleText, options.message, figures.prefix, figures.pointerSmall, figures, { plain: true });
21488
21476
  return eraseText(promptText, columns) + clearPrompt;
@@ -25497,7 +25485,7 @@ const runWith = (command, config) => {
25497
25485
  };
25498
25486
  //#endregion
25499
25487
  //#region package.json
25500
- var version = "0.1.1083";
25488
+ var version = "0.1.1086";
25501
25489
  //#endregion
25502
25490
  //#region src/install.ts
25503
25491
  const cli = pipe(make("deslop-coding-standards", {}, fnUntraced(function* () {