styleproof 4.4.8 → 4.4.9
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/CHANGELOG.md +4 -0
- package/dist/map-store.js +10 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,10 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
24
24
|
|
|
25
25
|
### Fixed
|
|
26
26
|
|
|
27
|
+
- **Explicit map-store credentials take precedence over checkout state.** When
|
|
28
|
+
`STYLEPROOF_MAP_STORE_TOKEN` is set, StyleProof now uses it before inspecting
|
|
29
|
+
persisted Git headers, so stale `actions/checkout` credentials cannot break a
|
|
30
|
+
cold-cache map upload.
|
|
27
31
|
- **Generated CI authenticates map publication explicitly.** `styleproof-init`
|
|
28
32
|
passes the workflow's least-privilege `github.token` as
|
|
29
33
|
`STYLEPROOF_MAP_STORE_TOKEN`, so cold-cache uploads do not depend on private
|
package/dist/map-store.js
CHANGED
|
@@ -64,6 +64,15 @@ function parseGitHttpExtraHeaders(configuredHeaders) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function effectiveGitHttpExtraHeaders(cwd) {
|
|
67
|
+
const mapStoreToken = process.env.STYLEPROOF_MAP_STORE_TOKEN;
|
|
68
|
+
if (mapStoreToken) {
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
key: ['http.https:', '', 'github.com', '.extraheader'].join('/'),
|
|
72
|
+
value: `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${mapStoreToken}`).toString('base64')}`,
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
}
|
|
67
76
|
const configuredHeaders = runGit(cwd, ['config', '--includes', '--get-regexp', '^http\\..*\\.extraheader$'], 1 << 20);
|
|
68
77
|
const effectiveHeaders = parseGitHttpExtraHeaders(configuredHeaders.stdout);
|
|
69
78
|
if (effectiveHeaders.length > 0)
|
|
@@ -82,15 +91,7 @@ function effectiveGitHttpExtraHeaders(cwd) {
|
|
|
82
91
|
});
|
|
83
92
|
if (includedHeaders.length > 0)
|
|
84
93
|
return includedHeaders;
|
|
85
|
-
|
|
86
|
-
if (!mapStoreToken)
|
|
87
|
-
return [];
|
|
88
|
-
return [
|
|
89
|
-
{
|
|
90
|
-
key: ['http.https:', '', 'github.com', '.extraheader'].join('/'),
|
|
91
|
-
value: `AUTHORIZATION: basic ${Buffer.from(`x-access-token:${mapStoreToken}`).toString('base64')}`,
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
+
return [];
|
|
94
95
|
}
|
|
95
96
|
function gitOutput(cwd, args) {
|
|
96
97
|
const r = runGit(cwd, args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styleproof",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.9",
|
|
4
4
|
"description": "Catch every CSS change before it ships — review PRs and certify refactors by the browser's computed styles, not pixels. Works with any styling system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"playwright",
|