From 99e3c9fa303bbc2ced365b8c3e5e24933a58d98b Mon Sep 17 00:00:00 2001 From: Daniel Freytag Date: Wed, 18 Dec 2024 09:58:21 +0100 Subject: [PATCH] fix: test jsr setup --- .github/workflows/test.yml | 12 ++++++------ storage-s3/README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 storage-s3/README.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9621d7b..e2a0d8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,8 @@ on: permissions: contents: read -# env: -# JSR_DEPENDENCIES: "@cross/test @std/assert @std/fmt @frytg/logger @frytg/check-required-env" +env: + JSR_DEPENDENCIES: "@cross/test @std/assert @std/fmt @frytg/logger @frytg/check-required-env" # NPM_DEPENDENCIES: "luxon minio sinon" jobs: @@ -94,8 +94,8 @@ jobs: - name: Bun version run: bun --version - #- name: Install JSR dependencies - # run: bunx jsr add ${{ env.JSR_DEPENDENCIES }} + - name: Install JSR dependencies + run: bunx jsr add ${{ env.JSR_DEPENDENCIES }} #- name: Install NPM dependencies # run: bun add ${{ env.NPM_DEPENDENCIES }} @@ -140,8 +140,8 @@ jobs: - name: Node version run: node --version - #- name: Install JSR dependencies - # run: npx jsr add ${{ env.JSR_DEPENDENCIES }} + - name: Install JSR dependencies + run: npx jsr add ${{ env.JSR_DEPENDENCIES }} #- name: Install NPM dependencies # run: npm install ${{ env.NPM_DEPENDENCIES }} diff --git a/storage-s3/README.md b/storage-s3/README.md new file mode 100644 index 0000000..29e17e1 --- /dev/null +++ b/storage-s3/README.md @@ -0,0 +1,29 @@ +# Storage (S3) wrapper + +[![JSR @frytg/storage-s3](https://jsr.io/badges/@frytg/storage-s3)](https://jsr.io/@frytg/storage-s3) +[![ci](https://github.com/frytg/utility/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/frytg/utility/actions/workflows/test.yml) + +This is a simple opinionated wrapper around the S3 library [MinIO](https://min.io/) to access and manipulate S3 objects. + +## Usage + +```ts +import { getObject } from '@frytg/storage-s3'; + +const object = await getObject('path/to/object.json', { parseJson: true }); +``` + +## Methods + +- [getObject](https://jsr.io/@frytg/storage-s3/doc/~/getObject) +- [uploadObject](https://jsr.io/@frytg/storage-s3/doc/~/uploadObject) +- [objectExists](https://jsr.io/@frytg/storage-s3/doc/~/objectExists) +- [listObjects](https://jsr.io/@frytg/storage-s3/doc/~/listObjects) + +## Author + +Created by [@frytg](https://github.com/frytg) / [frytg.digital](https://www.frytg.digital) + +## License + +[Unlicense](https://github.com/frytg/utility/blob/main/LICENSE) - also see [unlicense.org](https://unlicense.org)