@cloudbase/lowcode-builder 0.1.26 → 1.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.
Files changed (85) hide show
  1. package/lib/builder/core/index.d.ts +1 -3
  2. package/lib/builder/core/index.js +42 -52
  3. package/lib/builder/h5/compile.d.ts +1 -1
  4. package/lib/builder/h5/compile.js +59 -20
  5. package/lib/builder/h5/copy.js +2 -4
  6. package/lib/builder/h5/generate.js +3 -3
  7. package/lib/builder/h5/index.d.ts +5 -4
  8. package/lib/builder/h5/index.js +25 -14
  9. package/lib/builder/h5/material.js +6 -11
  10. package/lib/builder/h5/npm.js +6 -5
  11. package/lib/builder/mp/index.js +38 -49
  12. package/lib/builder/mp/materials.js +25 -18
  13. package/lib/builder/mp/mixMode.js +7 -10
  14. package/lib/builder/mp/mp_config.js +2 -3
  15. package/lib/builder/mp/wxml.js +1 -1
  16. package/lib/builder/service/webpack.d.ts +7 -1
  17. package/lib/builder/service/webpack.js +97 -24
  18. package/lib/builder/types/common.d.ts +1 -1
  19. package/lib/builder/types/common.js +2 -1
  20. package/lib/builder/util/common.js +1 -4
  21. package/lib/builder/util/generateFiles.js +12 -10
  22. package/lib/builder/util/mp.js +2 -8
  23. package/lib/builder.web.js +71 -0
  24. package/lib/index.d.ts +4 -0
  25. package/lib/index.js +6 -0
  26. package/lib/types.d.ts +1 -0
  27. package/lib/types.js +11 -0
  28. package/package.json +3 -8
  29. package/template/html/index.html.ejs +59 -29
  30. package/template/mp/common/weapp-page.js +23 -1
  31. package/template/mp/common/weapp-sdk.js +35 -0
  32. package/template/mp/package.json +1 -1
  33. package/template/mp/page/index.js +2 -1
  34. package/template/package.json +5 -2
  35. package/template/webpack/getCSSModuleLocalIdent.js +28 -0
  36. package/template/webpack/web.prod.js +112 -103
  37. package/template/src/app/common.js +0 -13
  38. package/template/src/app/global-api.js +0 -99
  39. package/template/src/app/handlers.js +0 -13
  40. package/template/src/app/material-actions.js +0 -16
  41. package/template/src/app/mountAppApis.js +0 -25
  42. package/template/src/app/mountMpApis.js +0 -4
  43. package/template/src/datasources/config.js.tpl +0 -23
  44. package/template/src/datasources/dataset-profiles.js.tpl +0 -5
  45. package/template/src/datasources/datasource-profiles.js.tpl +0 -4
  46. package/template/src/datasources/index.js +0 -31
  47. package/template/src/handlers/FieldMiddleware/renderer.jsx +0 -331
  48. package/template/src/handlers/HotAreas.js +0 -36
  49. package/template/src/handlers/PositionHandler.jsx +0 -8
  50. package/template/src/handlers/actionHandler/utils.js +0 -149
  51. package/template/src/handlers/componentEventActionEmitter.js +0 -29
  52. package/template/src/handlers/componentNodeMap.js +0 -24
  53. package/template/src/handlers/controller.js +0 -5
  54. package/template/src/handlers/emitComponentEvent.js +0 -8
  55. package/template/src/handlers/eventListener/componentEventListener.js +0 -15
  56. package/template/src/handlers/eventListener/hotAreaEventListener.js +0 -32
  57. package/template/src/handlers/eventListener/index.js +0 -29
  58. package/template/src/handlers/eventListener/pageEventListener.js +0 -11
  59. package/template/src/handlers/eventListener/types.js +0 -32
  60. package/template/src/handlers/hooks/index.js +0 -14
  61. package/template/src/handlers/initWebEnv.js +0 -4
  62. package/template/src/handlers/injectStyle.js +0 -14
  63. package/template/src/handlers/instanceMap.js +0 -39
  64. package/template/src/handlers/lifecycle.js +0 -232
  65. package/template/src/handlers/render.jsx +0 -131
  66. package/template/src/handlers/utils/common.js +0 -151
  67. package/template/src/handlers/utils/eventProxy.js +0 -64
  68. package/template/src/handlers/utils/events.js +0 -8
  69. package/template/src/handlers/utils/index.js +0 -4
  70. package/template/src/handlers/utils/widgets.js +0 -320
  71. package/template/src/index.jsx +0 -142
  72. package/template/src/index.less +0 -119
  73. package/template/src/libraries/default-lib/wx_yypt_report_v2.js +0 -441
  74. package/template/src/pages/app.tpl +0 -124
  75. package/template/src/router/index.tpl +0 -28
  76. package/template/src/store/computed.js +0 -11
  77. package/template/src/store/index.js +0 -40
  78. package/template/src/utils/ScanCodeComponent.js +0 -396
  79. package/template/src/utils/date.js +0 -324
  80. package/template/src/utils/history.js +0 -72
  81. package/template/src/utils/index.js +0 -67
  82. package/template/src/utils/kbone.js +0 -18
  83. package/template/src/utils/monitor-jssdk.min.js +0 -763
  84. package/template/src/utils/request.js +0 -5
  85. package/template/src/utils/scan-code-action.js +0 -27
