{"id":29107672,"url":"https://github.com/testingrequired/reqlang-expr-tspl","last_synced_at":"2025-08-20T17:08:48.012Z","repository":{"id":300508072,"uuid":"1006344626","full_name":"testingrequired/reqlang-expr-tspl","owner":"testingrequired","description":"A toy transpiler to convert reqlang-expr expressions to Typescript.","archived":false,"fork":false,"pushed_at":"2025-06-22T04:55:01.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T05:20:05.650Z","etag":null,"topics":["transpiler"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/testingrequired.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-06-22T03:49:34.000Z","updated_at":"2025-06-22T04:55:03.000Z","dependencies_parsed_at":"2025-06-22T05:31:43.009Z","dependency_job_id":null,"html_url":"https://github.com/testingrequired/reqlang-expr-tspl","commit_stats":null,"previous_names":["testingrequired/reqlang-expr-tspl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/testingrequired/reqlang-expr-tspl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingrequired%2Freqlang-expr-tspl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingrequired%2Freqlang-expr-tspl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingrequired%2Freqlang-expr-tspl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingrequired%2Freqlang-expr-tspl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testingrequired","download_url":"https://codeload.github.com/testingrequired/reqlang-expr-tspl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testingrequired%2Freqlang-expr-tspl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262539101,"owners_count":23325835,"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":["transpiler"],"created_at":"2025-06-29T05:07:26.533Z","updated_at":"2025-06-29T05:07:26.989Z","avatar_url":"https://github.com/testingrequired.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reqlang-expr-tspl\n\nA toy transpiler to convert [reqlang-expr](https://github.com/testingrequired/reqlang-expr) expressions to Typescript.\n\nThis is not a serious project.\n\n## Example\n\n```\n(id `foo`)\n```\n\ntranspiles to\n\n```typescript\n// This file was generated by reqlang-expr-tspl\nimport * as ReqlangExpr from \"@reqlang-expr-tspl/runtime\";\n\nconst expression: ReqlangExpr.Expression = (ctx) =\u003e {\n  return ctx.builtins.id(\"foo\");\n};\n\nconst args = ReqlangExpr.getArgs();\n\nconst env = new ReqlangExpr.Env(\n  args.vars,\n  args.prompts,\n  args.secrets,\n  args.client\n);\n\nconst context = {\n  env,\n  builtins: ReqlangExpr.builtinFns,\n};\n\nconst value = expression(context);\n\nconsole.log(JSON.stringify(value));\n```\n\nSee: [@reqlang-expr-tspl/runtime](./src/index.ts)\n\n## Running Transpiled Files\n\n```bash\nreqlang-expr-tspl spec/greeting_name.expr \u003e spec/greeting_name.expr.ts\n\nnpx tsx spec/greeting_name.expr.ts \\\n  --var 'greeting=Hello' \\\n  --prompt 'name=World'\n\n# \"Hello World\"\n```\n\n## Development\n\n- [Rust](https://www.rust-lang.org/)\n- [Node](https://nodejs.org/)\n- [just](https://just.systems/)\n\n## Running CLI\n\nThe `reqlang-expr-tspl.sh` script helps run the latest development version of the CLI.\n\n```bash\n./reqlang-expr-tspl.sh spec/greeting_name.expr \u003e spec/greeting_name.expr.ts\n\nnpx tsx spec/greeting_name.expr.ts \\\n  --var 'greeting=Hello' \\\n  --prompt 'name=World'\n\n# \"Hello World\"\n```\n\n### Tests\n\n[![Verify](https://github.com/testingrequired/reqlang-expr-tspl/actions/workflows/verify.yml/badge.svg)](https://github.com/testingrequired/reqlang-expr-tspl/actions/workflows/verify.yml)\n\nThe [spec](./spec/) directory has several input `*.expr` with corrosponding `*.expr.ts` expected generated code.\n\n- `cargo test` Transpiles the `*.expr` files and checks the `*.expr.ts` files for equality.\n- `npm run test` Runs the `*.expr.ts` files using `npx tsx` and compares results against `*.expr.ts.interpreted` files\n- `npm run check` Typechecks the `*.expr.ts` files\n- `just test` Runs all tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingrequired%2Freqlang-expr-tspl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestingrequired%2Freqlang-expr-tspl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestingrequired%2Freqlang-expr-tspl/lists"}