{"id":15910490,"url":"https://github.com/unlight/import-adjutor","last_synced_at":"2025-07-07T12:05:17.246Z","repository":{"id":38174041,"uuid":"267709788","full_name":"unlight/import-adjutor","owner":"unlight","description":"Parse ecmascript modules and collect names of export vars, functions, etc.","archived":false,"fork":false,"pushed_at":"2023-03-05T14:28:57.000Z","size":1725,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T03:06:14.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/unlight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-05-28T22:27:51.000Z","updated_at":"2023-09-14T18:01:57.000Z","dependencies_parsed_at":"2024-10-06T15:07:04.813Z","dependency_job_id":"da8ad32e-f735-4aa1-89f9-f3f2a8aed63d","html_url":"https://github.com/unlight/import-adjutor","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/unlight/import-adjutor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fimport-adjutor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fimport-adjutor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fimport-adjutor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fimport-adjutor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/import-adjutor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fimport-adjutor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264075398,"owners_count":23553505,"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","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-10-06T15:06:53.191Z","updated_at":"2025-07-07T12:05:17.209Z","avatar_url":"https://github.com/unlight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# import-adjutor\n\nParse ecmascript modules and collect names of export vars, functions, etc.  \nEx- [esm-exports](https://github.com/unlight/esm-exports)\n\n## Usage\n\n```sh\necho json | import-adjutor\n```\n\nWhere `json` is (JSON.stringified object):\n\n```js\n{\n    command: string;\n    args: object;\n}\n```\n\nOutput structure (JSON.stringified):\n\n## API\n\n#### insertImport\n\n```\ncommand: 'insertImport';\nargs:\n    declaration: Declaration;\n    sourceFileContent: string;\n    manipulationSettings?: Partial\u003cManipulationSettings\u003e \u0026 { noSemicolon?: boolean };\n    sorted: boolean = false;\ntype Declaration = {\n    name: string;\n    specifier: string;\n    isDefault?: boolean;\n};\ninterface ManipulationSettings extends SupportedFormatCodeSettingsOnly {\n    /** Indentation text */\n    indentationText: IndentationText;\n    /** New line kind */\n    newLineKind: NewLineKind;\n    /** Quote type used for string literals. */\n    quoteKind: QuoteKind;\n    /**\n     * Whether to enable renaming shorthand property assignments, binding elements,\n     * and import \u0026 export specifiers without changing behaviour.\n     * @remarks Defaults to true.\n     * This setting is only available when using TypeScript 3.4+.\n     */\n    usePrefixAndSuffixTextForRename: boolean;\n    /** Whether to use trailing commas when inserting or removing nodes. */\n    useTrailingCommas: boolean;\n}\n```\n\nOutput:\n\n```\nstring\n```\n\n#### exportsNodeModules\n\n```\ncommand: 'exportsNodeModules';\nargs:\n    directory: string;\n    project?: Project;\n    folderExcludePatterns?: string[];\n    fileExcludePatterns?: string[];\n```\n\nOutput:\n\n```\nArray \u003c{\n    name: string;\n    module?: string;\n    filepath?: string;\n    isDefault?: boolean;\n}\u003e,\n```\n\n#### exportsFromDirectory\n\n```\ncommand: 'exportsFromDirectory';\nargs:\n    directory: string;\n    project?: Project;\n    folderExcludePatterns?: string[];\n    fileExcludePatterns?: string[];\n```\n\nIf `directory` will contains `tsconfig.json` or `jsonconfig.json` then source files\nwill be added according to `include`, `exclude` patterns.\n`folderExcludePatterns`, `fileExcludePatterns` will be ignored.\n\nOutput:\n\n```\nArray \u003c{\n    name: string;\n    module?: string;\n    filepath?: string;\n    isDefault?: boolean;\n}\u003e,\n```\n\n## Resources\n\n-   https://ts-ast-viewer.com/\n-   https://stackoverflow.com/questions/56999775/how-to-get-exported-members-using-typescript-compiler-api\n-   https://github.com/GooGee/Code-Builder/blob/master/src/renderer/model/Checker.ts\n-   https://stackoverflow.com/questions/58885433/typescript-compiler-how-to-get-an-exported-symbol-by-name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fimport-adjutor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Fimport-adjutor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fimport-adjutor/lists"}