@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 +5 -78
- package/dist/{MutableList-Cpkiw3Cl.mjs → MutableList-CnvD7fcZ.mjs} +49 -14
- package/dist/install.js +18 -30
- package/dist/oxlint.d.ts +30 -25
- package/dist/oxlint.js +582 -362
- package/package.json +3 -3
- package/skills/design/SKILL.md +12 -15
- package/skills/engineering/SKILL.md +115 -110
- package/skills/review/SKILL.md +5 -6
- package/tsconfig.json +0 -2
package/README.md
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @deslop/coding-standards
|
|
2
2
|
|
|
3
|
-
A strict Oxlint preset and
|
|
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
|
|
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
|
-
*
|
|
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** (
|
|
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("
|
|
6368
|
-
*
|
|
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
|
|
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 $,
|
|
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 {
|
|
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 (
|
|
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 +
|
|
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 +
|
|
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
|
|
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 +
|
|
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
|
|
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 +
|
|
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 +
|
|
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
|
|
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 +
|
|
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.
|
|
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* () {
|