From f512d97e0981510ef3e6748d97e7fb53933ab773 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Thu, 8 Jan 2026 01:31:38 +0800 Subject: [PATCH] =?UTF-8?q?chore(config):=20=E6=9B=B4=E6=96=B0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F=E7=A4=BA=E4=BE=8B=E5=8F=8Anpm?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E9=AA=8C=E8=AF=81=E4=BB=A4=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在.env.example中添加S3_ENDPOINT环境变量示例配置 - 将.npmrc中npmjs.org的_authToken改为固定令牌 - 升级package.json版本号到0.0.15 - 调整测试文件中putObject调用的对象路径为'lanzhoub/a.json' --- .env.example | 3 ++- .npmrc | 2 +- package.json | 2 +- src/test/test-s3.ts | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 02059b6..9732412 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ S3_ACCESS_KEY_ID=your_access_key_id S3_SECRET_ACCESS_KEY=your_secret_access_key S3_REGION=your_region -S3_BUCKET_NAME=your_bucket_name \ No newline at end of file +S3_BUCKET_NAME=your_bucket_name +S3_ENDPOINT=your_endpoint diff --git a/.npmrc b/.npmrc index a5aa07b..eccbcd1 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ //npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN} -//registry.npmjs.org/:_authToken=${NPM_TOKEN} +//registry.npmjs.org/:_authToken=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 diff --git a/package.json b/package.json index a2a03d7..c2198ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kevisual/oss", - "version": "0.0.13", + "version": "0.0.15", "main": "dist/index.js", "scripts": { "build": "bun run bun.config.ts" diff --git a/src/test/test-s3.ts b/src/test/test-s3.ts index de69088..64d2d6a 100644 --- a/src/test/test-s3.ts +++ b/src/test/test-s3.ts @@ -1,5 +1,7 @@ import { OssBase } from "@/s3/core.ts"; +import { S3Client } from '@aws-sdk/client-s3'; + import { s3Client, bucketName } from './common.ts'; const oss = new OssBase({ @@ -18,6 +20,6 @@ let putJson = { name: 'test', age: 18, } -const objPut = await oss.putObject('a.json', putJson) +const objPut = await oss.putObject('lanzhoub/a.json', putJson) console.log(objPut);