npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@snewbie/capacitor-s3

v0.0.5

Published

一个 Capacitor 的 S3 组件。

Downloads

11

Readme

@snewbie/capacitor-s3

S3 Capacitor Plugin

Install

npm install @snewbie/capacitor-s3
npx cap sync

Usage

import { S3 } from '@snewbie/capacitor-s3';

const s3Instance = await S3.create({
  credentials: {
    accessKey: 'my-key',
    secretKey: 'my-secret',
  },
  endpoint: 'https://s3.example.com',
  bucketName: 'my-bucket',
});

API

create(...)

create(args: { credentials: BasicAWSCredentials; endpoint: string; bucketName: string; }) => Promise<S3>

创建 S3 实例。

| Param | Type | | ---------- | --------------------------------------------------------------------------------------------------------------------------- | | args | { credentials: BasicAWSCredentials; endpoint: string; bucketName: string; } |

Returns: Promise<S3>

Since: 0.0.1


putString(...)

putString(args: { key: string; value: string; }) => Promise<PutStringResult>

将字符串上传到 S3。

| Param | Type | | ---------- | -------------------------------------------- | | args | { key: string; value: string; } |

Returns: Promise<PutStringResult>

Since: 0.0.1


getString(...)

getString(args: { key: string; }) => Promise<string>

从 S3 获取字符串。

| Param | Type | | ---------- | ----------------------------- | | args | { key: string; } |

Returns: Promise<string>

Since: 0.0.1


doesObjectExist(...)

doesObjectExist(args: { key: string; }) => Promise<boolean>

检查对象是否存在。

| Param | Type | | ---------- | ----------------------------- | | args | { key: string; } |

Returns: Promise<boolean>

Since: 0.0.1


deleteObject(...)

deleteObject(args: { key: string; }) => Promise<void>

删除对象。

| Param | Type | | ---------- | ----------------------------- | | args | { key: string; } |

Since: 0.0.1


Interfaces

BasicAWSCredentials

| Prop | Type | Since | | --------------- | ------------------- | ----- | | accessKey | string | 0.0.1 | | secretKey | string | 0.0.1 |

PutStringResult

| Prop | Type | Description | | ---------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- | | versionId | string | 新上传对象的可选版本 ID。仅当为对象上传到的存储桶启用了对象版本控制时,才会设置此字段。 | | etag | string | 新创建的对象的 ETag 值。 | | contentMd5 | string | 返回在客户端计算的对象内容的 Base64 编码 MD5 哈希。如果禁用了 MD5 验证,并且调用方在发送 PutObjectRequest 时未在 ObjectMetadata 中提供 MD5 哈希,则此方法返回 null。 |