{"id":15178572,"url":"https://github.com/jbmusso/gremlin-loader","last_synced_at":"2026-02-11T23:03:44.377Z","repository":{"id":57253999,"uuid":"54889519","full_name":"jbmusso/gremlin-loader","owner":"jbmusso","description":"An experimental Gremlin (Groovy) loader for webpack","archived":false,"fork":false,"pushed_at":"2016-04-04T14:50:47.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-10T16:25:39.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jbmusso.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":"2016-03-28T12:05:00.000Z","updated_at":"2018-04-08T07:39:04.000Z","dependencies_parsed_at":"2022-08-31T09:01:52.645Z","dependency_job_id":null,"html_url":"https://github.com/jbmusso/gremlin-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbmusso/gremlin-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbmusso%2Fgremlin-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbmusso%2Fgremlin-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbmusso%2Fgremlin-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbmusso%2Fgremlin-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbmusso","download_url":"https://codeload.github.com/jbmusso/gremlin-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbmusso%2Fgremlin-loader/sbom","scorecard":{"id":510357,"data":{"date":"2025-08-11","repo":{"name":"github.com/jbmusso/gremlin-loader","commit":"59c4fad1fd289f4642e2c908face1427d8157330"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/5 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":"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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"}}]},"last_synced_at":"2025-08-20T00:22:53.201Z","repository_id":57253999,"created_at":"2025-08-20T00:22:53.201Z","updated_at":"2025-08-20T00:22:53.201Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29349259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-09-27T15:05:33.348Z","updated_at":"2026-02-11T23:03:44.353Z","avatar_url":"https://github.com/jbmusso.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gremlin-loader\n\nA Gremlin (Groovy) webpack loader.\n\n`gremlin-loader` allows you to define Gremlin queries in Groovy files and load them within your Node.js environment as JavaScript functions.\nThink about Webpack [css-loader](https://github.com/webpack/css-loader) in module mode, but for loading Groovy files instead of CSS flles.\n\nThe loader returns an `Object` where `keys` are names of all the functions found in the parsed file and `values` are JavaScript functions that, when called, return an `Object` with two properties:\n* `bindings`: an `Object` where `keys` are argument names of the function as defined in the Groovy file and `values` are all values passed when calling the JavaScript function\n* `gremlin`: the full string representation of the function as defined in the Groovy file, with an extra line appended responsible for immediately calling that Groovy function with the above `bindings` when sent to Gremlin Server for execution\n\nThis loader is meant to be used server-side with [babel-plugin-webpack-loaders](https://github.com/istarkov/babel-plugin-webpack-loaders).\n\nThis is highly experimental and shouldn't be used in production.\n\n## Installation\n\n```shell\nnpm install gremlin-loader babel-plugin-webpack-loaders --save\n```\n\nTo make `babel-plugin-webpack-loaders` work, your `.babelrc` file should resemble the following:\n\n```json\n{\n  \"presets\": [\"es2015\"],\n  \"plugins\": [\n    [\"babel-plugin-webpack-loaders\", {\n      \"config\": \"./webpack.config.babel.js\",\n      \"verbose\": false,\n    }]\n  ]\n}\n```\n\nAnd the corresponding `webpack.config.babel.js` file:\n\n```javascript\nconst config = {\n  output: {\n    libraryTarget: 'commonjs2',\n  },\n  resolve: {\n    extensions: ['', '.js', '.gremlin']\n  },\n  module: {\n    loaders: [\n      {\n        test: /\\.gremlin$/,\n        loader: 'gremlin'\n      }\n    ]\n  }\n};\n\nexport default config;\n```\n\n### Usage\n\nOnce configured, you can do the following:\n\nqueries.gremlin file:\n```groovy\ndef fetchAllByName = { userName -\u003e\n  g.V().has('name', userName)\n}\n```\n\napplication.js file:\n```javascript\nimport { fetchAllByName } from './queries';\n\nconst byNameQuery = fetchAllByName('Alice');\n// byNameQuery is an object with 'gremlin' and 'bindings' keys:\n// {\n//   gremlin: 'def fetchAllByName = { userName -\u003e  g.V().has(\\'name\\', userName)}\\n;fetchAllByName(userName)',\n//   bindings: { userName: 'Alice' }\n// }\n\n```\n\nWhen used in conjunction with [gremlin-javascript](https://github.com/jbmusso/gremlin-javascript):\n\n```javascript\nimport { createClient } from 'gremlin';\n\nconst client = createClient();\n\nconst query = fetchAllByName('Alice');\nclient.execute(query, (err, results) =\u003e {\n  // handle err or results\n});\n```\n\n### Benefits\n- full reusability of your Gremlin queries: anything you write in `.gremlin` (or `.groovy`) files is valid Gremlin-Groovy and can be copy/pasted in the Gremlin console or used in any other application\n- automatic parameter bindings with explicit names by extracting the function signature, for better Gremlin server performance (no query recompilation) and security (no injection)\n- you do not have to write/escape fat strings of Gremlin in your application, and you also get proper syntax highlighting for free in your IDE (because Gremlin is just Groovy)\n- automatic reloading of your Node.js application on `.gremlin` file change\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbmusso%2Fgremlin-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbmusso%2Fgremlin-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbmusso%2Fgremlin-loader/lists"}