{"id":18322095,"url":"https://github.com/aiveraiva/cdn","last_synced_at":"2026-04-14T04:31:50.809Z","repository":{"id":184651859,"uuid":"672258423","full_name":"AiverAiva/cdn","owner":"AiverAiva","description":"File tree system made big brainly 🤯. Using Github Actions for updating.","archived":false,"fork":false,"pushed_at":"2025-11-24T22:06:25.000Z","size":28517,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-28T08:41:44.642Z","etag":null,"topics":["actions","file-tree","filesystem","github"],"latest_commit_sha":null,"homepage":"https://cdn.weikuwu.me/","language":"JavaScript","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/AiverAiva.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":"2023-07-29T13:07:58.000Z","updated_at":"2025-11-24T22:06:09.000Z","dependencies_parsed_at":"2023-07-29T14:35:45.246Z","dependency_job_id":"9f877669-2cc9-4fa8-8cb0-5394dce95e10","html_url":"https://github.com/AiverAiva/cdn","commit_stats":null,"previous_names":["aiveraiva/cdn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AiverAiva/cdn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AiverAiva%2Fcdn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AiverAiva%2Fcdn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AiverAiva%2Fcdn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AiverAiva%2Fcdn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AiverAiva","download_url":"https://codeload.github.com/AiverAiva/cdn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AiverAiva%2Fcdn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: 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":["actions","file-tree","filesystem","github"],"created_at":"2024-11-05T18:23:10.736Z","updated_at":"2026-04-14T04:31:50.792Z","avatar_url":"https://github.com/AiverAiva.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cdn\n\nA file tree system made with very easy mechanic. Using Github Actions for updating.\nI made this due to the scarcity of these kind of resources we are able to find on the internet, there are prob some exist libraries that I didnt found.\nBut anyways it took me a few minutes to make this simple script, which fits all my requirements I need and it is pretty need\n\n# Explaination\n\nThis function basically creates the required html code for the website to work\nIt recursively searchs files in `src/`\nand making its path for the later using of turning the paths into code\nThats what this function does.\n\n```js\nfunction generateFileTree(dir) {\n  const files = fs.readdirSync(dir);\n\n  let fileTree = '\u003cul\u003e';\n  files.forEach((file) =\u003e {\n    const fullPath = path.join(dir, file);\n    const relativePath = path.relative(rootDir, fullPath);\n    const isDirectory = fs.statSync(fullPath).isDirectory();\n\n    if (isDirectory) {\n      fileTree += `\u003cli\u003e\u003cdetails\u003e\u003csummary\u003e\u003ci class=\"fas fa-folder\"\u003e\u003c/i\u003e ${file}\u003c/summary\u003e`;\n      fileTree += generateFileTree(fullPath);\n      fileTree += '\u003c/details\u003e\u003c/li\u003e';\n    } else {\n      fileTree += `\u003cli\u003e\u003ca href=\"${rootDir + relativePath}\"\u003e\u003ci class=\"fas fa-file\"\u003e\u003c/i\u003e ${file}\u003c/a\u003e\u003c/li\u003e`;\n    }\n  });\n  fileTree += '\u003c/ul\u003e';\n  return fileTree;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiveraiva%2Fcdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiveraiva%2Fcdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiveraiva%2Fcdn/lists"}