@effected/github-actions 0.19.1 → 0.20.1
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/Action.js +13 -12
- package/ActionCache.js +1 -2
- package/ActionEnvironment.js +21 -6
- package/ActionInput.js +37 -55
- package/ActionLogger.js +27 -10
- package/ActionOutputs.js +27 -8
- package/ActionState.js +31 -2
- package/ActionsIdentityToken.js +2 -1
- package/ActionsProvenance.js +2 -1
- package/Artifact.js +4 -8
- package/BlobEnvelope.js +41 -15
- package/BlobStore.githubCache.js +11 -4
- package/BlobStore.js +8 -7
- package/CacheKey.js +6 -7
- package/ChildEnv.js +2 -5
- package/DetachedProcess.js +8 -11
- package/GitHubMarkdown.js +8 -10
- package/GitHubToken.js +12 -14
- package/ManagedDocument.js +3 -4
- package/OidcTokenIssuer.js +11 -7
- package/PackageManagerInstaller.js +34 -25
- package/README.md +4 -4
- package/Secret.js +10 -17
- package/ToolInstaller.js +12 -6
- package/index.d.ts +338 -295
- package/index.js +1 -1
- package/internal/actionsResults.js +0 -12
- package/internal/archiveCommands.js +0 -66
- package/internal/cacheService.js +0 -16
- package/internal/digest.js +0 -13
- package/internal/jwt.js +0 -17
- package/internal/pnpmExe.js +0 -15
- package/internal/runnerFile.js +0 -16
- package/internal/shim.js +30 -0
- package/internal/sigv4.js +1 -4
- package/internal/unstubbed.js +0 -12
- package/package.json +12 -11
- package/WorkflowCommand.js +0 -100
package/ToolInstaller.js
CHANGED
|
@@ -96,8 +96,8 @@ const make = Effect.gen(function* () {
|
|
|
96
96
|
* installed". Discarding it is what makes an extraction failure unactionable.
|
|
97
97
|
*
|
|
98
98
|
* **One spawn, not two — load-bearing**, and why is spelled once in
|
|
99
|
-
* `internal/spawn.ts`:
|
|
100
|
-
*
|
|
99
|
+
* `internal/spawn.ts`: a second run fails on Windows because .NET's
|
|
100
|
+
* `ZipFile.ExtractToDirectory` refuses to overwrite.
|
|
101
101
|
*/
|
|
102
102
|
const extractWith = (command, archive) => Effect.gen(function* () {
|
|
103
103
|
const { output, code } = yield* spawnOnce(spawner, command).pipe(Effect.mapError((cause) => new ToolInstallerError({
|
|
@@ -287,7 +287,7 @@ const dies = unstubbed("ToolInstaller.makeTest");
|
|
|
287
287
|
* environment because a double has no `ActionEnvironment` to ask. The literal
|
|
288
288
|
* `/tmp/runner-tool-cache` is what `make`'s `path.join("/tmp", "runner-tool-cache")`
|
|
289
289
|
* spells on POSIX, which is the only place a test double runs. Test-double
|
|
290
|
-
* only
|
|
290
|
+
* only.
|
|
291
291
|
*/
|
|
292
292
|
const testRoot = () => process.env.RUNNER_TOOL_CACHE ?? "/tmp/runner-tool-cache";
|
|
293
293
|
/**
|
|
@@ -323,6 +323,13 @@ const testRoot = () => process.env.RUNNER_TOOL_CACHE ?? "/tmp/runner-tool-cache"
|
|
|
323
323
|
* @public
|
|
324
324
|
*/
|
|
325
325
|
var ToolInstaller = class ToolInstaller extends Context.Service()("@effected/github-actions/ToolInstaller") {
|
|
326
|
+
/**
|
|
327
|
+
* The live installer, over the runner's tool cache, `HttpClient` and `tar`.
|
|
328
|
+
*
|
|
329
|
+
* @remarks
|
|
330
|
+
* The cache root comes from `RUNNER_TOOL_CACHE`, resolved once at layer
|
|
331
|
+
* construction.
|
|
332
|
+
*/
|
|
326
333
|
static layer = Layer.effect(this, make);
|
|
327
334
|
/**
|
|
328
335
|
* Where a tool lives in the cache.
|
|
@@ -346,9 +353,8 @@ var ToolInstaller = class ToolInstaller extends Context.Service()("@effected/git
|
|
|
346
353
|
* otherwise have to stub it in every test. The default is the static layout
|
|
347
354
|
* over `RUNNER_TOOL_CACHE`, or the same off-runner root `make` resolves
|
|
348
355
|
* (`internal/runner.ts`). **That is a read of the ambient environment**,
|
|
349
|
-
* sanctioned here only because a double has no `ActionEnvironment` to ask
|
|
350
|
-
*
|
|
351
|
-
* allowlist (`__test__/ambientReads.test.ts`).
|
|
356
|
+
* sanctioned here only because a double has no `ActionEnvironment` to ask,
|
|
357
|
+
* and limited to the test double.
|
|
352
358
|
*/
|
|
353
359
|
static makeTest = (overrides = {}) => ({
|
|
354
360
|
find: () => dies("find"),
|