Skip to content

Commit 3afd5f8

Browse files
committed
Merge branch 'main' of github.com:triggerdotdev/trigger.dev
2 parents c922d24 + 39ec34f commit 3afd5f8

40 files changed

+2349
-150
lines changed

.changeset/famous-files-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/cli": patch
3+
---
4+
5+
Detects JSRuntime (Node/Deno at the moment). Adds basic Deno support

.changeset/gorgeous-panthers-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/cli": patch
3+
---
4+
5+
Improve create-integration output. Use templates and shared configs.

.changeset/warm-elephants-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/airtable": patch
3+
---
4+
5+
Export Base and Table

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"astro-build.astro-vscode",
4+
"denoland.vscode-deno"
5+
],
6+
"unwantedRecommendations": [
7+
8+
]
9+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"deno.enablePaths": ["references/deno-reference"]
3+
}

config-packages/tsconfig/integration.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"compilerOptions": {
44
"lib": ["DOM", "DOM.Iterable", "ES2019"],
55
"paths": {
6+
"@trigger.dev/tsup/*": ["../../config-packages/tsup/src/*"],
7+
"@trigger.dev/tsup": ["../../config-packages/tsup/src/index"],
68
"@trigger.dev/sdk/*": ["../../packages/trigger-sdk/src/*"],
79
"@trigger.dev/sdk": ["../../packages/trigger-sdk/src/index"],
810
"@trigger.dev/integration-kit/*": ["../../packages/integration-kit/src/*"],

config-packages/tsup/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "@trigger.dev/tsup",
3+
"version": "0.0.0",
4+
"private": true,
5+
"license": "MIT",
6+
"devDependencies": {
7+
"tsup": "7.1.x"
8+
}
9+
}

config-packages/tsup/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export { defineConfig } from "tsup";
2+
export { deepMergeOptions } from "./utils";
3+
export { options as integrationOptions } from "./integration";
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Options, defineConfig } from "tsup";
2+
3+
export const options: Options = {
4+
name: "main",
5+
entry: ["./src/index.ts"],
6+
outDir: "./dist",
7+
platform: "node",
8+
format: ["cjs"],
9+
legacyOutput: true,
10+
sourcemap: true,
11+
clean: true,
12+
bundle: true,
13+
splitting: false,
14+
dts: true,
15+
treeshake: {
16+
preset: "smallest",
17+
},
18+
esbuildPlugins: [],
19+
external: ["http", "https", "util", "events", "tty", "os", "timers"],
20+
};
21+
22+
export default defineConfig(options);

config-packages/tsup/src/utils.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { Options } from "tsup";
2+
3+
export const deepMergeOptions = deepMergeRecords<Options>;
4+
5+
function deepMergeRecords<TRecord extends Record<any, any>>(...options: TRecord[]): TRecord {
6+
const result = {} as TRecord;
7+
8+
for (const option of options) {
9+
for (const key in option) {
10+
if (option.hasOwnProperty(key)) {
11+
const optionValue = option[key];
12+
const existingValue = result[key];
13+
14+
if (
15+
existingValue &&
16+
typeof existingValue === "object" &&
17+
typeof optionValue === "object" &&
18+
!Array.isArray(existingValue) &&
19+
!Array.isArray(optionValue) &&
20+
existingValue !== null &&
21+
optionValue !== null
22+
) {
23+
result[key] = deepMergeRecords(existingValue, optionValue);
24+
} else {
25+
result[key] = optionValue;
26+
}
27+
}
28+
}
29+
}
30+
31+
return result;
32+
}

0 commit comments

Comments
 (0)