flex-plugin
Advanced tools
Comparing version 4.2.0-alpha.0 to 4.2.0
@@ -1,4 +0,4 @@ | ||
export { loadPlugin, FlexPlugin, } from './lib/flex-plugin'; | ||
export { getAssetsUrl, getRuntimeUrl, } from './utils/runtime'; | ||
export { loadPlugin, FlexPlugin } from './lib/flex-plugin'; | ||
export { getAssetsUrl, getRuntimeUrl } from './utils/runtime'; | ||
export { loadJS } from './utils/loadJS'; | ||
export { loadCSS } from './utils/loadCSS'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadCSS = exports.loadJS = exports.getRuntimeUrl = exports.getAssetsUrl = exports.FlexPlugin = exports.loadPlugin = void 0; | ||
/* eslint-disable import/no-unused-modules */ | ||
var flex_plugin_1 = require("./lib/flex-plugin"); | ||
exports.loadPlugin = flex_plugin_1.loadPlugin; | ||
exports.FlexPlugin = flex_plugin_1.FlexPlugin; | ||
Object.defineProperty(exports, "loadPlugin", { enumerable: true, get: function () { return flex_plugin_1.loadPlugin; } }); | ||
Object.defineProperty(exports, "FlexPlugin", { enumerable: true, get: function () { return flex_plugin_1.FlexPlugin; } }); | ||
var runtime_1 = require("./utils/runtime"); | ||
exports.getAssetsUrl = runtime_1.getAssetsUrl; | ||
exports.getRuntimeUrl = runtime_1.getRuntimeUrl; | ||
Object.defineProperty(exports, "getAssetsUrl", { enumerable: true, get: function () { return runtime_1.getAssetsUrl; } }); | ||
Object.defineProperty(exports, "getRuntimeUrl", { enumerable: true, get: function () { return runtime_1.getRuntimeUrl; } }); | ||
var loadJS_1 = require("./utils/loadJS"); | ||
exports.loadJS = loadJS_1.loadJS; | ||
Object.defineProperty(exports, "loadJS", { enumerable: true, get: function () { return loadJS_1.loadJS; } }); | ||
var loadCSS_1 = require("./utils/loadCSS"); | ||
exports.loadCSS = loadCSS_1.loadCSS; | ||
Object.defineProperty(exports, "loadCSS", { enumerable: true, get: function () { return loadCSS_1.loadCSS; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
/// <reference path="../../src/module.d.ts" /> | ||
/// <reference types="src/module" /> | ||
import Flex from '@twilio/flex-ui'; | ||
@@ -15,3 +15,3 @@ export declare type FlexGlobal = typeof Flex; | ||
version: string; | ||
dependencies: object; | ||
dependencies: Record<string, string>; | ||
protected constructor(name: string); | ||
@@ -18,0 +18,0 @@ abstract init(flex: FlexGlobal, manager: Flex.Manager): void; |
"use strict"; | ||
/// <reference path="../module.d.ts" /> | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadPlugin = exports.FlexPlugin = void 0; | ||
/** | ||
@@ -15,7 +16,7 @@ * Base class for creating a Flex Plugin | ||
'flex-ui': __FPB_FLEX_UI_VERSION, | ||
'react': __FPB_REACT_VERSION, | ||
react: __FPB_REACT_VERSION, | ||
'react-dom': __FPB_REACT_DOM_VERSION, | ||
}; | ||
this.name = name; | ||
// tslint:disable-next-line:no-console | ||
// eslint-disable-next-line no-console | ||
console.log("loading " + this.name + "@" + this.version + " plugin"); | ||
@@ -30,3 +31,3 @@ } | ||
*/ | ||
exports.loadPlugin = function (plugin) { | ||
var loadPlugin = function (plugin) { | ||
if (Twilio && Twilio.Flex && Twilio.Flex.Plugins) { | ||
@@ -36,6 +37,7 @@ Twilio.Flex.Plugins.init(plugin); | ||
else { | ||
// tslint:disable-next-line:no-console | ||
// eslint-disable-next-line no-console | ||
console.warn('This version of Flex does not appear to support plugins.'); | ||
} | ||
}; | ||
exports.loadPlugin = loadPlugin; | ||
//# sourceMappingURL=flex-plugin.js.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadCSS = void 0; | ||
var shortid_1 = __importDefault(require("./shortid")); | ||
@@ -14,3 +15,3 @@ /** | ||
*/ | ||
exports.loadCSS = function () { | ||
var loadCSS = function () { | ||
var hrefArray = []; | ||
@@ -30,2 +31,3 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
}; | ||
exports.loadCSS = loadCSS; | ||
//# sourceMappingURL=loadCSS.js.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadJS = void 0; | ||
var shortid_1 = __importDefault(require("./shortid")); | ||
@@ -14,3 +15,3 @@ /** | ||
*/ | ||
exports.loadJS = function () { | ||
var loadJS = function () { | ||
var srcArray = []; | ||
@@ -28,2 +29,3 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
}; | ||
exports.loadJS = loadJS; | ||
//# sourceMappingURL=loadJS.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAssetsUrl = exports.getRuntimeUrl = void 0; | ||
/** | ||
@@ -7,7 +8,6 @@ * Gets the Twilio Runtime URL | ||
*/ | ||
exports.getRuntimeUrl = function () { | ||
var getRuntimeUrl = function () { | ||
if (document && document.currentScript) { | ||
var pluginScript = document.currentScript; | ||
// tslint:disable-next-line:no-string-literal | ||
if (typeof pluginScript['src'] === 'string') { | ||
if (typeof pluginScript.src === 'string') { | ||
var pluginUrl = pluginScript.src; | ||
@@ -19,2 +19,3 @@ return pluginUrl.substr(0, pluginUrl.lastIndexOf('/')); | ||
}; | ||
exports.getRuntimeUrl = getRuntimeUrl; | ||
/** | ||
@@ -24,5 +25,6 @@ * Gets the base URL for Twilio Runtime Assets | ||
*/ | ||
exports.getAssetsUrl = function () { | ||
var getAssetsUrl = function () { | ||
return exports.getRuntimeUrl() + "/assets"; | ||
}; | ||
exports.getAssetsUrl = getAssetsUrl; | ||
//# sourceMappingURL=runtime.js.map |
{ | ||
"name": "flex-plugin", | ||
"version": "4.2.0-alpha.0", | ||
"version": "4.2.0", | ||
"description": "Runtime for Flex plugins", | ||
@@ -20,22 +20,18 @@ "keywords": [ | ||
"license": "MIT", | ||
"author": "Kousha Talebian <ktalebian@twilio.com>", | ||
"files": [ | ||
"dist", | ||
"bin" | ||
], | ||
"author": "Flex Runtime <flex-runtime@twilio.com>", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"bin": { | ||
"flex-check-start": "./bin/check-start" | ||
}, | ||
"directories": { | ||
"lib": "src", | ||
"bin": "bin", | ||
"test": "__tests__" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"prebuild": "npm run clean", | ||
"build": "tsc", | ||
"build": "cd ../.. && tsc -p \"packages/flex-plugin/tsconfig.json\"", | ||
"clean": "rm -rf dist", | ||
"prepublish": "npm run build", | ||
"lint": "eslint --ext ts src/", | ||
"lint:fix": "npm run lint -- --fix", | ||
"test": "cd ../.. && jest packages/flex-plugin --color", | ||
@@ -47,3 +43,3 @@ "test:watch": "cd ../.. && jest packages/flex-plugin --watch --color" | ||
}, | ||
"gitHead": "cd221fc8c416b909cf87defbc6de66607786ffbe" | ||
"gitHead": "801a84b782c004e11b10c772fe75fdd215cae6b5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15759
192
0
21