Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/app-bridge

Package Overview
Dependencies
Maintainers
12
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/app-bridge - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8-0

development.d.ts

1

actions/Button/actions.js

@@ -115,2 +115,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -24,2 +24,1 @@ "use strict";

})(Style = exports.Style || (exports.Style = {}));
//# sourceMappingURL=types.js.map

@@ -146,2 +146,1 @@ "use strict";

}
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -14,2 +14,1 @@ "use strict";

})(ActionType = exports.ActionType || (exports.ActionType = {}));
//# sourceMappingURL=types.js.map

@@ -11,2 +11,1 @@ "use strict";

exports.getGroupedButton = getGroupedButton;
//# sourceMappingURL=buttonGroupHelper.js.map

@@ -10,2 +10,1 @@ "use strict";

exports.getSingleButton = getSingleButton;
//# sourceMappingURL=buttonHelper.js.map

@@ -66,2 +66,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -21,2 +21,1 @@ "use strict";

})(OpenType = exports.OpenType || (exports.OpenType = {}));
//# sourceMappingURL=types.js.map

@@ -114,2 +114,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -149,2 +149,3 @@ /**

variantId?: number;
discount?: DiscountAmount;
}

@@ -151,0 +152,0 @@ export declare type NoteAttributes = Array<{

@@ -48,2 +48,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PREFIX = 'APP';
//# sourceMappingURL=constants.js.map

@@ -122,2 +122,1 @@ "use strict";

exports.throwError = throwError;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -35,2 +35,1 @@ "use strict";

})(AppActionType = exports.AppActionType || (exports.AppActionType = {}));
//# sourceMappingURL=types.js.map

@@ -26,2 +26,1 @@ "use strict";

exports.validationError = validationError;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -14,2 +14,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map

@@ -35,2 +35,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("../Toast/types"));
//# sourceMappingURL=index.js.map

@@ -40,3 +40,6 @@ "use strict";

function actionWrapper(action) {
return __assign({}, action, { version: getVersion() });
return __assign({}, action, { version: getVersion(), clientInterface: {
name: packageJson.name,
version: getVersion(),
} });
}

@@ -364,2 +367,1 @@ exports.actionWrapper = actionWrapper;

exports.findMatchInEnum = findMatchInEnum;
//# sourceMappingURL=helper.js.map

@@ -46,2 +46,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -68,2 +68,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -16,2 +16,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map

@@ -40,2 +40,1 @@ "use strict";

exports.default = mergeProps;
//# sourceMappingURL=merge.js.map

@@ -304,2 +304,1 @@ "use strict";

};
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -27,2 +27,1 @@ "use strict";

})(Size = exports.Size || (exports.Size = {}));
//# sourceMappingURL=types.js.map

@@ -77,2 +77,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -16,2 +16,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map

@@ -140,2 +140,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -25,2 +25,1 @@ "use strict";

})(ResourceType = exports.ResourceType || (exports.ResourceType = {}));
//# sourceMappingURL=types.js.map

@@ -16,2 +16,1 @@ "use strict";

exports.app = app;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -14,2 +14,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map

@@ -108,3 +108,3 @@ "use strict";

var mergedOptions = helper_1.getMergedProps(this.options, options);
var initialQuery = mergedOptions.initialQuery, _a = mergedOptions.showHidden, showHidden = _a === void 0 ? false : _a, _b = mergedOptions.showVariants, showVariants = _b === void 0 ? true : _b, _c = mergedOptions.selectMultiple, selectMultiple = _c === void 0 ? true : _c;
var initialQuery = mergedOptions.initialQuery, _a = mergedOptions.showHidden, showHidden = _a === void 0 ? true : _a, _b = mergedOptions.showVariants, showVariants = _b === void 0 ? true : _b, _c = mergedOptions.selectMultiple, selectMultiple = _c === void 0 ? true : _c;
this.initialQuery = initialQuery;

@@ -154,2 +154,1 @@ this.showHidden = Boolean(showHidden);

};
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -63,2 +63,1 @@ "use strict";

})(ResourceType = exports.ResourceType || (exports.ResourceType = {}));
//# sourceMappingURL=types.js.map

@@ -215,2 +215,1 @@ "use strict";

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -16,2 +16,1 @@ "use strict";

})(ActionType = exports.ActionType || (exports.ActionType = {}));
//# sourceMappingURL=types.js.map

@@ -54,3 +54,3 @@ "use strict";

_this.message = '';
_this.duration = 3000;
_this.duration = 5000;
_this.set(options);

@@ -104,2 +104,1 @@ return _this;

exports.create = create;
//# sourceMappingURL=actions.js.map

@@ -8,2 +8,1 @@ "use strict";

__export(require("./types"));
//# sourceMappingURL=index.js.map

@@ -16,2 +16,1 @@ "use strict";

})(Action = exports.Action || (exports.Action = {}));
//# sourceMappingURL=types.js.map

@@ -42,2 +42,6 @@ import { ClientApplication } from '../client';

}
export interface ClientInterface {
name?: string;
version?: string;
}
/**

@@ -47,2 +51,3 @@ * @public

export interface MetaAction extends AnyAction {
clientInterface?: ClientInterface;
readonly version: string;

@@ -49,0 +54,0 @@ readonly group: string;

@@ -31,2 +31,1 @@ "use strict";

})(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
//# sourceMappingURL=types.js.map

@@ -54,2 +54,1 @@ "use strict";

exports.default = generateUuid;
//# sourceMappingURL=uuid.js.map

@@ -37,2 +37,1 @@ "use strict";

exports.isAppMessage = isAppMessage;
//# sourceMappingURL=validator.js.map

@@ -6,2 +6,22 @@ # Change Log

<a name="1.0.8-0"></a>
## [1.0.8-0](https://github.com/Shopify/app-bridge/compare/v1.0.7...v1.0.8-0) (2019-03-04)
### Bug Fixes
* Increase default toast duration from 3000 to 5000 ([e46a13e](https://github.com/Shopify/app-bridge/commit/e46a13e))
* **cart:** added LineItem based discount to Cart and to the validator ([1ebeb0a](https://github.com/Shopify/app-bridge/commit/1ebeb0a))
* **resource-picker:** set default option `showHidden` to `true` ([#723](https://github.com/Shopify/app-bridge/pull/723))
* **client:** handle server side render instead of throwing an error ([#724](https://github.com/Shopify/app-bridge/pull/724))
### Features
* **dev-build:** add development build with validator ([#702](https://github.com/Shopify/app-bridge/pull/702))
* **interface:** actionWrapper adds clientInterface name and version ([bc20662](https://github.com/Shopify/app-bridge/commit/bc20662))
* add dispatchClientEventHandler to host middleware ([#768](https://github.com/Shopify/app-bridge/issues/768)) ([1daa5ff](https://github.com/Shopify/app-bridge/commit/1daa5ff))
<a name="1.0.7"></a>

@@ -123,2 +143,35 @@ ## [1.0.7](https://github.com/Shopify/app-bridge/compare/v1.0.6...v1.0.7) (2019-02-01)

<a name="1.0.0-2"></a>
# [1.0.0-2](https://github.com/Shopify/app-bridge/compare/v1.0.0-1...v1.0.0-2) (2018-12-19)
### Bug Fixes
* issue with TitleBar buttons unable to be manually updated ([959db99](https://github.com/Shopify/app-bridge/commit/959db99))
* remove isDismissible option from Toast action ([#650](https://github.com/Shopify/app-bridge/issues/650)) ([806cb20](https://github.com/Shopify/app-bridge/commit/806cb20))
### Features
* **error:** convert ButtonGroup to new validator ([d28d81d](https://github.com/Shopify/app-bridge/commit/d28d81d))
* **error:** enable lifecycle hooks for Dispatch and Update ([264d992](https://github.com/Shopify/app-bridge/commit/264d992))
* **features:** added feature detection ([dddc8c8](https://github.com/Shopify/app-bridge/commit/dddc8c8))
* **validator:** implement optional modal validator ([0ab8366](https://github.com/Shopify/app-bridge/commit/0ab8366))
* **validator:** implement optional validator for cart ([d127d83](https://github.com/Shopify/app-bridge/commit/d127d83))
* **validator:** implement optional validator for navigation ([f407cbc](https://github.com/Shopify/app-bridge/commit/f407cbc))
* **validator:** implement optional validator for Print ([d6fe732](https://github.com/Shopify/app-bridge/commit/d6fe732))
* **validator:** implement optional validator for Toast and Loading ([8981e8c](https://github.com/Shopify/app-bridge/commit/8981e8c))
* **validator:** move resource picker validation to middleware ([7ae4696](https://github.com/Shopify/app-bridge/commit/7ae4696))
* **validator:** TitleBar ([f43d5f4](https://github.com/Shopify/app-bridge/commit/f43d5f4))
### BREAKING CHANGES
* `isDismissible` option removed from Toast action
<a name="1.0.0-1"></a>

@@ -125,0 +178,0 @@ # [1.0.0-1](https://github.com/Shopify/app-bridge/compare/v1.0.0-0...v1.0.0-1) (2018-12-03)

import { AppConfig, AppMiddleware, ClientApplication, ClientApplicationCreator, ClientApplicationTransportInjector, Params } from './types';
export declare const WINDOW_UNDEFINED_MESSAGE = "window is not defined. Running an app outside a browser is not supported";
/**

@@ -3,0 +4,0 @@ * Extracts the query parameters from the current URL.

@@ -22,2 +22,3 @@ "use strict";

var collection_1 = require("../util/collection");
var shared_1 = require("../util/shared");
var env_1 = require("../util/env");

@@ -28,3 +29,3 @@ var print_1 = require("./print");

var Hooks_1 = __importDefault(require("./Hooks"));
var WINDOW_UNDEFINED_MESSAGE = 'window is not defined. Running an app outside a browser is not supported';
exports.WINDOW_UNDEFINED_MESSAGE = 'window is not defined. Running an app outside a browser is not supported';
function redirectHandler(hostFrame, config) {

@@ -121,3 +122,3 @@ var apiKey = config.apiKey, shopOrigin = config.shopOrigin, _a = config.forceRedirect, forceRedirect = _a === void 0 ? !env_1.isDevelopmentClient : _a;

transport.subscribe(handler);
return function (config /*initialState*/) {
return function (config) {
if (!config.shopOrigin) {

@@ -223,3 +224,3 @@ throw Error_1.fromAction('shopOrigin must be provided', Error_1.AppActionType.INVALID_CONFIG);

if (!frame) {
throw Error_1.fromAction(WINDOW_UNDEFINED_MESSAGE, Error_1.AppActionType.WINDOW_UNDEFINED);
throw Error_1.fromAction(exports.WINDOW_UNDEFINED_MESSAGE, Error_1.AppActionType.WINDOW_UNDEFINED);
}

@@ -246,3 +247,3 @@ var location = redirect_1.getLocation();

if (!currentWindow) {
throw Error_1.fromAction(WINDOW_UNDEFINED_MESSAGE, Error_1.AppActionType.WINDOW_UNDEFINED);
return shared_1.serverAppBridge;
}

@@ -257,2 +258,1 @@ return createAppWrapper(currentWindow.top)(config);

exports.default = createApp;
//# sourceMappingURL=Client.js.map

@@ -44,2 +44,1 @@ "use strict";

exports.default = Hooks;
//# sourceMappingURL=Hooks.js.map

@@ -1,4 +0,4 @@

import createClientApp from './Client';
import { createClientApp } from './Client';
export * from './types';
export * from './Client';
export default createClientApp;

@@ -5,10 +5,6 @@ "use strict";

}
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var Client_1 = __importDefault(require("./Client"));
var Client_1 = require("./Client");
__export(require("./types"));
__export(require("./Client"));
exports.default = Client_1.default;
//# sourceMappingURL=index.js.map
exports.default = Client_1.createClientApp;

@@ -46,2 +46,1 @@ "use strict";

exports.handleAppPrint = handleAppPrint;
//# sourceMappingURL=print.js.map

@@ -30,2 +30,1 @@ "use strict";

}
//# sourceMappingURL=redirect.js.map

@@ -38,6 +38,6 @@ import { ActionCallback, ActionSetInterface, ActionSetOptions, AnyAction, Dispatch, ErrorSubscriber, Group, MetaAction, Unsubscribe } from '../actions/types';

/**
* @internal
* @public
*/
export interface ClientApplicationCreator {
<S>(config: AppConfig, initialState?: S): ClientApplication<S>;
<S>(config: AppConfig): ClientApplication<S>;
}

@@ -44,0 +44,0 @@ /**

@@ -11,2 +11,1 @@ "use strict";

})(LifecycleHook = exports.LifecycleHook || (exports.LifecycleHook = {}));
//# sourceMappingURL=types.js.map
import * as actions from './actions';
import { createApp } from './client';
export { actions };
import { ClientApplicationCreator } from './client/types';
declare const createApp: ClientApplicationCreator;
export default createApp;
export { actions };
export * from './MessageTransport';
export * from './client';

@@ -13,8 +13,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var env_1 = require("./util/env");
var actions = __importStar(require("./actions"));
exports.actions = actions;
var client_1 = require("./client");
exports.default = client_1.createApp;
var createApp = env_1.isDevelopment
? require('./development').default
: require('./production').default;
exports.default = createApp;
__export(require("./MessageTransport"));
__export(require("./client"));
//# sourceMappingURL=index.js.map

@@ -78,2 +78,1 @@ "use strict";

exports.fromWindow = fromWindow;
//# sourceMappingURL=MessageTransport.js.map
{
"name": "@shopify/app-bridge",
"version": "1.0.7",
"version": "1.0.8-0",
"types": "index.d.ts",

@@ -8,12 +8,15 @@ "main": "index.js",

"files": [
"MessageTransport.d.ts",
"MessageTransport.js",
"MessageTransport.js.map",
"actions/",
"client/",
"index.d.ts",
"index.js",
"index.js.map",
"umd/",
"util/"
"/actions/",
"/client/",
"/umd/",
"/util/",
"/validate/",
"/MessageTransport.d.ts",
"/MessageTransport.js",
"/development.d.ts",
"/development.js",
"/index.d.ts",
"/index.js",
"/production.d.ts",
"/production.js"
],

@@ -41,3 +44,3 @@ "private": false,

"limit": "14 KB",
"path": "index.js"
"path": "production.js"
}

@@ -44,0 +47,0 @@ ],

@@ -43,2 +43,3 @@ # `@shopify/app-bridge`

### App State
Once the app is set up, you can access additional details and the state of the app at

@@ -61,2 +62,13 @@ any time by making async call `app.getState()`:

### Development & Debugging
Shopify App Bridge is shipped with a development build which includes the [validation middleware](./src/validate/README.MD) in order to provide helpful information during development.
If you're consuming App Bridge from a CDN or using the UMD build, simply include the development version:
`app-bridge.development.js` instead of `app-bridge.js`
When consumed as JS Modules, development/production build is dynamically selected based on the `NODE_ENV` variable. Development build is used when `NODE_ENV=development`.
Please note that the development build is not intended for production use, as the resulting file size is significantly larger due to the validator being present.
## Contributing

@@ -63,0 +75,0 @@

@@ -34,2 +34,1 @@ "use strict";

exports.removeFromCollection = removeFromCollection;
//# sourceMappingURL=collection.js.map
export declare const isServer: boolean;
export declare const isClient: boolean;
export declare const isDevelopment: boolean;
export declare const isProduction: boolean;
export declare const isDevelopment: boolean;
export declare const isDevelopmentClient: boolean;

@@ -5,5 +5,4 @@ "use strict";

exports.isClient = !exports.isServer;
exports.isProduction = process.env.NODE_ENV === 'production';
exports.isDevelopment = !exports.isProduction;
exports.isDevelopment = typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'development';
exports.isProduction = !exports.isDevelopment;
exports.isDevelopmentClient = exports.isDevelopment && exports.isClient;
//# sourceMappingURL=env.js.map
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc