@gct-paas/core 0.0.1-dev.10.1 → 0.0.1-dev.11

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/index.mjs CHANGED
@@ -41,12 +41,12 @@ export { deepMerge, getToken, setToken } from './utils/tools/tools.mjs';
41
41
 
42
42
  "use strict";
43
43
  function install() {
44
- if (window.gct_global) {
44
+ if (window._gct) {
45
45
  console.warn("\u6838\u5FC3\u5305\u5DF2\u5B89\u88C5\uFF0C\u8BF7\u52FF\u91CD\u590D\u5B89\u88C5\uFF01");
46
46
  return;
47
47
  }
48
48
  console.info("\u6838\u5FC3\u5305\u5B89\u88C5\u6210\u529F\uFF01");
49
- window.gct_global = new GctGlobal();
49
+ window._gct = new GctGlobal();
50
50
  }
51
51
 
52
52
  export { GctGlobal, install as default, install };
@@ -8,7 +8,7 @@ declare global {
8
8
  /**
9
9
  * paas 平台全局对象
10
10
  */
11
- const gct_global: GctGlobal;
11
+ const _gct: GctGlobal;
12
12
 
13
13
  interface Window {
14
14
  /**
@@ -16,7 +16,7 @@ declare global {
16
16
  *
17
17
  * @type {GctGlobal}
18
18
  */
19
- gct_global: GctGlobal;
19
+ _gct: GctGlobal;
20
20
  }
21
21
 
22
22
  /**
@@ -12,8 +12,8 @@ function interceptors(axios) {
12
12
  Object.assign(config.headers, {
13
13
  Token: getToken(),
14
14
  Source: isMobile ? 502 : 501,
15
- Lang: gct_global.store.lang,
16
- "Tenant-Id": gct_global.store.tenantId,
15
+ Lang: _gct.store.lang,
16
+ "Tenant-Id": _gct.store.tenantId,
17
17
  Timezone: getTimezone()
18
18
  });
19
19
  if (!config.headers["App-Tag"]) {
@@ -29,9 +29,9 @@ function interceptors(axios) {
29
29
  ProjectName.TENANT_CENTER,
30
30
  ProjectName.APP_DESIGNER,
31
31
  ProjectName.WEB_RENDER
32
- ].includes(gct_global.store.projectName)) {
32
+ ].includes(_gct.store.projectName)) {
33
33
  config.headers["Module"] = "TENANT_CENTER";
34
- } else if (gct_global.store.projectName === ProjectName.BACKEND_MANAGEMENT) {
34
+ } else if (_gct.store.projectName === ProjectName.BACKEND_MANAGEMENT) {
35
35
  config.headers["Module"] = "BACKEND_MANAGEMENT";
36
36
  }
37
37
  return config;
@@ -34,7 +34,7 @@ class PluginPgkUtil {
34
34
  if (this.cache.has(tag)) {
35
35
  return this.cache.get(tag);
36
36
  }
37
- const res = await gct_global.api.platform.plugin.getList();
37
+ const res = await _gct.api.platform.plugin.getList();
38
38
  const configs = res.data;
39
39
  if (configs.length > 0) {
40
40
  this.cache.set(tag, configs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.0.1-dev.10.1",
3
+ "version": "0.0.1-dev.11",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.min.cjs",
@@ -54,8 +54,8 @@
54
54
  "vue-i18n": "9.6.5"
55
55
  },
56
56
  "devDependencies": {
57
- "@gct-paas/build": "0.0.1-dev.10",
58
- "@gct-paas/cli": "0.0.1-dev.10",
57
+ "@gct-paas/build": "0.0.1-dev.11",
58
+ "@gct-paas/cli": "0.0.1-dev.11",
59
59
  "@types/path-browserify": "^1.0.3",
60
60
  "@types/qs": "^6.9.18",
61
61
  "fs-extra": "^11.3.0"
@@ -63,5 +63,5 @@
63
63
  "peerDependencies": {
64
64
  "vue": "^3.x"
65
65
  },
66
- "gitHead": "6bdbbb867c581cc85c4fc75ada7560310194aac0"
66
+ "gitHead": "3f988584fd9450fa356f802a0316d75ee44a6a27"
67
67
  }