Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tufcode committed Jun 6, 2023
0 parents commit af7139d
Show file tree
Hide file tree
Showing 29 changed files with 7,344 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn
- run: yarn build
#- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

dist/
lib/
build/
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"arcanis.vscode-zipfs"
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
5 changes: 5 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);
6 changes: 6 additions & 0 deletions .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "typescript",
"version": "5.0.4-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Semantic Release Changelog

## [1.0.4](https://github.com/tufcode/soketto-client/compare/v1.0.3...v1.0.4) (2023-04-21)


### Performance Improvements

* Upgrade paketto version ([fb63d07](https://github.com/tufcode/soketto-client/commit/fb63d0767f8723274026af7b8deb31ca93ec02bc))

## [1.0.3](https://github.com/tufcode/soketto-client/compare/v1.0.2...v1.0.3) (2023-04-21)


### Bug Fixes

* **browser support:** remove `setImmediate` ([b6d02cd](https://github.com/tufcode/soketto-client/commit/b6d02cd2683fe84e84e83f822a40c09aa0f6f655))

## [1.0.2](https://github.com/tufcode/soketto-client/compare/v1.0.1...v1.0.2) (2023-04-21)


### Bug Fixes

* replace ws in browser ([1191f02](https://github.com/tufcode/soketto-client/commit/1191f02f81289242efe5f72ba18e06c199b25dbd))

## [1.0.1](https://github.com/tufcode/soketto-client/compare/v1.0.0...v1.0.1) (2023-04-20)


### Performance Improvements

* removed ping & error ([990b8bf](https://github.com/tufcode/soketto-client/commit/990b8bf8fe5acfd319d3642ef559892cfd2015dc))

# 1.0.0 (2023-04-19)


### Bug Fixes

* **ci:** forgot to change names ([9115083](https://github.com/tufcode/soketto-client/commit/9115083b5e7122c616c0ba90468361a0410f277d))

# 1.0.0 (2023-04-17)


### Bug Fixes

* case insensitive replaceAll strikes again ([83286ed](https://github.com/tufcode/paketto/commit/83286ed5b4640117e7182bf0bdec861339b5ac5b))
* **ci:** really just want to trigger a release ([c7c1fe5](https://github.com/tufcode/paketto/commit/c7c1fe55f5c29ab1964c0d46a8228a2fd25f0a11))
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Tufan Meriç Uyguner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ソケット (soketto) client

TBA.

## Documentation

[API Docs](docs/README.md)
60 changes: 60 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# API Docs for Soketto Client

## Table of contents

### Classes

- [ClientInstance](classes/ClientInstance.md)
- [WebSocketTransport](classes/WebSocketTransport.md)

### Interfaces

- [ITransport](interfaces/ITransport.md)

### Functions

- [connect](README.md#connect)
- [createClient](README.md#createclient)

## Functions

### connect

**connect**(`serverAddr`, `transport`, `pakettoInstance?`): `Promise`<[`ClientInstance`](classes/ClientInstance.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `serverAddr` | `string` |
| `transport` | [`ITransport`](interfaces/ITransport.md) |
| `pakettoInstance?` | `PakettoInstance` |

#### Returns

`Promise`<[`ClientInstance`](classes/ClientInstance.md)\>

#### Defined in

[Client.ts:121](https://github.com/tufcode/soketto-client/blob/2718fee/src/Client.ts#L121)

___

### createClient

**createClient**(`transport`, `pakettoInstance?`): [`ClientInstance`](classes/ClientInstance.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `transport` | [`ITransport`](interfaces/ITransport.md) |
| `pakettoInstance?` | `PakettoInstance` |

#### Returns

[`ClientInstance`](classes/ClientInstance.md)

#### Defined in

[Client.ts:114](https://github.com/tufcode/soketto-client/blob/2718fee/src/Client.ts#L114)
Loading

0 comments on commit af7139d

Please sign in to comment.