{"id":35186174,"url":"https://github.com/aneilbaboo/app_modules","last_synced_at":"2026-04-21T21:07:22.736Z","repository":{"id":57182653,"uuid":"97879633","full_name":"aneilbaboo/app_modules","owner":"aneilbaboo","description":"Make app subdirectories appear as custom-named modules to require/import","archived":false,"fork":false,"pushed_at":"2017-08-02T19:42:06.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T14:53:36.697Z","etag":null,"topics":["import","nodejs","relative-paths","require"],"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/aneilbaboo.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-07-20T21:27:42.000Z","updated_at":"2017-08-02T19:44:41.000Z","dependencies_parsed_at":"2022-09-12T00:00:26.334Z","dependency_job_id":null,"html_url":"https://github.com/aneilbaboo/app_modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aneilbaboo/app_modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneilbaboo%2Fapp_modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneilbaboo%2Fapp_modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneilbaboo%2Fapp_modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneilbaboo%2Fapp_modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneilbaboo","download_url":"https://codeload.github.com/aneilbaboo/app_modules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneilbaboo%2Fapp_modules/sbom","scorecard":{"id":195548,"data":{"date":"2025-08-11","repo":{"name":"github.com/aneilbaboo/app_modules","commit":"70d8ec8f01869796c03c00e530686d6a21dfaca2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","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-jf85-cpcp-j695","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-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"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-16T21:45:58.460Z","repository_id":57182653,"created_at":"2025-08-16T21:45:58.460Z","updated_at":"2025-08-16T21:45:58.460Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32110196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"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":["import","nodejs","relative-paths","require"],"created_at":"2025-12-29T04:58:35.750Z","updated_at":"2026-04-21T21:07:22.731Z","avatar_url":"https://github.com/aneilbaboo.png","language":"JavaScript","readme":"[![CircleCI](https://circleci.com/gh/aneilbaboo/app_modules.svg?style=shield\u0026circle-token=5aa6e3e9eae97facd7cd6426c0a582fd3674e3bc)](https://circleci.com/gh/aneilbaboo/app_modules)\n\n# app_modules\n\nGet rid of relative import syntax by making app subdirectories appear as modules.\n\nE.g.,\n```javascript\nrequire('app/foo');\n// instead of\nrequire('../../../foo');\n```\n\nWorks seemlessly with transpiled code (see below).\n\n## Install\n```shell\nnpm install app_modules\n```\n\n## Configure\n\nRun code like the following as early as possible in your app:\n\n```javascript\n// before requiring other files...\nvar app_modules = require('app_modules');\n\n// IRL, compute the following paths dynamically:\n\n// initialize the library (this creates an app_modules dir in your project root):\napp_modules.init('/path/to/my/project/');   \n\n// make src/ available as a module named app:\napp_modules.addModule('app', '/path/to/my/project/src/'); // app_modules/app now points to src/\n```\n\n### Example\n\nGiven a Node.js project as follows:\n\n```shell\n- myproject\n  - package.json\n  - src/\n    - main.js # start script\n    - foo/\n      - bar.js\n  - lib/ # transpiled code\n```\n\nInitialize app_modules with dynamically computed paths:\n\n```javascript\n// src/main.js\nvar app_modules = require('app_modules');\nvar path = require('path');\n\napp_modules.init(path.resolve(__dirname, '..'));  // path of project root\napp_modules.addModule('app', __dirname);  // dynamically link app to either src/ or lib/\n\n// ... continue loading\n```\n\nNow you can write:\n```javascript\nvar bar = require('app/foo/bar');\n```\n\nThe `app` module links correctly to `src/` or `lib/` depending on whether you're running the untranspiled `src/main.js` or transpiled `lib/main.js` code.\n\n### Warning\n\nThis library uses an old but unofficial method `_initPaths` defined on the `Modules` class.  \n\n## API\n\n### init\n\nEnsures a directory exists in the project root and adds it to the NODE_PATH.  Directories in this folder will be accessible as modules.\n\n```javascript\ninit(projectRoot, app_modules_dirname)\n// where\n// projectRoot - path to the root dir of your node project\n// app_modules_dirname - defaults to 'app_modules'\n```\n\n### addModule\nSymlinks a directory into your app_modules directory.\n\n```javascript\naddModule(moduleName, sourcePath)\n// where\n// moduleName - name you'd like the sourcePath to be accessible as\n// sourcePath - absolute path to a directory\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneilbaboo%2Fapp_modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneilbaboo%2Fapp_modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneilbaboo%2Fapp_modules/lists"}