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

@icreate/ics-chromely-plugin-core

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icreate/ics-chromely-plugin-core - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

20

dist/ics-chromely-plugin-core.es5.js

@@ -304,3 +304,3 @@ import { LogLevels } from '@icreate/core';

* @LastEditors: 文贝
* @LastEditTime: 2022-06-20 16:06:59
* @LastEditTime: 2022-06-23 17:29:17
* @Description:

@@ -319,2 +319,8 @@ * @FilePath: \ics-chromely-plugin-core\src\core\hardware.ts

};
Hardware.Operate = function (url) {
var opts = {
url: "Hardware/" + url
};
icsChromelyRequest.command(opts);
};
// 获取本机Mac地址

@@ -336,2 +342,14 @@ Hardware.getMacAddress = function () {

};
// 获取操作系统版本
Hardware.GetOsVersion = function () {
return this.OperateEx('GetOsVersion');
};
// 重启操作系统
Hardware.RestartOS = function () {
this.Operate('RestartOS');
};
// 关闭操作系统
Hardware.CloseOS = function () {
this.Operate('CloseOS');
};
return Hardware;

@@ -338,0 +356,0 @@ }());

@@ -309,3 +309,3 @@ (function (global, factory) {

* @LastEditors: 文贝
* @LastEditTime: 2022-06-20 16:06:59
* @LastEditTime: 2022-06-23 17:29:17
* @Description:

@@ -324,2 +324,8 @@ * @FilePath: \ics-chromely-plugin-core\src\core\hardware.ts

};
Hardware.Operate = function (url) {
var opts = {
url: "Hardware/" + url
};
icsChromelyRequest.command(opts);
};
// 获取本机Mac地址

@@ -341,2 +347,14 @@ Hardware.getMacAddress = function () {

};
// 获取操作系统版本
Hardware.GetOsVersion = function () {
return this.OperateEx('GetOsVersion');
};
// 重启操作系统
Hardware.RestartOS = function () {
this.Operate('RestartOS');
};
// 关闭操作系统
Hardware.CloseOS = function () {
this.Operate('CloseOS');
};
return Hardware;

@@ -343,0 +361,0 @@ }());

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

* @LastEditors: 文贝
* @LastEditTime: 2022-06-20 16:06:59
* @LastEditTime: 2022-06-23 17:29:17
* @Description:

@@ -23,2 +23,8 @@ * @FilePath: \ics-chromely-plugin-core\src\core\hardware.ts

};
Hardware.Operate = function (url) {
var opts = {
url: "Hardware/" + url
};
ics_chromely_js_sdk_1.default.command(opts);
};
// 获取本机Mac地址

@@ -40,2 +46,14 @@ Hardware.getMacAddress = function () {

};
// 获取操作系统版本
Hardware.GetOsVersion = function () {
return this.OperateEx('GetOsVersion');
};
// 重启操作系统
Hardware.RestartOS = function () {
this.Operate('RestartOS');
};
// 关闭操作系统
Hardware.CloseOS = function () {
this.Operate('CloseOS');
};
return Hardware;

@@ -42,0 +60,0 @@ }());

export default class Hardware {
private static OperateEx;
private static Operate;
static getMacAddress(): Promise<any>;

@@ -7,2 +8,5 @@ static getIpAddress(): Promise<any>;

static GetOSDesc(): Promise<any>;
static GetOsVersion(): Promise<any>;
static RestartOS(): void;
static CloseOS(): void;
}

2

package.json
{
"name": "@icreate/ics-chromely-plugin-core",
"version": "0.0.10",
"version": "0.0.11",
"description": "提供Ics Chromely Client核心本地操作插件js sdk,包含本地日志、主窗体控制、打开三方浏览器、打印机列表、硬件IP和Mac地址、本地配置获取和注册表读写等",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -5,3 +5,3 @@ <!--

* @LastEditors: 文贝
* @LastEditTime: 2022-06-20 16:09:38
* @LastEditTime: 2022-06-23 17:43:43
* @Descripttion:

@@ -17,2 +17,3 @@ * @FilePath: \ics-chromely-plugin-core\README.md

```
0.0.11 HardwareHelper增加获取操作系统描述GetOSDesc()
0.0.10 HardwareHelper增加获取操作系统描述GetOSDesc()

@@ -42,8 +43,14 @@ ```

```javascript
// 日志级别
level: LogLevels
debug(logObject: any): Promise<any>
info(logObject: any): Promise<any>
warn(logObject: any): Promise<any>
error(logObject: any): Promise<any>
fatal(logObject: any): Promise<any>
// 输出调试日志
debug(logObject: any): Promise<String>
// 输出普通日志
info(logObject: any): Promise<String>
// 输出警告日志
warn(logObject: any): Promise<String>
// 输出错误日志
error(logObject: any): Promise<String>
// 输出致命错误日志
fatal(logObject: any): Promise<String>
```

@@ -54,5 +61,9 @@

```javascript
// 打开Google浏览器
OpenChrome(url:string):void
// 打开IE浏览器
OpenIE(url:string):void
// 打开FireFox浏览器
OpenFireFox(url:string):void
// 打开默认浏览器
OpenDefault(url:string):void

@@ -64,7 +75,13 @@ ```

```javascript
// 主窗体最小化
Minimize(): void
// 主窗体最大化
Maximize(): void
// 主窗体还原
Restore(): void
// 主窗体关闭
Close(): void
// 重启程序
Restart(): void
// 主窗体状态
State(): Promise<String>

@@ -76,6 +93,9 @@ ```

```javascript
// 是否处于非浏览器环境
isChromely: boolean
cefSharp: Object
// 订阅C#事件
$on(eventName: string, callback: Function): void
// 取消订阅C#事件
$off(eventName: string, callback: Function): void
// 触发C#事件
$emit(eventName: string): void

@@ -87,9 +107,15 @@ ```

// 获取本机Mac地址
getMacAddress(): Promise<any>
getMacAddress(): Promise<array>
// 获取本机Ip地址
getIpAddress(): Promise<any>
getIpAddress(): Promise<array>
// 获取本机主机名
getHostName(): Promise<any>
getHostName(): Promise<string>
// 获取操作系统描述
GetOSDesc(): Promise<any>
GetOSDesc(): Promise<string>
// 获取操作系统版本
GetOsVersion(): Promise<string>
// 重启操作系统
RestartOS(): void
// 关闭操作系统
CloseOS(): void
```

@@ -100,7 +126,7 @@ ### PrinterHelper

// 获取本地打印机列表
getPrinterList(): Promise<any>
getPrinterList(): Promise<array>
// 获取本地打印机列表
getPrinterDefault(): Promise<any>
getPrinterDefault(): Promise<string>
// 判断指定打印机名称是否存在
isPrinterExists(printerName: string): Promise<any>
isPrinterExists(printerName: string): Promise<bool>
```

@@ -112,5 +138,5 @@ ### RegeditHelper

// 获取指定的注册表键对应的值
getRegeditValue(name: string): Promise<any>
getRegeditValue(name: string): Promise<string>
// 设置注册表键值
setRegeditValue(name: string, value: string): Promise<any>
setRegeditValue(name: string, value: string): Promise<string>
```

@@ -121,6 +147,6 @@ ### ConfigHelper

// 获取指定的配置键对应的值
Get(key: string): Promise<any>
// 获取指定的配置键对应的值 多级可以使用:key1:key2:key3...
Get(key: string): Promise<string>
// 获取appsetting.json中的BaseUrl值
GetBaseUrl(): Promise<any>
GetBaseUrl(): Promise<string>
```

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

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