Skip to content

Commit

Permalink
chore: update packages version
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Dec 14, 2023
1 parent 374b00b commit b57dfe7
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 164 deletions.
217 changes: 164 additions & 53 deletions packages/cloud-sdk/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/cloud-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lafjs/cloud",
"version": "1.0.0-beta.13-storage-pr4",
"version": "1.0.0-beta.13-storage-pr6",
"description": "The cloud sdk for laf cloud function",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -33,7 +33,7 @@
"@types/express": "^4.17.15",
"@types/ws": "^8.5.3",
"axios": "^1.2.1",
"database-proxy": "^1.0.0-beta.12",
"database-proxy": "^1.0.0-beta.12-pr0",
"mongodb": "^5.9.2",
"ws": "^8.11.0"
},
Expand Down
8 changes: 6 additions & 2 deletions packages/database-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
```js
const app = require('express')()
const { Proxy, MongoAccessor, Policy } = require('database-proxy')
const { MongoClient } = require('mongodb')

app.use(express.json())

Expand All @@ -31,9 +32,12 @@ const rules = {
}
}

const client = new MongoClient('mongodb://localhost:27017')
client.connect()

// create an accessor
const accessor = new MongoAccessor('mydb', 'mongodb://localhost:27017', { directConnection: true })
accessor.init()
const accessor = new MongoAccessor(client)


// create a policy
const policy = new Policy(accessor)
Expand Down
57 changes: 39 additions & 18 deletions packages/database-proxy/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/database-proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "database-proxy",
"version": "1.0.0-beta.12",
"version": "1.0.0-beta.12-pr0",
"description": "通过一套「访问控制规则」配置数据库访问,用一个 API 替代服务端 90% 的数据访问 APIs。",
"main": "./dist",
"scripts": {
Expand Down

0 comments on commit b57dfe7

Please sign in to comment.