@@ -3,10 +3,12 @@ const webpack = require('webpack');
3
3
  const TerserPlugin = require('terser-webpack-plugin');
4
4
  const HtmlWebpackPlugin = require('html-webpack-plugin');
5
5
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
+ const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
6
7
  const CopyWebpackPlugin = require('copy-webpack-plugin');
7
8
  const themeVars = require('./themeVars');
9
+ const getCSSModuleLocalIdent = require('./getCSSModuleLocalIdent');
8
10
  const HappyPack = require('happypack');
9
- const core = 7;
11
+ const core = 4;
10
12
  const happyThreadPool = HappyPack.ThreadPool({ size: core });
11
13
 
12
14
  const TS_LOADER_ID = 'ts-loader';
@@ -21,8 +23,9 @@ module.exports = function (options) {
21
23
  resolveModules,
22
24
  htmlTemplatePath,
23
25
  definePlugin = {},
26
+ devtool = false,
24
27
  } = options;
25
- const isDevelopment = mode !== 'production';
28
+
26
29
  const babelLoader = {
27
30
  loader: 'babel-loader',
28
31
  options: {
@@ -35,7 +38,8 @@ module.exports = function (options) {
35
38
  {
36
39
  modules: false,
37
40
  targets: {
38
- esmodules: true,
41
+ // esmodules: true,
42
+ browsers: ['defaults', 'iOS >= 10', 'safari >= 10'],
39
43
  },
40
44
  },
41
45
  ],
@@ -60,27 +64,45 @@ module.exports = function (options) {
60
64
  ].filter(Boolean),
61
65
  },
62
66
  };
67
+ const typescriptLoader = {
68
+ loader: 'ts-loader',
69
+ options: {
70
+ compilerOptions: {
71
+ target: 'ESNext',
72
+ module: 'ESNext',
73
+ esModuleInterop: true,
74
+ },
75
+ happyPackMode: true,
76
+ transpileOnly: true,
77
+ },
78
+ };
63
79
 
