@blocklet/launcher-util 2.3.17 → 2.3.19
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/es/locale/en.js +20 -5
- package/es/locale/zh.js +20 -5
- package/es/nft.js +7 -1
- package/lib/locale/en.js +19 -4
- package/lib/locale/zh.js +19 -4
- package/lib/nft.js +6 -0
- package/package.json +2 -2
package/es/locale/en.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import flat from "flat";
|
|
2
|
-
import {
|
|
2
|
+
import { INSTANCE_STATUS, PAYMENT_METHODS, CURRENCY_TYPE } from "../constant";
|
|
3
3
|
const en = flat({
|
|
4
4
|
common: {
|
|
5
5
|
app: "App",
|
|
@@ -9,10 +9,25 @@ const en = flat({
|
|
|
9
9
|
},
|
|
10
10
|
serverlessInstance: {
|
|
11
11
|
appStatus: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
added: "Added",
|
|
13
|
+
waiting: "Waiting",
|
|
14
|
+
downloading: "Downloading",
|
|
15
|
+
extracting: "Extracting",
|
|
16
|
+
installing: "Installing",
|
|
17
|
+
upgrading: "Upgrading",
|
|
18
|
+
installed: "Installed",
|
|
19
|
+
created: "Created",
|
|
20
|
+
starting: "Starting",
|
|
21
|
+
running: "Running",
|
|
22
|
+
stopping: "Stopping",
|
|
23
|
+
stopped: "Stopped",
|
|
24
|
+
error: "Error",
|
|
25
|
+
deleting: "Deleting",
|
|
26
|
+
corrupted: "Corrupted",
|
|
27
|
+
purchasing: "Waiting for purchase",
|
|
28
|
+
purchased: "Purchased",
|
|
29
|
+
verifying: "Verifying purchase",
|
|
30
|
+
unknown: "Unknown"
|
|
16
31
|
}
|
|
17
32
|
},
|
|
18
33
|
dedicatedInstance: {
|
package/es/locale/zh.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import flat from "flat";
|
|
2
|
-
import {
|
|
2
|
+
import { INSTANCE_STATUS, PAYMENT_METHODS, CURRENCY_TYPE } from "../constant";
|
|
3
3
|
const zh = flat({
|
|
4
4
|
common: {
|
|
5
5
|
app: "应用",
|
|
@@ -9,10 +9,25 @@ const zh = flat({
|
|
|
9
9
|
},
|
|
10
10
|
serverlessInstance: {
|
|
11
11
|
appStatus: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
added: "已添加",
|
|
13
|
+
waiting: "等待中",
|
|
14
|
+
downloading: "下载中",
|
|
15
|
+
extracting: "提取中",
|
|
16
|
+
installing: "安装中",
|
|
17
|
+
upgrading: "升级中",
|
|
18
|
+
installed: "已安装",
|
|
19
|
+
created: "已创建",
|
|
20
|
+
starting: "启动中",
|
|
21
|
+
running: "运行中",
|
|
22
|
+
stopping: "停止中",
|
|
23
|
+
stopped: "已停止",
|
|
24
|
+
error: "错误",
|
|
25
|
+
deleting: "删除中",
|
|
26
|
+
corrupted: "已损坏",
|
|
27
|
+
purchased: "已购买",
|
|
28
|
+
purchasing: "购买中...",
|
|
29
|
+
verifying: "验证中...",
|
|
30
|
+
unknown: "未知状态"
|
|
16
31
|
}
|
|
17
32
|
},
|
|
18
33
|
dedicatedInstance: {
|
package/es/nft.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import get from "lodash/get";
|
|
2
2
|
import last from "lodash/last";
|
|
3
|
+
import { NFT_TYPE_SERVERLESS } from "../lib/constant";
|
|
3
4
|
const getNftExpirationDate = (asset) => last(get(asset, "data.value.expirationDate", []));
|
|
4
5
|
const isDateExpired = (expirationDate) => !!expirationDate && new Date(expirationDate).getTime() <= Date.now();
|
|
5
6
|
const isNFTExpired = (asset) => {
|
|
6
7
|
const expirationDate = getNftExpirationDate(asset);
|
|
7
8
|
return isDateExpired(expirationDate);
|
|
8
9
|
};
|
|
10
|
+
const isServerlessNFT = (assetState) => {
|
|
11
|
+
var _a;
|
|
12
|
+
return assetState.moniker === NFT_TYPE_SERVERLESS || ((_a = assetState.tags) == null ? void 0 : _a.includes(NFT_TYPE_SERVERLESS));
|
|
13
|
+
};
|
|
9
14
|
export {
|
|
10
15
|
getNftExpirationDate,
|
|
11
16
|
isDateExpired,
|
|
12
|
-
isNFTExpired
|
|
17
|
+
isNFTExpired,
|
|
18
|
+
isServerlessNFT
|
|
13
19
|
};
|
package/lib/locale/en.js
CHANGED
|
@@ -10,10 +10,25 @@ const en = flat({
|
|
|
10
10
|
},
|
|
11
11
|
serverlessInstance: {
|
|
12
12
|
appStatus: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
added: "Added",
|
|
14
|
+
waiting: "Waiting",
|
|
15
|
+
downloading: "Downloading",
|
|
16
|
+
extracting: "Extracting",
|
|
17
|
+
installing: "Installing",
|
|
18
|
+
upgrading: "Upgrading",
|
|
19
|
+
installed: "Installed",
|
|
20
|
+
created: "Created",
|
|
21
|
+
starting: "Starting",
|
|
22
|
+
running: "Running",
|
|
23
|
+
stopping: "Stopping",
|
|
24
|
+
stopped: "Stopped",
|
|
25
|
+
error: "Error",
|
|
26
|
+
deleting: "Deleting",
|
|
27
|
+
corrupted: "Corrupted",
|
|
28
|
+
purchasing: "Waiting for purchase",
|
|
29
|
+
purchased: "Purchased",
|
|
30
|
+
verifying: "Verifying purchase",
|
|
31
|
+
unknown: "Unknown"
|
|
17
32
|
}
|
|
18
33
|
},
|
|
19
34
|
dedicatedInstance: {
|
package/lib/locale/zh.js
CHANGED
|
@@ -10,10 +10,25 @@ const zh = flat({
|
|
|
10
10
|
},
|
|
11
11
|
serverlessInstance: {
|
|
12
12
|
appStatus: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
added: "已添加",
|
|
14
|
+
waiting: "等待中",
|
|
15
|
+
downloading: "下载中",
|
|
16
|
+
extracting: "提取中",
|
|
17
|
+
installing: "安装中",
|
|
18
|
+
upgrading: "升级中",
|
|
19
|
+
installed: "已安装",
|
|
20
|
+
created: "已创建",
|
|
21
|
+
starting: "启动中",
|
|
22
|
+
running: "运行中",
|
|
23
|
+
stopping: "停止中",
|
|
24
|
+
stopped: "已停止",
|
|
25
|
+
error: "错误",
|
|
26
|
+
deleting: "删除中",
|
|
27
|
+
corrupted: "已损坏",
|
|
28
|
+
purchased: "已购买",
|
|
29
|
+
purchasing: "购买中...",
|
|
30
|
+
verifying: "验证中...",
|
|
31
|
+
unknown: "未知状态"
|
|
17
32
|
}
|
|
18
33
|
},
|
|
19
34
|
dedicatedInstance: {
|
package/lib/nft.js
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const get = require("lodash/get");
|
|
4
4
|
const last = require("lodash/last");
|
|
5
|
+
const constant = require("../lib/constant");
|
|
5
6
|
const getNftExpirationDate = (asset) => last(get(asset, "data.value.expirationDate", []));
|
|
6
7
|
const isDateExpired = (expirationDate) => !!expirationDate && new Date(expirationDate).getTime() <= Date.now();
|
|
7
8
|
const isNFTExpired = (asset) => {
|
|
8
9
|
const expirationDate = getNftExpirationDate(asset);
|
|
9
10
|
return isDateExpired(expirationDate);
|
|
10
11
|
};
|
|
12
|
+
const isServerlessNFT = (assetState) => {
|
|
13
|
+
var _a;
|
|
14
|
+
return assetState.moniker === constant.NFT_TYPE_SERVERLESS || ((_a = assetState.tags) == null ? void 0 : _a.includes(constant.NFT_TYPE_SERVERLESS));
|
|
15
|
+
};
|
|
11
16
|
exports.getNftExpirationDate = getNftExpirationDate;
|
|
12
17
|
exports.isDateExpired = isDateExpired;
|
|
13
18
|
exports.isNFTExpired = isNFTExpired;
|
|
19
|
+
exports.isServerlessNFT = isServerlessNFT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-util",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.19",
|
|
4
4
|
"description": "Common constants",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"constant"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"vite": "^5.2.10",
|
|
49
49
|
"vite-plugin-build": "^0.10.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "390e1c74743c4733482995dc5bbae6f7ad1037d1"
|
|
52
52
|
}
|