{"id":19658534,"url":"https://github.com/cdaringe/deno-emit-esm-server","last_synced_at":"2025-04-28T20:31:21.510Z","repository":{"id":43066868,"uuid":"472148711","full_name":"cdaringe/deno-emit-esm-server","owner":"cdaringe","description":"Emits ESM from TypeScript URLs via Deno.emit(...)","archived":false,"fork":false,"pushed_at":"2023-10-24T23:16:59.000Z","size":32,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T16:02:47.243Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdaringe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"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":"2022-03-21T01:30:25.000Z","updated_at":"2024-06-14T09:29:49.000Z","dependencies_parsed_at":"2024-11-11T15:40:01.627Z","dependency_job_id":"b7eec91c-371f-4077-a19e-b95615b2581a","html_url":"https://github.com/cdaringe/deno-emit-esm-server","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.03125,"last_synced_commit":"145f6015e3d509f0a238a8c96f548add67d2db03"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fdeno-emit-esm-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fdeno-emit-esm-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fdeno-emit-esm-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fdeno-emit-esm-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/deno-emit-esm-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251383682,"owners_count":21580921,"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-11-11T15:38:01.584Z","updated_at":"2025-04-28T20:31:21.139Z","avatar_url":"https://github.com/cdaringe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emit_esm_server\n\nServe ECMAScript modules given a `deno` GitHub module URL.\n\nAllows an ESM runtime (e.g. a browser!) to import `deno` modules, where deno\nmodules are otherwise not ready to load in the browser immediately.\n\n[![main](https://github.com/cdaringe/deno-emit-esm-server/actions/workflows/main.yml/badge.svg)](https://github.com/cdaringe/deno-emit-esm-server/actions/workflows/main.yml)\n\n**input**:\n\nOne of:\n\n- denoland URL: `HTTP GET \u003corigin\u003e/denoland/x/:pkg[@:version]/path/to/mod.ts`\n- github deno URL:\n  `HTTP GET \u003corigin\u003e/github/:owner/:repo/:branch/path/to/mod.ts`\n\nWhen a module includes a URL to an external module (https://foo.org/bar/mod.ts),\nit is rewritten to `\u003cESM_EMIT_SERVER_ORIGIN\u003e?moduleUrl=\u003curl\u003e`\n\n**output**: ESM source code\n\n## Demo\n\n[Import typescript modules directly into the browser](https://observablehq.com/@cdaringe/import-deno-modules-into-the-browser-with-esm_emit_server)\n\n## configuration\n\n- `EMIT_SERVER_ORIGIN` - the origin of where your server is hosted. used to\n  rewrite HTTP imports back to your server\n\n## warning\n\nNon-production ready :)\n\n## Example\n\n- (optional) build the server:\n  `docker build --platform linux/arm64/v8 --progress=plain -t cdaringe/deno_emit_server .`\n- run the server:\n  `docker run --platform linux/arm64/v8 --rm -p 7777:7777 cdaringe/deno_emit_server`\n- request a TypeScript module as an ECMAScript Module:\n  `curl localhost:7777/github/denoland/deno_std/main/log/logger.ts`\n\n```js\n// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.\nimport { getLevelByName, getLevelName, LogLevels } from \"./levels.ts\";\nexport class LogRecord {\n    msg;\n    #args;\n    #datetime;\n    level;\n    levelName;\n    loggerName;\n// ...snip snip...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fdeno-emit-esm-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Fdeno-emit-esm-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fdeno-emit-esm-server/lists"}