@cloudbase/lowcode-builder 0.1.11 → 0.1.12
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { findForItemsOfWidget, getWidget } from './widget'
|
|
3
3
|
import lodashGet from 'lodash.get';
|
|
4
4
|
import lodashSet from 'lodash.set';
|
|
5
|
+
import { getAccessToken } from '../datasources/index'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Convert abcWordSnd -> abc-word-snd
|
|
@@ -312,8 +313,11 @@ export async function checkAuth(app, appId, $page) {
|
|
|
312
313
|
const [isAccess, authConfig] = await Promise.all(requestList);
|
|
313
314
|
app.hideNavigationBarLoading();
|
|
314
315
|
|
|
315
|
-
|
|
316
|
-
|
|
316
|
+
let isAnonymousUser = true;
|
|
317
|
+
try {
|
|
318
|
+
const { accessToken } = await getAccessToken();
|
|
319
|
+
isAnonymousUser = !accessToken;
|
|
320
|
+
} catch (e) { }
|
|
317
321
|
|
|
318
322
|
if (!isAccess) {
|
|
319
323
|
if (isAnonymousUser && loginPage && (authConfig.NeedLogin || authConfig.RejectStrategy == 'to_login')) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _WEDA_CLOUD_SDK as WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
|
|
1
|
+
import { _WEDA_CLOUD_SDK as WEDA_CLOUD_SDK, auth} from '@cloudbase/weda-client'
|
|
2
2
|
const {
|
|
3
3
|
setConfig,
|
|
4
4
|
initTcb,
|
|
@@ -9,8 +9,8 @@ const {
|
|
|
9
9
|
EXTRA_API,
|
|
10
10
|
DS_API,
|
|
11
11
|
DS_SDK,
|
|
12
|
-
getAccessToken,
|
|
13
12
|
} = WEDA_CLOUD_SDK
|
|
13
|
+
const getAccessToken = auth.getAccessToken
|
|
14
14
|
|
|
15
15
|
export {
|
|
16
16
|
createDataset,
|