From c5c1c31345dd8a3b81f168d751e89847e658f4c7 Mon Sep 17 00:00:00 2001 From: Stuart Leeks Date: Thu, 8 May 2025 16:51:59 +0000 Subject: [PATCH] npm run build --- dist/restore-only/index.js | 17 +++++++++-------- dist/restore/index.js | 17 +++++++++-------- dist/save-only/index.js | 17 +++++++++-------- dist/save/index.js | 17 +++++++++-------- 4 files changed, 36 insertions(+), 32 deletions(-) diff --git a/dist/restore-only/index.js b/dist/restore-only/index.js index c42c938..da82f3f 100644 --- a/dist/restore-only/index.js +++ b/dist/restore-only/index.js @@ -65114,21 +65114,22 @@ class StateProviderBase { class StateProvider extends StateProviderBase { constructor() { super(...arguments); - this.setState = core.saveState; + this.setState = (key, value) => { core.saveState(key, value); stateToOutput(key, value); }; this.getState = core.getState; } } exports.StateProvider = StateProvider; +const stateToOutputMap = new Map([ + [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], + [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] +]); +function stateToOutput(key, value) { + core.setOutput(stateToOutputMap.get(key), value); +} class NullStateProvider extends StateProviderBase { constructor() { super(...arguments); - this.stateToOutputMap = new Map([ - [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], - [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] - ]); - this.setState = (key, value) => { - core.setOutput(this.stateToOutputMap.get(key), value); - }; + this.setState = stateToOutput; // eslint-disable-next-line @typescript-eslint/no-unused-vars this.getState = (key) => ""; } diff --git a/dist/restore/index.js b/dist/restore/index.js index 95f7849..9e2a513 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -65114,21 +65114,22 @@ class StateProviderBase { class StateProvider extends StateProviderBase { constructor() { super(...arguments); - this.setState = core.saveState; + this.setState = (key, value) => { core.saveState(key, value); stateToOutput(key, value); }; this.getState = core.getState; } } exports.StateProvider = StateProvider; +const stateToOutputMap = new Map([ + [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], + [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] +]); +function stateToOutput(key, value) { + core.setOutput(stateToOutputMap.get(key), value); +} class NullStateProvider extends StateProviderBase { constructor() { super(...arguments); - this.stateToOutputMap = new Map([ - [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], - [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] - ]); - this.setState = (key, value) => { - core.setOutput(this.stateToOutputMap.get(key), value); - }; + this.setState = stateToOutput; // eslint-disable-next-line @typescript-eslint/no-unused-vars this.getState = (key) => ""; } diff --git a/dist/save-only/index.js b/dist/save-only/index.js index 1e1b222..f191eb4 100644 --- a/dist/save-only/index.js +++ b/dist/save-only/index.js @@ -65127,21 +65127,22 @@ class StateProviderBase { class StateProvider extends StateProviderBase { constructor() { super(...arguments); - this.setState = core.saveState; + this.setState = (key, value) => { core.saveState(key, value); stateToOutput(key, value); }; this.getState = core.getState; } } exports.StateProvider = StateProvider; +const stateToOutputMap = new Map([ + [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], + [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] +]); +function stateToOutput(key, value) { + core.setOutput(stateToOutputMap.get(key), value); +} class NullStateProvider extends StateProviderBase { constructor() { super(...arguments); - this.stateToOutputMap = new Map([ - [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], - [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] - ]); - this.setState = (key, value) => { - core.setOutput(this.stateToOutputMap.get(key), value); - }; + this.setState = stateToOutput; // eslint-disable-next-line @typescript-eslint/no-unused-vars this.getState = (key) => ""; } diff --git a/dist/save/index.js b/dist/save/index.js index d288e0b..683caad 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -65127,21 +65127,22 @@ class StateProviderBase { class StateProvider extends StateProviderBase { constructor() { super(...arguments); - this.setState = core.saveState; + this.setState = (key, value) => { core.saveState(key, value); stateToOutput(key, value); }; this.getState = core.getState; } } exports.StateProvider = StateProvider; +const stateToOutputMap = new Map([ + [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], + [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] +]); +function stateToOutput(key, value) { + core.setOutput(stateToOutputMap.get(key), value); +} class NullStateProvider extends StateProviderBase { constructor() { super(...arguments); - this.stateToOutputMap = new Map([ - [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], - [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] - ]); - this.setState = (key, value) => { - core.setOutput(this.stateToOutputMap.get(key), value); - }; + this.setState = stateToOutput; // eslint-disable-next-line @typescript-eslint/no-unused-vars this.getState = (key) => ""; }