gitlab-repo-db
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "gitlab-repo-db", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A database based on gitlab files", | ||
"main": "./lib/index.js", | ||
"license": "MIT", | ||
"author": { | ||
"name": "cyyjs", | ||
"email": "cyy0418@qq.com" | ||
}, | ||
"scripts": { | ||
@@ -12,3 +16,7 @@ "build": "yarn lint && rollup -c", | ||
}, | ||
"homepage": "", | ||
"homepage": "https://github.com/cyyjs/gitlab-repo-db", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:cyyjs/gitlab-repo-db.git" | ||
}, | ||
"types": "./lib/index.d.ts", | ||
@@ -15,0 +23,0 @@ "files": [ |
@@ -1,2 +0,2 @@ | ||
## gitlab-db | ||
## gitlab-repo-db | ||
@@ -6,1 +6,55 @@ 基于Gitlab 仓库文件存储的数据库 | ||
### 安装 | ||
```bash | ||
yarn add gitlab-repo-db | ||
``` | ||
### 使用 | ||
```js | ||
const DB = new GitlabDB({ | ||
url: 'your gitlab api url', | ||
projectID: 'repo project id', | ||
token: 'your gitlab token' | ||
}) | ||
const collection = DB.collection('test') | ||
const query = { | ||
a: 1 | ||
} | ||
// find all | ||
collection.find(query) | ||
// find one | ||
collection.findOne(query) | ||
// insert one | ||
collection.insert({ | ||
b: 1 | ||
}) | ||
// insert multiple | ||
collection.insert([{ | ||
b: 1 | ||
}, { | ||
c: 1 | ||
}]) | ||
// update | ||
const updateData = { | ||
c: 1 | ||
} | ||
const updateOption = { | ||
multi: true, // default: false | ||
upsert: true // default: false | ||
} | ||
collection.update(query, updateData, option) | ||
// remove all | ||
collection.remove(query) | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5812
1
2
60
0