Compare commits
7 Commits
e07114b1c0
...
1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 54d466fb27 | |||
| 07d30f7e83 | |||
| cd806b7d17 | |||
| 7daf542961 | |||
| f911224847 | |||
| c8d2de9f9d | |||
| f8de78f3ab |
@@ -22,8 +22,9 @@ jobs:
|
||||
|
||||
- name: Build TypeScript
|
||||
run: npm run build
|
||||
|
||||
- name: Add NPM token
|
||||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
||||
|
||||
- name: Publish to NPM
|
||||
run: npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: npm publish --access public
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,4 +13,5 @@ yarn-error.log*
|
||||
.DS_Store
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.example
|
||||
/dist
|
||||
6
README.md
Normal file
6
README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Chatenium SDK For TypeScript
|
||||
A library for interacting with the Chatenium API.
|
||||
## Quick Start
|
||||
```aiignore
|
||||
npm install @chatenium/chatenium-sdk
|
||||
```
|
||||
23
package.json
23
package.json
@@ -1,8 +1,25 @@
|
||||
{
|
||||
"name": "chatenium-sdk",
|
||||
"version": "1.0.0",
|
||||
"name": "@chatenium/chatenium-sdk",
|
||||
"version": "1.0.2",
|
||||
"description": "A library for interacting with the Chatenium API",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"./core/*": "./dist/core/*.js",
|
||||
"./services/*": "./dist/services/*.js"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"test": "vitest run",
|
||||
@@ -15,7 +32,7 @@
|
||||
"typescript": "^5.5.3",
|
||||
"vitest": "^4.1.2"
|
||||
},
|
||||
"private": true,
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@faker-js/faker": "^10.4.0",
|
||||
"axios": "^1.14.0",
|
||||
|
||||
@@ -4,6 +4,9 @@ export interface SDKConfig {
|
||||
wsUrl: string;
|
||||
}
|
||||
|
||||
declare const process: any;
|
||||
declare const require: any;
|
||||
|
||||
const isNode =
|
||||
typeof process !== 'undefined' &&
|
||||
typeof process.versions !== 'undefined' &&
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {PublicUserData} from "./common.schema";
|
||||
import {GIF} from "./userService.schema";
|
||||
import {GIF, PersonalUserData} from "./userService.schema";
|
||||
|
||||
export interface Session {
|
||||
userData: PersonalUserData
|
||||
|
||||
@@ -11,11 +11,11 @@ export class KeyringMock implements KeyringAPI {
|
||||
return this.ring[key];
|
||||
}
|
||||
|
||||
getAll(): string[] {
|
||||
return Object.keys(this.ring);
|
||||
}
|
||||
|
||||
delete(key: string) {
|
||||
delete this.ring[key];
|
||||
}
|
||||
|
||||
flush() {
|
||||
this.ring = {};
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,9 @@ import {FileUploadService} from "./fileUploadService";
|
||||
describe("fileUploadService", () => {
|
||||
it('should upload files', async () => {
|
||||
const service = new FileUploadService("");
|
||||
const uploadId = await service.uploadFiles("", "", [])
|
||||
const uploadId = await service.uploadFiles("", "", [], {
|
||||
fileProgressUpdate: () => {}
|
||||
})
|
||||
expect(uploadId).toBe("MockUploadId")
|
||||
});
|
||||
})
|
||||
@@ -4,6 +4,7 @@
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"declaration": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"outDir": "dist"
|
||||
|
||||
Reference in New Issue
Block a user