inngest 0.0.0-streaming-20230424112237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.devcontainer/devcontainer.json +56 -0
  4. package/.eslintignore +1 -0
  5. package/.eslintrc.js +40 -0
  6. package/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
  7. package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  8. package/.github/actions/setup-and-build/action.yml +37 -0
  9. package/.github/workflows/pr.yml +248 -0
  10. package/.github/workflows/release.yml +31 -0
  11. package/.vscode/settings.json +4 -0
  12. package/CHANGELOG.md +112 -0
  13. package/LICENSE.md +674 -0
  14. package/README.md +162 -0
  15. package/TODO.md +11 -0
  16. package/api-extractor.json +381 -0
  17. package/deno_compat/README.md +18 -0
  18. package/deno_compat/deno.fresh.ts +5 -0
  19. package/deno_compat/import_map.json +6 -0
  20. package/deno_compat/inngest.ts +11 -0
  21. package/deno_compat/link.ts +70 -0
  22. package/etc/inngest.api.md +234 -0
  23. package/jest.config.js +12 -0
  24. package/landing/.eslintignore +1 -0
  25. package/landing/index.html +12 -0
  26. package/landing/package.json +24 -0
  27. package/landing/postcss.config.cjs +6 -0
  28. package/landing/src/app.tsx +18 -0
  29. package/landing/src/components/Button.tsx +30 -0
  30. package/landing/src/components/Code.tsx +54 -0
  31. package/landing/src/components/ConfigErrors.tsx +44 -0
  32. package/landing/src/components/Container.tsx +23 -0
  33. package/landing/src/components/Content.tsx +182 -0
  34. package/landing/src/components/DevServerBar.tsx +80 -0
  35. package/landing/src/components/ExpandableEventSender.tsx +95 -0
  36. package/landing/src/components/FunctionBlock.tsx +141 -0
  37. package/landing/src/components/Introspect.tsx +55 -0
  38. package/landing/src/components/Loading.tsx +36 -0
  39. package/landing/src/components/TextInput.tsx +72 -0
  40. package/landing/src/components/Toast.tsx +130 -0
  41. package/landing/src/hooks/useFnIntrospect.tsx +63 -0
  42. package/landing/src/index.css +24 -0
  43. package/landing/src/main.tsx +5 -0
  44. package/landing/src/preact.d.ts +1 -0
  45. package/landing/src/types.ts +42 -0
  46. package/landing/src/utils/classnames.tsx +21 -0
  47. package/landing/src/vite-env.d.ts +1 -0
  48. package/landing/tailwind.config.cjs +8 -0
  49. package/landing/tsconfig.json +23 -0
  50. package/landing/tsconfig.node.json +9 -0
  51. package/landing/vite.config.ts +8 -0
  52. package/landing/yarn.lock +1350 -0
  53. package/package.json +108 -0
  54. package/renovate.json +37 -0
  55. package/rules/README.md +1 -0
  56. package/rules/index.js +5 -0
  57. package/rules/package.json +9 -0
  58. package/rules/process-warn.js +37 -0
  59. package/scripts/release.js +57 -0
  60. package/src/cloudflare.test.ts +84 -0
  61. package/src/cloudflare.ts +76 -0
  62. package/src/components/Inngest.test.ts +507 -0
  63. package/src/components/Inngest.ts +406 -0
  64. package/src/components/InngestCommHandler.test.ts +40 -0
  65. package/src/components/InngestCommHandler.ts +1213 -0
  66. package/src/components/InngestFunction.test.ts +1127 -0
  67. package/src/components/InngestFunction.ts +517 -0
  68. package/src/components/InngestStepTools.test.ts +371 -0
  69. package/src/components/InngestStepTools.ts +543 -0
  70. package/src/components/NonRetriableError.ts +33 -0
  71. package/src/components/legitstuff.md +799 -0
  72. package/src/deno/fresh.test.ts +95 -0
  73. package/src/deno/fresh.ts +61 -0
  74. package/src/digitalocean.ts +79 -0
  75. package/src/edge.test.ts +73 -0
  76. package/src/edge.ts +71 -0
  77. package/src/examples/README.md +12 -0
  78. package/src/examples/client.ts +6 -0
  79. package/src/examples/handler.ts +193 -0
  80. package/src/examples/hello-world/README.md +9 -0
  81. package/src/examples/hello-world/index.test.ts +64 -0
  82. package/src/examples/hello-world/index.ts +7 -0
  83. package/src/examples/index.ts +19 -0
  84. package/src/examples/parallel-reduce/README.md +15 -0
  85. package/src/examples/parallel-reduce/index.test.ts +78 -0
  86. package/src/examples/parallel-reduce/index.ts +27 -0
  87. package/src/examples/parallel-work/README.md +34 -0
  88. package/src/examples/parallel-work/index.test.ts +100 -0
  89. package/src/examples/parallel-work/index.ts +31 -0
  90. package/src/examples/polling/README.md +30 -0
  91. package/src/examples/polling/index.test.ts +35 -0
  92. package/src/examples/polling/index.ts +40 -0
  93. package/src/examples/promise-all/README.md +15 -0
  94. package/src/examples/promise-all/index.test.ts +87 -0
  95. package/src/examples/promise-all/index.ts +14 -0
  96. package/src/examples/promise-race/README.md +16 -0
  97. package/src/examples/promise-race/index.test.ts +98 -0
  98. package/src/examples/promise-race/index.ts +14 -0
  99. package/src/examples/send-event/README.md +12 -0
  100. package/src/examples/send-event/index.test.ts +115 -0
  101. package/src/examples/send-event/index.ts +30 -0
  102. package/src/examples/sequential-reduce/README.md +17 -0
  103. package/src/examples/sequential-reduce/index.test.ts +78 -0
  104. package/src/examples/sequential-reduce/index.ts +29 -0
  105. package/src/express.test.ts +34 -0
  106. package/src/express.ts +68 -0
  107. package/src/helpers/ServerTiming.ts +121 -0
  108. package/src/helpers/consts.ts +127 -0
  109. package/src/helpers/devserver.ts +92 -0
  110. package/src/helpers/env.ts +281 -0
  111. package/src/helpers/errors.ts +89 -0
  112. package/src/helpers/functions.ts +18 -0
  113. package/src/helpers/promises.ts +71 -0
  114. package/src/helpers/scalar.ts +14 -0
  115. package/src/helpers/stream.ts +67 -0
  116. package/src/helpers/strings.test.ts +30 -0
  117. package/src/helpers/strings.ts +101 -0
  118. package/src/helpers/types.ts +133 -0
  119. package/src/index.ts +16 -0
  120. package/src/init.ts +55 -0
  121. package/src/lambda.test.ts +29 -0
  122. package/src/lambda.ts +125 -0
  123. package/src/next.test.ts +4 -0
  124. package/src/next.ts +107 -0
  125. package/src/nuxt.test.ts +9 -0
  126. package/src/nuxt.ts +69 -0
  127. package/src/redwood.test.ts +27 -0
  128. package/src/redwood.ts +100 -0
  129. package/src/remix.test.ts +32 -0
  130. package/src/remix.ts +92 -0
  131. package/src/test/helpers.ts +956 -0
  132. package/src/types.ts +874 -0
  133. package/tsconfig.build.json +9 -0
  134. package/tsconfig.json +28 -0
  135. package/tsconfig.types.json +10 -0
  136. package/tsdoc-metadata.json +11 -0
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "public",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "image": "mcr.microsoft.com/devcontainers/universal:2",
3
+ "features": {
4
+ "ghcr.io/enricosecondulfo/devcontainer-features/volta:1": {}
5
+ },
6
+ "customizations": {
7
+ "vscode": {
8
+ "settings": {
9
+ "deno.enablePaths": ["./deno_compat"],
10
+ "typescript.tsdk": "node_modules/typescript/lib",
11
+ "eslint.validate": [
12
+ "javascript",
13
+ "javascriptreact",
14
+ "typescript",
15
+ "typescriptreact",
16
+ "graphql"
17
+ ],
18
+ "editor.rulers": [80],
19
+ "typescript.format.enable": false,
20
+ "eslint.format.enable": true,
21
+ "editor.codeActionsOnSave": {
22
+ "source.organizeImports": true,
23
+ "source.fixAll": true
24
+ },
25
+ "search.exclude": {
26
+ "**/dist": true,
27
+ "**/etc": true
28
+ },
29
+ "[javascript]": {
30
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
31
+ },
32
+ "[javascriptreact]": {
33
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
34
+ },
35
+ "[typescript]": {
36
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
37
+ },
38
+ "[typescriptreact]": {
39
+ "editor.defaultFormatter": "dbaeumer.vscode-eslint"
40
+ },
41
+ "[yaml]": {
42
+ "editor.defaultFormatter": "redhat.vscode-yaml"
43
+ },
44
+ "files.eol": "\n"
45
+ },
46
+ "extensions": [
47
+ "dbaeumer.vscode-eslint",
48
+ "kumar-harsh.graphql-for-vscode",
49
+ "wix.vscode-import-cost",
50
+ "esbenp.prettier-vscode",
51
+ "OfHumanBondage.react-proptypes-intellisense",
52
+ "redhat.vscode-yaml"
53
+ ]
54
+ }
55
+ }
56
+ }
package/.eslintignore ADDED
@@ -0,0 +1 @@
1
+ landing/**/*
package/.eslintrc.js ADDED
@@ -0,0 +1,40 @@
1
+ module.exports = {
2
+ extends: [
3
+ "eslint:recommended",
4
+ "plugin:@typescript-eslint/recommended",
5
+ "plugin:@typescript-eslint/recommended-requiring-type-checking",
6
+ "prettier",
7
+ "plugin:prettier/recommended",
8
+ ],
9
+ parser: "@typescript-eslint/parser",
10
+ parserOptions: {
11
+ tsconfigRootDir: __dirname,
12
+ project: ["./tsconfig.json"],
13
+ },
14
+ plugins: ["@typescript-eslint", "@inngest"],
15
+ root: true,
16
+ ignorePatterns: ["dist/", "*.d.ts", "*.js", "deno_compat/"],
17
+ rules: {
18
+ "prettier/prettier": "warn",
19
+ "@inngest/process-warn": "off",
20
+ "@typescript-eslint/no-unused-vars": [
21
+ "warn",
22
+ { varsIgnorePattern: "^_", argsIgnorePattern: "^_" },
23
+ ],
24
+ },
25
+ overrides: [
26
+ {
27
+ files: ["src/**/*.ts"],
28
+ excludedFiles: [
29
+ "*.d.ts",
30
+ "*.test.ts",
31
+ "src/test/**/*",
32
+ "src/examples/**/*",
33
+ "src/init.ts",
34
+ ],
35
+ rules: {
36
+ "@inngest/process-warn": "warn",
37
+ },
38
+ },
39
+ ],
40
+ };
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG]"
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear and concise description of what the bug is.
11
+
12
+ **To Reproduce**
13
+ Steps to reproduce the behavior:
14
+
15
+ 1. Create a function with '...'
16
+ 2. Send this event '...'
17
+ 3. ...
18
+
19
+ **Expected behavior**
20
+ A clear and concise description of what you expected to happen.
21
+
22
+ **Code snippets / Logs / Screenshots**
23
+ If applicable, add screenshots to help explain your problem.
24
+
25
+ **System info (please complete the following information):**
26
+
27
+ - OS: [e.g. Mac, Windows]
28
+ - npm package Version [e.g. 0.7.0]
29
+ - Framework [e.g. Next.js, Express]
30
+ - Platform [e.g. Vercel, AWS Lambda]
31
+
32
+ **Additional context**
33
+ Add any other context about the problem here.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ""
5
+ labels: feature
6
+ assignees: ""
7
+ ---
8
+
9
+ **Is your feature request related to a problem? Please describe.**
10
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11
+
12
+ **Describe the solution you'd like**
13
+ A clear and concise description of what you want to happen.
14
+
15
+ **Describe alternatives you've considered**
16
+ A clear and concise description of any alternative solutions or features you've considered.
17
+
18
+ **Additional context**
19
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,37 @@
1
+ name: "Setup and build"
2
+ description: "Sets up Node, installs dependencies, and builds the project."
3
+ inputs:
4
+ working-directory: # id of input
5
+ description: 'The directory to run the action in.'
6
+ required: false
7
+ default: '.'
8
+ runs:
9
+ using: composite
10
+ steps:
11
+ - uses: volta-cli/action@v4
12
+
13
+ - name: Get yarn cache directory path
14
+ id: yarn-cache-dir-path
15
+ shell: bash
16
+ run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
17
+ working-directory: ${{ inputs.working-directory }}
18
+
19
+ - uses: actions/cache@v3
20
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
21
+ with:
22
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
23
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
24
+ restore-keys: |
25
+ ${{ runner.os }}-yarn-
26
+
27
+ - shell: bash
28
+ run: yarn install --frozen-lockfile
29
+ working-directory: ${{ inputs.working-directory }}
30
+
31
+ - shell: bash
32
+ run: yarn install --frozen-lockfile
33
+ working-directory: ${{ inputs.working-directory }}/landing
34
+
35
+ - shell: bash
36
+ run: yarn build
37
+ working-directory: ${{ inputs.working-directory }}
@@ -0,0 +1,248 @@
1
+ name: PR checks
2
+
3
+ on:
4
+ pull_request:
5
+ workflow_dispatch:
6
+ workflow_call:
7
+ push:
8
+ branches:
9
+ - 'renovate/**'
10
+
11
+ concurrency:
12
+ group: pr-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ env:
16
+ NODE_AUTH_TOKEN: nothing
17
+
18
+ jobs:
19
+ test:
20
+ name: Runtime
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ nodeVersion:
26
+ - 14
27
+ - 16
28
+ - 18
29
+ - lts
30
+ steps:
31
+ - uses: actions/checkout@v3
32
+ - uses: ./.github/actions/setup-and-build
33
+ - run: volta run --node ${{ matrix.nodeVersion }} yarn test
34
+
35
+ types:
36
+ name: Types
37
+ runs-on: ubuntu-latest
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ tsVersion:
42
+ - 'latest'
43
+ - '~5.0.0'
44
+ - '~4.9.0'
45
+ - '~4.8.0'
46
+ - "~4.7.0"
47
+ steps:
48
+ - uses: actions/checkout@v3
49
+ - uses: ./.github/actions/setup-and-build
50
+ - run: yarn prelink
51
+ - run: yarn add -D typescript@${{ matrix.tsVersion }}
52
+ - run: yarn test:types
53
+
54
+ api_diff:
55
+ name: Local API diff
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v3
59
+ - uses: ./.github/actions/setup-and-build
60
+ - run: yarn run api-extractor run
61
+
62
+ lint:
63
+ name: Lint
64
+ runs-on: ubuntu-latest
65
+ steps:
66
+ - uses: actions/checkout@v3
67
+ - uses: ./.github/actions/setup-and-build
68
+ - run: yarn lint
69
+
70
+ examples:
71
+ name: Test examples
72
+ runs-on: ubuntu-latest
73
+ strategy:
74
+ fail-fast: false
75
+ matrix:
76
+ repo:
77
+ # - inngest/sdk-example-cloudflare-workers - BROKEN
78
+ - inngest/sdk-example-nextjs-vercel
79
+ # - inngest/sdk-example-redwoodjs-vercel - BROKEN
80
+ - inngest/sdk-example-nextjs-cloudflare
81
+ - inngest/sdk-example-nextjs-netlify
82
+ - inngest/sdk-example-remix-vercel
83
+ - inngest/sdk-example-nuxt-vercel
84
+ steps:
85
+ # Checkout the repo
86
+ - name: Checkout SDK
87
+ uses: actions/checkout@v3
88
+ with:
89
+ path: sdk
90
+ - uses: ./sdk/.github/actions/setup-and-build
91
+ with:
92
+ working-directory: sdk
93
+
94
+ # Checkout the example repo
95
+ - name: Checkout example
96
+ uses: actions/checkout@v3
97
+ with:
98
+ repository: ${{ matrix.repo }}
99
+ path: examples/${{ matrix.repo }}
100
+ ref: main
101
+
102
+ # Get the SDK ready and link it locally
103
+ - name: Prepare SDK for linking
104
+ run: yarn prelink
105
+ working-directory: sdk
106
+ - name: Create link to SDK
107
+ run: yarn link
108
+ working-directory: sdk/dist
109
+
110
+ # If we find a deno.json file in the example repo, we need to pull Deno on
111
+ # to the toolchain.
112
+ - name: Check if Deno is used
113
+ id: deno-check
114
+ run: echo "isDeno=$(test -f deno.json && echo true || echo false)" >> $GITHUB_OUTPUT
115
+ working-directory: examples/${{ matrix.repo }}
116
+ - name: If Deno is used, install it
117
+ uses: denoland/setup-deno@v1
118
+ if: ${{ steps.deno-check.outputs.isDeno == 'true' }}
119
+ with:
120
+ deno-version: vx.x.x
121
+
122
+ # Install dependencies in the example repo
123
+ - name: Install example dependencies
124
+ if: ${{ steps.deno-check.outputs.isDeno != 'true' }}
125
+ run: |
126
+ if test -f yarn.lock; then
127
+ yarn install --frozen-lockfile
128
+ elif test -f package-lock.json; then
129
+ npm ci
130
+ fi
131
+ working-directory: examples/${{ matrix.repo }}
132
+
133
+ # Link the SDK, making sure to use the same Yarn version that we used to
134
+ # create the link.
135
+ #
136
+ # Because repos are always owner/repo with a slash, the directory will be
137
+ # the same, therefore we must venture an extra level deep when searching
138
+ # for package.json.
139
+ #
140
+ # Yarn v3 (berry) will override Volta's version control and always use
141
+ # whatever version is specified and cached in the repo's `.yarnrc.yml`
142
+ # file.
143
+ # Because of this, we must instead link the SDK using a relative path, and
144
+ # have the library's `dist/` directory appear as a separate package by
145
+ # specifying an empty `yarn.lock` file within.
146
+ #
147
+ # Locally linking the lib to a Deno repo is harder, as Deno doesn't
148
+ # support local linking between ESM and CJS. Instead, we run a manual
149
+ # shim script to bend paths and adjust the target repo's import path.
150
+ - name: Link local SDK to example
151
+ run: |
152
+ if test -f deno.json; then
153
+ deno run --allow-read --allow-write ../../../sdk/deno_compat/link.ts
154
+ else
155
+ yarnv=$(volta run --yarn $(cat ../../../sdk/package.json | jq -r .volta.yarn) yarn -v)
156
+
157
+ if [[ $yarnv == 3* ]]; then
158
+ touch ../../../sdk/dist/yarn.lock
159
+ yarn link ../../../sdk/dist
160
+ else
161
+ volta run --yarn $(cat ../../../sdk/package.json | jq -r .volta.yarn) yarn link inngest
162
+ fi
163
+ fi
164
+ working-directory: examples/${{ matrix.repo }}
165
+
166
+
167
+ # Copy any SDK function examples to the example repo so that we're always
168
+ # testing many functions against many handlers.
169
+ - name: Find inngest functions path in example
170
+ id: inngest-functions-path
171
+ run: echo "dir=$(dirname $(echo \"$(git ls-files | grep inngest/index.ts)))\"" >> $GITHUB_OUTPUT
172
+ working-directory: examples/${{ matrix.repo }}
173
+ - name: Remove any existing inngest functions
174
+ run: rm -rf ${{ steps.inngest-functions-path.outputs.dir }}
175
+ working-directory: examples/${{ matrix.repo }}
176
+ - name: Copy functions to test to example
177
+ run: cp -Tr ../../../sdk/src/examples/ ${{ steps.inngest-functions-path.outputs.dir }}
178
+ working-directory: examples/${{ matrix.repo }}
179
+ # IF we're using Deno, also replace any "inngest..." imports with
180
+ # "npm:inngest..." and any direct file imports in `inngest/index.ts` with
181
+ # `.ts` suffixes.
182
+ - name: If Deno, transform imports
183
+ if: ${{ steps.deno-check.outputs.isDeno == 'true' }}
184
+ run: |
185
+ find ${{ steps.inngest-functions-path.outputs.dir }} -type f -name "*.ts" -exec sed -i 's/from "inngest/from "npm:inngest/g' {} \;
186
+ find ${{ steps.inngest-functions-path.outputs.dir }} -type f -name "*.ts" -exec sed -i -E 's/from "\.(.+)"/from "\.\1\/index\.ts"/g' {} \;
187
+ working-directory: examples/${{ matrix.repo }}
188
+
189
+ # Try to build the example
190
+ - name: If not Deno, build the example
191
+ if: ${{ steps.deno-check.outputs.isDeno != 'true' }}
192
+ run: |
193
+ if test -f yarn.lock; then
194
+ yarn build
195
+ elif test -f package-lock.json; then
196
+ npm run build
197
+ fi
198
+ working-directory: examples/${{ matrix.repo }}
199
+
200
+ - name: Run the Inngest dev server
201
+ run: npx inngest-cli@latest dev > cli.log 2>&1 &
202
+ working-directory: examples/${{ matrix.repo }}
203
+ env:
204
+ DO_NOT_TRACK: 1
205
+ - name: Wait for the Inngest dev server to start
206
+ uses: mydea/action-wait-for-api@v1
207
+ with:
208
+ url: "http://localhost:8288"
209
+ timeout: "60"
210
+
211
+ # Run the example
212
+ - name: Run the example's dev server
213
+ run: |
214
+ if test -f yarn.lock; then
215
+ (yarn dev > dev.log 2>&1 &)
216
+ elif test -f package-lock.json; then
217
+ (npm run dev > dev.log 2>&1 &)
218
+ else
219
+ (deno task start > dev.log 2>&1 &)
220
+ fi
221
+ working-directory: examples/${{ matrix.repo }}
222
+ # Provide the example any env vars it might need
223
+ env:
224
+ PORT: 3000
225
+ DO_NOT_TRACK: 1
226
+ - name: Wait for the example to start
227
+ uses: mydea/action-wait-for-api@v1
228
+ with:
229
+ url: "http://localhost:3000/api/inngest"
230
+ timeout: "60"
231
+
232
+ # Give the dev server 5 seconds to register with the example
233
+ # TODO Check logs instead of sleeping
234
+ - name: Wait 5 seconds for dev server registration
235
+ run: sleep 5
236
+
237
+ # Run the examples test suite against the dev server
238
+ - name: Run integration test suite
239
+ run: yarn test:examples
240
+ working-directory: sdk
241
+
242
+ - if: ${{ always() }}
243
+ run: cat dev.log
244
+ working-directory: examples/${{ matrix.repo }}
245
+
246
+ - if: ${{ always() }}
247
+ run: cat cli.log
248
+ working-directory: examples/${{ matrix.repo }}
@@ -0,0 +1,31 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ concurrency: ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ env:
11
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12
+
13
+ jobs:
14
+ release:
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
18
+ id-token: write
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ with:
22
+ persist-credentials: false
23
+ - uses: ./.github/actions/setup-and-build
24
+ - uses: changesets/action@v1
25
+ id: changesets
26
+ with:
27
+ publish: yarn release
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.CHANGESET_GITHUB_TOKEN }}
30
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31
+ NODE_ENV: test # disable npm access checks; they don't work in CI
@@ -0,0 +1,4 @@
1
+ {
2
+ "deno.enablePaths": ["./deno_compat"],
3
+ "typescript.tsdk": "node_modules/typescript/lib"
4
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,112 @@
1
+ # inngest
2
+
3
+ ## 0.0.0-streaming-20230424112237
4
+
5
+ ### Minor Changes
6
+
7
+ - a6c573e: INN-1087 Add edge streaming support to `"inngest/next"` serve handler
8
+
9
+ ## 1.7.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 34b6d39: INN-1240 Add `queueMicrotask()` fallback for restrictive environments
14
+
15
+ ## 1.7.0
16
+
17
+ ### Minor Changes
18
+
19
+ - c999896: INN-1029 Add `env` option to `Inngest` client to explicitly push to a particular Inngest env
20
+
21
+ ### Patch Changes
22
+
23
+ - 131727a: Adjust README to have a slightly clearer intro
24
+ - c999896: INN-1186 Send `x-inngest-platform` and `x-inngest-framework` headers during registration
25
+ - 0728308: Expose run ID to function executions for user-managed logging and tracing
26
+ - 3ac579f: Warn users when some functions appear undefined when serving
27
+ - eb1ea34: Allow signing keys with multiple prefixes, as required for branch environment support
28
+
29
+ ## 1.6.1
30
+
31
+ ### Patch Changes
32
+
33
+ - a840e67: INN-1126 Execute a step early if it's the only pending item during a discovery
34
+
35
+ This reduces the number of "Function steps" used for simple step functions.
36
+
37
+ ## 1.6.0
38
+
39
+ ### Minor Changes
40
+
41
+ - c7d1bee: Add `onFailure` handler to `createFunction` options, allowing you to specify a new function to run when the initial handler fails
42
+
43
+ ## 1.5.4
44
+
45
+ ### Patch Changes
46
+
47
+ - 071fe89: INN-1054 Ensure serve handlers return `any` instead of `unknown` so that they don't needlessly conflict with user types
48
+
49
+ ## 1.5.3
50
+
51
+ ### Patch Changes
52
+
53
+ - 906aca5: INN-1009 Show warnings when using the package with TS versions `<4.7.2` and Node versions `<14`
54
+
55
+ This includes tests to assert we appropriately support these versions now and in the future.
56
+
57
+ - ca7d79e: Detect env vars from Node and Deno in serve handlers (INN-1012)
58
+
59
+ ## 1.5.2
60
+
61
+ ### Patch Changes
62
+
63
+ - 2d6e0b5: Fix infinite type instantiation using a looping type in serve handlers (thanks for the report, @grempe)
64
+
65
+ ## 1.5.1
66
+
67
+ ### Patch Changes
68
+
69
+ - 0836145: Refactor `InngestCommHandler` to better detect env and reduce duplication (INN-997)
70
+
71
+ ## 1.5.0
72
+
73
+ ### Minor Changes
74
+
75
+ - ac81320: Add `"inngest/lambda"` serve handler for AWS Lambda environments
76
+ - f73a346: Add `"inngest/edge"` serve handler for use in v8 edge runtimes
77
+
78
+ ## 1.4.1
79
+
80
+ ### Patch Changes
81
+
82
+ - 43162d3: The "_Connected to `inngest dev`_" pill at the top of the SDK's landing page now links to the connected dev server.
83
+
84
+ _Thanks, [**@khill-fbmc**](https://github.com/khill-fbmc)!_
85
+
86
+ ![image](https://user-images.githubusercontent.com/1736957/225711717-fdc87dda-b8df-4aa4-a76b-233729f4d547.png)
87
+
88
+ - 56b8e9a: Removes many `any` types from the internal and public APIs.
89
+
90
+ Affects the public API, so will therefore be a package bump, but shouldn't affect any expected areas of use.
91
+
92
+ - a45601e: Update dependency typescript to v5
93
+
94
+ Including a bump for this as it does seem to fix some complex inference for future features.
95
+
96
+ ## 1.4.0
97
+
98
+ ### Minor Changes
99
+
100
+ - ebb8740: Add ability to control the concurrency of a specific function via the `concurrency` option when creating an Inngest function
101
+ - e61cf0f: Add `cancelOn` option when creating a function, allowing you cancel execution of a function based on incoming events.
102
+
103
+ ## 1.3.5
104
+
105
+ ### Patch Changes
106
+
107
+ - a4f8ae8: Fixes a typing bug where both `event` and `cron` could be specified as a trigger at the same time.
108
+
109
+ Multiple event triggers will be coming in a later update, but not in this format.
110
+
111
+ - d6a8329: Ensure signatures are not validated during development
112
+ - 950a2bc: Ensure `inngest.send()` and `step.sendEvent()` can be given an empty array without error