putitoutthere 0.1.15 → 0.1.17
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/dist/log.d.ts +7 -2
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +9 -4
- package/dist/log.js.map +1 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +16 -2
- package/dist/templates.js.map +1 -1
- package/package.json +1 -1
package/dist/log.d.ts
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* JSON-per-line output in CI; human-readable text in TTYs. Every emitted
|
|
5
5
|
* line is passed through a redactor that replaces any occurrence of a
|
|
6
6
|
* known-secret env value (keys matching *TOKEN* / *SECRET* / *PASSWORD*
|
|
7
|
-
* / *KEY*, case-insensitive) with `[REDACTED]
|
|
7
|
+
* / *KEY*, case-insensitive) with `[REDACTED:<digest>]`, where `<digest>`
|
|
8
|
+
* is a stable 8-hex-char SHA-256 prefix (#134). Operators can correlate
|
|
9
|
+
* rotated tokens across log lines without ever seeing the value.
|
|
8
10
|
*
|
|
9
11
|
* Substring redaction (rather than Pino-style field-path redaction) is
|
|
10
12
|
* deliberate: handlers capture child-process stdout/stderr and feed it
|
|
@@ -23,7 +25,10 @@ export interface LoggerOptions {
|
|
|
23
25
|
}
|
|
24
26
|
export declare function createLogger(opts?: LoggerOptions): Logger;
|
|
25
27
|
/**
|
|
26
|
-
* Replace every occurrence of a known-secret env value with
|
|
28
|
+
* Replace every occurrence of a known-secret env value with
|
|
29
|
+
* `[REDACTED:<digest>]` where `<digest>` is a stable 8-hex-char
|
|
30
|
+
* SHA-256 prefix of the token. Operators can correlate rotated
|
|
31
|
+
* tokens across log lines without ever seeing the value itself.
|
|
27
32
|
* Empty / single-char values are skipped to avoid mangling unrelated
|
|
28
33
|
* characters. Called on every log write.
|
|
29
34
|
*/
|
package/dist/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AASxD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,IAAI,GAAE,aAAkB,GAAG,MAAM,CAsB7D;AA0BD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAWxC"}
|
package/dist/log.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* JSON-per-line output in CI; human-readable text in TTYs. Every emitted
|
|
5
5
|
* line is passed through a redactor that replaces any occurrence of a
|
|
6
6
|
* known-secret env value (keys matching *TOKEN* / *SECRET* / *PASSWORD*
|
|
7
|
-
* / *KEY*, case-insensitive) with `[REDACTED]
|
|
7
|
+
* / *KEY*, case-insensitive) with `[REDACTED:<digest>]`, where `<digest>`
|
|
8
|
+
* is a stable 8-hex-char SHA-256 prefix (#134). Operators can correlate
|
|
9
|
+
* rotated tokens across log lines without ever seeing the value.
|
|
8
10
|
*
|
|
9
11
|
* Substring redaction (rather than Pino-style field-path redaction) is
|
|
10
12
|
* deliberate: handlers capture child-process stdout/stderr and feed it
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
*
|
|
14
16
|
* Issue #11. Plan: §22.2, §22.5.
|
|
15
17
|
*/
|
|
18
|
+
import { tokenDigest } from './auth.js';
|
|
16
19
|
const LEVEL_ORDER = {
|
|
17
20
|
debug: 10,
|
|
18
21
|
info: 20,
|
|
@@ -62,9 +65,11 @@ function formatScalar(v) {
|
|
|
62
65
|
}
|
|
63
66
|
/* ----------------------------- redaction ----------------------------- */
|
|
64
67
|
const SECRET_KEY = /TOKEN|SECRET|PASSWORD|KEY/i;
|
|
65
|
-
const REDACTED = '[REDACTED]';
|
|
66
68
|
/**
|
|
67
|
-
* Replace every occurrence of a known-secret env value with
|
|
69
|
+
* Replace every occurrence of a known-secret env value with
|
|
70
|
+
* `[REDACTED:<digest>]` where `<digest>` is a stable 8-hex-char
|
|
71
|
+
* SHA-256 prefix of the token. Operators can correlate rotated
|
|
72
|
+
* tokens across log lines without ever seeing the value itself.
|
|
68
73
|
* Empty / single-char values are skipped to avoid mangling unrelated
|
|
69
74
|
* characters. Called on every log write.
|
|
70
75
|
*/
|
|
@@ -79,7 +84,7 @@ export function redact(s) {
|
|
|
79
84
|
continue;
|
|
80
85
|
// String.replaceAll expects a literal or a RegExp; use split/join to
|
|
81
86
|
// avoid regex escaping every secret value.
|
|
82
|
-
out = out.split(v).join(REDACTED);
|
|
87
|
+
out = out.split(v).join(`[REDACTED:${tokenDigest(v)}]`);
|
|
83
88
|
}
|
|
84
89
|
return out;
|
|
85
90
|
}
|
package/dist/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,MAAM,WAAW,GAA0B;IACzC,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;CACV,CAAC;AAQF,MAAM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AACH,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAAE,SAAS;QAClC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS;QACpD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;YAAE,SAAS;QAC/B,qEAAqE;QACrE,2CAA2C;QAC3C,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/templates.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Issue #25. Plan: §9.
|
|
14
14
|
*/
|
|
15
15
|
export type Cadence = 'immediate' | 'scheduled';
|
|
16
|
-
export declare const TOML_SKELETON = "# Put It Out There \u2014 release orchestration config.\n# Docs: https://github.com/thekevinscott/put-it-out-there\n\n[putitoutthere]\nversion = 1\n\n# Declare one [[package]] block per releasable artifact.
|
|
16
|
+
export declare const TOML_SKELETON = "# Put It Out There \u2014 release orchestration config.\n# Docs: https://github.com/thekevinscott/put-it-out-there\n\n[putitoutthere]\nversion = 1\n\n# Declare one [[package]] block per releasable artifact. Examples:\n#\n# [[package]]\n# name = \"my-crate\"\n# kind = \"crates\"\n# path = \"crates/my-crate\" # dir containing Cargo.toml\n# paths = [\"crates/my-crate/**\", \"Cargo.toml\", \"Cargo.lock\"]\n# first_version = \"0.1.0\"\n#\n# [[package]]\n# name = \"my-py\"\n# kind = \"pypi\"\n# path = \"py/my-py\" # dir containing pyproject.toml\n# paths = [\"py/my-py/**\"]\n# first_version = \"0.1.0\"\n#\n# [[package]]\n# name = \"my-pkg\"\n# kind = \"npm\"\n# path = \"packages/my-pkg\" # dir containing package.json\n# paths = [\"packages/my-pkg/**\"]\n# first_version = \"0.1.0\"\n";
|
|
17
17
|
export declare const AGENTS_MD = "# Release signaling for Put It Out There\n\nWhen you finish a unit of work and are preparing a PR or commit, add a git\ntrailer to the commit message body to signal a release:\n\n release: <patch|minor|major|skip>\n\nRules:\n- Omit the trailer for docs-only, CI-only, or internal-only changes.\n- `patch` for bug fixes or internal refactors that don't change public API.\n- `minor` for new features that are backwards-compatible.\n- `major` for breaking changes.\n- `skip` to suppress release when path filters would otherwise cascade.\n\nThe trailer on the merge commit determines the release. If merging via\n\"Squash and merge,\" include the trailer in the PR description so it ends up\nin the squashed commit body.\n\n## Scoping a release to specific packages\n\nTo release a subset of packages in a polyglot repo, append a bracketed list:\n\n release: minor [dirsql-rust, dirsql-python]\n\nPackages named in the list are bumped with the specified version. Other\npackages cascaded by path filters still get a `patch`. Packages in the\nlist that *aren't* cascaded are force-included.\n";
|
|
18
18
|
export declare const RELEASE_YML_IMMEDIATE: string;
|
|
19
19
|
export declare const RELEASE_YML_SCHEDULED: string;
|
package/dist/templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhD,eAAO,MAAM,aAAa,+0BA4BzB,CAAC;AAEF,eAAO,MAAM,SAAS,4kCA2BrB,CAAC;AAmJF,eAAO,MAAM,qBAAqB,QAAsE,CAAC;AACzG,eAAO,MAAM,qBAAqB,QAAsE,CAAC;AAEzG,eAAO,MAAM,SAAS,iaAsBrB,CAAC;AAEF,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAGnD"}
|
package/dist/templates.js
CHANGED
|
@@ -18,14 +18,28 @@ export const TOML_SKELETON = `# Put It Out There — release orchestration confi
|
|
|
18
18
|
[putitoutthere]
|
|
19
19
|
version = 1
|
|
20
20
|
|
|
21
|
-
# Declare one [[package]] block per releasable artifact.
|
|
21
|
+
# Declare one [[package]] block per releasable artifact. Examples:
|
|
22
22
|
#
|
|
23
23
|
# [[package]]
|
|
24
24
|
# name = "my-crate"
|
|
25
25
|
# kind = "crates"
|
|
26
|
-
# path = "crates/my-crate"
|
|
26
|
+
# path = "crates/my-crate" # dir containing Cargo.toml
|
|
27
27
|
# paths = ["crates/my-crate/**", "Cargo.toml", "Cargo.lock"]
|
|
28
28
|
# first_version = "0.1.0"
|
|
29
|
+
#
|
|
30
|
+
# [[package]]
|
|
31
|
+
# name = "my-py"
|
|
32
|
+
# kind = "pypi"
|
|
33
|
+
# path = "py/my-py" # dir containing pyproject.toml
|
|
34
|
+
# paths = ["py/my-py/**"]
|
|
35
|
+
# first_version = "0.1.0"
|
|
36
|
+
#
|
|
37
|
+
# [[package]]
|
|
38
|
+
# name = "my-pkg"
|
|
39
|
+
# kind = "npm"
|
|
40
|
+
# path = "packages/my-pkg" # dir containing package.json
|
|
41
|
+
# paths = ["packages/my-pkg/**"]
|
|
42
|
+
# first_version = "0.1.0"
|
|
29
43
|
`;
|
|
30
44
|
export const AGENTS_MD = `# Release signaling for Put It Out There
|
|
31
45
|
|
package/dist/templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B5B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BxB,CAAC;AAEF,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDjB,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnB,CAAC;AAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;CAYhB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBxB,CAAC;AAEF,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBxB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,WAAW,CAAC;AACzG,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,WAAW,CAAC;AAEzG,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,yCAAyC;IACzC,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAC;AACjF,CAAC"}
|