From c58b6a8dfc7a6e75cac18efe68b119b7e8dd1501 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 7 Feb 2024 11:44:15 -0600 Subject: [PATCH 1/3] fix sleep import --- src/procedures/alexa/helpers.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/procedures/alexa/helpers.js b/src/procedures/alexa/helpers.js index 306e705d..e31a55aa 100644 --- a/src/procedures/alexa/helpers.js +++ b/src/procedures/alexa/helpers.js @@ -2,9 +2,8 @@ const _ = require("lodash"); const AlexaSMAPI = require("ask-smapi-sdk"); const GetStorage = require("./storage"); const assert = require("assert"); -const { sleep } = require("../../utils"); +const { sleep } = require("../../timers"); const { getCloudURL, getServicesURL } = require("../utils"); -// FIXME: is sleep defined? // login with alexa credentials const lwaClientID = process.env.LWA_CLIENT_ID; From eafae30f246a2fc1884739a55a8467598283cafe Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 7 Feb 2024 11:46:07 -0600 Subject: [PATCH 2/3] add TODO for more missing method impls --- src/procedures/alexa/helpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/procedures/alexa/helpers.js b/src/procedures/alexa/helpers.js index e31a55aa..0c980676 100644 --- a/src/procedures/alexa/helpers.js +++ b/src/procedures/alexa/helpers.js @@ -3,6 +3,7 @@ const AlexaSMAPI = require("ask-smapi-sdk"); const GetStorage = require("./storage"); const assert = require("assert"); const { sleep } = require("../../timers"); +// FIXME: update these methods const { getCloudURL, getServicesURL } = require("../utils"); // login with alexa credentials From ed4e49d98d640a8f366752373511459b83fc36c1 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 7 Feb 2024 11:54:54 -0600 Subject: [PATCH 3/3] Implement missing helpers --- src/procedures/alexa/helpers.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/procedures/alexa/helpers.js b/src/procedures/alexa/helpers.js index 0c980676..459bc47e 100644 --- a/src/procedures/alexa/helpers.js +++ b/src/procedures/alexa/helpers.js @@ -3,8 +3,21 @@ const AlexaSMAPI = require("ask-smapi-sdk"); const GetStorage = require("./storage"); const assert = require("assert"); const { sleep } = require("../../timers"); -// FIXME: update these methods -const { getCloudURL, getServicesURL } = require("../utils"); +const { NetsBloxCloud, ServerURL } = require("../../config"); + +/** + * Get the URL of the cloud we are connected to. + */ +function getCloudURL() { + return NetsBloxCloud; +} + +/** + * Get the URL of the services host (this instance). + */ +function getServicesURL() { + return ServerURL; +} // login with alexa credentials const lwaClientID = process.env.LWA_CLIENT_ID;