{"id":25081764,"url":"https://github.com/abramstyle/deploy-tools","last_synced_at":"2025-04-01T09:43:00.288Z","repository":{"id":57094237,"uuid":"178139095","full_name":"abramstyle/deploy-tools","owner":"abramstyle","description":"My deployment utils","archived":false,"fork":false,"pushed_at":"2019-03-28T09:46:13.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T05:18:33.397Z","etag":null,"topics":["aws","deployment"],"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/abramstyle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-28T06:20:10.000Z","updated_at":"2023-03-08T16:38:08.000Z","dependencies_parsed_at":"2022-08-22T23:10:07.414Z","dependency_job_id":null,"html_url":"https://github.com/abramstyle/deploy-tools","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abramstyle%2Fdeploy-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abramstyle%2Fdeploy-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abramstyle%2Fdeploy-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abramstyle%2Fdeploy-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abramstyle","download_url":"https://codeload.github.com/abramstyle/deploy-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620204,"owners_count":20806718,"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":["aws","deployment"],"created_at":"2025-02-07T05:18:27.118Z","updated_at":"2025-04-01T09:43:00.269Z","avatar_url":"https://github.com/abramstyle.png","language":"TypeScript","readme":"# Deploy tools\n\nSome utils to finish your deployment.\n\n# Upload your file to AWS S3\n```ts\nconst path = require('path');\nconst { S3Uploader } = require('@abramstyle/deploy-tools');\n\nconst buildPath = path.resolve(__dirname, '../dist');\n\nconst uploadConfig = {\n  bucket: 'YOUR_BUCKET_NAME',\n  keyPrefix: 'YOUR_DIRECTORY_PREFIX',\n};\n\nasync function startJob() {\n  const uploader = new S3Uploader(uploadConfig);\n\n  uploader.on('success', ({ count, finished, filename }) =\u003e {\n    console.log(`progress: ${finished}/${count}. file ${filename} upload success.`);\n  });\n  uploader.on('done', () =\u003e {\n    console.log('uploading finished.');\n  });\n\n  await uploader.uploadDir(buildPath);\n}\n\nconsole.log('initializing...');\n\nstartJob().then(() =\u003e {\n  console.log('start upload...');\n}).catch((error) =\u003e {\n  console.error('file upload failed.', error);\n});\n```\n\n## API\n### constructor\n```ts\ninterface UploaderConfig {\n  bucket: string,\n  keyPrefix: string,\n}\n```\n```ts\npublic constructor(config: UploaderConfig)\n```\n\n### uploadFile\n```ts\npublic async uploadFile(filepath: string): Promise\u003cany\u003e\n```\n\n### uploadDir\n```ts\npublic async uploadDir(distDir: string): Promise\u003cvoid\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabramstyle%2Fdeploy-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabramstyle%2Fdeploy-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabramstyle%2Fdeploy-tools/lists"}