{"id":24623595,"url":"https://github.com/yukaii/amdex","last_synced_at":"2026-05-06T08:36:49.509Z","repository":{"id":272229945,"uuid":"915901946","full_name":"Yukaii/amdex","owner":"Yukaii","description":"A command-line tool to extract and restore AMD-style JavaScript modules from bundled files.","archived":false,"fork":false,"pushed_at":"2025-01-25T13:11:45.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T21:45:06.391Z","etag":null,"topics":["acorn","amd-module","debundler"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Yukaii.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-13T04:13:07.000Z","updated_at":"2025-01-25T13:11:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc476b39-e89b-4af5-b51b-e6c690d1f522","html_url":"https://github.com/Yukaii/amdex","commit_stats":null,"previous_names":["yukaii/amdex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yukaii/amdex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Famdex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Famdex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Famdex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Famdex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukaii","download_url":"https://codeload.github.com/Yukaii/amdex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Famdex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32685047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["acorn","amd-module","debundler"],"created_at":"2025-01-25T03:57:42.508Z","updated_at":"2026-05-06T08:36:49.504Z","avatar_url":"https://github.com/Yukaii.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amdex\n\nA command-line tool to extract and restore AMD-style JavaScript modules from bundled files.\n\n## Installation\n\n```bash\nnpm install -g amdex\n# or\npnpm add -g amdex\n# or\nyarn global add amdex\n```\n\n## Usage\n\n### Restore AMD Modules\n\nExtract and restore individual AMD modules from a bundled file:\n\n```bash\namdex restore -i bundle.js -o ./output\n```\n\nOptions:\n- `-i, --input \u003cpath\u003e`: Input bundle file path (required)\n- `-o, --output \u003cpath\u003e`: Output directory for extracted modules (default: \"./restored\")\n- `--include \u003cpattern\u003e`: Include only modules matching this pattern (regex)\n- `--exclude \u003cpattern\u003e`: Exclude modules matching this pattern (regex)\n\n### List Modules\n\nList all AMD modules found in a bundle:\n\n```bash\namdex list -i bundle.js\n```\n\nOptions:\n- `-i, --input \u003cpath\u003e`: Input bundle file path (required)\n\n## Example\n\nGiven a bundled file with AMD modules:\n\n```javascript\ndefine('module/a', ['jquery', 'underscore'], function($, _) {\n    // module code\n});\n\ndefine('module/b', ['module/a'], function(moduleA) {\n    // module code\n});\n```\n\nRunning:\n```bash\namdex restore -i bundle.js -o ./src --include \"module/.*\"\n```\n\nWill create:\n```\nsrc/\n  module/\n    a.js\n    b.js\n```\n\nEach file will contain its original AMD module definition with dependencies and implementation code.\n\n## Features\n\n- Extracts AMD modules while preserving:\n  - Module IDs\n  - Dependencies\n  - Implementation code\n  - Original formatting (mostly)\n- Supports filtering modules by include/exclude patterns\n- Maintains directory structure based on module IDs\n- Handles reserved keywords in code\n- TypeScript support\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/amdex.git\n\n# Install dependencies\ncd amdex\nnpm install\n\n# Build\nnpm run build\n\n# Run locally\n./dist/cli.js\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukaii%2Famdex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukaii%2Famdex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukaii%2Famdex/lists"}