qcloud-iotexplorer-appdev-plugin-wificonf-qrcode
Advanced tools
Comparing version 1.0.4 to 1.1.35
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QrCode=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_plugin_wificonf_core_1=require("qcloud-iotexplorer-appdev-plugin-wificonf-core"),WifiConfErrorMsg=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfErrorMsg,WifiConfStepCode=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepCode,QrCode=function(o){function e(e,i){return o.call(this,e,i)||this}return tslib_1.__extends(e,o),e.prototype.doBusiness=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o,e;return tslib_1.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),o=this,[4,qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:this.options.wifiConfToken,productId:"",deviceName:"",familyId:this.options.familyId,roomId:this.options.roomId,onProgress:function(e){o.onProgress.call(o,e)},sdk:this.sdk})];case 1:return i.sent(),[3,3];case 2:return e=i.sent(),console.log(e),e&&e.code in WifiConfErrorMsg&&(e.uiMsg=WifiConfErrorMsg[e.code]),this.onProgress({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:e}}),[3,3];case 3:return[2]}}))}))},e}(qcloud_iotexplorer_appdev_plugin_wificonf_core_1.WifiConfProtocolBase);exports.QrCode=QrCode; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.QrCode=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_plugin_wificonf_core_1=require("qcloud-iotexplorer-appdev-plugin-wificonf-core"),WifiConfErrorMsg=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfErrorMsg,WifiConfStepCode=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepCode,QrCode=function(o){function e(e,i){return o.call(this,e,i)||this}return tslib_1.__extends(e,o),e.prototype.doBusiness=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var o,e=this;return tslib_1.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:this.options.wifiConfToken,productId:"",deviceName:"",familyId:this.options.familyId,roomId:this.options.roomId,onProgress:function(o){e.onProgress.call(e,o)},sdk:this.sdk})];case 1:return i.sent(),[3,3];case 2:return o=i.sent(),console.log(o),o&&o.code in WifiConfErrorMsg&&(o.uiMsg=WifiConfErrorMsg[o.code]),this.onProgress({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:o}}),[3,3];case 3:return[2]}}))}))},e}(qcloud_iotexplorer_appdev_plugin_wificonf_core_1.WifiConfProtocolBase);exports.QrCode=QrCode; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "qcloud-iotexplorer-appdev-plugin-wificonf-qrcode", | ||
"version": "1.0.4", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "rm -rf lib && npx tsc -p tsconfig.json -t es5 --outDir lib && node bin/minify.js -t lib", | ||
"typing": "cd @types && tsc" | ||
}, | ||
"miniprogram": "dist/release", | ||
"author": "xiaoluanhong@163.com", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/tencentyun/qcloud-iotexplorer-appdev/issues" | ||
}, | ||
"dependencies": { | ||
"qcloud-iotexplorer-appdev-plugin-wificonf-core": "^1.0.29", | ||
"qcloud-iotexplorer-appdev-sdk": "^1.0.38" | ||
}, | ||
"devDependencies": { | ||
"commander": "^6.0.0", | ||
"miniprogram-api-typings": "^3.1.2", | ||
"query-string": "^6.9.0", | ||
"terser": "^5.0.0", | ||
"tslib": "^2.0.1", | ||
"typescript": "^3.9.7" | ||
} | ||
"name": "qcloud-iotexplorer-appdev-plugin-wificonf-qrcode", | ||
"version": "1.1.35", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "rm -rf lib && npx tsc -p tsconfig.json -t es5 --outDir lib && node ../../bin/minify.js -p plugin-wificonf-qrcode -t lib", | ||
"typing": "cd @types && tsc" | ||
}, | ||
"miniprogram": "dist/release", | ||
"author": "xiaoluanhong@163.com", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/tencentyun/qcloud-iotexplorer-appdev/issues" | ||
}, | ||
"dependencies": { | ||
"qcloud-iotexplorer-appdev-plugin-wificonf-core": "^1.1.37", | ||
"qcloud-iotexplorer-appdev-sdk": "^1.1.22", | ||
"tslib": "^2.0.1" | ||
}, | ||
"gitHead": "10163258c2ec4eacfbe72611ec7205e18498be6a" | ||
} |
@@ -13,10 +13,10 @@ import { AppDevPlugin, AppDevSdk } from 'qcloud-iotexplorer-appdev-sdk'; | ||
start(options: WifiConfOption) { | ||
const qrcode = new QrCode(sdk,{ | ||
const qrcode = new QrCode(sdk, { | ||
wifiConfType: 'Qrcode', | ||
...options | ||
...options, | ||
}); | ||
return qrcode.doBusiness(); | ||
} | ||
}, | ||
}; | ||
} | ||
} |
@@ -5,3 +5,3 @@ import { | ||
constants, | ||
} from "qcloud-iotexplorer-appdev-plugin-wificonf-core"; | ||
} from 'qcloud-iotexplorer-appdev-plugin-wificonf-core'; | ||
@@ -17,2 +17,3 @@ const { WifiConfErrorMsg, WifiConfStepCode } = constants; | ||
export class QrCode extends WifiConfProtocolBase { | ||
// eslint-disable-next-line no-useless-constructor | ||
constructor(sdk, options) { | ||
@@ -25,11 +26,10 @@ super(sdk, options); | ||
try { | ||
const self = this; | ||
await queryTokenStateAndBind({ | ||
token: this.options.wifiConfToken, | ||
productId: "", | ||
deviceName: "", | ||
productId: '', | ||
deviceName: '', | ||
familyId: this.options.familyId, | ||
roomId: this.options.roomId, | ||
onProgress(data) { | ||
self.onProgress.call(self, data); | ||
onProgress: (data) => { | ||
this.onProgress.call(this, data); | ||
}, | ||
@@ -36,0 +36,0 @@ sdk: this.sdk, |
{ | ||
"include": [ | ||
"src", | ||
"global.d.ts" | ||
], | ||
"compilerOptions": { | ||
"experimentalDecorators": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"target": "es5", | ||
"lib": [ | ||
"es2017" | ||
], | ||
// "rootDir": "src", | ||
"declaration": true, | ||
"importHelpers": true, | ||
"allowSyntheticDefaultImports": true, | ||
"sourceMap": true, | ||
"downlevelIteration": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"allowJs": true | ||
} | ||
"extends": "../../tsconfig.build.json", | ||
"include": [ | ||
"src", | ||
"../../global.d.ts" | ||
], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./lib" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
0
1
6209
3
10
86
1