@columenlabs/lumen-ship 0.1.232 → 0.1.233
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 +1 -1
- package/package.json +1 -1
- package/scripts/check-parts.sh +5 -1
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ lumen-ship check kit-neutral [paths] # no name from LUMEN_FORBIDDEN_NAMES (def
|
|
|
100
100
|
lumen-ship check suppressions # a useExhaustiveDependencies suppression needs a reason of 3+ words
|
|
101
101
|
lumen-ship check settings-copy # a Settings section description is one plain line of 64 characters or less
|
|
102
102
|
lumen-ship check magic-numbers # hard-coded px/rem class values may only go down
|
|
103
|
-
lumen-ship check parts <folders> # the kit's part pages: hint-text, text-action, raw-overlay, settings-page may only go down
|
|
103
|
+
lumen-ship check parts <folders> # the kit's part pages: hint-text, text-action, raw-overlay, settings-page, tags-text, key-input may only go down
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
Run each from a package folder in its `lint` script; run `parts` from the repo root with the app folders (`lumen-ship check parts apps/*/web/src`). `magic-numbers` reads the repo's `scripts/magic-numbers.baseline` (or `LUMEN_SHIP_BASELINE`): one `<folder> <count>` a line, lowered in the change that removes one. `parts` reads `scripts/parts.baseline` (or `LUMEN_SHIP_PARTS_BASELINE`): one `<folder> <rule> <count>` a line; `--write-baseline` writes today's counts on a first run. Each rule is explained, with what to write instead, at https://lumen.columenlabs.com/parts/README.md.
|
package/package.json
CHANGED
package/scripts/check-parts.sh
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
# raw-overlay an import of the kit's raw ui/sheet, ui/dialog, ui/select, ui/command or ui/combobox
|
|
10
10
|
# settings-page a route, link or nav item to a page of its own named settings: settings are sections
|
|
11
11
|
# of the one Settings dialog (LumenShell settings, opened at ?settings=<section>)
|
|
12
|
+
# key-input a password <Input> in an app: a key, token or secret is a LumenConnection field
|
|
13
|
+
# (docs/parts/settings.md, Built on the slots), never an Input with a Save button of its own
|
|
12
14
|
# tags-text tags or labels joined into comma text (`r.tags.join(', ')`) on a line with no `tags: true`:
|
|
13
15
|
# a ViewField with `tags: true` (its value may stay the joined text, for sorting) or TagChips
|
|
14
16
|
set -euo pipefail
|
|
@@ -22,7 +24,7 @@ if [ $# -eq 0 ]; then
|
|
|
22
24
|
exit 1
|
|
23
25
|
fi
|
|
24
26
|
baseline=${LUMEN_SHIP_PARTS_BASELINE:-$(git rev-parse --show-toplevel)/scripts/parts.baseline}
|
|
25
|
-
rules="hint-text text-action raw-overlay settings-page tags-text"
|
|
27
|
+
rules="hint-text text-action raw-overlay settings-page tags-text key-input"
|
|
26
28
|
|
|
27
29
|
# Prints `file:line` for each break of one rule in one folder.
|
|
28
30
|
hits() {
|
|
@@ -37,6 +39,8 @@ hits() {
|
|
|
37
39
|
$re = qr/<Button\b[^>]*>\s*(?:<[A-Z]\w*[^>]*\/>\s*)?(?:\{[^}]*\?\s*)?\x27?(?:Save|Run|Test|Send|Sync|Refresh|Copy|Edit|Delete|Remove|Retry|Reset)\b/;
|
|
38
40
|
} elsif ($rule eq "tags-text") {
|
|
39
41
|
$re = qr/^(?![^\n]*\btags:\s*true)[^\n]*?\b(?:tags|labels)\b(?:\s*\?\?\s*\[\])?\)?\s*\??\.join\(\s*[\x27"`],/m;
|
|
42
|
+
} elsif ($rule eq "key-input") {
|
|
43
|
+
$re = qr/<(?:Input|InputGroupInput)\b(?:=>|[^>])*?\btype=(?:"password"|\{[^}]*[\x27"]password[\x27"])/;
|
|
40
44
|
} elsif ($rule eq "settings-page") {
|
|
41
45
|
$re = qr/\b(?:path|to|href)\s*[:=]\s*\{?\s*[\x27"`](?:[^\x27"`]*\/)?settings(?=[\/?#\x27"`])/i;
|
|
42
46
|
} else {
|