@tuya-miniapp/ark-extension-virtual-device 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/worker/index.js +11 -5
- package/package.json +2 -2
package/dist/worker/index.js
CHANGED
|
@@ -7550,7 +7550,7 @@ var require_node2 = __commonJS({
|
|
|
7550
7550
|
"node_modules/debug/src/node.js"(exports, module2) {
|
|
7551
7551
|
var tty = require("tty");
|
|
7552
7552
|
var util = require("util");
|
|
7553
|
-
exports.init =
|
|
7553
|
+
exports.init = init2;
|
|
7554
7554
|
exports.log = log;
|
|
7555
7555
|
exports.formatArgs = formatArgs;
|
|
7556
7556
|
exports.save = save;
|
|
@@ -7696,7 +7696,7 @@ var require_node2 = __commonJS({
|
|
|
7696
7696
|
function load() {
|
|
7697
7697
|
return process.env.DEBUG;
|
|
7698
7698
|
}
|
|
7699
|
-
function
|
|
7699
|
+
function init2(debug) {
|
|
7700
7700
|
debug.inspectOpts = {};
|
|
7701
7701
|
const keys = Object.keys(exports.inspectOpts);
|
|
7702
7702
|
for (let i = 0; i < keys.length; i++) {
|
|
@@ -21462,7 +21462,7 @@ var getProductVirtualToken = async (params) => {
|
|
|
21462
21462
|
|
|
21463
21463
|
// worker/utils/readProjectConfigJson.ts
|
|
21464
21464
|
var readProjectConfigJson = async () => {
|
|
21465
|
-
const config = await ark.project.
|
|
21465
|
+
const config = await ark.project.getInfo();
|
|
21466
21466
|
console.log("config", config);
|
|
21467
21467
|
return config;
|
|
21468
21468
|
};
|
|
@@ -21875,8 +21875,14 @@ async function getLangContent(params) {
|
|
|
21875
21875
|
errorCode: 0
|
|
21876
21876
|
};
|
|
21877
21877
|
}
|
|
21878
|
-
|
|
21879
|
-
|
|
21878
|
+
async function init() {
|
|
21879
|
+
const projectInfo = await services_default.getTuyaProjectInfo();
|
|
21880
|
+
if (projectInfo.type === "panel-app") {
|
|
21881
|
+
ark.miniapp.addPluginMethod("TYUniLocalizationManager", "getLangKey", getLangKey);
|
|
21882
|
+
ark.miniapp.addPluginMethod("TYUniLocalizationManager", "getLangContent", getLangContent);
|
|
21883
|
+
}
|
|
21884
|
+
}
|
|
21885
|
+
init();
|
|
21880
21886
|
|
|
21881
21887
|
// worker/api/TYUniPhoneNetworkManager.ts
|
|
21882
21888
|
var import_TYUniCode2 = __toESM(require_dist());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-miniapp/ark-extension-virtual-device",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"manifest.json",
|
|
6
6
|
"dist/"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/preset-typescript": "^7.16.7",
|
|
21
21
|
"@tuya-fe/react-hooks": "^2.0.7",
|
|
22
22
|
"@tuya-miniapp/TYUniCode": "0.0.75",
|
|
23
|
-
"@tuya-miniapp/ark-api": "
|
|
23
|
+
"@tuya-miniapp/ark-api": "0.5.0",
|
|
24
24
|
"@types/fs-extra": "^9.0.13",
|
|
25
25
|
"@types/node": "^17.0.34",
|
|
26
26
|
"@types/react": "^16.8.19",
|