{"id":50230123,"url":"https://github.com/bjmhe/unplugin-jdoss","last_synced_at":"2026-06-02T13:00:32.178Z","repository":{"id":359123570,"uuid":"1244600003","full_name":"bjmhe/unplugin-jdoss","owner":"bjmhe","description":"A build plugin based on unplugin that automatically uploads files to JD OSS after build completion.","archived":false,"fork":false,"pushed_at":"2026-05-23T14:19:37.000Z","size":384,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T18:17:56.611Z","etag":null,"topics":["jd","oss","unplugin"],"latest_commit_sha":null,"homepage":"","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/bjmhe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"liberapay":"bjmhe"}},"created_at":"2026-05-20T12:19:59.000Z","updated_at":"2026-05-23T14:19:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bjmhe/unplugin-jdoss","commit_stats":null,"previous_names":["bjmhe/unplugin-jdoss"],"tags_count":7,"template":false,"template_full_name":"sxzz/unplugin-starter","purl":"pkg:github/bjmhe/unplugin-jdoss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjmhe%2Funplugin-jdoss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjmhe%2Funplugin-jdoss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjmhe%2Funplugin-jdoss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjmhe%2Funplugin-jdoss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjmhe","download_url":"https://codeload.github.com/bjmhe/unplugin-jdoss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjmhe%2Funplugin-jdoss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33822821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["jd","oss","unplugin"],"created_at":"2026-05-26T18:09:14.091Z","updated_at":"2026-06-02T13:00:32.160Z","avatar_url":"https://github.com/bjmhe.png","language":"TypeScript","funding_links":["https://liberapay.com/bjmhe"],"categories":[],"sub_categories":[],"readme":"# unplugin-jdoss\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n\nA build plugin based on [unplugin](https://github.com/unjs/unplugin) that automatically uploads files to JD OSS after build completion.\n\nIt supports multiple build tools, including Vite, Webpack, Rspack, Rollup, Rolldown, esbuild and Farm. The plugin integrates `@jd/upload-oss-tools` and automatically performs uploads in the `writeBundle` hook, eliminating the need for manual deployment of static assets.\n\n## Install\n\n```bash\nnpm i -D -E unplugin-jdoss\n```\n\n## Features\n\n- **Automatic OSS Upload** - Automatically uploads build artifacts to JD OSS after build completion via the `writeBundle` hook\n- **Multi-Builder Support** - Works seamlessly with Vite, Webpack, Rspack, Rollup, Rolldown, esbuild, and Farm\n- **Zero Configuration** - Integrates with `@jd/upload-oss-tools` out of the box, no manual deployment needed\n- **Build Tool Agnostic** - Built on [unplugin](https://github.com/unjs/unplugin) for universal compatibility across modern build tools\n- **Static Asset Deployment** - Eliminates the need for manual static asset deployment workflows\n\n## Usage\n\n```typescript\n/// vite.config.ts\n\nimport path from 'node:path'\nimport VitePluginJdoss from 'unplugin-jdoss/vite'\nimport { defineConfig, loadEnv, searchForWorkspaceRoot } from 'vite'\n\nexport default defineConfig(({ mode }) =\u003e {\n  const workspaceRoot = searchForWorkspaceRoot(process.cwd())\n  const env = loadEnv(mode, workspaceRoot)\n\n  return {\n    base: env.VITE_BASE_URL,\n    plugins: [\n      mode === 'production' \u0026\u0026\n        VitePluginJdoss({\n          localFullPath: path.resolve(workspaceRoot, 'dist'),\n          access: env.VITE_OSS_ACCESS,\n          secret: env.VITE_OSS_SECRET,\n          site: 'storage.jd.local',\n          cover: true,\n          timeout: '30000',\n          printCdnFile: false,\n          bucket: env.VITE_OSS_BUCKET,\n          folder: env.VITE_OSS_FOLDER,\n          ignoreRegexp: '',\n        }),\n    ],\n  }\n})\n```\n\n## Ecology\n\n- [x] Rollup\n- [x] Vite\n- [x] Webpack\n- [x] Esbuild\n- [x] Rspack\n- [x] Farm\n- [x] Rolldown\n- [x] Bun\n\n## License\n\n[MIT](./LICENSE) License © 2026-PRESENT [Benjamin He](https://github.com/bjmhe)\n\u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/bjmhe/unplugin-jdoss/graphs/contributors\"\u003e\n\u003cimg src=\"https://contrib.rocks/image?repo=bjmhe/unplugin-jdoss\" /\u003e\n\u003c/a\u003e\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/unplugin-jdoss.svg\n[npm-version-href]: https://npmjs.com/package/unplugin-jdoss\n[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-jdoss\n[npm-downloads-href]: https://www.npmcharts.com/compare/unplugin-jdoss?interval=30\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjmhe%2Funplugin-jdoss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjmhe%2Funplugin-jdoss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjmhe%2Funplugin-jdoss/lists"}