Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 #294

Merged
merged 190 commits into from
Oct 4, 2023
Merged

V3 #294

Show file tree
Hide file tree
Changes from 114 commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
364a721
Initial changes sweep for moving to a monorepo
jpwilliams Jul 10, 2023
1158e8c
Remove unsupported `defaults` key in `setup-and-build` composite action
jpwilliams Jul 10, 2023
46d85a9
Fix bad paths to `setup-and-build` composite action
jpwilliams Jul 11, 2023
594a2c7
Remove local pack `inngest.tgz`
jpwilliams Jul 11, 2023
9933df1
Fix working directory issues for PR checks
jpwilliams Jul 11, 2023
d4d7609
Rename `examples/projects/` to `examples/apps/`
jpwilliams Jul 11, 2023
e8a09e2
Remove Deno linking files for integration tests - reintroducing Deno …
jpwilliams Jul 11, 2023
2de25fe
Use npm to run tests instead of pnpm due to Node version restrictions
jpwilliams Jul 11, 2023
b693708
Remove unneeded Deno check in PR testing
jpwilliams Jul 11, 2023
642a124
Use `volta` to run global binaries across different projects
jpwilliams Jul 11, 2023
6b58fb6
Use `setup-and-build` action to install `@antfu/ni`
jpwilliams Jul 11, 2023
07b4e41
Fix type testing targeting incorrect directory
jpwilliams Jul 11, 2023
d1bf2bd
Reintroduce prelinking; exports don't work in all targets
jpwilliams Jul 11, 2023
5f6f633
Fix integration function tests referencing local package
jpwilliams Jul 11, 2023
361307b
Remove `inngest-init` script
jpwilliams Jul 11, 2023
847fc8f
Remove SDK landing page tests
jpwilliams Jul 11, 2023
77fc04d
Duplicate README for root
jpwilliams Jul 11, 2023
13bf9e0
Move changesets to publish and manage all packages
jpwilliams Jul 12, 2023
07a1102
Merge branch 'main' into pnpm
jpwilliams Jul 12, 2023
44e4b34
Merge branch 'main' into pnpm
jpwilliams Jul 12, 2023
79f22df
Avoid installing dependencies for every example test
jpwilliams Jul 12, 2023
9571ea7
Still add `pnpm` for running integration tests
jpwilliams Jul 12, 2023
1052afd
We always have to build to generate `version.ts`...
jpwilliams Jul 12, 2023
79a9e97
Update contribution instructions
jpwilliams Jul 12, 2023
a1e50a5
Add example functions as workspace package for easy Jest types
jpwilliams Jul 12, 2023
29ce04f
Remove dangling Deno comments from PR checks
jpwilliams Jul 12, 2023
da1cda1
Remove PR checks running directly on `pnpm` branch
jpwilliams Jul 12, 2023
b1dbc00
Add `examples/apps/framework-remix/`
jpwilliams Jul 12, 2023
0e4cfea
Merge branch 'main' into pnpm
jpwilliams Jul 12, 2023
c53e0c6
Add `examples/apps/framework-nuxt/`
jpwilliams Jul 12, 2023
c71aa7c
Merge branch 'main' into pnpm
jpwilliams Jul 12, 2023
1b842d6
Merge branch 'main' into pnpm
jpwilliams Jul 12, 2023
6ebfd78
Add Yarn to example testing toolchain
jpwilliams Jul 12, 2023
b2f2e3d
Pin Yarn instead of directly using v4
jpwilliams Jul 12, 2023
8295119
Add `only-allow` for pnpm protection
jpwilliams Jul 12, 2023
f6d1c6a
Clean up existing framework examples to use v2 schemas
jpwilliams Jul 13, 2023
d336838
Move current `eslint-plugin` package to `@inngest/eslint-plugin-inter…
jpwilliams Jul 14, 2023
412c58f
Merge branch 'main' into pnpm
jpwilliams Jul 14, 2023
ea99740
Fix internal eslint-plugin rule exceptions
jpwilliams Jul 14, 2023
97eaf25
Merge branch 'main' into pnpm
jpwilliams Jul 17, 2023
d4d5c46
Fix out-of-date `@inngest/eslint-plugin` rules
jpwilliams Jul 17, 2023
0a63800
Set root `README.md` to be a symlink to the `packages/inngest/README.md`
jpwilliams Jul 20, 2023
d7aa7b3
Merge branch 'main' into pnpm
jpwilliams Jul 27, 2023
cf0042f
Ignore linting when building and testing example repos, fix install
jpwilliams Jul 27, 2023
2a5c4b9
Remove Volta usage; always breaks (volta-cli/action#77)
jpwilliams Jul 27, 2023
2590f47
Merge branch 'main' into pnpm
jpwilliams Jul 27, 2023
ea04e0e
Set Node version to build with
jpwilliams Jul 27, 2023
01d2ab1
Don't use any special package managers
jpwilliams Jul 27, 2023
3c281ad
Add `debug@^4.3.4`; remove `queue-microtask@^1.2.3`
jpwilliams Aug 3, 2023
abd23c5
Add timeout and deferred promise helpers
jpwilliams Aug 3, 2023
30ff91c
Refactor core loop
jpwilliams Aug 3, 2023
b5cc0cd
Add middleware initialization (INN-1887) and `transformInput` (INN-1877)
jpwilliams Aug 3, 2023
f43af50
Shift execution result debug statements
jpwilliams Aug 3, 2023
1ffe4b7
INN-1878 Add `beforeMemoization` middleware
jpwilliams Aug 3, 2023
74af1ee
Remove TODO comment; already implemented
jpwilliams Aug 3, 2023
1495b13
INN-1879 Add `afterMemoization` middleware hooks
jpwilliams Aug 3, 2023
11c47d8
INN-1890: Capture and report middleware errors during execution
jpwilliams Aug 3, 2023
cf3ad10
INN-1880 Add `beforeExecution` middleware hooks
jpwilliams Aug 4, 2023
0bbe7e1
Fix various TODOs and ESLint exceptions
jpwilliams Aug 4, 2023
3bf1f73
INN-1885 Re-add support for failure handlers
jpwilliams Aug 4, 2023
6f73498
Rename `gatherFoundSteps` to `filterNewSteps` for clarity
jpwilliams Aug 4, 2023
c6055b0
Merge branch 'main' into pnpm
jpwilliams Aug 8, 2023
dd8d4a1
Merge branch 'pnpm' into v3-refactor
jpwilliams Aug 8, 2023
d4492a5
INN-1881: Add `afterExecution` middleware hooks
jpwilliams Aug 8, 2023
43b5634
INN-1882: Add `transformOutput` middleware hooks
jpwilliams Aug 8, 2023
61edc34
Add `typescript@beta` tests to ensure beta releases are being tested
jpwilliams Aug 8, 2023
31c45f0
Merge branch 'pnpm' into v3-refactor
jpwilliams Aug 9, 2023
d8c440d
INN-1883: Add `beforeResponse` middleware hook
jpwilliams Aug 9, 2023
b44db13
Fix TS being confused, requiring `const` instead of `let`
jpwilliams Aug 9, 2023
47706fa
Add `fns` function option support
jpwilliams Aug 9, 2023
de5fd96
Push API diff for various refactor changes
jpwilliams Aug 9, 2023
59655d7
Add real JSON returns and error serialization
jpwilliams Aug 9, 2023
2a1b5b9
Add placeholder prerelease GitHub Action
jpwilliams Aug 9, 2023
d454015
Add placeholder prerelease GitHub Action
jpwilliams Aug 9, 2023
ed099c6
Revert "Add placeholder prerelease GitHub Action"
jpwilliams Aug 9, 2023
645a26b
Revert "Add placeholder prerelease GitHub Action"
jpwilliams Aug 9, 2023
e14c6df
Merge branch 'pnpm' into v3-refactor
jpwilliams Aug 9, 2023
fd69ec0
Ensure `beforeResponse` hook called at the end, consistent serialization
jpwilliams Aug 9, 2023
b6743b5
Fix bad import of promise helpers in `InngestStepTools`
jpwilliams Aug 9, 2023
47aebe4
Adjust tests ready for new execution rules
jpwilliams Aug 9, 2023
6f7994e
Remove unused `GetHookStackOptions`
jpwilliams Aug 9, 2023
8903533
Merge branch 'main' into pnpm
jpwilliams Aug 10, 2023
f605822
Merge branch 'pnpm' into v3-refactor
jpwilliams Aug 10, 2023
c2b8ac3
Update some contribution guidelines
jpwilliams Aug 10, 2023
6cbd3e1
Add optional `disable_immediate_execution` to incoming execution req
jpwilliams Aug 10, 2023
7bfaa43
Enable immediate execution of found steps where appropriate
jpwilliams Aug 10, 2023
e5f0790
Fix tests to abide by new execution rules
jpwilliams Aug 10, 2023
ae5a803
Add error serialization tests
jpwilliams Aug 10, 2023
7430d3d
Fix bad import in `InngestFunction` tests
jpwilliams Aug 10, 2023
a483e10
Move `generateReleaseConfig` script to the root
jpwilliams Aug 10, 2023
c2be940
Up timeouts and attempts of integration testing
jpwilliams Aug 10, 2023
e3b7104
Merge branch 'main' into v3-refactor
jpwilliams Aug 10, 2023
01883ee
Merge branch 'main' into v3-refactor
jpwilliams Aug 11, 2023
678b100
Merge branch 'main' into v3-refactor
jpwilliams Aug 14, 2023
e8de769
Move `generateReleaseConfig.js`
jpwilliams Aug 14, 2023
88c6081
Add prerelease workflow
jpwilliams Aug 14, 2023
446681a
Add NPM_TOKEN to prerelease workflow
jpwilliams Aug 14, 2023
dcd520c
Add NODE_AUTH_TOKEN to prerelease workflow and ensure 1 release at once
jpwilliams Aug 14, 2023
d5155c5
Force npm registry in `setup-and-build` composite action
jpwilliams Aug 14, 2023
9b81995
Allow prerelease comment to send properly
jpwilliams Aug 14, 2023
a46953f
Merge branch 'pnpm' into v3-refactor
jpwilliams Aug 14, 2023
0829790
INN-1913: Retain inline step execution for some step types
jpwilliams Aug 15, 2023
34e7b73
Merge branch 'main' into v3-refactor
jpwilliams Aug 16, 2023
4170aa5
INN-1915: Replace `name` with `id` for clients (and comm handlers)
jpwilliams Aug 16, 2023
4e13dcd
Merge branch 'main' into v3-refactor
jpwilliams Aug 17, 2023
4015ecc
Merge branch 'main' into v3-refactor
jpwilliams Aug 18, 2023
27015f8
Merge branch 'main' into v3-refactor
jpwilliams Aug 21, 2023
9a2bddb
INN-1916 Ensures `id` is required and `name` is optional for functions
jpwilliams Aug 21, 2023
d546133
INN-1942 Remove string-only function creation
jpwilliams Aug 21, 2023
119a292
Merge branch 'main' into v3-refactor
jpwilliams Aug 23, 2023
b25ddf3
INN-1864 Allow naming all steps using generic step options
jpwilliams Aug 23, 2023
f28b3ed
INN-1941 Remove shimmed `fns` option from function config
jpwilliams Aug 23, 2023
af627cb
Ensure a function's default name is its unprefixed ID
jpwilliams Aug 24, 2023
867e03a
Export `StepOptions` types to make custom step tooling middleware
jpwilliams Aug 24, 2023
309c6de
Prune removed errors
jpwilliams Aug 24, 2023
bc77efc
Add release tags to exported step options types
jpwilliams Aug 24, 2023
e2de22f
Merge branch 'main' into v3-refactor
jpwilliams Aug 25, 2023
456e842
Refactor serve handlers to be flatter, object-based, and simpler
jpwilliams Aug 29, 2023
ec6e94c
Fix `cacheFn()` helper linting and generic usage
jpwilliams Aug 29, 2023
a1b5705
Remove unneeded `InngestCommHandler` test in `"inngest/express"` handler
jpwilliams Aug 29, 2023
80e42dc
Adjust handler tests to adhere to new serve handler format
jpwilliams Aug 29, 2023
856d738
Update all supported handlers with new serve handler format
jpwilliams Aug 29, 2023
3830010
Fix some linting issues
jpwilliams Aug 29, 2023
f267b4e
Push API diff for `InngestCommHandler` refactors
jpwilliams Aug 29, 2023
db791f0
Fix up serve handler comment examples
jpwilliams Aug 29, 2023
95644bc
Remove unused introspection query key
jpwilliams Aug 29, 2023
baa59cf
Unify URL config to use a single base URL
jpwilliams Aug 29, 2023
51d7c5a
Add `runAsPromise()` helper for safely executing user code
jpwilliams Aug 30, 2023
9de09e4
Fix TODO comment for `GetEvents` type
jpwilliams Aug 30, 2023
1576888
Add `rethrowError()` helper for prefixing errors with Inngest context
jpwilliams Aug 30, 2023
6bd85c2
Fix TODO - better errors/reasons for accessing serve handler fields
jpwilliams Aug 30, 2023
03fd0bd
Safely promisify various user code executions with `runAsPromise()`
jpwilliams Aug 30, 2023
8f2cb1c
Fix call stack error when accessing handler actions
jpwilliams Aug 30, 2023
a22be8b
Remove completed TODO
jpwilliams Aug 30, 2023
d5eb006
Fix test imports to allow for type testing
jpwilliams Aug 30, 2023
af688cf
Upgrade to `typescript@~5.2.0`
jpwilliams Aug 30, 2023
96493f4
Prune unused code
jpwilliams Aug 30, 2023
b2d9839
Upgrade example clients and functions to v3
jpwilliams Aug 31, 2023
7e4d3e6
Handle unpassed options in Fastify plugin
jpwilliams Aug 31, 2023
4de8b70
Upgrade example serve handlers to v3
jpwilliams Aug 31, 2023
0ccde69
Upgrade Zod to 3.22 for `.catch()`
jpwilliams Aug 31, 2023
d93e2bd
Add environment variables for all registration options
jpwilliams Aug 31, 2023
a44cd51
Merge branch 'main' into v3-refactor
jpwilliams Aug 31, 2023
c7cd325
Upgrade existing examples to v3
jpwilliams Aug 31, 2023
617549a
Remove unneeded TODO
jpwilliams Aug 31, 2023
6ebd679
Fix TODOs for missing `stepId`, `fnId`, `deployId`
jpwilliams Aug 31, 2023
600f1a1
Clear up various TODOs
jpwilliams Aug 31, 2023
55a7485
Downgrade `zod` to `~3.21`; `>=3.22` breaks against earlier versions
jpwilliams Sep 1, 2023
51b2a96
Fix `as const` functions array throwing TS errors
jpwilliams Sep 1, 2023
7b2ae5c
Alter `step.waitForEvent()` to accept (`idOrOptions, waitForEventOpts)`
jpwilliams Sep 1, 2023
e7e754f
Merge branch 'main' into v3-refactor
jpwilliams Sep 1, 2023
5dcbfd6
Add `logPrefix` const for marking logs across the app
jpwilliams Sep 5, 2023
45bb057
INN-2020: Detect and warn on deprecated fns argument
jpwilliams Sep 5, 2023
c1321ad
INN-2017: Detect and warn on function creation with string name
jpwilliams Sep 5, 2023
7962779
INN-2018: Detect and warn on trigger definiton with string name
jpwilliams Sep 5, 2023
458ec30
INN-2019: Detect and warn on deprecated env var use
jpwilliams Sep 5, 2023
2da1025
INN-2016: Detect and warn on serve handler previous inputs
jpwilliams Sep 5, 2023
8630fa3
Fix some `hasOwnProperty()` calls to be safer
jpwilliams Sep 5, 2023
31ced33
Merge branch 'main' into v3-refactor
jpwilliams Sep 18, 2023
6d3aaec
Adjust integration test functions for new v3 APIs
jpwilliams Sep 18, 2023
32841a4
Add support for step-based `Promise.race()` (#315)
jpwilliams Sep 19, 2023
2ac488a
Add `Retry-After` header using control flow (#316)
jpwilliams Sep 19, 2023
6ddeb65
Set default `displayName` when none is specified directly
jpwilliams Sep 22, 2023
6dd654a
Return event IDs when sending events (#256)
djfarrelly Sep 25, 2023
c2a8eb4
Merge branch 'main' into v3-refactor
jpwilliams Sep 25, 2023
50c35e5
Hashing and automatic indexing for V3 (#320)
jpwilliams Sep 25, 2023
9047d2e
Merge branch 'main' into v3-refactor
jpwilliams Sep 26, 2023
2f7b02a
Enable `DEBUG=inngest:*` is `INNGEST_LOG_LEVEL=debug`
jpwilliams Sep 28, 2023
fc72f82
Merge branch 'main' into v3-refactor
jpwilliams Sep 29, 2023
9b0bc0e
Ensure `ServeHandlerOptions` are exported for custom handlers
jpwilliams Oct 2, 2023
2b40d19
Refactor handler example to use new v3 handlers
jpwilliams Oct 2, 2023
bcbebef
Clean up disparate env types (`Record<string, string | undefined>`)
jpwilliams Oct 2, 2023
ee05030
Merge branch 'main' into v3-refactor
jpwilliams Oct 2, 2023
6486254
V2 backcompatibility for V3 (#328)
jpwilliams Oct 2, 2023
67fcb83
Namespace step and function data/error for future per-step errors
jpwilliams Oct 3, 2023
12cd218
Resolve `step-not-found` lacking status
jpwilliams Oct 3, 2023
0d39c78
Ensure adding new execution versions has an obvious TS path
jpwilliams Oct 3, 2023
487a58b
Remove depreacted `landingPage` option when seving
jpwilliams Oct 3, 2023
c8c2375
Fix `"inngest/edge"` and `"inngest/cloudflare"` handlers using bad fetch
jpwilliams Oct 3, 2023
2907ed2
Fix `functions.test.ts` incorrectly inferring `FnData` type
jpwilliams Oct 4, 2023
713d1b6
Fix integration tests following data namespacing
jpwilliams Oct 4, 2023
4af320a
Add autocomplete for function `id` based on `name` to aid migration
jpwilliams Oct 4, 2023
c79fb26
Export `slugify` for v2->v3 migration
jpwilliams Oct 4, 2023
553ffa9
Add v3 breaking changesets
jpwilliams Oct 4, 2023
013468e
Removing TS type for strings
jpwilliams Oct 4, 2023
c87d7ac
Ensure `undefined` returns are handled correctly
jpwilliams Oct 4, 2023
2d73df3
Line API diff for `undefined` returns
jpwilliams Oct 4, 2023
80cc6d3
Only manage `{data}` scoping for v1; don't double-scope function returns
jpwilliams Oct 4, 2023
042b7da
Fix `undefined` data that should be `null` for v0/v1 responses
jpwilliams Oct 4, 2023
894c58c
Fix integration tests following descoping function data
jpwilliams Oct 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 30 additions & 31 deletions packages/inngest/etc/inngest.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export interface ClientOptions {
env?: string;
eventKey?: string;
fetch?: typeof fetch;
id: string;
inngestBaseUrl?: string;
// Warning: (ae-forgotten-export) The symbol "Logger" needs to be exported by the entry point index.d.ts
logger?: Logger;
// Warning: (ae-forgotten-export) The symbol "MiddlewareStack" needs to be exported by the entry point index.d.ts
//
// (undocumented)
middleware?: MiddlewareStack;
name: string;
schemas?: EventSchemas<Record<string, EventPayload>>;
}

Expand Down Expand Up @@ -98,12 +98,10 @@ export interface FunctionOptions<Events extends Record<string, EventPayload>, Ev
limit: number;
key?: string;
};
// (undocumented)
fns?: Record<string, unknown>;
id?: string;
id: string;
idempotency?: string;
middleware?: MiddlewareStack;
name: string;
name?: string;
// (undocumented)
onFailure?: (...args: unknown[]) => unknown;
rateLimit?: {
Expand All @@ -114,8 +112,10 @@ export interface FunctionOptions<Events extends Record<string, EventPayload>, Ev
retries?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
}

// Warning: (ae-forgotten-export) The symbol "AnyInngest" needs to be exported by the entry point index.d.ts
//
// @public
export type GetEvents<T extends Inngest<any>> = T extends Inngest<infer U> ? EventsFromOpts<U> : never;
export type GetEvents<T extends AnyInngest> = T extends Inngest<infer U> ? EventsFromOpts<U> : never;

// @public
export enum headerKeys {
Expand All @@ -135,8 +135,7 @@ export enum headerKeys {

// @public
export class Inngest<TOpts extends ClientOptions = ClientOptions> {
constructor({ name, eventKey, inngestBaseUrl, fetch, env, logger, middleware, }: TOpts);
// Warning: (ae-forgotten-export) The symbol "ShimmedFns" needs to be exported by the entry point index.d.ts
constructor({ id, eventKey, inngestBaseUrl, fetch, env, logger, middleware, }: TOpts);
// Warning: (ae-forgotten-export) The symbol "ExclusiveKeys" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Handler" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ExtendWithMiddleware" needs to be exported by the entry point index.d.ts
Expand All @@ -145,21 +144,20 @@ export class Inngest<TOpts extends ClientOptions = ClientOptions> {
// Warning: (ae-forgotten-export) The symbol "FunctionTrigger" needs to be exported by the entry point index.d.ts
//
// (undocumented)
createFunction<TFns extends Record<string, unknown>, TMiddleware extends MiddlewareStack, TTrigger extends TriggerOptions<keyof EventsFromOpts<TOpts> & string>, TShimmedFns extends Record<string, (...args: any[]) => any> = ShimmedFns<TFns>, TTriggerName extends keyof EventsFromOpts<TOpts> & string = EventNameFromTrigger<EventsFromOpts<TOpts>, TTrigger>>(nameOrOpts: string | ExclusiveKeys<Omit<FunctionOptions<EventsFromOpts<TOpts>, TTriggerName>, "fns" | "onFailure" | "middleware"> & {
fns?: TFns;
onFailure?: Handler<TOpts, EventsFromOpts<TOpts>, TTriggerName, TShimmedFns, ExtendWithMiddleware<[
createFunction<TMiddleware extends MiddlewareStack, TTrigger extends TriggerOptions<keyof EventsFromOpts<TOpts> & string>, TTriggerName extends keyof EventsFromOpts<TOpts> & string = EventNameFromTrigger<EventsFromOpts<TOpts>, TTrigger>>(options: ExclusiveKeys<Omit<FunctionOptions<EventsFromOpts<TOpts>, TTriggerName>, "onFailure" | "middleware"> & {
onFailure?: Handler<TOpts, EventsFromOpts<TOpts>, TTriggerName, ExtendWithMiddleware<[
typeof builtInMiddleware,
NonNullable<TOpts["middleware"]>,
TMiddleware
], FailureEventArgs<EventsFromOpts<TOpts>[TTriggerName]>>>;
middleware?: TMiddleware;
}, "batchEvents", "cancelOn" | "rateLimit">, trigger: TTrigger, handler: Handler<TOpts, EventsFromOpts<TOpts>, TTriggerName, TShimmedFns, ExtendWithMiddleware<[
}, "batchEvents", "cancelOn" | "rateLimit">, trigger: TTrigger, handler: Handler<TOpts, EventsFromOpts<TOpts>, TTriggerName, ExtendWithMiddleware<[
typeof builtInMiddleware,
NonNullable<TOpts["middleware"]>,
TMiddleware
]>>): InngestFunction<TOpts, EventsFromOpts<TOpts>, FunctionTrigger<keyof EventsFromOpts<TOpts> & string>, FunctionOptions<EventsFromOpts<TOpts>, keyof EventsFromOpts<TOpts> & string>>;
readonly id: string;
readonly inngestBaseUrl: URL;
readonly name: string;
// Warning: (ae-forgotten-export) The symbol "SendEventPayload" needs to be exported by the entry point index.d.ts
send<Payload extends SendEventPayload<EventsFromOpts<TOpts>>>(payload: Payload): Promise<void>;
setEventKey(
Expand All @@ -171,10 +169,11 @@ export class Inngest<TOpts extends ClientOptions = ClientOptions> {
//
// @public
export class InngestCommHandler<H extends Handler_2, TResTransform extends (res: ActionResponse<string>, ...args: Parameters<H>) => any, TStreamTransform extends (res: ActionResponse<ReadableStream>, ...args: Parameters<H>) => any> {
// Warning: (ae-forgotten-export) The symbol "AnyInngestFunction" needs to be exported by the entry point index.d.ts
constructor(
frameworkName: string,
client: Inngest<any>,
functions: InngestFunction<any, any, any, any>[], { inngestRegisterUrl, fetch, logLevel, signingKey, serveHost, servePath, streaming, name, }: RegisterOptions | undefined,
client: AnyInngest,
functions: AnyInngestFunction[], { inngestRegisterUrl, fetch, logLevel, signingKey, serveHost, servePath, streaming, id, }: RegisterOptions | undefined,
handler: H,
transformRes: TResTransform,
streamTransformRes?: TStreamTransform);
Expand All @@ -185,10 +184,10 @@ export class InngestCommHandler<H extends Handler_2, TResTransform extends (res:
createHandler(): (...args: Parameters<H>) => Promise<Awaited<ReturnType<TResTransform>>>;
protected readonly frameworkName: string;
readonly handler: H;
readonly id: string;
protected _isProd: boolean;
protected log(level: LogLevel, ...args: unknown[]): void;
protected readonly logLevel: LogLevel;
readonly name: string;
// (undocumented)
protected register(url: URL, devServerHost: string | undefined, deployId: string | undefined | null, getHeaders: () => Record<string, string>): Promise<{
status: number;
Expand All @@ -201,10 +200,10 @@ export class InngestCommHandler<H extends Handler_2, TResTransform extends (res:
protected registerBody(url: URL): RegisterRequest;
protected reqUrl(url: URL): URL;
// Warning: (ae-forgotten-export) The symbol "ServerTiming" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "StepRunResponse" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "ExecutionResult" needs to be exported by the entry point index.d.ts
//
// (undocumented)
protected runStep(functionId: string, stepId: string | null, data: unknown, timer: ServerTiming): Promise<StepRunResponse>;
protected runStep(functionId: string, stepId: string | null, data: unknown, timer: ServerTiming): Promise<ExecutionResult>;
protected readonly serveHost: string | undefined;
protected readonly servePath: string | undefined;
protected signingKey: string | undefined;
Expand Down Expand Up @@ -257,8 +256,8 @@ export interface MiddlewareOptions {
//
// @public (undocumented)
export type MiddlewareRegisterFn = (ctx: {
client: Inngest<any>;
fn?: InngestFunction<any, any, any, any>;
client: AnyInngest;
fn?: AnyInngestFunction;
}) => MaybePromise<MiddlewareRegisterReturn>;

// @public (undocumented)
Expand Down Expand Up @@ -301,11 +300,11 @@ export enum queryKeys {
// @public
export interface RegisterOptions {
fetch?: typeof fetch;
id?: string;
inngestRegisterUrl?: string;
// @deprecated
landingPage?: boolean;
logLevel?: LogLevel;
name?: string;
serveHost?: string;
servePath?: string;
signingKey?: string;
Expand All @@ -314,8 +313,8 @@ export interface RegisterOptions {

// @public
export type ServeHandler = (
client: Inngest<any>,
functions: InngestFunction<any, any, any, any>[],
client: AnyInngest,
functions: AnyInngestFunction[],
opts?: RegisterOptions
/**
* This `any` return is appropriate.
Expand Down Expand Up @@ -355,14 +354,14 @@ export type ZodEventSchemas = Record<string, {

// Warnings were encountered during analysis:
//
// src/components/InngestMiddleware.ts:261:3 - (ae-forgotten-export) The symbol "InitialRunInfo" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:274:5 - (ae-forgotten-export) The symbol "MiddlewareRunInput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:280:5 - (ae-forgotten-export) The symbol "BlankHook" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:313:5 - (ae-forgotten-export) The symbol "MiddlewareRunOutput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:332:5 - (ae-forgotten-export) The symbol "MiddlewareSendEventInput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:342:5 - (ae-forgotten-export) The symbol "MiddlewareSendEventOutput" needs to be exported by the entry point index.d.ts
// src/types.ts:51:5 - (ae-forgotten-export) The symbol "failureEventErrorSchema" needs to be exported by the entry point index.d.ts
// src/types.ts:685:5 - (ae-forgotten-export) The symbol "TimeStrBatch" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:259:3 - (ae-forgotten-export) The symbol "InitialRunInfo" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:272:5 - (ae-forgotten-export) The symbol "MiddlewareRunInput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:278:5 - (ae-forgotten-export) The symbol "BlankHook" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:311:5 - (ae-forgotten-export) The symbol "MiddlewareRunOutput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:330:5 - (ae-forgotten-export) The symbol "MiddlewareSendEventInput" needs to be exported by the entry point index.d.ts
// src/components/InngestMiddleware.ts:340:5 - (ae-forgotten-export) The symbol "MiddlewareSendEventOutput" needs to be exported by the entry point index.d.ts
// src/types.ts:53:5 - (ae-forgotten-export) The symbol "failureEventErrorSchema" needs to be exported by the entry point index.d.ts
// src/types.ts:639:5 - (ae-forgotten-export) The symbol "TimeStrBatch" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
3 changes: 2 additions & 1 deletion packages/inngest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"canonicalize": "^1.0.8",
"chalk": "^4.1.2",
"cross-fetch": "^3.1.5",
"debug": "^4.3.4",
"h3": "^1.0.2",
"hash.js": "^1.1.7",
"json-stringify-safe": "^5.0.1",
"ms": "^2.1.3",
"queue-microtask": "^1.2.3",
"serialize-error-cjs": "^0.1.3",
"type-fest": "^3.5.1",
"zod": "^3.19.1"
Expand All @@ -63,6 +63,7 @@
"@jest/globals": "^29.5.0",
"@microsoft/api-extractor": "^7.33.7",
"@types/aws-lambda": "^8.10.108",
"@types/debug": "^4.1.8",
"@types/express": "^4.17.13",
"@types/inquirer": "^9.0.3",
"@types/jest": "^27.4.1",
Expand Down
28 changes: 14 additions & 14 deletions packages/inngest/src/components/EventSchemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { z } from "zod";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Schemas<T extends EventSchemas<any>> = GetEvents<
Inngest<{ name: "test"; schemas: T }>
Inngest<{ id: "test"; schemas: T }>
>;

describe("EventSchemas", () => {
Expand Down Expand Up @@ -544,13 +544,13 @@ describe("EventSchemas", () => {
}>();

const inngest = new Inngest({
name: "test",
id: "test",
schemas,
eventKey: "test-key-123",
});

inngest.createFunction(
{ name: "test" },
{ id: "test" },
{ event: "test.event" },
({ event }) => {
assertType<"test.event">(event.name);
Expand All @@ -567,13 +567,13 @@ describe("EventSchemas", () => {
}>();

const inngest = new Inngest({
name: "test",
id: "test",
schemas,
eventKey: "test-key-123",
});

inngest.createFunction(
{ name: "test" },
{ id: "test" },
{ event: "test.event" },
({ event }) => {
assertType<"test.event">(event.name);
Expand All @@ -592,19 +592,19 @@ describe("EventSchemas", () => {
}>();

const inngest = new Inngest({
name: "test",
id: "test",
schemas,
eventKey: "test-key-123",
});

inngest.createFunction(
{
name: "test",
id: "test",
cancelOn: [{ event: "test.event2", match: "data.foo" }],
},
{ event: "test.event" },
({ step }) => {
void step.waitForEvent("test.event2", {
void step.waitForEvent("id", "test.event2", {
match: "data.foo",
timeout: "1h",
});
Expand All @@ -620,19 +620,19 @@ describe("EventSchemas", () => {
}>();

const inngest = new Inngest({
name: "test",
id: "test",
schemas,
eventKey: "test-key-123",
});

inngest.createFunction(
{
name: "test",
id: "test",
cancelOn: [{ event: "test.event2", match: "data.foo" }],
},
{ event: "test.event" },
({ step }) => {
void step.waitForEvent("test.event2", {
void step.waitForEvent("id", "test.event2", {
match: "data.foo",
timeout: "1h",
});
Expand All @@ -648,19 +648,19 @@ describe("EventSchemas", () => {
}>();

const inngest = new Inngest({
name: "test",
id: "test",
schemas,
eventKey: "test-key-123",
});

inngest.createFunction(
{
name: "test",
id: "test",
cancelOn: [{ event: "test.event2", match: "data.foo" }],
},
{ event: "test.event" },
({ step }) => {
void step.waitForEvent("test.event2", {
void step.waitForEvent("id", "test.event2", {
match: "data.foo",
timeout: "1h",
});
Expand Down
Loading