@nocobase/plugin-license 2.1.0-alpha.1 → 2.1.0-alpha.3
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/externalVersion.js
CHANGED
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
|
-
"@nocobase/client": "2.1.0-alpha.
|
|
12
|
+
"@nocobase/client": "2.1.0-alpha.3",
|
|
13
13
|
"antd": "5.24.2",
|
|
14
14
|
"ahooks": "3.7.8",
|
|
15
15
|
"@ant-design/icons": "5.6.1",
|
|
16
16
|
"@formily/react": "2.3.7",
|
|
17
|
-
"@nocobase/license-kit": "0.3.
|
|
17
|
+
"@nocobase/license-kit": "0.3.7",
|
|
18
18
|
"react-i18next": "11.18.6",
|
|
19
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
19
|
+
"@nocobase/server": "2.1.0-alpha.3",
|
|
20
20
|
"lodash": "4.17.21",
|
|
21
21
|
"koa": "2.16.0",
|
|
22
22
|
"axios": "1.7.7",
|
|
23
|
-
"@nocobase/logger": "2.1.0-alpha.
|
|
23
|
+
"@nocobase/logger": "2.1.0-alpha.3"
|
|
24
24
|
};
|
package/dist/server/utils/key.js
CHANGED
|
@@ -92,7 +92,8 @@ async function saveLicenseKey(licenseKey, ctx) {
|
|
|
92
92
|
const filePath = import_path.default.resolve(dir, "license-key");
|
|
93
93
|
await import_fs.default.promises.writeFile(filePath, licenseKey);
|
|
94
94
|
if (ctx && ctx.cache) {
|
|
95
|
-
await ctx.cache.
|
|
95
|
+
await ctx.cache.del(import_interface2.CACHE_KEY);
|
|
96
|
+
await ctx.cache.set(import_interface2.CACHE_KEY, licenseKey, 30 * 24 * 60 * 60 * 1e3);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
async function getLocalKeyData() {
|
|
@@ -111,6 +112,9 @@ async function getKey(ctx) {
|
|
|
111
112
|
if (ctx == null ? void 0 : ctx.cache) {
|
|
112
113
|
try {
|
|
113
114
|
key = await ctx.cache.get(import_interface2.CACHE_KEY);
|
|
115
|
+
if (key) {
|
|
116
|
+
return key;
|
|
117
|
+
}
|
|
114
118
|
} catch (e) {
|
|
115
119
|
import_logger.logger.warn("Failed to get license key from cache", e);
|
|
116
120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-license",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.3",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "License settings",
|
|
6
6
|
"displayName.ru-RU": "Настройки лицензии",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"ts:env": "tsc -p tsconfig.env.json"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "b4d7448b938c1c3be8b2299ad32c6cbe012dd4ea"
|
|
20
20
|
}
|