-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send STREAMING_SET_PERSONA to parent (#9)
* add basic tests (to be run locally) * refactor types * switch to `setup()` in `speechstate.ts` * add CI for publishing PRs as npm packages with tag @pr<PR number>
- Loading branch information
1 parent
be7eed4
commit e5de8c6
Showing
14 changed files
with
3,667 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Compile and package | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v27 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-24.05 | ||
|
||
- run: nix develop | ||
|
||
- run: yarn --immutable | ||
- run: yarn exec tsc | ||
- run: npm version prerelease --no-git-tag-version --preid=${{ format('pr{0}-{1}-{2}', github.event.number, github.run_attempt, github.run_id) }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Publish to NPM registry | ||
run: npm publish --tag ${{ format('pr{0}', github.event.number) }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ yarn-error.log* | |
# pycharm | ||
.idea | ||
/.yarn/cache | ||
/src/credentials.ts |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
inputs = { | ||
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
systems.url = "github:nix-systems/default"; | ||
}; | ||
|
||
outputs = | ||
{ systems, nixpkgs, ... }@inputs: | ||
let | ||
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); | ||
in | ||
{ | ||
devShells = eachSystem (pkgs: { | ||
default = pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.corepack | ||
pkgs.nodejs | ||
|
||
# You can set the major version of Node.js to a specific one instead | ||
# of the default version | ||
# pkgs.nodejs-22_x | ||
|
||
# It is possible to use bun instead of node. | ||
pkgs.bun | ||
|
||
# Optionally, you can add yarn or pnpm for package management for node. | ||
# pkgs.nodePackages.pnpm | ||
pkgs.yarn | ||
|
||
# pkgs.nodePackages.typescript | ||
# pkgs.nodePackages.typescript-language-server | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,40 +5,59 @@ | |
"homepage": "http://localhost/speechstate", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": ["/dist"], | ||
"files": [ | ||
"/dist" | ||
], | ||
"dependencies": { | ||
"microsoft-cognitiveservices-speech-sdk": "^1.31.0", | ||
"web-speech-cognitive-services": "^7.1.3", | ||
"xstate": "^5.9.1" | ||
"xstate": "^5.17.4" | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"compile": "tsc", | ||
"test": "jest --silent=false" | ||
"test": "vitest", | ||
"test:browser": "vitest" | ||
}, | ||
"eslintConfig": { | ||
"extends": ["react-app", "react-app/jest"] | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [">0.2%", "not dead", "not op_mini all"], | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@statelyai/inspect": "^0.2.5", | ||
"@statelyai/inspect": "^0.4.0", | ||
"@testing-library/dom": "^10.4.0", | ||
"@types/jest": "^29.5.2", | ||
"@types/webspeechapi": "^0.0.29", | ||
"@vitest/browser": "^2.0.5", | ||
"buffer": "^5.5.0||^6.0.0", | ||
"jest": "^29.5.0", | ||
"jest-environment-jsdom": "^29.5.0", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.0.4", | ||
"vite": "^5.0.11", | ||
"vitest": "^2.0.5", | ||
"webdriverio": "^9.0.7", | ||
"ws": "^8.16.0" | ||
}, | ||
"trustedDependencies": [ | ||
"p-defer-es5", | ||
"edgedriver", | ||
"core-js-pure" | ||
], | ||
"packageManager": "[email protected]", | ||
"description": "* SDK", | ||
"directories": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.