@bytecodealliance/jco-std
Advanced tools
@@ -1,3 +0,3 @@ | ||
| import { type WasiConfigHelper } from '../../../../../0.2.x/config.js'; | ||
| export type { WasiConfigHelper } from '../../../../../0.2.x/config.js'; | ||
| import { type WasiConfigHelper } from "../../../../../0.2.x/config.js"; | ||
| export type { WasiConfigHelper } from "../../../../../0.2.x/config.js"; | ||
| export type WASIConfigMiddleware = { | ||
@@ -4,0 +4,0 @@ Variables: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.3/http/adapters/hono/middleware/config.ts"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElG,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE;QACP,MAAM,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,oBAAoB,oFAKhC,CAAC"} | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.3/http/adapters/hono/middleware/config.ts"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElG,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE;QACT,MAAM,EAAE,gBAAgB,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,oBAAoB,oFAKhC,CAAC"} |
@@ -7,3 +7,3 @@ import { createMiddleware } from "hono/factory"; | ||
| import * as wasiConfig from "wasi:config/store@0.2.0-rc.1"; | ||
| import { buildConfigHelperFromWASI } from '../../../../../0.2.x/config.js'; | ||
| import { buildConfigHelperFromWASI } from "../../../../../0.2.x/config.js"; | ||
| /** | ||
@@ -40,5 +40,5 @@ * A Hono middleware that injects a helper that can retrieve | ||
| return createMiddleware(async (c, next) => { | ||
| c.set('config', buildConfigHelperFromWASI(wasiConfig)); | ||
| c.set("config", buildConfigHelperFromWASI(wasiConfig)); | ||
| await next(); | ||
| }); | ||
| }; |
@@ -1,3 +0,3 @@ | ||
| import { type WasiEnvironmentHelper } from '../../../../../0.2.x/cli/environment.js'; | ||
| export type { WasiEnvironmentHelper } from '../../../../../0.2.x/cli/environment.js'; | ||
| import { type WasiEnvironmentHelper } from "../../../../../0.2.x/cli/environment.js"; | ||
| export type { WasiEnvironmentHelper } from "../../../../../0.2.x/cli/environment.js"; | ||
| export type WASIEnvMiddleware = { | ||
@@ -4,0 +4,0 @@ Variables: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.3/http/adapters/hono/middleware/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAE7G,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,SAAS,EAAE;QACP,GAAG,EAAE,qBAAqB,CAAC;KAC9B,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,iFAK7B,CAAC"} | ||
| {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.3/http/adapters/hono/middleware/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAC;AAEjD,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE;QACT,GAAG,EAAE,qBAAqB,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,iFAK7B,CAAC"} |
@@ -7,3 +7,3 @@ import { createMiddleware } from "hono/factory"; | ||
| import * as wasiEnv from "wasi:cli/environment@0.2.3"; | ||
| import { buildEnvHelperFromWASI } from '../../../../../0.2.x/cli/environment.js'; | ||
| import { buildEnvHelperFromWASI, } from "../../../../../0.2.x/cli/environment.js"; | ||
| /** | ||
@@ -40,5 +40,5 @@ * A Hono middleware that injects a helper that can retrieve | ||
| return createMiddleware(async (c, next) => { | ||
| c.set('env', buildEnvHelperFromWASI(wasiEnv)); | ||
| c.set("env", buildEnvHelperFromWASI(wasiEnv)); | ||
| await next(); | ||
| }); | ||
| }; |
| import type { Hono, Schema as HonoSchema, Env as HonoEnv } from "hono"; | ||
| import { type FireOpts } from '../../../../0.2.x/hono.js'; | ||
| import { type FireOpts } from "../../../../0.2.x/hono.js"; | ||
| /** Analog to Hono's fire function, which sets up your Hono application to be served */ | ||
| export declare function fire<Env extends HonoEnv = HonoEnv, Schema extends HonoSchema = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type | ||
| BasePath extends string = '/'>(app: Hono<Env, Schema, BasePath>, opts?: FireOpts): void; | ||
| export { incomingHandler } from '../../../../0.2.x/hono.js'; | ||
| export { buildLogger } from '../../../../0.2.x/logging.js'; | ||
| BasePath extends string = "/">(app: Hono<Env, Schema, BasePath>, opts?: FireOpts): void; | ||
| export { incomingHandler } from "../../../../0.2.x/hono.js"; | ||
| export { buildLogger } from "../../../../0.2.x/logging.js"; | ||
| //# sourceMappingURL=server.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../src/wasi/0.2.3/http/adapters/hono/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKvE,uFAAuF;AACvF,wBAAgB,IAAI,CAChB,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAAE,8DAA8D;AAC9F,QAAQ,SAAS,MAAM,GAAG,GAAG,EAE7B,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAChC,IAAI,CAAC,EAAE,QAAQ,QAIlB;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"} | ||
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../src/wasi/0.2.3/http/adapters/hono/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKvE,uFAAuF;AACvF,wBAAgB,IAAI,CAClB,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAAE,8DAA8D;AAC9F,QAAQ,SAAS,MAAM,GAAG,GAAG,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,QAAQ,QAGlD;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"} |
@@ -1,4 +0,4 @@ | ||
| import { buildFireFn } from '../../../../0.2.x/hono.js'; | ||
| import { readWASIRequest } from '../../types/request.js'; | ||
| import { writeWebResponse } from '../../types/response.js'; | ||
| import { buildFireFn } from "../../../../0.2.x/hono.js"; | ||
| import { readWASIRequest } from "../../types/request.js"; | ||
| import { writeWebResponse } from "../../types/response.js"; | ||
| /** Analog to Hono's fire function, which sets up your Hono application to be served */ | ||
@@ -9,3 +9,3 @@ export function fire(app, opts) { | ||
| } | ||
| export { incomingHandler } from '../../../../0.2.x/hono.js'; | ||
| export { buildLogger } from '../../../../0.2.x/logging.js'; | ||
| export { incomingHandler } from "../../../../0.2.x/hono.js"; | ||
| export { buildLogger } from "../../../../0.2.x/logging.js"; |
@@ -1,4 +0,4 @@ | ||
| import { ResponseOutparam } from 'wasi:http/types@0.2.3'; | ||
| import { ResponseOutparam } from "wasi:http/types@0.2.3"; | ||
| /** Write a Web `Response` into a `wasi:http@0.2.x#outgoing-response` */ | ||
| export declare function writeWebResponse(resp: Response, outgoingWasiResp: ResponseOutparam): Promise<void>; | ||
| //# sourceMappingURL=response.d.ts.map |
@@ -1,3 +0,3 @@ | ||
| import { OutgoingBody, ResponseOutparam, Fields, OutgoingResponse } from 'wasi:http/types@0.2.3'; | ||
| import { genWriteWebResponseFn } from '../../../0.2.x/http/types/response.js'; | ||
| import { OutgoingBody, ResponseOutparam, Fields, OutgoingResponse } from "wasi:http/types@0.2.3"; | ||
| import { genWriteWebResponseFn } from "../../../0.2.x/http/types/response.js"; | ||
| /** Write a Web `Response` into a `wasi:http@0.2.x#outgoing-response` */ | ||
@@ -4,0 +4,0 @@ export async function writeWebResponse(resp, outgoingWasiResp) { |
@@ -1,3 +0,3 @@ | ||
| import { type WasiConfigHelper } from '../../../../../0.2.x/config.js'; | ||
| export { type WasiConfigHelper } from '../../../../../0.2.x/config.js'; | ||
| import { type WasiConfigHelper } from "../../../../../0.2.x/config.js"; | ||
| export { type WasiConfigHelper } from "../../../../../0.2.x/config.js"; | ||
| export type WASIConfigMiddleware = { | ||
@@ -4,0 +4,0 @@ Variables: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.6/http/adapters/hono/middleware/config.ts"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE;QACP,MAAM,EAAE,gBAAgB,CAAC;KAC5B,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,oBAAoB,oFAKhC,CAAC"} | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.6/http/adapters/hono/middleware/config.ts"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE;QACT,MAAM,EAAE,gBAAgB,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,oBAAoB,oFAKhC,CAAC"} |
@@ -1,2 +0,2 @@ | ||
| import { createMiddleware } from 'hono/factory'; | ||
| import { createMiddleware } from "hono/factory"; | ||
| // NOTE: this import is somewhat "magical", it is filled in by componentize-js when | ||
@@ -7,3 +7,3 @@ // building a component. | ||
| import * as wasiConfig from "wasi:config/store@0.2.0-rc.1"; | ||
| import { buildConfigHelperFromWASI } from '../../../../../0.2.x/config.js'; | ||
| import { buildConfigHelperFromWASI } from "../../../../../0.2.x/config.js"; | ||
| /** | ||
@@ -40,5 +40,5 @@ * A Hono middleware that injects a helper that can retrieve | ||
| return createMiddleware(async (c, next) => { | ||
| c.set('config', buildConfigHelperFromWASI(wasiConfig)); | ||
| c.set("config", buildConfigHelperFromWASI(wasiConfig)); | ||
| await next(); | ||
| }); | ||
| }; |
@@ -1,3 +0,3 @@ | ||
| import { type WasiEnvironmentHelper } from '../../../../../0.2.x/cli/environment.js'; | ||
| export { type WasiEnvironmentHelper } from '../../../../../0.2.x/cli/environment.js'; | ||
| import { type WasiEnvironmentHelper } from "../../../../../0.2.x/cli/environment.js"; | ||
| export { type WasiEnvironmentHelper } from "../../../../../0.2.x/cli/environment.js"; | ||
| export type WASIEnvMiddleware = { | ||
@@ -4,0 +4,0 @@ Variables: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.6/http/adapters/hono/middleware/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAE7G,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,SAAS,EAAE;QACP,GAAG,EAAE,qBAAqB,CAAC;KAC9B,CAAC;CACL,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,iFAK7B,CAAC"} | ||
| {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../../../src/wasi/0.2.6/http/adapters/hono/middleware/env.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE;QACT,GAAG,EAAE,qBAAqB,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,iBAAiB,iFAK7B,CAAC"} |
@@ -1,8 +0,8 @@ | ||
| import { createMiddleware } from 'hono/factory'; | ||
| import { createMiddleware } from "hono/factory"; | ||
| // NOTE: this import is somewhat "magical", it is filled in by componentize-js when | ||
| // building a component. | ||
| // building a component. | ||
| // | ||
| // Transpilers & bundlers must essentially ignore this component when building. | ||
| import * as wasiEnv from "wasi:cli/environment@0.2.6"; | ||
| import { buildEnvHelperFromWASI } from '../../../../../0.2.x/cli/environment.js'; | ||
| import { buildEnvHelperFromWASI, } from "../../../../../0.2.x/cli/environment.js"; | ||
| /** | ||
@@ -39,5 +39,5 @@ * A Hono middleware that injects a helper that can retrieve | ||
| return createMiddleware(async (c, next) => { | ||
| c.set('env', buildEnvHelperFromWASI(wasiEnv)); | ||
| c.set("env", buildEnvHelperFromWASI(wasiEnv)); | ||
| await next(); | ||
| }); | ||
| }; |
@@ -1,8 +0,8 @@ | ||
| import type { Hono, Schema as HonoSchema, Env as HonoEnv } from 'hono'; | ||
| import { type FireOpts } from '../../../../0.2.x/hono.js'; | ||
| import type { Hono, Schema as HonoSchema, Env as HonoEnv } from "hono"; | ||
| import { type FireOpts } from "../../../../0.2.x/hono.js"; | ||
| /** Analog to Hono's fire function, which sets up your Hono application to be served */ | ||
| export declare function fire<Env extends HonoEnv = HonoEnv, Schema extends HonoSchema = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type | ||
| BasePath extends string = '/'>(app: Hono<Env, Schema, BasePath>, opts?: FireOpts): void; | ||
| export { incomingHandler } from '../../../../0.2.x/hono.js'; | ||
| export { buildLogger } from '../../../../0.2.x/logging.js'; | ||
| BasePath extends string = "/">(app: Hono<Env, Schema, BasePath>, opts?: FireOpts): void; | ||
| export { incomingHandler } from "../../../../0.2.x/hono.js"; | ||
| export { buildLogger } from "../../../../0.2.x/logging.js"; | ||
| //# sourceMappingURL=server.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../src/wasi/0.2.6/http/adapters/hono/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKvE,uFAAuF;AACvF,wBAAgB,IAAI,CAChB,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAAE,8DAA8D;AAC9F,QAAQ,SAAS,MAAM,GAAG,GAAG,EAE7B,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAChC,IAAI,CAAC,EAAE,QAAQ,QAIlB;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"} | ||
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../src/wasi/0.2.6/http/adapters/hono/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAKvE,uFAAuF;AACvF,wBAAgB,IAAI,CAClB,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAAE,8DAA8D;AAC9F,QAAQ,SAAS,MAAM,GAAG,GAAG,EAC7B,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,QAAQ,QAGlD;AAED,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC"} |
@@ -1,4 +0,4 @@ | ||
| import { buildFireFn } from '../../../../0.2.x/hono.js'; | ||
| import { readWASIRequest } from '../../types/request.js'; | ||
| import { writeWebResponse } from '../../types/response.js'; | ||
| import { buildFireFn } from "../../../../0.2.x/hono.js"; | ||
| import { readWASIRequest } from "../../types/request.js"; | ||
| import { writeWebResponse } from "../../types/response.js"; | ||
| /** Analog to Hono's fire function, which sets up your Hono application to be served */ | ||
@@ -9,3 +9,3 @@ export function fire(app, opts) { | ||
| } | ||
| export { incomingHandler } from '../../../../0.2.x/hono.js'; | ||
| export { buildLogger } from '../../../../0.2.x/logging.js'; | ||
| export { incomingHandler } from "../../../../0.2.x/hono.js"; | ||
| export { buildLogger } from "../../../../0.2.x/logging.js"; |
@@ -1,4 +0,4 @@ | ||
| import { ResponseOutparam } from 'wasi:http/types@0.2.6'; | ||
| import { ResponseOutparam } from "wasi:http/types@0.2.6"; | ||
| /** Write a Web `Response` into a `wasi:http@0.2.x#outgoing-response` */ | ||
| export declare function writeWebResponse(resp: Response, outgoingWasiResp: ResponseOutparam): Promise<void>; | ||
| //# sourceMappingURL=response.d.ts.map |
@@ -1,3 +0,3 @@ | ||
| import { OutgoingBody, ResponseOutparam, Fields, OutgoingResponse } from 'wasi:http/types@0.2.6'; | ||
| import { genWriteWebResponseFn } from '../../../0.2.x/http/types/response.js'; | ||
| import { OutgoingBody, ResponseOutparam, Fields, OutgoingResponse } from "wasi:http/types@0.2.6"; | ||
| import { genWriteWebResponseFn } from "../../../0.2.x/http/types/response.js"; | ||
| /** Write a Web `Response` into a `wasi:http@0.2.x#outgoing-response` */ | ||
@@ -4,0 +4,0 @@ export async function writeWebResponse(resp, outgoingWasiResp) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/wasi/0.2.x/cli/environment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAE/D,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACtC,cAAc,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,YAAY,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtC;;;;OAIG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAK7F"} | ||
| {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/wasi/0.2.x/cli/environment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,yBAAyB,CAAC;AAE/D,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,YAAY,EAAE,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtC;;;;OAIG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,qBAAqB,CAK7F"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAEzD,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACnC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzC;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEzC;;;;OAIG;IACH,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtC;;;;OAIG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB,CAYxF"} | ||
| {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAEzD,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvC;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEzC;;;;OAIG;IACH,MAAM,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtC;;;;OAIG;IACH,YAAY,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB,CAYxF"} |
@@ -1,2 +0,2 @@ | ||
| import type { Hono, Schema as HonoSchema, Env as HonoEnv } from 'hono'; | ||
| import type { Hono, Schema as HonoSchema, Env as HonoEnv } from "hono"; | ||
| /** | ||
@@ -3,0 +3,0 @@ * A pre-made incomingHandler export for downstream users to export. |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"hono.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/hono.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AAmHvE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;gBAEf,GAAG,QACF,GAAG;CAqBhB,CAAC;AAEF,mCAAmC;AACnC,MAAM,WAAW,QAAQ;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,UAAU,eAAe;IACrB,4FAA4F;IAC5F,eAAe,EAAE,CAAC,eAAe,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5D,0GAA0G;IAC1G,gBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,IAIzC,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAC9B,QAAQ,SAAS,MAAM,GAAG,GAAG,EAE7B,KAAK,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAChC,OAAO,QAAQ,UAiCtB"} | ||
| {"version":3,"file":"hono.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/hono.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AA0GvE;;;;;GAKG;AACH,eAAO,MAAM,eAAe;gBAEnB,GAAG,QACF,GAAG;CAiBZ,CAAC;AAEF,mCAAmC;AACnC,MAAM,WAAW,QAAQ;IACvB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,eAAe;IACvB,4FAA4F;IAC5F,eAAe,EAAE,CAAC,eAAe,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5D,0GAA0G;IAC1G,gBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,IAI7C,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,MAAM,SAAS,UAAU,GAAG,EAAE,EAC9B,QAAQ,SAAS,MAAM,GAAG,GAAG,EAC7B,KAAK,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,QAAQ,UA6BpD"} |
+8
-11
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
| /* eslint-disable @typescript-eslint/no-empty-object-type */ | ||
| import { ensureGlobalAddEventListener } from '../globals.js'; | ||
| import { ensureGlobalAddEventListener } from "../globals.js"; | ||
| /** Strategy for interfacing with WASI environment */ | ||
@@ -34,3 +34,3 @@ var AppAdapterType; | ||
| if (!opts.app) { | ||
| throw TypeError('Hono app must be provided'); | ||
| throw TypeError("Hono app must be provided"); | ||
| } | ||
@@ -58,4 +58,3 @@ this.app = opts.app; | ||
| async handle(wasiRequest, // IncomingRequest | ||
| wasiResponse // ResponseOutparam | ||
| ) { | ||
| wasiResponse) { | ||
| const request = await readWASIRequest(wasiRequest); | ||
@@ -87,3 +86,3 @@ const resp = await app.fetch(request); | ||
| if (!ADAPTER) { | ||
| throw new Error('app has not been set, ensure fire() was called with your app'); | ||
| throw new Error("app has not been set, ensure fire() was called with your app"); | ||
| } | ||
@@ -96,3 +95,3 @@ const adapterType = ADAPTER.getAdapterType(); | ||
| if (!incomingHandler) { | ||
| throw new Error('unexpectedly missing incomingHandler generated ESM export'); | ||
| throw new Error("unexpectedly missing incomingHandler generated ESM export"); | ||
| } | ||
@@ -115,5 +114,3 @@ incomingHandler.handle(req, resp); | ||
| app, | ||
| type: opts?.useFetchEvent | ||
| ? AppAdapterType.FetchEvent | ||
| : AppAdapterType.WasiHTTP, | ||
| type: opts?.useFetchEvent ? AppAdapterType.FetchEvent : AppAdapterType.WasiHTTP, | ||
| readWASIRequest, | ||
@@ -134,3 +131,3 @@ writeWebResponse, | ||
| const addEventListener = ensureGlobalAddEventListener(); | ||
| addEventListener('fetch', (evt) => { | ||
| addEventListener("fetch", (evt) => { | ||
| evt.respondWith(app.fetch(evt.request)); | ||
@@ -140,3 +137,3 @@ }); | ||
| catch (err) { | ||
| console.error('failed to build fetch event listener', err); | ||
| console.error("failed to build fetch event listener", err); | ||
| throw err; | ||
@@ -143,0 +140,0 @@ } |
@@ -11,9 +11,9 @@ /** | ||
| export interface SimpleWASIMethod { | ||
| tag: 'get' | 'head' | 'post' | 'put' | 'delete' | 'connect' | 'options' | 'trace' | 'patch'; | ||
| tag: "get" | "head" | "post" | "put" | "delete" | "connect" | "options" | "trace" | "patch"; | ||
| } | ||
| export interface OtherWASIMethod { | ||
| tag: 'other'; | ||
| tag: "other"; | ||
| val: string; | ||
| } | ||
| export type HTTPMethod = 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH' | string; | ||
| export type HTTPMethod = "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH" | string; | ||
| /** Convert an object similar to a `wasi:http@0.2.x#method` to a HTTP method string */ | ||
@@ -20,0 +20,0 @@ export declare function wasiHTTPMethodToString(wasiMethod: WASIHTTPMethodLike): HTTPMethod; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wasi/0.2.x/http/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACpE,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;CAC/F;AACD,MAAM,WAAW,eAAe;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACf;AACD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjH,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,CA6BjF;AAED,6CAA6C;AAC7C,UAAU,yBAAyB;IAC/B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAI9E"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wasi/0.2.x/http/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACpE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;CAC7F;AACD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,MAAM,GACN,KAAK,GACL,QAAQ,GACR,SAAS,GACT,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,CAAC;AAEX,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,GAAG,UAAU,CAuBjF;AAED,6CAA6C;AAC7C,UAAU,yBAAyB;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAM9E"} |
+12
-12
@@ -12,17 +12,17 @@ /** | ||
| if (!wasiMethod?.tag) { | ||
| throw new TypeError('invalid wasi HTTP method variant, does not contain tag'); | ||
| throw new TypeError("invalid wasi HTTP method variant, does not contain tag"); | ||
| } | ||
| switch (wasiMethod.tag) { | ||
| case 'get': | ||
| case 'head': | ||
| case 'post': | ||
| case 'put': | ||
| case 'delete': | ||
| case 'connect': | ||
| case 'options': | ||
| case 'trace': | ||
| case 'patch': | ||
| case "get": | ||
| case "head": | ||
| case "post": | ||
| case "put": | ||
| case "delete": | ||
| case "connect": | ||
| case "options": | ||
| case "trace": | ||
| case "patch": | ||
| return wasiMethod.tag.toUpperCase(); | ||
| case 'other': | ||
| if (!wasiMethod.val || typeof wasiMethod.val !== 'string') { | ||
| case "other": | ||
| if (!wasiMethod.val || typeof wasiMethod.val !== "string") { | ||
| throw new TypeError("HTTP method variant 'other' with missing/invaldi payload"); | ||
@@ -29,0 +29,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/wasi/0.2.x/http/types/request.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG3E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,YAAY,IAC9B,qBAAqB,eAAe,KAAG,OAAO,CAAC,OAAO,CAAC,CAwFhG"} | ||
| {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/wasi/0.2.x/http/types/request.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG3E;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,OAAO,YAAY,IAChC,qBAAqB,eAAe,KAAG,OAAO,CAAC,OAAO,CAAC,CA4F9F"} |
@@ -16,3 +16,3 @@ import { ensureGlobalReadableStream, ensureGlobalRequest } from "../../../globals.js"; | ||
| if (!wasiIncomingRequest) { | ||
| throw new TypeError('WASI incoming request not provided'); | ||
| throw new TypeError("WASI incoming request not provided"); | ||
| } | ||
@@ -24,7 +24,7 @@ const method = wasiHTTPMethodToString(wasiIncomingRequest.method()); | ||
| switch (schemeRaw.tag) { | ||
| case 'HTTP': | ||
| scheme = 'http'; | ||
| case "HTTP": | ||
| scheme = "http"; | ||
| break; | ||
| case 'HTTPS': | ||
| scheme = 'https'; | ||
| case "HTTPS": | ||
| scheme = "https"; | ||
| break; | ||
@@ -35,4 +35,7 @@ default: | ||
| const authority = wasiIncomingRequest.authority(); | ||
| const decoder = new TextDecoder('utf-8'); | ||
| const headers = Object.fromEntries(wasiIncomingRequest.headers().entries().map(([k, valueBytes]) => { | ||
| const decoder = new TextDecoder("utf-8"); | ||
| const headers = Object.fromEntries(wasiIncomingRequest | ||
| .headers() | ||
| .entries() | ||
| .map(([k, valueBytes]) => { | ||
| return [k, decoder.decode(valueBytes)]; | ||
@@ -70,3 +73,3 @@ })); | ||
| catch (err) { | ||
| if (err.payload.tag === 'closed') { | ||
| if (err.payload.tag === "closed") { | ||
| break; | ||
@@ -73,0 +76,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/wasi/0.2.x/http/types/response.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAc,MAAM,uBAAuB,CAAC;AAElH,UAAU,yBAAyB;IAC/B,KAAK,EAAE;QACH,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;QAC1C,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;KAC7C,CAAA;CACJ;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,IAG1B,MAAM,QAAQ,EAAE,kBAAkB,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAAC,CA8E5G"} | ||
| {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/wasi/0.2.x/http/types/response.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,MAAM,EAEP,MAAM,uBAAuB,CAAC;AAE/B,UAAU,yBAAyB;IACjC,KAAK,EAAE;QACL,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;QAC1C,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;KAC3C,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,IAMjE,MAAM,QAAQ,EACd,kBAAkB,gBAAgB,KACjC,OAAO,CAAC,IAAI,CAAC,CAgFjB"} |
@@ -12,3 +12,3 @@ const ENCODER = new TextEncoder(); | ||
| export function genWriteWebResponseFn(args) { | ||
| const { types: { OutgoingResponse, Fields, OutgoingBody, ResponseOutparam } } = args; | ||
| const { types: { OutgoingResponse, Fields, OutgoingBody, ResponseOutparam }, } = args; | ||
| return async function writeWebResponse(resp, outgoingWasiResp) { | ||
@@ -78,3 +78,3 @@ // Build headers | ||
| ResponseOutparam.set(outgoingWasiResp, { | ||
| tag: 'ok', | ||
| tag: "ok", | ||
| val: outgoingResponse, | ||
@@ -81,0 +81,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/logging.ts"],"names":[],"mappings":"AAgDA,UAAU,eAAe;IACrB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,eAAe;UAK7B,MAAM,WAAW,MAAM,EAAE;eAGzB,MAAM,WAAW,MAAM,EAAE;eAGzB,MAAM,WAAW,MAAM,EAAE;cAG1B,MAAM,WAAW,MAAM,EAAE;cAGzB,MAAM,WAAW,MAAM,EAAE;kBAGrB,MAAM,WAAW,MAAM,EAAE;eAG5B,MAAM,WAAW,MAAM,EAAE;EAK7C"} | ||
| {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/wasi/0.2.x/logging.ts"],"names":[],"mappings":"AAgDA,UAAU,eAAe;IACvB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,CAAC,EAAE,eAAe;UAK/B,MAAM,WAAW,MAAM,EAAE;eAGzB,MAAM,WAAW,MAAM,EAAE;eAGzB,MAAM,WAAW,MAAM,EAAE;cAG1B,MAAM,WAAW,MAAM,EAAE;cAGzB,MAAM,WAAW,MAAM,EAAE;kBAGrB,MAAM,WAAW,MAAM,EAAE;eAG5B,MAAM,WAAW,MAAM,EAAE;EAK3C"} |
@@ -33,3 +33,3 @@ // NOTE: we can't use log just yet due to lack of support in | ||
| //type LogFn = (s: string) => void; | ||
| const DEFAULT_CONTEXT = 'jco-std/http/adapter/hono'; | ||
| const DEFAULT_CONTEXT = "jco-std/http/adapter/hono"; | ||
| const DEFAULT_LOG_FN_BUILDER = (context) => { | ||
@@ -50,23 +50,23 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const fn = (msg, ...rest) => { | ||
| logFn('info', msg, ...rest); | ||
| logFn("info", msg, ...rest); | ||
| }; | ||
| fn.trace = (msg, ...rest) => { | ||
| logFn('trace', msg, ...rest); | ||
| logFn("trace", msg, ...rest); | ||
| }; | ||
| fn.debug = (msg, ...rest) => { | ||
| logFn('debug', msg, ...rest); | ||
| logFn("debug", msg, ...rest); | ||
| }; | ||
| fn.info = (msg, ...rest) => { | ||
| logFn('info', msg, ...rest); | ||
| logFn("info", msg, ...rest); | ||
| }; | ||
| fn.warn = (msg, ...rest) => { | ||
| logFn('warn', msg, ...rest); | ||
| logFn("warn", msg, ...rest); | ||
| }; | ||
| fn.critical = (msg, ...rest) => { | ||
| logFn('critical', msg, ...rest); | ||
| logFn("critical", msg, ...rest); | ||
| }; | ||
| fn.error = (msg, ...rest) => { | ||
| logFn('error', msg, ...rest); | ||
| logFn("error", msg, ...rest); | ||
| }; | ||
| return fn; | ||
| } |
@@ -11,3 +11,3 @@ /** Get the global `Request` */ | ||
| /** Get the global `AddEventListener` */ | ||
| export declare function ensureGlobalAddEventListener(): EventTarget['addEventListener']; | ||
| export declare function ensureGlobalAddEventListener(): EventTarget["addEventListener"]; | ||
| //# sourceMappingURL=globals.d.ts.map |
+4
-4
| /** Get the global `Request` */ | ||
| export function ensureGlobalRequest() { | ||
| if (!globalThis.Request) { | ||
| throw new TypeError('Request not provided by platform'); | ||
| throw new TypeError("Request not provided by platform"); | ||
| } | ||
@@ -11,3 +11,3 @@ return globalThis.Request; | ||
| if (!globalThis.ReadableStream) { | ||
| throw new TypeError('ReadableStream not provided by platform'); | ||
| throw new TypeError("ReadableStream not provided by platform"); | ||
| } | ||
@@ -18,6 +18,6 @@ return globalThis.ReadableStream; | ||
| export function ensureGlobalAddEventListener() { | ||
| if (!('addEventListener' in globalThis)) { | ||
| throw new TypeError('AddEventListener not provided by platform'); | ||
| if (!("addEventListener" in globalThis)) { | ||
| throw new TypeError("AddEventListener not provided by platform"); | ||
| } | ||
| return globalThis.addEventListener; | ||
| } |
+15
-14
| { | ||
| "name": "@bytecodealliance/jco-std", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "Library of shared functionality for use with the JS WebAssembly components", | ||
| "keywords": [ | ||
| "Component", | ||
| "Wasm", | ||
| "WebAssembly" | ||
| ], | ||
| "homepage": "https://github.com/bytecodealliance/jco#readme", | ||
| "bugs": { | ||
| "url": "https://github.com/bytecodealliance/jco/issues" | ||
| }, | ||
| "license": "(Apache-2.0 WITH LLVM-exception)", | ||
| "contributors": [ | ||
@@ -15,16 +25,6 @@ { | ||
| }, | ||
| "license": "(Apache-2.0 WITH LLVM-exception)", | ||
| "bugs": { | ||
| "url": "https://github.com/bytecodealliance/jco/issues" | ||
| }, | ||
| "homepage": "https://github.com/bytecodealliance/jco#readme", | ||
| "keywords": [ | ||
| "Wasm", | ||
| "WebAssembly", | ||
| "Component" | ||
| ], | ||
| "type": "module", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "type": "module", | ||
| "exports": { | ||
@@ -79,3 +79,5 @@ "./wasi/0.2.x/http/adapters/hono/server": { | ||
| "setup:jco-transpile:build": "npm run build -w @bytecodealliance/jco-transpile", | ||
| "lint": "eslint -c ./eslint.config.mjs", | ||
| "fmt": "oxfmt", | ||
| "fmt:check": "oxfmt --check", | ||
| "lint": "oxlint", | ||
| "lint:fix": "npm run lint -- --fix", | ||
@@ -97,3 +99,2 @@ "build:bindings:wasi:http:0.2.6": "WIT_PATH=wit/http-v0m2p6 OUTPUT_DIR_PATH=src/wasi/0.2.6/generated/types node scripts/generate-wasi-bindings.mjs", | ||
| "rolldown": "^1.0.0-beta.46", | ||
| "typescript-eslint": "^8.43.0", | ||
| "vitest": "^4.0.8", | ||
@@ -100,0 +101,0 @@ "which": "^5.0.0" |
+7
-7
@@ -9,3 +9,3 @@ # `@bytecodealliance/jco-std` | ||
| WebAssembly components can be used from server side applications *and* in the browser, and | ||
| WebAssembly components can be used from server side applications _and_ in the browser, and | ||
| `@bytecodealliance/jco-std` contains shared functionality and helpers for both environments. | ||
@@ -30,8 +30,8 @@ | ||
| ```ts | ||
| import { Hono } from 'hono'; | ||
| import { Hono } from "hono"; | ||
| import { fire } from '@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server'; | ||
| import { fire } from "@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server"; | ||
| const app = new Hono(); | ||
| app.get('/', () => "Hello World!"); | ||
| app.get("/", () => "Hello World!"); | ||
@@ -43,3 +43,3 @@ fire(app); | ||
| // as componentize-js will be looking for the ES module export. | ||
| export { incomingHandler } from '@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server'; | ||
| export { incomingHandler } from "@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server"; | ||
| ``` | ||
@@ -51,3 +51,3 @@ | ||
| > | ||
| > Note that using `0.2.x` is similar to using `latest`, it may change at *any* library update. | ||
| > Note that using `0.2.x` is similar to using `latest`, it may change at _any_ library update. | ||
@@ -63,3 +63,3 @@ [hono]: https://hono.dev | ||
| | Export | Description | | ||
| |-------------------------|-------------------------------------------------------------------------------| | ||
| | ----------------------- | ----------------------------------------------------------------------------- | | ||
| | `http/adapters/hono` | Enables easier building of [Hono][hono] HTTP servers | | ||
@@ -66,0 +66,0 @@ | `http/adapters/express` | Provides a simple [Express][express]-like interface for building HTTP servers | |
8
-11.11%73189
-0.06%