64
80
  let plugins = [
65
81
  new HappyPack({
66
- id: TS_LOADER_ID,
82
+ id: 'vue',
83
+ cache: true,
84
+ verbose: true,
67
85
  loaders: [
68
86
  babelLoader,
87
+ typescriptLoader,
69
88
  {
70
- loader: 'ts-loader',
89
+ loader: 'vue-loader',
71
90
  options: {
72
- compilerOptions: {
73
- target: 'ESNext',
74
- module: 'ESNext',
75
- esModuleInterop: true,
91
+ threadMode: true,
92
+ loaders: {
93
+ js: [babelLoader],
94
+ ts: [babelLoader, typescriptLoader],
76
95
  },
77
- happyPackMode: true,
78
- transpileOnly: true,
79
96
  },
80
97
  },
81
98
  ],
82
99
  threadPool: happyThreadPool,
83
100
  }),
101
+ new HappyPack({
102
+ id: TS_LOADER_ID,
103
+ loaders: [babelLoader, typescriptLoader],
104
+ threadPool: happyThreadPool,
105
+ }),
84
106
  new HappyPack({
85
107
  id: 'babel',
86
108
  loaders: [babelLoader],
@@ -94,7 +116,6 @@ module.exports = function (options) {
94
116
  new MiniCssExtractPlugin({
95
117
  filename: '[name].[contenthash].css',
96
118
  chunkFilename: '[id].[contenthash].css',
97
- ignoreOrder: true,
98
119
  }),
99
120
  new webpack.DefinePlugin(
100
121
  Object.assign(
@@ -103,8 +124,8 @@ module.exports = function (options) {
103
124
  'process.env.SSR': false,
104
125
  'process.env.compileTool': `'webpack'`,
105
126
  },
106
- definePlugin
107
- )
127
+ definePlugin,
128
+ ),
108
129
  ),
109
130
  new CopyWebpackPlugin({
110
131
  patterns: [
@@ -115,31 +136,63 @@ module.exports = function (options) {
115
136
  },
116
137
  ],
117
138
  }),
139
+ new webpack.HashedModuleIdsPlugin({
140
+ hashFunction: 'sha256',
141
+ hashDigest: 'hex',
142
+ hashDigestLength: 20,
143
+ }),
144
+ new webpack.EnvironmentPlugin({
145
+ SSR: false,
146
+ WEBPACK_ENV: 'production',
147
+ }),
148
+ ];
149
+
150
+ const commonCSSLoaders = [
151
+ MiniCssExtractPlugin.loader,
152
+ {
153
+ loader: 'css-loader',
154
+ options: {
155
+ modules: {
156
+ auto: true,
157
+ getLocalIdent: getCSSModuleLocalIdent,
158
+ },
159
+ importLoaders: 2,
160
+ },
161
+ },
162
+ {
163
+ loader: 'postcss-loader',
164
+ options: {
165
+ postcssOptions: {
166
+ plugins: [
167
+ [
168
+ 'postcss-pxtorem',
169
+ {
170
+ rootValue: 14,
171
+ propList: ['*'],
172
+ // todo
173
+ selectorBlackList: ['.weui-picker__indicator'],
174
+ },
175
+ ],
176
+ ],
177
+ },
178
+ },
179
+ },
118
180
  ];
119
- if (!isDevelopment) {
120
- plugins = plugins.concat([
121
- new webpack.HashedModuleIdsPlugin({
122
- hashFunction: 'sha256',
123
- hashDigest: 'hex',
124
- hashDigestLength: 20,
125
- }),
126
- new webpack.EnvironmentPlugin({
127
- SSR: false,
128
- WEBPACK_ENV: 'production',
129
- }),
130
- ]);
131
- }
181
+
132
182
  return {
133
183
  context,
134
184
  entry,
135
- mode,
185
+ /**
186
+ * 只要是构建都开启 production 以使用精简
187
+ */
188
+ mode: 'production',
136
189
  watch,
137
190
  output,
138
191
  externals,
139
192
  cache: {
140
193
  type: 'memory',
141
194
  },
142
- devtool: isDevelopment ? 'eval' : false,
195
+ devtool: devtool,
143
196
  resolve: {
144
197
  extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.scss', '.css'],
145
198
  modules: [...resolveModules],
@@ -151,6 +204,10 @@ module.exports = function (options) {
151
204
  },
152
205
  module: {
153
206
  rules: [
207
+ {
208
+ test: /\.vue$/,
209
+ loader: 'happypack/loader?id=vue',
210
+ },
154
211
  {
155
212
  test: /\.tsx?$/,
156
213
  exclude: /node_modules\/(?!@cloudbase\/weda-ui)|gsd-kbone-react/,
@@ -158,38 +215,13 @@ module.exports = function (options) {
158
215
  },
159
216
  {
160
217
  test: /\.(js|jsx)$/,
161
- exclude: /node_modules\/(?!@cloudbase\/weda-ui)|gsd-kbone-react/,
218
+ exclude: /node_modules\/(?!(@cloudbase\/weda-ui)|(@tcwd\/vuera)|(@tcwd\/weapps-core))|gsd-kbone-react/,
162
219
  use: ['happypack/loader?id=babel'],
163
220
  },
164
221
  {
165
222
  test: /\.(scss|sass)$/,
166
223
  use: [
167
- MiniCssExtractPlugin.loader,
168
- {
169
- loader: 'css-loader',
170
- options: {
171
- modules: false,
172
- importLoaders: 2,
173
- },
174
- },
175
- {
176
- loader: 'postcss-loader',
177
- options: {
178
- postcssOptions: {
179
- plugins: [
180
- [
181
- 'postcss-pxtorem',
182
- {
183
- rootValue: 14,
184
- propList: ['*'],
185
- // todo
186
- selectorBlackList: ['.weui-picker__indicator'],
187
- },
188
- ],
189
- ],
190
- },
191
- },
192
- },
224
+ ...commonCSSLoaders,
193
225
  {
194
226
  loader: 'sass-loader',
195
227
  options: {
@@ -199,39 +231,19 @@ module.exports = function (options) {
199
231
  ],
200
232
  },
201
233
  {
202
- test: /\.(css|less)$/,
234
+ test: /\.css$/,
235
+ use: [...commonCSSLoaders],
236
+ },
237
+ {
238
+ test: /\.less$/,
203
239
  use: [
204
- MiniCssExtractPlugin.loader,
205
- {
206
- loader: 'css-loader',
207
- options: {
208
- modules: false,
209
- importLoaders: 2,
210
- },
211
- },
212
- {
213
- loader: 'postcss-loader',
214
- options: {
215
- postcssOptions: {
216
- plugins: [
217
- [
218
- 'postcss-pxtorem',
219
- {
220
- rootValue: 14,
221
- propList: ['*'],
222
- // todo
223
- selectorBlackList: ['.weui-picker__indicator'],
224
- },
225
- ],
226
- ],
227
- },
228
- },
229
- },
240
+ ...commonCSSLoaders,
230
241
  {
231
242
  loader: 'less-loader',
232
243
  options: {
233
244
  lessOptions: {
234
245
  modifyVars: themeVars,
246
+ javascriptEnabled: true,
235
247
  },
236
248
  },
237
249
  },
@@ -245,19 +257,21 @@ module.exports = function (options) {
245
257
  },
246
258
  plugins,
247
259
  optimization: {
260
+ concatenateModules: true,
248
261
  noEmitOnErrors: true,
249
- removeEmptyChunks: true,
250
262
  splitChunks: {
263
+ maxSize: 3000000,
251
264
  cacheGroups: {
252
265
  base: {
253
266
  test: /(react|react-dom|react-router|react-router-dom|mobx|mobx-react-lite|@cloudbase\/js-sdk)/,
254
267
  chunks: 'all',
255
- priority: 100, //优先级
268
+ minSize: 500000,
269
+ priority: 100, // 优先级
256
270
  },
257
271
  utils: {
258
- test: /(lodash|dayjs|axios|kbone-api|fastclick)/,
272
+ test: /(lodash|dayjs|axios|kbone-api)/,
259
273
  chunks: 'all',
260
- priority: 100, //优先级
274
+ priority: 100, // 优先级
261
275
  },
262
276
  'async-commons': {
263
277
  chunks: 'async',
@@ -271,22 +285,17 @@ module.exports = function (options) {
271
285
  },
272
286
  },
273
287
  },
274
- ...(isDevelopment
275
- ? {
276
- minimize: false,
277
- removeAvailableModules: false,
278
- concatenateModules: true,
279
- }
280
- : {
281
- minimizer: [
282
- new TerserPlugin({
283
- test: /\.js(\?.*)?$/i,
284
- cache: false,
285
- parallel: true,
286
- sourceMap: false,
287
- }),
288
- ],
289
- }),
288
+ minimizer: [
289
+ new TerserPlugin({
290
+ test: /\.js(\?.*)?$/i,
291
+ cache: false,
292
+ parallel: true,
293
+ sourceMap: false,
294
+ terserOptions: {
295
+ safari10: true,
296
+ },
297
+ }),
298
+ ],
290
299
  },
291
300
  };
292
301
  };
@@ -1,13 +0,0 @@
1
- <% mods.forEach((mod) => {%>
2
- import * as <%= mod %> from '../lowcode/common/<%= mod %>'<%}) %>
3
-
4
- function getModule(targetModule) {
5
- if(targetModule.__esModule) {
6
- return targetModule.default ? targetModule.default : targetModule
7
- }
8
- }
9
-
10
- export default {
11
- <% mods.forEach((mod) => {%>
12
- <%= mod %>: getModule(<%= mod %>),<%}) %>
13
- }
@@ -1,99 +0,0 @@
1
- import * as sdk from '@tcwd/weapps-sdk';
2
- import { createComputed } from 'utils';
3
- import store, { subPackageName } from '../store';
4
- import computed from '../store/computed';
5
- import common from './common';
6
- import { _isMobile } from '../utils';
7
- import actionMap from './material-actions';
8
- import { createWebApp, _ACTIONS_KEY as ACTIONS_KEY, _ROUTER_KEY as ROUTER_KEY } from '@cloudbase/weda-client';
9
- import { createDataset, EXTRA_API } from '../datasources/index';
10
-
11
- const mainAppKey = '__weappsMainApp';
12
- const appGlobal = process.env.isMiniprogram ? getApp() : window;
13
-
14
- export const app = createGlboalApi();
15
- export const $page = createPageApi();
16
-
17
- export function setCurrentPage(pageCtx) {
18
- Object.assign($page, pageCtx);
19
- }
20
-
21
- function createGlboalApi() {
22
- const mpApp = createWebApp();
23
- const globalAPI = {
24
- id: '<%= appId %>',
25
- domain: '<%= domain %>',
26
- formActions: {},
27
- pages: {},
28
- session: {
29
- configure: sdk.configure,
30
- request: sdk.request,
31
- getSessionId: sdk.getSessionId,
32
- },
33
- state: store,
34
- computed: createComputed(computed.global),
35
- common,
36
- ...mpApp,
37
- // ... other sdk apis & apis from mp
38
- }; // The global api exposed to lowcode
39
-
40
- const dataset = createDataset('$global');
41
- globalAPI.dataset = dataset;
42
- globalAPI.state.dataset = dataset;
43
- globalAPI.setState = (userSetState) => {
44
- Object.keys(userSetState).forEach((keyPath) => {
45
- globalAPI.utils.set(globalAPI.dataset.state, keyPath, userSetState[keyPath]);
46
- });
47
- };
48
- /**
49
- * 内部通用的设置状态变量值的方法
50
- * varPath 结构为 $global.<变量名> 即全局变量
51
- * $page.<变量名> 即当前页面变量
52
- * <pageId>.<变量名> 指定页面 pageId 的变量 (应当避免修改非当前页面的变量值)
53
- */
54
- globalAPI._setStateVal = (config) => {
55
- EXTRA_API.setState(config.varPath, config.val);
56
- };
57
- if (subPackageName) {
58
- // is sub app
59
- globalAPI.mainApp = appGlobal[mainAppKey];
60
- } else {
61
- // is mainApp
62
- appGlobal.app = globalAPI;
63
- appGlobal[mainAppKey] = globalAPI;
64
- }
65
-
66
- // 挂运营平台上报对象到app里
67
- globalAPI.yyptReport = appGlobal.yyptReport;
68
-
69
- // # expose some sdk modules
70
- const sdkModsIncluded = ['flow', 'getPageOptions', 'getLaunchOptions'];
71
- sdkModsIncluded.forEach((key) => {
72
- globalAPI[key] = sdk[key];
73
- });
74
-
75
- return globalAPI;
76
- }
77
- function createPageApi() {
78
- const $page = {
79
- state: {},
80
- computed: {},
81
- handler: {},
82
- props: {},
83
- widgets: {},
84
- // 页面数据源变量存储位置
85
- dataVar: {},
86
- };
87
- return $page;
88
- }
89
-
90
- // 分app 和 wx 挂载app
91
- export const mountAPIs = (sdks) => {
92
- Object.keys(sdks).forEach((item) => {
93
- let action = sdks[item];
94
- if (!(item in ACTIONS_KEY) && !(item in ROUTER_KEY)) {
95
- app[item] = action;
96
- }
97
- });
98
- return app;
99
- };
@@ -1,13 +0,0 @@
1
- <%for(const pageId in pageModules) {
2
- pageModules[pageId].filter(mod => mod.type === 'handler-fn' && mod.name !== '____index____').forEach(mod => {%>
3
- import <%= pageId%>_<%= mod.name%> from '../lowcode/<%= pageId%>/handler/<%= mod.name%>'<%
4
- })
5
- }%>
6
-
7
- <% for(const pageId in pageModules) {%>
8
- export const $$_<%=pageId %> = {<%
9
- pageModules[pageId].filter(mod => mod.type === 'handler-fn' && mod.name !== '____index____').forEach(mod => {%>
10
- ['<%= mod.name%>']: <%= pageId%>_<%= mod.name%>,<%
11
- }) %>
12
- }
13
- <%}%>
@@ -1,16 +0,0 @@
1
- // Imports all material actions
2
- <% materials.map((material,index) => { if(material.entries && material.entries.actions){ %>
3
- import * as <%= _.camelCase(material.name)%>Actions_<%= index%> from 'libraries/<%=material.name%>@<%= material.version %>/<%=material.entries.actions%>';
4
- <% } else if(material.entries && material.entries.entry) {%>
5
- import <%= _.camelCase(material.name)%>_<%= index%> from 'libraries/<%=material.name%>@<%= material.version %>/<%=material.entries.entry%>';
6
- const <%= _.camelCase(material.name)%>Actions_<%= index%> = <%= _.camelCase(material.name)%>_<%= index%>.actions
7
- <% } else { (material.actions || []).map(act => {%>
8
- import <%= _.camelCase(material.name)%>_<%=act.name%> from 'libraries/<%=material.name%>@<%= material.version %>/actions/<%= act.name %>'
9
- <% }) }}) %>
10
- export default {
11
- <% materials.map((material, index) => {
12
- %> ['<%= material.name%>']:<% if(material.entries && (material.entries.entry || material.entries.actions)){ %> <%=_.camelCase(material.name)%>Actions_<%= index%>,
13
- <% }else{ %> {<% (material.actions || []).map(act => { %>
14
- ['<%= act.name%>']: <%= _.camelCase(material.name)%>_<%=act.name%>,<%})%>
15
- },
16
- <%}}) %>}
@@ -1,25 +0,0 @@
1
- import { mountAPIs } from './global-api';
2
- import sdk from '@tcwd/weapps-sdk/lib/app-h5-sdk';
3
-
4
- mountAPIs(sdk);
5
-
6
- /**
7
- * 适配 wx.navigateTo 用法
8
- */
9
- function navigateTo({ url }) {
10
- let paths = url.split('?');
11
- let result = /pages\/([0-9a-zA-z_]+)\/index/.exec(paths[0]);
12
- let hash = '';
13
- if (result.length > 1) {
14
- hash = `/${result[0]}`;
15
- }
16
- let path = `/${hash}`;
17
- location.hash = `${path}${paths[1] ? `?${paths[1]}` : ''}`;
18
- }
19
- if (process.env.isApp) {
20
- window.wx = {
21
- ...(window.wx || {}),
22
- ...sdk,
23
- navigateTo,
24
- };
25
- }
@@ -1,4 +0,0 @@
1
- import { mountAPIs } from './global-api'
2
- import sdk from 'libraries/compatible-sdk/wx-sdk'
3
-
4
- mountAPIs(sdk)
@@ -1,23 +0,0 @@
1
- import dataSourceProfiles from './datasource-profiles'
2
- import datasetProfiles from './dataset-profiles'
3
-
4
- /**
5
- * 数据源基本配置
6
- */
7
- export default {
8
- /** 当前是否处于正式发布模式 */
9
- isProd: <%= isProd %>,
10
- /** 低码应用ID */
11
- appID: '<%= appID %>',
12
- /** 云开发环境ID */
13
- envID: '<%= envID %>',
14
- /** 应用端ID */
15
- tcbClientId: '<%= clientID %>',
16
- /** 数据源描述对象数组 */
17
- dataSourceProfiles: dataSourceProfiles,
18
- /**
19
- * 新的dataset变量配置对象
20
- * key 为页面ID(全局为$global), val 为变量配置数组
21
- */
22
- datasetProfiles: datasetProfiles,
23
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * 全局及页面的数据源变量定义文件
3
- */
4
-
5
- export default <%= datasetProfiles %>
@@ -1,4 +0,0 @@
1
- /**
2
- * 数据源摘要描述数组
3
- */
4
- export default <%= datasourceProfiles %>
@@ -1,31 +0,0 @@
1
- import { _WEDA_CLOUD_SDK as WEDA_CLOUD_SDK } from '@cloudbase/weda-client'
2
- import config from './config';
3
-
4
- const {
5
- setConfig,
6
- initTcb,
7
- CLOUD_SDK,
8
- createDataset,
9
- createStateDataSourceVar,
10
- generateParamsParser,
11
- EXTRA_API,
12
- DS_API,
13
- DS_SDK,
14
- getAccessToken,
15
- } = WEDA_CLOUD_SDK
16
-
17
- export {
18
- createDataset,
19
- createStateDataSourceVar,
20
- generateParamsParser,
21
- EXTRA_API,
22
- CLOUD_SDK,
23
- DS_API,
24
- DS_SDK,
25
- setConfig,
26
- initTcb,
27
- getAccessToken,
28
- }
29
-
30
- setConfig(config);
31
- initTcb();