{"id":22050122,"url":"https://github.com/icapps/tree-house-storage","last_synced_at":"2026-04-17T10:01:58.066Z","repository":{"id":57676980,"uuid":"176713647","full_name":"icapps/tree-house-storage","owner":"icapps","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-25T07:05:49.000Z","size":4231,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T01:51:59.267Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icapps.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-20T10:55:10.000Z","updated_at":"2022-07-25T06:58:14.000Z","dependencies_parsed_at":"2022-09-13T13:03:02.096Z","dependency_job_id":null,"html_url":"https://github.com/icapps/tree-house-storage","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/icapps/tree-house-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Ftree-house-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Ftree-house-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Ftree-house-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Ftree-house-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icapps","download_url":"https://codeload.github.com/icapps/tree-house-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Ftree-house-storage/sbom","scorecard":{"id":479697,"data":{"date":"2025-08-11","repo":{"name":"github.com/icapps/tree-house-storage","commit":"dffddc19bb09c8510016c115136c2a839d022f5e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: ISC License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"31 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-44fp-w29j-9vj5","Warn: Project is vulnerable to: GHSA-4pg4-qvpc-4q3h","Warn: Project is vulnerable to: GHSA-g5hg-p3ph-g8qg","Warn: Project is vulnerable to: GHSA-fjgf-rc76-4x9p","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:17:40.383Z","repository_id":57676980,"created_at":"2025-08-19T16:17:40.383Z","updated_at":"2025-08-19T16:17:40.383Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31924368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T09:10:15.403Z","status":"ssl_error","status_checked_at":"2026-04-17T09:10:14.455Z","response_time":62,"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":[],"created_at":"2024-11-30T14:17:56.993Z","updated_at":"2026-04-17T10:01:58.028Z","avatar_url":"https://github.com/icapps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Treehouse storage\n\nNodeJS storage utility module written in Typescript\n\n[![npm version](https://badge.fury.io/js/%40icapps%2Ftree-house-storage.svg)](https://badge.fury.io/js/%40icapps%2Ftree-house-storage)\n[![Dependencies](https://david-dm.org/icapps/tree-house-storage.svg)](https://david-dm.org/icapps/tree-house-storage.svg)\n[![Build Status](https://travis-ci.com/icapps/tree-house-storage.svg?branch=master)](https://travis-ci.com/icapps/tree-house-storage)\n[![Coverage Status](https://coveralls.io/repos/github/icapps/tree-house-storage/badge.svg)](https://coveralls.io/github/icapps/tree-house-storage) [![Greenkeeper badge](https://badges.greenkeeper.io/icapps/tree-house-storage.svg)](https://greenkeeper.io/)\n\n## Installation\n\nInstall via npm\n\n```shell\nnpm install @icapps/tree-house-storage\n```\n\nor via yarn\n\n```shell\nyarn add @icapps/tree-house-storage\n```\n\n## Usage\n\n## Middleware functions\n\n### multipartUpload(options)\n\nExpress middleware function to upload a local file using multer.\n\n```javascript\nimport { middleware } from '@icapps/tree-house-storage'\n\nconst options = {\n  destination: 'uploads',\n  fileSize: 12000,\n  allowedFileTypes: ['image/png', 'image/jpg'],\n\n  // Optional Joi schema validation for other body data\n  validator: {\n    schema: joiSchema,\n    options: joiOptions,\n  };\n};\n\napp.post('/upload', middleware.multipartUpload(options), ...);\n```\n\n[More information on Multer](https://github.com/expressjs/multer)\n\n## Local filesystem\n\nLocal file functions enabling the use of Promises for `fs` methods.\n\n[More information on fs](https://nodejs.org/api/fs.html)\n\n### createIfNotExists(path)\n\nCreates a folder if it doesn't exist already. (*Asynchronous*)\n\n```javascript\nimport { local } from '@icapps/tree-house-storage'\nawait local.createIfNotExists('/localFolder');\n```\n\n### createFile(path, name, content)\n\nCreates a new local file. This will also create a folder when it does not exist already. (*Asynchronous*)\n\n```javascript\nimport { local } from '@icapps/tree-house-storage'\nawait local.createFile('/localFolder', 'myFile.txt', 'My personal content');\n```\n\n### readFile(path)\n\nRead an existing local file via filepath. (*Asynchronous*)\n\n```javascript\nimport { local } from '@icapps/tree-house-storage'\nawait local.readFile('/localFolder', 'myFile.txt', 'My personal content');\n```\n\n### deleteFile(path)\n\nDelete an existing local file via filepath (*Asynchronous*)\n\n```javascript\nimport { local } from '@icapps/tree-house-storage'\nawait local.deleteFile('/localFolder/myFile.txt');\n```\n\n## Amazon\n\nAmazon S3 libs\n\n[More information on AWS S3](https://aws.amazon.com/sdk-for-node-js/)\n\n### createClient(clientOptions)\n\nCreate an S3 client\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nconst options = {\n  region: 'eu-west-1',\n  accessKeyId: 'myAccesKey',\n  secretAccessKey: 'mySecret',\n};\nconst client = amazon.createClient(options);\n```\n\n### uploadFile(client, options)\n\nUpload a file to S3\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nconst options = {\n  path: 'localPath/localFile.png',\n  content: 'fileContent ...',\n  name: uuid.v4(),\n  contentType: 'image/png',\n  bucket: 's3bucketName',\n  key: 's3KeyName',\n  encryption: 'AE-256', // Optional encryption (this will enable server encryption on S3)\n};\nconst { location, bucket, key } = await amazon.uploadFile(client, options);\n```\n\n### getFile(client, bucket, key)\n\nRetrieve a file from S3\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nconst { body } = await amazon.getFile(client, bucket, key);\n```\n\n### removeFile(client, bucket, key)\n\nRemove a file from S3\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nawait amazon.removeFile(client, bucket, key);\n```\n\n### getPresignedUrl(client, options)\n\nGets a pre-signed url for an S3 resource\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nconst options = {\n  bucket: 's3bucketName',\n  key: 's3KeyName',\n  expires: 1600, // Optional expiration time\n};\nconst { location, bucket, key } = await amazon.getPresignedUrl(client, options);\n```\n\n### getUploadPresignedUrl(client, options)\n\nGets a pre-signed upload url for an S3 resource\n\n```javascript\nimport { amazon } from '@icapps/tree-house-storage'\n\nconst options = {\n  bucket: 's3bucketName',\n  key: 's3KeyName',\n  expires: 1600, // Optional expiration time\n  contentType: 'image/png' // Optional but best practice to include this\n};\n\nconst url = await amazon.getUploadPresignedUrl(client, options);\n```\n\n## Tests\n\nAll tests are written using Jest. Check out the documentation [here](https://jestjs.io/docs/en/getting-started) for more information.\n\n  You can run `npm run test` to run all tests\n\n  You can run `npm run test:coverage` to run all tests with coverage report\n\n## Bugs\n\nWhen you find issues, please report them:\n\n- web: [https://github.com/icapps/tree-house-storage/issues](https://github.com/icapps/tree-house-storage/issues)\n\nBe sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.\n\n## Authors\n\nSee the list of [contributors](https://github.com/icapps/tree-house-storage/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the ISC License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficapps%2Ftree-house-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficapps%2Ftree-house-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficapps%2Ftree-house-storage/lists"}