{"id":31125057,"url":"https://github.com/devisjs/devis-mongo-client","last_synced_at":"2026-05-14T23:03:55.175Z","repository":{"id":57212057,"uuid":"110113067","full_name":"Devisjs/devis-mongo-client","owner":"Devisjs","description":"a mongoDB plugin for Devis","archived":false,"fork":false,"pushed_at":"2022-12-06T17:07:15.000Z","size":30,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-14T09:57:50.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Devisjs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-09T12:33:04.000Z","updated_at":"2017-11-25T21:24:17.000Z","dependencies_parsed_at":"2023-01-24T10:15:41.504Z","dependency_job_id":null,"html_url":"https://github.com/Devisjs/devis-mongo-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Devisjs/devis-mongo-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fdevis-mongo-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fdevis-mongo-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fdevis-mongo-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fdevis-mongo-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devisjs","download_url":"https://codeload.github.com/Devisjs/devis-mongo-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devisjs%2Fdevis-mongo-client/sbom","scorecard":{"id":40032,"data":{"date":"2025-08-11","repo":{"name":"github.com/Devisjs/devis-mongo-client","commit":"8828fe1caad32a491d83d68ffbb1d54cba3a6b68"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-8462-q7x7-g2x4","Warn: Project is vulnerable to: GHSA-4jwp-vfvf-657p","Warn: Project is vulnerable to: GHSA-v8w9-2789-6hhr","Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2","Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mh5c-679w-hh4r","Warn: Project is vulnerable to: GHSA-57cf-349j-352g","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T21:16:46.780Z","repository_id":57212057,"created_at":"2025-08-14T21:16:46.781Z","updated_at":"2025-08-14T21:16:46.781Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275658802,"owners_count":25504780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-17T20:42:41.949Z","updated_at":"2025-09-17T20:42:44.524Z","avatar_url":"https://github.com/Devisjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Devis mongo client\n \u003cimg  src=\"https://avatars3.githubusercontent.com/u/21971184?v=4\u0026amp;s=200\" href=\"http://devisjs.surge.sh\" width=\"250\" /\u003e\n\n\u003eA data storage plugin for Devisjs\n\nThis module supports the majority of necessary features for using your MongoDB database.\n\n\n## Install\n\nWe should install Devis and the plugin :\n\n```bash\n$ npm install --save devis\n$ npm install --save devis-mongo-client\n```\n\n## Supported functions \n\n* Connect to the database :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"connect\"},{url:mongodb_url},callback);\n    ```\n    * Example :\n     ```javascript\n    .call({\n\t\trole: \"mongodb\",\n\t\taction: \"connect\"\n        }, { url: \"mongodb://localhost:27017/foo\" },callback);\n    ``` \n    \n* Create a collection : \n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"createCollection\"},{collection:collection},callback);\n    ```\n* Drop a collection : \n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"dropCollection\"},{collection:collection},callback);\n    ``` \n    \n* Find data :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"find\"},{collection:collection, type:type, query: query, options: options},callback);\n    ```\n    *type* : one or many (default : many);\n   \n    * Examples :  \n        * Example 1 : \n        ```javascript\n        //close is true by default, but if you don't wanan close the connection you should give false as argument \n        .call({role:\"mongodb\",action:\"find\"},{collection:\"foo\", type : \"one\", params:{\"Acronym\" : \"L\"},close:false},callback);\n        ``` \n        * Example 2 : \n        ```javascript\n        call({ role: \"mongodb\", action: \"find\" }, { type: \"many\", collection: \"foo\",query:{Name:\"3\"}, options: { fields: { \"Acronym\": 0, _id: 0 } } },callback);\n        ```\n* Indexes :\n    * Create Index : \n        * Syntax :\n        ```javascript\n        .call({role:\"mongodb\", action:\"index\"},{collection:collection, type:type, indexFields: indexFields, params: params},callback);\n        ```\n        *type* : ensureIndex or createIndex.\n    * check index if exist : \n        * Syntax :\n        ```javascript\n        .call({role:\"mongodb\", action:\"index\"},{collection:collection, type:\"ifExist\", index: index},callback);\n        ```\n    * get indexes of a given collection : \n        * Syntax : \n        ```javascript\n        .call({role:\"mongodb\", action:\"index\"},{collection:collection, type:\"getAllIndexes\"},callback);\n        ```\n    * Example :\n    ```javascript\n    .call({role:\"mongodb\",action:\"index\"},{collection:\"foo\", type:\"ifExist\",index:[\"_id_\",\"Acronym_1\"],callback);\n    ```\n* Insert data :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"insert\"},{collection:collection, type:type, data: data, params: params},callback);\n    ```\n    *type* : one or many.\n    * Example :\n    ```javascript\n    let data = [\n        {Value: \"1\",Name: \"foo\", Acronym:\"foo1\"}, \n        {Value: \"2\",Name: \"bar\", Acronym:\"bar1\"}];\n    .call({ role: \"mongodb\", action: \"insert\" },{ type: \"many\",collection: \"foo\", data: data },callback);\n    ```\n* Delete data :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"delete\"},{collection:collection, type:type, query: query},callback);\n    ```\n    *type* : one or many.\n    * Example :\n    ```javascript\n    .call({role:\"mongodb\",action:\"delete\"},{type:\"deleteOne\", collection:\"foo\",params:{Value: \"1\"}},,callback);\n    ```\n* Update data :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"update\"},{collection:collection, type:type, query: query, data: data},callback);\n    ```\n    *type* : one or many.\n    * Example :\n    ```javascript\n    let queryOr={\n\t    $or:[{Value: \"1\"},{Value:\"2\"}]};\n    let newData={$set: { Name: \"foobar\"}};\n    .call({role:\"mongodb\", action:\"update\"},{ type: \"many\", collection: \"foo\",query:queryOr, data:newData},callback);\n    ```\n* Aggregate functions :\n    * Syntax :\n    ```javascript\n    .call({role:\"mongodb\", action:\"aggregate\"},{collection:collection, aggQuery: aggQuery},callback);\n    ```\n    * Example : \n    ```javascript\n    let aggQuery = [\n            { \"$match\": { \"date\": \"29.05.2017\"} },\n            {\n                \"$group\": {\n                    \"_id\": { \"Key\": \"$Key\", \"date\": \"$date\"},\n                    \"count\": { \"$sum\": 1 }\n            }\n        }];\n    .call({ role: \"mongodb\", action: \"aggregate\" }, { collection: \"Production\",aggQuery:aggQuery },callback);\n    ```\n## Example : \n```javascript\n//Initialize a Devis instance\nlet devisMongoClient = require(\"devis\")\n\n//use the devis-mongo-client plugin\n        .plug(\"devis-mongo-client\")\nlet promise = new Promise((resolve, reject) =\u003e {\n        //connect to the database\n    devis.call({\n        role: \"mongodb\",\n        action: \"connect\"\n    }, {\n        url: \"mongodb://localhost:27017/prisma\"\n    }, (err, db) =\u003e {\n        if (err) reject(err);\n        else {\n            resolve(\"success\");\n        }\n    });\n\n});\npromise.then((res) =\u003e {\n\n\t//call find function of the plugin by giving the collection and search conditions \n\tdevisMongoClient.call({\n\t\trole: \"mongodb\",\n\t\taction: \"find\"\n\t    }, {\n\t\tcollection: \"foo\",\n\t\tparams: {\n\t\t    \"Acronym\": \"L\"\n\t\t}\n\t    }, (err, result) =\u003e {\n\t\tif (err) {\n\t\t    console.log(err);\n\t\t} else {\n\t\t    console.log(result);\n\t\t}\n\t}\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevisjs%2Fdevis-mongo-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevisjs%2Fdevis-mongo-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevisjs%2Fdevis-mongo-client/lists"}