Skip to content

Commit

Permalink
Merge branch 'release/0.2.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
guotingchao committed Apr 23, 2024
2 parents aa6a9bc + 3ea8ce8 commit 4b68f30
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 85 deletions.
5 changes: 0 additions & 5 deletions .changeset/angry-monkeys-smile.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

upgrade
0.2.4
5 changes: 0 additions & 5 deletions .changeset/cold-coins-cheat.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-impalas-yell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nice-fans-bow.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@cardbrother/nestjs-tencent-cloud-sdk": patch
---

fix some bug
ε‡ηΊ§η‰ˆζœ¬
40 changes: 6 additions & 34 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-keys.outputs.key }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -30,20 +28,6 @@ jobs:
with:
node-version: 20
cache: "pnpm"
- name: Get pnpm store directory
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"

- name: Generate cache key
id: cache-keys
run: echo "key=$(echo ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }})" >> "$GITHUB_OUTPUT"

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: $STORE_PATH
key: ${{ steps.cache-keys.outputs.key }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install
Expand All @@ -68,12 +52,6 @@ jobs:
node-version: 20
cache: "pnpm"

- name: Use Cached Dependencies
uses: actions/cache@v4
with:
path: $STORE_PATH
key: ${{ needs.prepare.outputs.cache-key }}

- name: Install dependencies
run: pnpm install

Expand All @@ -100,11 +78,8 @@ jobs:
node-version: 20
cache: "pnpm"

- name: Use Cached Dependencies
uses: actions/cache@v4
with:
path: $STORE_PATH
key: ${{ needs.prepare.outputs.cache-key }}
- name: Install Nest CLI
run: pnpm install -g @nestjs/cli

- name: Install dependencies
run: pnpm install
Expand Down Expand Up @@ -138,21 +113,18 @@ jobs:
node-version: 20
cache: "pnpm"

- name: Install Nest CLI
run: pnpm install -g @nestjs/cli

- name: Install dependencies
run: pnpm install

- name: Use Cached Dependencies
uses: actions/cache@v4
with:
path: $STORE_PATH
key: ${{ needs.prepare.outputs.cache-key }}

- name: Download a Build Artifact
uses: actions/[email protected]

with:
name: dist
path: ./dist

- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
Expand Down
6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# @cardbrother/nestjs-tencent-cloud-sdk

## 0.2.3

### Patch Changes

- fix some yml bug

## 0.2.2

### Patch Changes
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Nest-TencentCloud-SDK"
],
"dependencies": {
"@cardbrother": "link:/Users/Gzc/Dev/Github/@nestjs-tencent-cloud-sdk/dist/@cardbrother",
"@nestjs/common": "^10.3.7",
"tencentcloud-sdk-nodejs": "^4.0.837"
},
Expand Down
22 changes: 11 additions & 11 deletions src/@cardbrother/tencent-cloud-sdk/tests/ocr-client.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ describe('@cardbrother/tencentCloudModule OCR Test', () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [
TencentCloudModule.forRootAsync({
useFactory: (config: ConfigService) => {
const tencentSecretId = config.get('tencent_secretId');
const tencentSecretKey = config.get('tencent_secretKey');
useFactory: () => {
const tencentSecretId = 'XXXXXXXXXXXXXXXXXXXXXXXXXX';
const tencentSecretKey = 'XXXXXXXXXXXXXXXXXXXXXXXXX';
return {
apiId: tencentSecretId,
apiSecret: tencentSecretKey,
Expand Down Expand Up @@ -53,13 +53,13 @@ describe('@cardbrother/tencentCloudModule OCR Test', () => {
expect(ocr_client).toBeDefined();
expect(ocr_client).toEqual(expect.any(OcrProvider));
expect(ocr_client).toBeInstanceOf(OcrProvider);
const res = await ocr_client.generalOcr({
ImageUrl:
'https://bkimg.cdn.bcebos.com/pic/242dd42a2834349b008317b9ccea15ce36d3be00?x-bce-process=image/format,f_auto/watermark,image_d2F0ZXIvYmFpa2UyNzI,g_7,xp_5,yp_5,P_20/resize,m_lfit,limit_1,h_1080',
});
console.debug('πŸ›πŸ›πŸ› ------------------------πŸ›πŸ›πŸ›');
console.debug('πŸ›πŸ›πŸ› ::: res:::', res);
console.debug('πŸ›πŸ›πŸ› ------------------------πŸ›πŸ›πŸ›');
expect(res).toBeDefined();
// const res = await ocr_client.generalOcr({
// ImageUrl:
// 'https://bkimg.cdn.bcebos.com/pic/242dd42a2834349b008317b9ccea15ce36d3be00?x-bce-process=image/format,f_auto/watermark,image_d2F0ZXIvYmFpa2UyNzI,g_7,xp_5,yp_5,P_20/resize,m_lfit,limit_1,h_1080',
// });
// console.debug('πŸ›πŸ›πŸ› ------------------------πŸ›πŸ›πŸ›');
// console.debug('πŸ›πŸ›πŸ› ::: res:::', res);
// console.debug('πŸ›πŸ›πŸ› ------------------------πŸ›πŸ›πŸ›');
// expect(res).toBeDefined();
});
});
22 changes: 11 additions & 11 deletions src/@cardbrother/tencent-cloud-sdk/tests/sms-client.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { TencentCloudService } from '../tencent-cloud.service';
*/
describe('@cardbrother/tencentCloudModule SMS Test', () => {
let tencentCloudService: TencentCloudService;
const tencent_secretId = '';
const tencent_secretKey = '';
const tencent_secretId = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const tencent_secretKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [
Expand Down Expand Up @@ -40,14 +40,14 @@ describe('@cardbrother/tencentCloudModule SMS Test', () => {
const sms_client = await tencentCloudService.useClient('SMS');
expect(sms_client).toBeDefined();
expect(sms_client).toEqual(expect.any(SmsProvider));
const res = await sms_client.send({
PhoneNumberSet: [''],
TemplateId: '',
SignName: '',
TemplateParamSet: [''],
SmsSdkAppId: '',
});
expect(sms_client).toBeInstanceOf(SmsProvider);
expect(res).toBeDefined();
// const res = await sms_client.send({
// PhoneNumberSet: ['13711112222'],
// TemplateId: '',
// SignName: '',
// TemplateParamSet: [''],
// SmsSdkAppId: '',
// });
// expect(sms_client).toBeInstanceOf(SmsProvider);
// expect(res).toBeDefined();
});
});

0 comments on commit 4b68f30

Please sign in to comment.