@cloudbase/cli 2.1.6 → 2.2.0-alpha.0
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/bin/tcb.js +45 -19
- package/lib/commands/common.js +37 -7
- package/lib/commands/lowcode/app.js +110 -3
- package/lib/commands/lowcode/comps.js +57 -25
- package/lib/decorators/constants.js +1 -0
- package/lib/decorators/injectParams.js +3 -0
- package/lib/decorators/params/index.js +2 -1
- package/lib/index.js +3 -3
- package/lib/utils/auth.js +2 -1
- package/lib/utils/config.js +8 -1
- package/lib/utils/log.js +3 -0
- package/package.json +2 -2
- package/types/commands/common.d.ts +5 -2
- package/types/commands/lowcode/app.d.ts +25 -0
- package/types/commands/lowcode/comps.d.ts +1 -1
- package/types/decorators/constants.d.ts +2 -1
- package/types/decorators/params/index.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/types.d.ts +1 -0
- package/types/utils/config.d.ts +15 -1
- package/types/utils/log.d.ts +1 -0
- package/.history/.gitignore_20220624162613 +0 -84
- package/.history/.gitignore_20220627114054 +0 -86
- package/.history/package_20220922143103.json +0 -93
- package/.history/package_20220922143115.json +0 -89
- package/.history/package_20220922202714.json +0 -89
- package/.history/package_20220922202748.json +0 -89
- package/.history/src/commands/lowcode/app_20220728111717.ts +0 -52
- package/.history/src/commands/lowcode/app_20220728112031.ts +0 -34
- package/.history/src/commands/lowcode/app_20220729172854.ts +0 -34
- package/.history/src/index_20220624162613.ts +0 -13
- package/.history/src/index_20220627113609.ts +0 -15
- package/.history/src/index_20220627114102.ts +0 -13
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash'
|
|
2
|
-
import { Command, ICommand } from '../common'
|
|
3
|
-
import { watchApp } from '@cloudbase/lowcode-cli'
|
|
4
|
-
import { InjectParams, Log, Logger, CmdContext, ArgsOptions } from '../../decorators'
|
|
5
|
-
|
|
6
|
-
@ICommand()
|
|
7
|
-
export class LowCodeWatch extends Command {
|
|
8
|
-
get options() {
|
|
9
|
-
return {
|
|
10
|
-
cmd: 'lowcode',
|
|
11
|
-
childCmd: 'watch',
|
|
12
|
-
options: [
|
|
13
|
-
{
|
|
14
|
-
flags: '--verbose',
|
|
15
|
-
desc: '是否打印详细日志'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
flags: '--wx-devtool-path <wxDevtoolPath>',
|
|
19
|
-
desc: '微信开发者工具的安装路径'
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
desc: '开启云开发低码的本地构建模式',
|
|
23
|
-
requiredEnvId: false
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@InjectParams()
|
|
28
|
-
async execute(@CmdContext() ctx, @ArgsOptions() options) {
|
|
29
|
-
await watchApp({
|
|
30
|
-
watchPort: 8288,
|
|
31
|
-
wxDevtoolPath: options?.wxDevtoolPath
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash'
|
|
2
|
-
import { Command, ICommand } from '../common'
|
|
3
|
-
import { watchApp } from '@cloudbase/lowcode-cli'
|
|
4
|
-
import { InjectParams, Log, Logger, CmdContext, ArgsOptions } from '../../decorators'
|
|
5
|
-
|
|
6
|
-
@ICommand()
|
|
7
|
-
export class LowCodeWatch extends Command {
|
|
8
|
-
get options() {
|
|
9
|
-
return {
|
|
10
|
-
cmd: 'lowcode',
|
|
11
|
-
childCmd: 'watch',
|
|
12
|
-
options: [
|
|
13
|
-
{
|
|
14
|
-
flags: '--verbose',
|
|
15
|
-
desc: '是否打印详细日志'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
flags: '--wx-devtool-path <wxDevtoolPath>',
|
|
19
|
-
desc: '微信开发者工具的安装路径'
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
desc: '开启微搭低代码的本地构建模式',
|
|
23
|
-
requiredEnvId: false
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@InjectParams()
|
|
28
|
-
async execute(@CmdContext() ctx, @ArgsOptions() options) {
|
|
29
|
-
await watchApp({
|
|
30
|
-
watchPort: 8288,
|
|
31
|
-
wxDevtoolPath: options?.wxDevtoolPath
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata'
|
|
2
|
-
import { registerCommands } from './commands/common'
|
|
3
|
-
import './commands'
|
|
4
|
-
|
|
5
|
-
export { smartDeploy } from './commands'
|
|
6
|
-
|
|
7
|
-
registerCommands()
|
|
8
|
-
|
|
9
|
-
// HACK: 部分依赖使用了 globalThis,会在 Node12 以下的版本报错
|
|
10
|
-
if (typeof globalThis === undefined) {
|
|
11
|
-
// eslint-disable-next-line no-undef
|
|
12
|
-
;(globalThis as any) = global
|
|
13
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata'
|
|
2
|
-
import { registerCommands } from './commands/common'
|
|
3
|
-
import './commands'
|
|
4
|
-
|
|
5
|
-
export { smartDeploy } from './commands'
|
|
6
|
-
|
|
7
|
-
registerCommands()
|
|
8
|
-
|
|
9
|
-
// HACK: 部分依赖使用了 globalThis,会在 Node12 以下的版本报错
|
|
10
|
-
if (typeof globalThis === undefined) {
|
|
11
|
-
// eslint-disable-next-line no-undef
|
|
12
|
-
;(globalThis as any) = global
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
console.log("daniel tcb")
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import 'reflect-metadata'
|
|
2
|
-
import { registerCommands } from './commands/common'
|
|
3
|
-
import './commands'
|
|
4
|
-
|
|
5
|
-
export { smartDeploy } from './commands'
|
|
6
|
-
|
|
7
|
-
registerCommands()
|
|
8
|
-
|
|
9
|
-
// HACK: 部分依赖使用了 globalThis,会在 Node12 以下的版本报错
|
|
10
|
-
if (typeof globalThis === undefined) {
|
|
11
|
-
// eslint-disable-next-line no-undef
|
|
12
|
-
;(globalThis as any) = global
|
|
13
|
-
}
|