Skip to content

Convert create_build_list function from Python to TypeScript#2

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/convert-create-build-list-to-typescript
Draft

Convert create_build_list function from Python to TypeScript#2
Copilot wants to merge 4 commits into
mainfrom
copilot/convert-create-build-list-to-typescript

Conversation

Copilot AI commented Nov 23, 2025

Copy link
Copy Markdown

Converts the create_build_list function from Python to TypeScript with all required dependencies.

Implementation

Core conversion (10 modules):

  • main.pysrc/main.ts - Entry point with createBuildList function
  • module/files.pysrc/module/files.ts - File I/O, hashing (MD5), source change detection
  • module/properties.pysrc/module/properties.ts - TOML/JSON config management
  • module/dependency.pysrc/module/dependency.ts - Dependency tree resolution, level-based build ordering
  • module/build_cmds.pysrc/module/build_cmds.ts - Command generation, parameter substitution
  • module/results.pysrc/module/results.ts - Markdown result document generation
  • module/dict_tools.pysrc/module/dict_tools.ts - Deep merge utilities
  • module/toml_tools.pysrc/module/toml_tools.ts - Config tree navigation
  • module/app_config_tools.pysrc/module/app_config_tools.ts - Build step resolution (simplified)
  • module/obi_constants.pysrc/module/obi_constants.ts - Constants

Code quality improvements:

  • Replaced JSON.parse(JSON.stringify()) with proper deep clone utility to prevent prototype pollution
  • Added BufferEncoding validation for file operations
  • Type-safe interfaces for all data structures

Usage

npm run build
node dist/main.js --set-path /path/to/project [--source file.rpgle]

Or programmatically:

import { createBuildList } from './dist/main';
createBuildList({ setPath: '/path/to/project' });

Dependencies

  • @iarna/toml (2.2.5) - TOML parsing
  • typescript (5.9.3), @types/node (24.10.1) - dev dependencies
  • No vulnerabilities, CodeQL clean

Limitations

  • app_config_tools.ts has simplified extended source processing (regex/shell/script execution not fully implemented)
  • results.ts only includes create_result_doc (output extraction functions not needed)
Original prompt

in main.py there is a function create_build_list
can you convert it to typescript including all other sources which are needed for this function

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Nov 23, 2025
Copilot AI and others added 3 commits November 23, 2025 06:22
Co-authored-by: andreas-prouza <65070910+andreas-prouza@users.noreply.github.com>
Co-authored-by: andreas-prouza <65070910+andreas-prouza@users.noreply.github.com>
Co-authored-by: andreas-prouza <65070910+andreas-prouza@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert create_build_list function to TypeScript Convert create_build_list function from Python to TypeScript Nov 23, 2025
Copilot AI requested a review from andreas-prouza November 23, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants