deel-local-cli 1.20.1 → 1.20.3
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.ko.md +4 -2
- package/README.md +4 -2
- package/package.json +1 -1
- package/src/safety/secrets.js +47 -9
package/README.ko.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
[](https://github.com/jysvai/deel-local-cli/actions/workflows/test.yml)
|
|
22
22
|
[](https://github.com/jysvai/deel-local-cli/actions/workflows/codeql.yml)
|
|
23
|
-
[](docs/ko/develop.md)
|
|
24
24
|
|
|
25
25
|
[](https://www.npmjs.com/package/deel-local-cli?activeTab=dependencies)
|
|
26
26
|
[](package.json)
|
|
@@ -301,7 +301,7 @@ deel --offline
|
|
|
301
301
|
무엇이 어디로 갈 수 있는지는 켤 때 화면 맨 위에 늘 적혀 있습니다.
|
|
302
302
|
|
|
303
303
|
```
|
|
304
|
-
deel 1.20.
|
|
304
|
+
deel 1.20.3 ⌂ 이 안
|
|
305
305
|
보냄 이 컴퓨터 안 127.0.0.1:11434 ← 여기 말고는 어디로도 안 갑니다
|
|
306
306
|
```
|
|
307
307
|
|
|
@@ -1289,6 +1289,8 @@ zip 은 진짜 `unzip` 으로, tar 는 진짜 `tar` 가 만든 것을 읽혀 교
|
|
|
1289
1289
|
|
|
1290
1290
|
| 판 | 무엇이 바뀌었나 |
|
|
1291
1291
|
|---|---|
|
|
1292
|
+
| [1.20.3](docs/ko/releases/1.20.md#1203) | 울타리를 옮긴 자리가 어디까지 흔들렸는지 한 판에 보이게 했습니다 |
|
|
1293
|
+
| [1.20.2](docs/ko/releases/1.20.md#1202) | 앞 판이 막으려던 자리를 앞 판이 막고 있었습니다 |
|
|
1292
1294
|
| [1.20.1](docs/ko/releases/1.20.md#1201) | `PASSWORD=` 는 한 번도 안 잡히고 있었습니다 |
|
|
1293
1295
|
| [1.20.0](docs/ko/releases/1.20.md#1200) | 대문자로 안 적은 열쇠는 그대로 나가고 있었습니다 |
|
|
1294
1296
|
| [1.19.5](docs/ko/releases/1.19.md#1195) | 윈도우 줄바꿈에서는 앞 판의 고침이 통째로 헛돌고 있었습니다 |
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Vendor APIs connect too — **only when you say so**
|
|
|
20
20
|
|
|
21
21
|
[](https://github.com/jysvai/deel-local-cli/actions/workflows/test.yml)
|
|
22
22
|
[](https://github.com/jysvai/deel-local-cli/actions/workflows/codeql.yml)
|
|
23
|
-
[](docs/en/develop.md)
|
|
24
24
|
|
|
25
25
|
[](https://www.npmjs.com/package/deel-local-cli?activeTab=dependencies)
|
|
26
26
|
[](package.json)
|
|
@@ -374,7 +374,7 @@ deel --offline
|
|
|
374
374
|
The destination is printed at the top of every session:
|
|
375
375
|
|
|
376
376
|
```
|
|
377
|
-
deel 1.20.
|
|
377
|
+
deel 1.20.3 ⌂ inside
|
|
378
378
|
Sends to this machine 127.0.0.1:11434 ← nowhere else
|
|
379
379
|
```
|
|
380
380
|
|
|
@@ -1350,6 +1350,8 @@ so one run tells you everything.
|
|
|
1350
1350
|
|
|
1351
1351
|
| Version | What changed |
|
|
1352
1352
|
|---|---|
|
|
1353
|
+
| [1.20.3](docs/en/releases/1.20.md#1203) | How far a moved fence shook is now visible in one run |
|
|
1354
|
+
| [1.20.2](docs/en/releases/1.20.md#1202) | The previous release was blocking the very thing it meant to allow |
|
|
1353
1355
|
| [1.20.1](docs/en/releases/1.20.md#1201) | `PASSWORD=` was never once caught |
|
|
1354
1356
|
| [1.20.0](docs/en/releases/1.20.md#1200) | A key not written in capitals was going out as it was |
|
|
1355
1357
|
| [1.19.5](docs/en/releases/1.19.md#1195) | On Windows line endings the previous release's fix did nothing at all |
|
package/package.json
CHANGED
package/src/safety/secrets.js
CHANGED
|
@@ -63,11 +63,17 @@ const 표 = (종류) => `«가림:${종류}»`;
|
|
|
63
63
|
* 있어야 몰래칸이다. 안 넘기면 그 선언 줄이 통째로 잘려 나가고, 남은 빈 줄에
|
|
64
64
|
* 코드의 표시가 없어 멀쩡한 코드가 가려진다(17차 리뷰).
|
|
65
65
|
*
|
|
66
|
+
* 앞에 수식하는 낱말이 붙어도 줄머리로 친다 — `static` · `readonly` ·
|
|
67
|
+
* `accessor` · `override`. `static` 만 멀쩡했던 것은 그 낱말이 마침
|
|
68
|
+
* `코드표시` 목록에 있어서였다. 목록에 없는 낱말(`accessor`)에서는 그대로
|
|
69
|
+
* 뭉갰다(19차 리뷰). 글자와 빈칸만 있는 앞자리는 코드의 수식어로 본다 —
|
|
70
|
+
* 설정 줄이라면 그 자리에 `:` 나 `=` 가 있다.
|
|
71
|
+
*
|
|
66
72
|
* 줄머리 `#` 을 안 잘라도 설정 줄은 안 상한다 — `# API_KEY: 값` 은 잘라도
|
|
67
73
|
* 안 잘라도 코드의 표시가 없어 어차피 가려진다.
|
|
68
74
|
*/
|
|
69
75
|
const 몰래칸 = (줄, i) => /^[\p{L}_$]/u.test(줄[i + 1] ?? '')
|
|
70
|
-
&& (줄[i - 1] === '.' || /^[ \t]*$/.test(줄.slice(0, i)));
|
|
76
|
+
&& (줄[i - 1] === '.' || /^[ \t]*(?:[A-Za-z]+[ \t]+)*$/.test(줄.slice(0, i)));
|
|
71
77
|
|
|
72
78
|
const 주석떼기 = (줄) => {
|
|
73
79
|
let 따 = '';
|
|
@@ -546,11 +552,22 @@ export const 갈래 = [
|
|
|
546
552
|
*
|
|
547
553
|
* 민 이름으로 받을 때 빼는 것이 셋 있다. 재 보고 뺐다.
|
|
548
554
|
*
|
|
549
|
-
* -
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
*
|
|
555
|
+
* - `key` — 대소문자 가리지 않고 뺀다. `key: 값` 도 `KEY: 값` 도 그냥
|
|
556
|
+
* 짝의 이름일 때가 너무 많다. 앞머리가 붙은 `API_KEY` · `A_KEY` 는
|
|
557
|
+
* 본다. 앞머리에 글자가 하나는 있어야 한다 — `_KEY` 는 밑줄뿐이라
|
|
558
|
+
* 민 `KEY` 와 다를 것이 없는데 잡히고 있었다(19차 리뷰).
|
|
559
|
+
* - `PWD` — 셸의 **현재 폴더**다. `PWD` 도 `OLDPWD` 도 뺀다(밑줄이
|
|
560
|
+
* 앞에 있어야 본다). `DB_PWD` 는 그대로 본다.
|
|
561
|
+
* - 붙임표로 **시작하는** 낱말 — `\b` 가 `-` 뒤에서 끊고 들어가면
|
|
562
|
+
* `id-token` 의 `token` 만 집게 된다. 그건 깃허브 액션 문법이다.
|
|
563
|
+
*
|
|
564
|
+
* 붙임표로 **이은 이름 전체**(`github-token`)는 다르다. 그건 진짜 비밀
|
|
565
|
+
* 이름이다. 그래서 이름으로는 받고, **따옴표 없는 맨 값일 때만** 물린다
|
|
566
|
+
* (아래 `바꾸기` 를 보라) — `id-token: write` 의 `write` 가 맨 값이고,
|
|
567
|
+
* `github-token: 'abc123'` 의 값은 따옴표에 싸여 있다. 19차 리뷰.
|
|
568
|
+
*
|
|
569
|
+
* `X-API-KEY:` 처럼 붙임표로 이은 **머리글**은 앞자리 `헤더` 갈래가
|
|
570
|
+
* 먼저 집는다.
|
|
554
571
|
*
|
|
555
572
|
* 재 봤다. 이 저장소 파일 348개에 넣어 보니 21줄이 새로 가려졌고,
|
|
556
573
|
* **전부 진짜 열쇠였다**(`apiKey: 'sk-…'` 꼴).
|
|
@@ -560,12 +577,33 @@ export const 갈래 = [
|
|
|
560
577
|
* 것보다 낫다(1.19.0). 검사로 못 박아 둔다.
|
|
561
578
|
*/
|
|
562
579
|
id: '환경변수',
|
|
563
|
-
re: /\b(_?(?:[A-Z0-9_]*(?:
|
|
580
|
+
re: /\b(?<!-)(_?(?:[A-Z0-9_]*(?:TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?)|[A-Z0-9_]*[A-Z0-9]_?KEY|[A-Z0-9_]*_PWD|[A-Za-z][A-Za-z0-9]*(?:[-_](?:key|token|secret|password|passwd|pwd|credentials?)|-(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIALS?)|Key|Token|Secret|Password|Passwd|Pwd|Credentials?)|(?:password|secret|token|passwd|credentials?)))(?:(["']?[ \t]*(?::[^\n,;]{0,200}?|:[^\n]{0,200}?[>\])}][^\n,;]{0,80}?)[ \t]*=(?!=|>)\s*)((?:\(\s*)+)?(["'`])(?!«)((?:\\[^\n]|(?!\4)[^\n]){4,}?)\4((?:\s*\))+)?|(["']?\s*(?::(?![^\n]{0,200}?=[ \t]*«가림:)|=)\s*)((?:\(\s*)+)?(?:(["'`])(?!«)((?:\\[^\n]|(?!\9)[^\n]){4,}?)\9|(?!«)(?![\w$.]+\s*[([])(?!(?:string|number|boolean|bigint|symbol|object|unknown|never|void|null|undefined|true|false)\b)(?![^\n]{0,200}?}[ \t]*(?:=(?!=|>)|\)))(?!\(*\s*(?:process\.env|import\.meta\.env|globalThis\.process\.env|globalThis\.env|os\.environ|os\.getenv|ENV(?=\s*[[.(])|Deno\.env|Bun\.env)\b)([^\s"'()[\]{},;<>]{4,})(?=[ \t]*(?:[;,)\]}\r\n#]|$)))((?:\s*\))+)?)/g,
|
|
564
581
|
바꾸기: (m, 이름, 타입사이, 타입여는, 따A, 값A, 타입닫는,
|
|
565
582
|
민사이, 여는, 따B, 값B, 값C, 닫는, 자리, 전체) => {
|
|
566
583
|
// 따옴표 없는 맨 값만 「코드가 가리키는 이름인가」 를 되묻는다.
|
|
567
|
-
|
|
568
|
-
|
|
584
|
+
/*
|
|
585
|
+
* 붙임표로 이은 이름은 **따옴표에 싸인 값**일 때만 가린다.
|
|
586
|
+
* `id-token: write`(깃허브 액션)와 `github-token: 'abc123'`(진짜 비밀)이
|
|
587
|
+
* 이름으로는 안 갈리는데, 앞것의 값은 늘 맨 낱말이다.
|
|
588
|
+
*/
|
|
589
|
+
if (값C !== undefined && 이름.includes('-')) return m;
|
|
590
|
+
if (값C !== undefined) {
|
|
591
|
+
/*
|
|
592
|
+
* 짝이 여러 줄에 걸리면 이름 줄과 값 줄이 다르다. **둘 중 하나라도**
|
|
593
|
+
* 코드면 코드다.
|
|
594
|
+
*
|
|
595
|
+
* const API_KEY = ← 이름 줄에만 `const` 가 있다
|
|
596
|
+
* config.apiKey
|
|
597
|
+
* const opts = { apiKey:
|
|
598
|
+
* config.apiKey, ← 값 줄에만 쉼표가 있다
|
|
599
|
+
* };
|
|
600
|
+
*
|
|
601
|
+
* 한쪽만 보면 반대쪽이 뭉개진다(17차에 값 줄만 보게 고쳤다가
|
|
602
|
+
* 18차에 위쪽을 잃었다).
|
|
603
|
+
*/
|
|
604
|
+
const 값자리 = 자리 + m.lastIndexOf(값C);
|
|
605
|
+
if (!점값을가릴까(전체, 자리, 값C) || !점값을가릴까(전체, 값자리, 값C)) return m;
|
|
606
|
+
}
|
|
569
607
|
return 타입사이 === undefined
|
|
570
608
|
? `${이름}${민사이}${여는 ?? ''}${표('환경변수')}${닫는 ?? ''}`
|
|
571
609
|
: `${이름}${타입사이}${타입여는 ?? ''}${표('환경변수')}${타입닫는 ?? ''}`;
|