@vzn/vx-reapi 0.0.640 → 0.0.641
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/package.json +2 -2
- package/src/executor.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx-reapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.641",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Bazel Remote Execution API plugin for vx — remote cache (ActionCache + CAS) against NativeLink, BuildBuddy, Buildbarn or bazel-remote.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@vzn/vx": "^0.0.
|
|
42
|
+
"@vzn/vx": "^0.0.641"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
package/src/executor.ts
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
isLiteralPattern,
|
|
18
18
|
isUserError,
|
|
19
19
|
normalizeGlob,
|
|
20
|
+
restorableOutput,
|
|
20
21
|
UserError,
|
|
21
22
|
withForwardArgs,
|
|
22
23
|
} from '@vzn/vx'
|
|
@@ -1407,9 +1408,19 @@ export async function materialiseOutputs(
|
|
|
1407
1408
|
...(req.outputs?.workspaceFiles ?? []),
|
|
1408
1409
|
].map((g) => normalizeGlob(g))
|
|
1409
1410
|
const matchers = declared.map((g) => new Bun.Glob(g))
|
|
1411
|
+
// Core's restore gate: a `!` take-back, vx's own files and a
|
|
1412
|
+
// `node_modules` no glob names are no output either.
|
|
1413
|
+
const isOwn = restorableOutput(req.outputs?.files ?? [])
|
|
1414
|
+
const isWs = restorableOutput(req.outputs?.workspaceFiles ?? [])
|
|
1410
1415
|
const isDeclared = (abs: string): boolean => {
|
|
1411
1416
|
const rel = toPosix(path.relative(req.workspaceRoot, abs))
|
|
1412
|
-
|
|
1417
|
+
const own =
|
|
1418
|
+
projectRel === ''
|
|
1419
|
+
? rel
|
|
1420
|
+
: rel.startsWith(`${projectRel}/`)
|
|
1421
|
+
? rel.slice(projectRel.length + 1)
|
|
1422
|
+
: undefined
|
|
1423
|
+
return (own !== undefined && isOwn(own)) || isWs(rel)
|
|
1413
1424
|
}
|
|
1414
1425
|
// A declared output, or a path under one a literal glob names whole.
|
|
1415
1426
|
const underDeclared = (rel: string): boolean => {
|