Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit e2b1916

Browse files
committed
[refactor] refactor config resolver & optimize command tips
1 parent ab6979e commit e2b1916

73 files changed

Lines changed: 1459 additions & 783 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ addons/
44
lib/
55
types/
66
node_modules
7-
bin/
7+
bin/
8+
functions/

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
docs
22
coverage
3-
test
3+
test
4+
cloudbase/
5+
cloudbaserc.js
6+
scripts

cloudbase/functions/app/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const tcb = require('@cloudbase/node-sdk')
2+
3+
const app = tcb.init({
4+
env: 'tcli'
5+
})
6+
7+
exports.main = async event => {
8+
const db = app.database()
9+
const collection = db.collection('cli-config')
10+
return collection.add({
11+
name: 'test'
12+
})
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const tcb = require('@cloudbase/node-sdk')
2+
3+
const app = tcb.init({
4+
env: 'tcli'
5+
})
6+
7+
exports.main = async event => {
8+
const db = app.database()
9+
const collection = db.collection('cli-config')
10+
return collection.add({
11+
name: 'test'
12+
})
13+
}

0 commit comments

Comments
 (0)