This commit is contained in:
2025-07-07 00:31:38 +09:00
parent 40cb0dc3ca
commit d9f340fd69
6 changed files with 24 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "tap-sdk-js", "name": "tap-sdk-js",
"version": "1.0.3", "version": "1.1.3",
"description": "", "description": "",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
@@ -11,13 +11,13 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "./dist/index.js", "main": "./dist/src/index.js",
"types": "./dist/index.d.ts", "types": "./dist/src/index.d.ts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/index.js", "import": "./dist/src/index.js",
"require": "./dist/index.js", "require": "./dist/src/index.js",
"types": "./dist/index.d.ts" "types": "./dist/src/index.d.ts"
} }
}, },
"keywords": [], "keywords": [],

View File

@@ -1,13 +1,11 @@
import { createEmitter, TapEvents } from "./events.js"; import type { TapEvents } from "./events.js";
import { createEmitter } from "./events.js";
import { createWebSocketManager } from "../api/websocket.js"; import { createWebSocketManager } from "../api/websocket.js";
import { import type { AudioReq, HelloRes } from "./schema.js";
audioReqSchema, import { helloResSchema, audioReqSchema } from "./schema.js";
AudioReq, import type { AudioRequestHandle } from "./request.js";
helloResSchema, import type { StreamResolvable } from "../util/stream.js";
HelloRes, import { intoReadable } from "../util/stream.js";
} from "./schema.js";
import { AudioRequestHandle } from "./request.js";
import { StreamResolvable, intoReadable } from "../util/stream.js";
import { VERSION } from "../util/constant.js"; import { VERSION } from "../util/constant.js";
import got from "got"; import got from "got";
import { EventEmitter } from "eventemitter3"; import { EventEmitter } from "eventemitter3";

View File

@@ -1,4 +1,4 @@
import { AudioRequestHandle } from "./request.js"; import type { AudioRequestHandle } from "./request.js";
import { EventEmitter } from "eventemitter3"; import { EventEmitter } from "eventemitter3";
/** /**

View File

@@ -1,4 +1,4 @@
import { StreamResolvable } from "../util/stream.js"; import type { StreamResolvable } from "../util/stream.js";
export type AudioRequestPayload = { export type AudioRequestPayload = {
data: string; data: string;

View File

@@ -1,3 +1,3 @@
export * from "./core/client.js"; export * from "./core/client.js";
export { TapEvents } from "./core/events.js"; export type { TapEvents } from "./core/events.js";
export { AudioRequestHandle } from "./core/request.js"; export type { AudioRequestHandle } from "./core/request.js";

View File

@@ -9,7 +9,7 @@
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */ /* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */ // "jsx": "preserve", /* Specify what JSX code is generated. */
// "libReplacement": true, /* Enable lib replacement. */ // "libReplacement": true, /* Enable lib replacement. */
@@ -23,9 +23,9 @@
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */ /* Modules */
"module": "node16" /* Specify what module code is generated. */, "module": "nodenext" /* Specify what module code is generated. */,
// "rootDir": "./src" /* Specify the root folder within your source files. */, // "rootDir": "./src" /* Specify the root folder within your source files. */,
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ "moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */,
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
"rootDirs": [ "rootDirs": [
@@ -36,7 +36,7 @@
// "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ "allowImportingTsExtensions": false /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */,
// "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
@@ -52,7 +52,7 @@
/* Emit */ /* Emit */
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
// "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ "emitDeclarationOnly": false /* Only output d.ts files and not JavaScript files. */,
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
// "noEmit": true, /* Disable emitting files from a compilation. */ // "noEmit": true, /* Disable emitting files from a compilation. */
@@ -73,10 +73,10 @@
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
/* Interop Constraints */ /* Interop Constraints */
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ "verbatimModuleSyntax": true /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */,
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
// "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,