From 74a6520cff98a188aca8a28114f148d5f7ef8b28 Mon Sep 17 00:00:00 2001 From: Sebastian Arrubia Date: Wed, 18 May 2022 12:13:26 -0300 Subject: [PATCH] Adding localhost mode --- index.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 3b3463c..2f44ff2 100644 --- a/index.js +++ b/index.js @@ -20,11 +20,22 @@ try { const splits = core.getMultilineInput('splits'); core.debug('Splits: ' + splits); - var factory = SplitFactory({ - core: { - authorizationKey: apiKey, - }, - }); + var factory; + if (apiKey == 'localhost') { + factory = SplitFactory({ + core: { + authorizationKey: apiKey, + }, + features: '.github/splitio/.split', + }); + } else { + factory = SplitFactory({ + core: { + authorizationKey: apiKey, + }, + }); + } + var client = factory.client(); client.on(client.Event.SDK_READY, async function () {