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

@imedx/ics-imedx-chromely-plugin-intf-platform

Package Overview
Dependencies
Maintainers
13
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imedx/ics-imedx-chromely-plugin-intf-platform - npm Package Compare versions

Comparing version 0.0.1-beta.4 to 0.0.1-beta.5

dist/index.html

24

dist/ics-imedx-chromely-plugin-intf-platform.es5.js

@@ -93,3 +93,3 @@ import icsChromelyRequest from '@icreate/ics-chromely-js-sdk';

var IntfPlatformManage = /** @class */ (function () {
var IntfPlatformManage$1 = /** @class */ (function () {
function IntfPlatformManage() {

@@ -186,3 +186,3 @@ this.interfaces = new Map();

return icsChromelyRequest.function({
url: "InteractionCore/" + url,
url: "InteractionCore/".concat(url),
method: 'POST',

@@ -225,3 +225,3 @@ data: data

// 调用js接口实现
var intfCoreManage = IntfPlatformManage.getIntfPlatformManage();
var intfCoreManage = IntfPlatformManage$1.getIntfPlatformManage();
// 获取核心接口

@@ -231,3 +231,3 @@ var intfCoreInstance = intfCoreManage.getCoreInterface(intfCode);

if (!intfCoreInstance) {
return Promise.reject("\u6838\u5FC3\u63A5\u53E3" + intfCode + "\u4E0D\u5B58\u5728\uFF01");
return Promise.reject("\u6838\u5FC3\u63A5\u53E3".concat(intfCode, "\u4E0D\u5B58\u5728\uFF01"));
}

@@ -243,6 +243,16 @@ // 返回接口结果

var _a = new IntfPlatformManage(), registerInterface = _a.registerInterface, registerInterfaceCore = _a.registerInterfaceCore, getInterface = _a.getInterface, getAllInterface = _a.getAllInterface, getAllCoreInterface = _a.getAllCoreInterface, getCoreInterface = _a.getCoreInterface, getCoreInterfaceConfig = _a.getCoreInterfaceConfig, getInterfaceConfig = _a.getInterfaceConfig;
// import './index.scss'
// const {
// registerInterface,
// registerInterfaceCore,
// getInterface,
// getAllInterface,
// getAllCoreInterface,
// getCoreInterface,
// getCoreInterfaceConfig,
// getInterfaceConfig
// } = new IntfPlatformManage()
var IntfPlatformManage = IntfPlatformManage$1.getIntfPlatformManage();
export default IntfPlatform;
export { registerInterface, registerInterfaceCore, getInterface, getAllInterface, getAllCoreInterface, getCoreInterface, getCoreInterfaceConfig, getInterfaceConfig, IntfPlatform, IntfResponse, BaseInterfaceCore, intfParam, InterfaceParamType, InterfaceType };
export { BaseInterfaceCore, InterfaceParamType, InterfaceType, IntfPlatform, IntfPlatformManage, IntfResponse, IntfPlatform as default, intfParam };
//# sourceMappingURL=ics-imedx-chromely-plugin-intf-platform.es5.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@icreate/ics-chromely-js-sdk')) :
typeof define === 'function' && define.amd ? define(['exports', '@icreate/ics-chromely-js-sdk'], factory) :
(factory((global.icsImedxChromelyPluginIntfPlatform = {}),global.icsChromelyRequest));
}(this, (function (exports,icsChromelyRequest) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@icreate/ics-chromely-js-sdk')) :
typeof define === 'function' && define.amd ? define(['exports', '@icreate/ics-chromely-js-sdk'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.icsImedxChromelyPluginIntfPlatform = {}, global.icsChromelyRequest));
})(this, (function (exports, icsChromelyRequest) { 'use strict';
icsChromelyRequest = icsChromelyRequest && icsChromelyRequest.hasOwnProperty('default') ? icsChromelyRequest['default'] : icsChromelyRequest;
/**
* 接口响应
*/
var IntfResponse = /** @class */ (function () {
function IntfResponse(code, message, data) {
if (code === void 0) { code = 200; }
if (message === void 0) { message = 'ok'; }
if (data === void 0) { data = null; }
this.code = code || 200;
this.message = message || 'ok';
this.data = data || null;
}
IntfResponse.success = new IntfResponse();
return IntfResponse;
}());
/**
* 抽象接口定义
*/
var BaseInterfaceCore = /** @class */ (function () {
function BaseInterfaceCore() {
}
/**
* 200成功返回
* @param data 成功数据
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.success = function (data) {
return new IntfResponse(200, 'ok', data);
};
/**
* 400错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.failure = function (message) {
return new IntfResponse(400, message);
};
/**
* 500错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.internalError = function (message) {
return new IntfResponse(500, message);
};
/**
* 404错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.notFound = function (message) {
return new IntfResponse(404, message);
};
return BaseInterfaceCore;
}());
/**
* 接口配置
*/
var intfParam = /** @class */ (function () {
function intfParam(name, type, options, defaultValue, remark, deprecated) {
this.name = name;
this.type = type;
this.options = options;
this.default = defaultValue;
this.remark = remark;
this.deprecated = deprecated;
}
return intfParam;
}());
/**
* 接口参数类型
*/
exports.InterfaceParamType = void 0;
(function (InterfaceParamType) {
// 输入框
InterfaceParamType[InterfaceParamType["input"] = 1] = "input";
// 选择框
InterfaceParamType[InterfaceParamType["select"] = 2] = "select";
})(exports.InterfaceParamType || (exports.InterfaceParamType = {}));
/**
* 接口模式 1表示C#接口 2表示js接口
*/
exports.InterfaceType = void 0;
(function (InterfaceType) {
// DLL接口
InterfaceType[InterfaceType["DLL"] = 1] = "DLL";
// js接口
InterfaceType[InterfaceType["JS"] = 2] = "JS";
})(exports.InterfaceType || (exports.InterfaceType = {}));
/**
* 接口响应
*/
var IntfResponse = /** @class */ (function () {
function IntfResponse(code, message, data) {
if (code === void 0) { code = 200; }
if (message === void 0) { message = 'ok'; }
if (data === void 0) { data = null; }
this.code = code || 200;
this.message = message || 'ok';
this.data = data || null;
}
IntfResponse.success = new IntfResponse();
return IntfResponse;
}());
/**
* 抽象接口定义
*/
var BaseInterfaceCore = /** @class */ (function () {
function BaseInterfaceCore() {
}
/**
* 200成功返回
* @param data 成功数据
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.success = function (data) {
return new IntfResponse(200, 'ok', data);
};
/**
* 400错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.failure = function (message) {
return new IntfResponse(400, message);
};
/**
* 500错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.internalError = function (message) {
return new IntfResponse(500, message);
};
/**
* 404错误
* @param message 错误消息
* @returns 接口响应数据
*/
BaseInterfaceCore.prototype.notFound = function (message) {
return new IntfResponse(404, message);
};
return BaseInterfaceCore;
}());
/**
* 接口配置
*/
var intfParam = /** @class */ (function () {
function intfParam(name, type, options, defaultValue, remark, deprecated) {
this.name = name;
this.type = type;
this.options = options;
this.default = defaultValue;
this.remark = remark;
this.deprecated = deprecated;
}
return intfParam;
}());
(function (InterfaceParamType) {
// 输入框
InterfaceParamType[InterfaceParamType["input"] = 1] = "input";
// 选择框
InterfaceParamType[InterfaceParamType["select"] = 2] = "select";
})(exports.InterfaceParamType || (exports.InterfaceParamType = {}));
(function (InterfaceType) {
// DLL接口
InterfaceType[InterfaceType["DLL"] = 1] = "DLL";
// js接口
InterfaceType[InterfaceType["JS"] = 2] = "JS";
})(exports.InterfaceType || (exports.InterfaceType = {}));
var IntfPlatformManage$1 = /** @class */ (function () {
function IntfPlatformManage() {
this.interfaces = new Map();
this.coreInterfaces = new Map();
this.configs = new Map();
this.coreConfigs = new Map();
}
/**
* 获取核心接口
* @returns 核心接口管理
*/
IntfPlatformManage.getIntfPlatformManage = function () {
if (this.manage == null) {
this.manage = new IntfPlatformManage();
}
return this.manage;
};
/**
* 注册核心接口
* @param name 核心接口名称
* @param instance 核心接口实例
*/
IntfPlatformManage.prototype.registerInterfaceCore = function (name, instance, config) {
this.coreInterfaces.set(name, instance);
this.coreConfigs.set(name, config);
};
/**
* 注册核心接口
* @param name 核心接口名称
* @param instance 核心接口实例
*/
IntfPlatformManage.prototype.registerInterface = function (name, instance, config) {
this.interfaces.set(name, instance);
this.configs.set(name, config);
};
/**
* 获取所有核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getAllCoreInterface = function () {
return this.coreInterfaces;
};
/**
* 获取核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getCoreInterface = function (name) {
return this.coreInterfaces.get(name);
};
/**
* 获取核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getCoreInterfaceConfig = function (name) {
return this.configs.get(name);
};
/**
* 获取所有实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getAllInterface = function (name) {
return this.interfaces;
};
/**
* 获取实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getInterface = function (name) {
return this.interfaces.get(name);
};
/**
* 获取实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getInterfaceConfig = function (name) {
return this.configs.get(name);
};
return IntfPlatformManage;
}());
var IntfPlatformManage = /** @class */ (function () {
function IntfPlatformManage() {
this.interfaces = new Map();
this.coreInterfaces = new Map();
this.configs = new Map();
this.coreConfigs = new Map();
}
/**
* 获取核心接口
* @returns 核心接口管理
*/
IntfPlatformManage.getIntfPlatformManage = function () {
if (this.manage == null) {
this.manage = new IntfPlatformManage();
}
return this.manage;
};
/**
* 注册核心接口
* @param name 核心接口名称
* @param instance 核心接口实例
*/
IntfPlatformManage.prototype.registerInterfaceCore = function (name, instance, config) {
this.coreInterfaces.set(name, instance);
this.coreConfigs.set(name, config);
};
/**
* 注册核心接口
* @param name 核心接口名称
* @param instance 核心接口实例
*/
IntfPlatformManage.prototype.registerInterface = function (name, instance, config) {
this.interfaces.set(name, instance);
this.configs.set(name, config);
};
/**
* 获取所有核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getAllCoreInterface = function () {
return this.coreInterfaces;
};
/**
* 获取核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getCoreInterface = function (name) {
return this.coreInterfaces.get(name);
};
/**
* 获取核心接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getCoreInterfaceConfig = function (name) {
return this.configs.get(name);
};
/**
* 获取所有实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getAllInterface = function (name) {
return this.interfaces;
};
/**
* 获取实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getInterface = function (name) {
return this.interfaces.get(name);
};
/**
* 获取实现接口
* @param name 核心接口名称
* @returns
*/
IntfPlatformManage.prototype.getInterfaceConfig = function (name) {
return this.configs.get(name);
};
return IntfPlatformManage;
}());
var IntfPlatform = /** @class */ (function () {
function IntfPlatform() {
}
IntfPlatform.OperateEx = function (url, data) {
// let opts =
return icsChromelyRequest.function({
url: "InteractionCore/".concat(url),
method: 'POST',
data: data
});
};
/**
* 获取接口模式
* @returns 接口模式
*/
IntfPlatform.GetInterfaceType = function (intfCode) {
return exports.InterfaceType.DLL;
};
/**
*
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.init = function () {
return this.OperateEx('Init');
};
/**
*
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.dispose = function () {
return this.OperateEx('Dispose');
};
/**
*
* @param intfCode: string
* @param code: string
* @param param: any
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.bussiness = function (intfCode, code, param) {
var mode = this.GetInterfaceType(intfCode);
switch (mode) {
case exports.InterfaceType.JS:
// 调用js接口实现
var intfCoreManage = IntfPlatformManage$1.getIntfPlatformManage();
// 获取核心接口
var intfCoreInstance = intfCoreManage.getCoreInterface(intfCode);
// 判断核心接口是否存在
if (!intfCoreInstance) {
return Promise.reject("\u6838\u5FC3\u63A5\u53E3".concat(intfCode, "\u4E0D\u5B58\u5728\uFF01"));
}
// 返回接口结果
return Promise.resolve(intfCoreInstance.business(code, param));
default:
return this.OperateEx('Business', { intfCode: intfCode, code: code, param: JSON.stringify(param) });
}
};
return IntfPlatform;
}());
var IntfPlatform = /** @class */ (function () {
function IntfPlatform() {
}
IntfPlatform.OperateEx = function (url, data) {
// let opts =
return icsChromelyRequest.function({
url: "InteractionCore/" + url,
method: 'POST',
data: data
});
};
/**
* 获取接口模式
* @returns 接口模式
*/
IntfPlatform.GetInterfaceType = function (intfCode) {
return exports.InterfaceType.DLL;
};
/**
*
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.init = function () {
return this.OperateEx('Init');
};
/**
*
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.dispose = function () {
return this.OperateEx('Dispose');
};
/**
*
* @param intfCode: string
* @param code: string
* @param param: any
* @returns 成功:{code: 200, data, message: 'ok'}
*/
IntfPlatform.bussiness = function (intfCode, code, param) {
var mode = this.GetInterfaceType(intfCode);
switch (mode) {
case exports.InterfaceType.JS:
// 调用js接口实现
var intfCoreManage = IntfPlatformManage.getIntfPlatformManage();
// 获取核心接口
var intfCoreInstance = intfCoreManage.getCoreInterface(intfCode);
// 判断核心接口是否存在
if (!intfCoreInstance) {
return Promise.reject("\u6838\u5FC3\u63A5\u53E3" + intfCode + "\u4E0D\u5B58\u5728\uFF01");
}
// 返回接口结果
return Promise.resolve(intfCoreInstance.business(code, param));
default:
return this.OperateEx('Business', { intfCode: intfCode, code: code, param: JSON.stringify(param) });
}
};
return IntfPlatform;
}());
// import './index.scss'
// const {
// registerInterface,
// registerInterfaceCore,
// getInterface,
// getAllInterface,
// getAllCoreInterface,
// getCoreInterface,
// getCoreInterfaceConfig,
// getInterfaceConfig
// } = new IntfPlatformManage()
var IntfPlatformManage = IntfPlatformManage$1.getIntfPlatformManage();
var _a = new IntfPlatformManage(), registerInterface = _a.registerInterface, registerInterfaceCore = _a.registerInterfaceCore, getInterface = _a.getInterface, getAllInterface = _a.getAllInterface, getAllCoreInterface = _a.getAllCoreInterface, getCoreInterface = _a.getCoreInterface, getCoreInterfaceConfig = _a.getCoreInterfaceConfig, getInterfaceConfig = _a.getInterfaceConfig;
exports.BaseInterfaceCore = BaseInterfaceCore;
exports.IntfPlatform = IntfPlatform;
exports.IntfPlatformManage = IntfPlatformManage;
exports.IntfResponse = IntfResponse;
exports.default = IntfPlatform;
exports.intfParam = intfParam;
exports.default = IntfPlatform;
exports.registerInterface = registerInterface;
exports.registerInterfaceCore = registerInterfaceCore;
exports.getInterface = getInterface;
exports.getAllInterface = getAllInterface;
exports.getAllCoreInterface = getAllCoreInterface;
exports.getCoreInterface = getCoreInterface;
exports.getCoreInterfaceConfig = getCoreInterfaceConfig;
exports.getInterfaceConfig = getInterfaceConfig;
exports.IntfPlatform = IntfPlatform;
exports.IntfResponse = IntfResponse;
exports.BaseInterfaceCore = BaseInterfaceCore;
exports.intfParam = intfParam;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
})));
}));
//# sourceMappingURL=ics-imedx-chromely-plugin-intf-platform.umd.js.map
{
"name": "@imedx/ics-imedx-chromely-plugin-intf-platform",
"version": "0.0.1-beta.4",
"version": "0.0.1-beta.5",
"description": "",

@@ -9,6 +9,7 @@ "keywords": [],

"typings": "dist/types/ics-imedx-chromely-plugin-intf-platform.d.ts",
"type": "module",
"files": [
"dist"
],
"author": "1428815164@qq.com <hling_tao@163.com>",
"author": "34692730@qq.com <wenbei421@163.com>",
"repository": {

@@ -25,4 +26,4 @@ "type": "git",

"prebuild": "rimraf dist",
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
"start": "rollup -c rollup.config.ts -w",
"build": "rollup -c rollup.config.js",
"start": "rollup -c rollup.config.js -w",
"test": "jest --coverage",

@@ -89,4 +90,11 @@ "test:watch": "jest --coverage --watch",

"@commitlint/config-conventional": "^7.1.2",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.0",
"@types/jest": "^23.3.2",
"@types/node": "^10.11.0",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"colors": "^1.3.2",

@@ -97,2 +105,3 @@ "commitizen": "^3.0.0",

"cz-conventional-changelog": "^2.1.0",
"eslint": "^7.15.0",
"husky": "^1.0.1",

@@ -103,2 +112,4 @@ "jest": "^23.6.0",

"lodash.camelcase": "^4.3.0",
"package-tls": "^1.2.2",
"path": "^0.12.7",
"prettier": "^1.14.3",

@@ -108,8 +119,4 @@ "prompt": "^1.0.0",

"rimraf": "^2.6.2",
"rollup": "^0.67.0",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-typescript2": "^0.18.0",
"rollup": "^3.20.6",
"rollup-plugin-sourcemaps": "^0.6.3",
"semantic-release": "^15.9.16",

@@ -119,3 +126,4 @@ "shelljs": "^0.8.3",

"ts-jest": "^23.10.2",
"ts-node": "^7.0.1",
"ts-node": "^9.1.1",
"tslib": "^2.0.3",
"tslint": "^5.11.0",

@@ -125,8 +133,12 @@ "tslint-config-prettier": "^1.15.0",

"typedoc": "^0.12.0",
"typescript": "^3.0.3"
"typescript": "^4.1.3"
},
"dependencies": {
"@icreate/ics-chromely-js-sdk": "^0.0.4-beta.1",
"@imedx/ics-imedx-chromely-plugin-intf-platform": "^0.0.1-beta.3"
"@imedx/ics-imedx-chromely-plugin-intf-platform": "^0.0.1-beta.3",
"@rollup/plugin-html": "^1.0.2",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-sass": "^1.12.19",
"rollup-plugin-serve": "^2.0.2"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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