UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the

19 lines (18 loc) 686 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Error_1 = require("@shopify/app-bridge/actions/Error"); function isValidConfig(appConfig, config) { if (!appConfig) { return false; } var apiKey = appConfig.apiKey; if (!apiKey || apiKey !== config.apiKey) { return false; } return true; } exports.isValidConfig = isValidConfig; function throwInvalidConfigError(appConfig, config, action) { Error_1.throwError(Error_1.AppActionType.INVALID_CONFIG, action, "Provided apiKey `" + appConfig.apiKey + "` is incorrect. Expecting `" + config.apiKey + "`"); } exports.throwInvalidConfigError = throwInvalidConfigError;