Duplicated the nextjs example folder for the to-do app
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Next.js: debug server-side",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "pnpm run dev"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"typescript.tsdk": "../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
|
||||
|
||||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
|
||||
module.exports = {
|
||||
reactStrictMode: true,
|
||||
transpilePackages: [
|
||||
"@trigger.dev/sdk",
|
||||
"@trigger.dev/github",
|
||||
"@trigger.dev/internal",
|
||||
],
|
||||
experimental: {
|
||||
appDir: true,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@examples/to-do",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@trigger.dev/nextjs": "workspace:*",
|
||||
"@trigger.dev/sdk": "workspace:*",
|
||||
"@types/node": "18.15.13",
|
||||
"@types/react": "^18.0.21",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"next": "13.3.1",
|
||||
"node-fetch": "2.6.x",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"typescript": "5.0.4",
|
||||
"zod": "^3.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node-fetch": "2.6.x",
|
||||
"msw": "^0.47.0",
|
||||
"ts-loader": "^9.4.2",
|
||||
"webpack": "^5.0.0"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
|
||||
|
After Width: | Height: | Size: 629 B |
@@ -0,0 +1,42 @@
|
||||
import { github, slack } from "@/trigger";
|
||||
import { events } from "@trigger.dev/github";
|
||||
import { createAppRoute } from "@trigger.dev/nextjs";
|
||||
import { Job, TriggerClient } from "@trigger.dev/sdk";
|
||||
|
||||
export const client = new TriggerClient({
|
||||
id: "nextjs-appdir-example",
|
||||
url: process.env.VERCEL_URL,
|
||||
apiKey: process.env.TRIGGER_API_KEY,
|
||||
apiUrl: process.env.TRIGGER_API_URL,
|
||||
logLevel: "debug",
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "appdir-alert-on-new-github-issues",
|
||||
name: "AppDir: Alert on new GitHub issues",
|
||||
version: "0.1.1",
|
||||
enabled: true,
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
trigger: github.triggers.repo({
|
||||
event: events.onIssueOpened,
|
||||
repo: "ericallam/basic-starter-12k",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
|
||||
await io.logger.info("This is a simple log info message");
|
||||
|
||||
const response = await io.slack.postMessage("Slack 📝", {
|
||||
text: `New Issue opened: ${payload.issue.html_url}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
|
||||
export const { POST, dynamic } = createAppRoute(client, {
|
||||
path: "/api/v2/trigger",
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Metadata } from "next";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Home",
|
||||
description: "Welcome to Next.js",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
// Layouts must accept a children prop.
|
||||
// This will be populated with nested layouts or pages
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// src/mocks/handlers.js
|
||||
import { rest } from "msw";
|
||||
import { z } from "zod";
|
||||
|
||||
export const handlers = [
|
||||
rest.get(
|
||||
"https://api.github.com/repos/ericallam/triggerdotdev-test-repo",
|
||||
(req, res, ctx) => {
|
||||
const { "x-trigger-attempt": attempts } = z
|
||||
.object({
|
||||
"x-trigger-attempt": z.coerce.number().optional(),
|
||||
})
|
||||
.parse(Object.fromEntries(req.headers.entries()));
|
||||
|
||||
if (typeof attempts === "number" && attempts > 2) {
|
||||
return req.passthrough();
|
||||
}
|
||||
|
||||
// Return a rate-limited error
|
||||
const nowInSeconds = Math.floor(Date.now() / 1000);
|
||||
const rateLimitResetTime = nowInSeconds + 10;
|
||||
|
||||
return res(
|
||||
// Respond with a 200 status code
|
||||
ctx.status(403),
|
||||
// And a response body of an error
|
||||
ctx.json({
|
||||
message: "API rate limit exceeded",
|
||||
documentation_url:
|
||||
"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting",
|
||||
}),
|
||||
ctx.set({
|
||||
"x-ratelimit-limit": "60",
|
||||
"x-ratelimit-remaining": "0",
|
||||
"x-ratelimit-reset": rateLimitResetTime.toString(),
|
||||
})
|
||||
);
|
||||
}
|
||||
),
|
||||
];
|
||||
@@ -0,0 +1,6 @@
|
||||
import "@/styles/globals.css";
|
||||
import type { AppProps } from "next/app";
|
||||
|
||||
export default function App({ Component, pageProps }: AppProps) {
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
type Data = {
|
||||
name: string
|
||||
}
|
||||
|
||||
export default function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse<Data>
|
||||
) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { client } from "@/trigger";
|
||||
import { createPagesRoute } from "@trigger.dev/nextjs";
|
||||
|
||||
const { handler, config } = createPagesRoute(client, { path: "/api/trigger" });
|
||||
|
||||
export { config };
|
||||
|
||||
export default handler;
|
||||
@@ -0,0 +1,114 @@
|
||||
import Head from 'next/head'
|
||||
import Image from 'next/image'
|
||||
import { Inter } from 'next/font/google'
|
||||
import styles from '@/styles/Home.module.css'
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] })
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<meta name="description" content="Generated by create next app" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<main className={`${styles.main} ${inter.className}`}>
|
||||
<div className={styles.description}>
|
||||
<p>
|
||||
Get started by editing
|
||||
<code className={styles.code}>src/pages/index.tsx</code>
|
||||
</p>
|
||||
<div>
|
||||
<a
|
||||
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
By{' '}
|
||||
<Image
|
||||
src="/vercel.svg"
|
||||
alt="Vercel Logo"
|
||||
className={styles.vercelLogo}
|
||||
width={100}
|
||||
height={24}
|
||||
priority
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.center}>
|
||||
<Image
|
||||
className={styles.logo}
|
||||
src="/next.svg"
|
||||
alt="Next.js Logo"
|
||||
width={180}
|
||||
height={37}
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.grid}>
|
||||
<a
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2>
|
||||
Docs <span>-></span>
|
||||
</h2>
|
||||
<p>
|
||||
Find in-depth information about Next.js features and API.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2>
|
||||
Learn <span>-></span>
|
||||
</h2>
|
||||
<p>
|
||||
Learn about Next.js in an interactive course with quizzes!
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2>
|
||||
Templates <span>-></span>
|
||||
</h2>
|
||||
<p>
|
||||
Discover and deploy boilerplate example Next.js projects.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2>
|
||||
Deploy <span>-></span>
|
||||
</h2>
|
||||
<p>
|
||||
Instantly deploy your Next.js site to a shareable URL
|
||||
with Vercel.
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 6rem;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.description {
|
||||
display: inherit;
|
||||
justify-content: inherit;
|
||||
align-items: inherit;
|
||||
font-size: 0.85rem;
|
||||
max-width: var(--max-width);
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.description a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.description p {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
background-color: rgba(var(--callout-rgb), 0.5);
|
||||
border: 1px solid rgba(var(--callout-border-rgb), 0.3);
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
.code {
|
||||
font-weight: 700;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(25%, auto));
|
||||
width: var(--max-width);
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 1rem 1.2rem;
|
||||
border-radius: var(--border-radius);
|
||||
background: rgba(var(--card-rgb), 0);
|
||||
border: 1px solid rgba(var(--card-border-rgb), 0);
|
||||
transition: background 200ms, border 200ms;
|
||||
}
|
||||
|
||||
.card span {
|
||||
display: inline-block;
|
||||
transition: transform 200ms;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.7rem;
|
||||
}
|
||||
|
||||
.card p {
|
||||
margin: 0;
|
||||
opacity: 0.6;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.5;
|
||||
max-width: 30ch;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
padding: 4rem 0;
|
||||
}
|
||||
|
||||
.center::before {
|
||||
background: var(--secondary-glow);
|
||||
border-radius: 50%;
|
||||
width: 480px;
|
||||
height: 360px;
|
||||
margin-left: -400px;
|
||||
}
|
||||
|
||||
.center::after {
|
||||
background: var(--primary-glow);
|
||||
width: 240px;
|
||||
height: 180px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.center::before,
|
||||
.center::after {
|
||||
content: '';
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
filter: blur(45px);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
}
|
||||
/* Enable hover only on non-touch devices */
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.card:hover {
|
||||
background: rgba(var(--card-rgb), 0.1);
|
||||
border: 1px solid rgba(var(--card-border-rgb), 0.15);
|
||||
}
|
||||
|
||||
.card:hover span {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
.card:hover span {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media (max-width: 700px) {
|
||||
.content {
|
||||
padding: 4rem;
|
||||
}
|
||||
|
||||
.grid {
|
||||
grid-template-columns: 1fr;
|
||||
margin-bottom: 120px;
|
||||
max-width: 320px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 1rem 2.5rem;
|
||||
}
|
||||
|
||||
.card h2 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.center {
|
||||
padding: 8rem 0 6rem;
|
||||
}
|
||||
|
||||
.center::before {
|
||||
transform: none;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.description a {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.description p,
|
||||
.description div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.description p {
|
||||
align-items: center;
|
||||
inset: 0 0 auto;
|
||||
padding: 2rem 1rem 1.4rem;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(var(--background-start-rgb), 1),
|
||||
rgba(var(--callout-rgb), 0.5)
|
||||
);
|
||||
background-clip: padding-box;
|
||||
backdrop-filter: blur(24px);
|
||||
}
|
||||
|
||||
.description div {
|
||||
align-items: flex-end;
|
||||
pointer-events: none;
|
||||
inset: auto 0 0;
|
||||
padding: 2rem;
|
||||
height: 200px;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
transparent 0%,
|
||||
rgb(var(--background-end-rgb)) 40%
|
||||
);
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet and Smaller Desktop */
|
||||
@media (min-width: 701px) and (max-width: 1120px) {
|
||||
.grid {
|
||||
grid-template-columns: repeat(2, 50%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.vercelLogo {
|
||||
filter: invert(1);
|
||||
}
|
||||
|
||||
.logo {
|
||||
filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
:root {
|
||||
--max-width: 1100px;
|
||||
--border-radius: 12px;
|
||||
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
|
||||
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
|
||||
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
|
||||
|
||||
--foreground-rgb: 0, 0, 0;
|
||||
--background-start-rgb: 214, 219, 220;
|
||||
--background-end-rgb: 255, 255, 255;
|
||||
|
||||
--primary-glow: conic-gradient(
|
||||
from 180deg at 50% 50%,
|
||||
#16abff33 0deg,
|
||||
#0885ff33 55deg,
|
||||
#54d6ff33 120deg,
|
||||
#0071ff33 160deg,
|
||||
transparent 360deg
|
||||
);
|
||||
--secondary-glow: radial-gradient(
|
||||
rgba(255, 255, 255, 1),
|
||||
rgba(255, 255, 255, 0)
|
||||
);
|
||||
|
||||
--tile-start-rgb: 239, 245, 249;
|
||||
--tile-end-rgb: 228, 232, 233;
|
||||
--tile-border: conic-gradient(
|
||||
#00000080,
|
||||
#00000040,
|
||||
#00000030,
|
||||
#00000020,
|
||||
#00000010,
|
||||
#00000010,
|
||||
#00000080
|
||||
);
|
||||
|
||||
--callout-rgb: 238, 240, 241;
|
||||
--callout-border-rgb: 172, 175, 176;
|
||||
--card-rgb: 180, 185, 188;
|
||||
--card-border-rgb: 131, 134, 135;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--foreground-rgb: 255, 255, 255;
|
||||
--background-start-rgb: 0, 0, 0;
|
||||
--background-end-rgb: 0, 0, 0;
|
||||
|
||||
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
|
||||
--secondary-glow: linear-gradient(
|
||||
to bottom right,
|
||||
rgba(1, 65, 255, 0),
|
||||
rgba(1, 65, 255, 0),
|
||||
rgba(1, 65, 255, 0.3)
|
||||
);
|
||||
|
||||
--tile-start-rgb: 2, 13, 46;
|
||||
--tile-end-rgb: 2, 5, 19;
|
||||
--tile-border: conic-gradient(
|
||||
#ffffff80,
|
||||
#ffffff40,
|
||||
#ffffff30,
|
||||
#ffffff20,
|
||||
#ffffff10,
|
||||
#ffffff10,
|
||||
#ffffff80
|
||||
);
|
||||
|
||||
--callout-rgb: 20, 20, 20;
|
||||
--callout-border-rgb: 108, 108, 108;
|
||||
--card-rgb: 100, 100, 100;
|
||||
--card-border-rgb: 200, 200, 200;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
color: rgb(var(--foreground-rgb));
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
transparent,
|
||||
rgb(var(--background-end-rgb))
|
||||
)
|
||||
rgb(var(--background-start-rgb));
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,571 @@
|
||||
import { setupServer } from "msw/node";
|
||||
import { handlers } from "./mocks/handlers";
|
||||
|
||||
const mockServer = setupServer(...handlers);
|
||||
mockServer.listen({
|
||||
onUnhandledRequest: "bypass",
|
||||
});
|
||||
|
||||
import { Github, events } from "@trigger.dev/github";
|
||||
import {
|
||||
DynamicSchedule,
|
||||
DynamicTrigger,
|
||||
Job,
|
||||
TriggerClient,
|
||||
cronTrigger,
|
||||
eventTrigger,
|
||||
intervalTrigger,
|
||||
isTriggerError,
|
||||
missingConnectionNotification,
|
||||
missingConnectionResolvedNotification,
|
||||
} from "@trigger.dev/sdk";
|
||||
import { Slack } from "@trigger.dev/slack";
|
||||
import { OpenAI } from "@trigger.dev/openai";
|
||||
import { z } from "zod";
|
||||
import fetch from "node-fetch";
|
||||
|
||||
export const client = new TriggerClient({
|
||||
id: "nextjs-example",
|
||||
url: process.env.VERCEL_URL,
|
||||
apiKey: process.env.TRIGGER_API_KEY,
|
||||
apiUrl: process.env.TRIGGER_API_URL,
|
||||
logLevel: "debug",
|
||||
});
|
||||
|
||||
const openai = new OpenAI({
|
||||
id: "openai",
|
||||
apiKey: process.env.OPENAI_API_KEY!,
|
||||
});
|
||||
|
||||
export const github = new Github({
|
||||
id: "github",
|
||||
octokitRequest: { fetch },
|
||||
});
|
||||
|
||||
const githubUser = new Github({ id: "github-user", octokitRequest: { fetch } });
|
||||
|
||||
// const githubLocal = new Github({
|
||||
// id: "github-local",
|
||||
// token: process.env.GITHUB_TOKEN,
|
||||
// });
|
||||
|
||||
export const slack = new Slack({ id: "my-slack-new" });
|
||||
|
||||
const dynamicOnIssueOpenedTrigger = new DynamicTrigger(client, {
|
||||
id: "github-issue-opened",
|
||||
event: events.onIssueOpened,
|
||||
source: github.sources.repo,
|
||||
});
|
||||
|
||||
const dynamicUserTrigger = new DynamicTrigger(client, {
|
||||
id: "dynamic-user-trigger",
|
||||
event: events.onIssueOpened,
|
||||
source: githubUser.sources.repo,
|
||||
});
|
||||
|
||||
const dynamicSchedule = new DynamicSchedule(client, {
|
||||
id: "dynamic-interval",
|
||||
});
|
||||
|
||||
const enabled = true;
|
||||
|
||||
const CHAT_MODELS = ["gpt-3.5-turbo"];
|
||||
|
||||
new Job(client, {
|
||||
id: "openai-test",
|
||||
name: "OpenAI Test",
|
||||
version: "0.0.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "openai.test",
|
||||
schema: z.object({
|
||||
model: z.string(),
|
||||
prompt: z.string(),
|
||||
}),
|
||||
}),
|
||||
integrations: {
|
||||
openai,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
if (CHAT_MODELS.includes(payload.model)) {
|
||||
const completion = await io.openai.createChatCompletion("✨", {
|
||||
model: payload.model,
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: payload.prompt,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
return completion;
|
||||
}
|
||||
|
||||
const completion = await io.openai.createCompletion("✨", {
|
||||
model: payload.model,
|
||||
prompt: payload.prompt,
|
||||
});
|
||||
|
||||
return completion;
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "on-missing-auth-connection",
|
||||
name: "On missing auth connection",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: missingConnectionNotification([githubUser]),
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
switch (payload.type) {
|
||||
case "DEVELOPER": {
|
||||
return await io.slack.postMessage("message", {
|
||||
text: `Missing developer connection: ${JSON.stringify(payload)}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
}
|
||||
case "EXTERNAL": {
|
||||
return await io.slack.postMessage("message", {
|
||||
text: `Missing external connection: account: ${JSON.stringify(
|
||||
payload.account
|
||||
)}, payload: ${JSON.stringify(payload)}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "on-missing-auth-connection-resolved",
|
||||
name: "On missing auth connection-resolved",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: missingConnectionResolvedNotification([githubUser]),
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
switch (payload.type) {
|
||||
case "DEVELOPER": {
|
||||
return await io.slack.postMessage("message", {
|
||||
text: `Missing developer connection resolved: ${JSON.stringify(
|
||||
payload
|
||||
)}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
}
|
||||
case "EXTERNAL": {
|
||||
return await io.slack.postMessage("message", {
|
||||
text: `Missing external connection resolved: ${JSON.stringify(
|
||||
payload
|
||||
)}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "user-on-issue-opened",
|
||||
name: "user on issue opened",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicUserTrigger,
|
||||
integrations: {
|
||||
github: githubUser,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
return await io.github.getRepo("get.repo", {
|
||||
repo: payload.repository.full_name,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "get-user-repo",
|
||||
name: "Get User Repo",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "get.repo",
|
||||
schema: z.object({
|
||||
repo: z.string(),
|
||||
}),
|
||||
}),
|
||||
integrations: {
|
||||
github: githubUser,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
return await io.github.getRepo("get.repo", payload);
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "get-user-repo-on-schedule",
|
||||
name: "Get User Repo On Schedule",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicSchedule,
|
||||
integrations: {
|
||||
github: githubUser,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
return await io.github.getRepo("get.repo", {
|
||||
repo: ctx.event.context.source.metadata.repo,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "register-dynamic-interval",
|
||||
name: "Register Dynamic Interval",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "dynamic.interval",
|
||||
schema: z.object({
|
||||
id: z.string(),
|
||||
seconds: z.number().int().positive(),
|
||||
}),
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.registerInterval("📆", dynamicSchedule, payload.id, {
|
||||
seconds: payload.seconds,
|
||||
});
|
||||
|
||||
await io.wait("wait", 60);
|
||||
|
||||
await io.unregisterInterval("❌📆", dynamicSchedule, payload.id);
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "register-dynamic-cron",
|
||||
name: "Register Dynamic Cron",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "dynamic.cron",
|
||||
schema: z.object({
|
||||
id: z.string(),
|
||||
cron: z.string(),
|
||||
}),
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.registerCron("📆", dynamicSchedule, payload.id, {
|
||||
cron: payload.cron,
|
||||
});
|
||||
|
||||
await io.wait("wait", 60);
|
||||
|
||||
await io.unregisterCron("❌📆", dynamicSchedule, payload.id);
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "use-dynamic-interval",
|
||||
name: "Use Dynamic Interval",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicSchedule,
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
await io.logger.info("This is a log info message", {
|
||||
payload,
|
||||
});
|
||||
await io.sendEvent("send-event", {
|
||||
name: "custom.event",
|
||||
payload,
|
||||
context: ctx,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "event-1",
|
||||
name: "Run when the foo.bar event happens",
|
||||
version: "0.0.1",
|
||||
enabled: true,
|
||||
trigger: eventTrigger({
|
||||
name: "foo.bar",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.try(
|
||||
async () => {
|
||||
return await io.runTask(
|
||||
"task-1",
|
||||
{ name: "task-1", retry: { limit: 3 } },
|
||||
async (task) => {
|
||||
if (task.attempts > 2) {
|
||||
return {
|
||||
bar: "foo",
|
||||
};
|
||||
}
|
||||
|
||||
throw new Error(`Task failed on ${task.attempts} attempt(s)`);
|
||||
}
|
||||
);
|
||||
},
|
||||
async (error) => {
|
||||
// These should never be reached
|
||||
await io.wait("wait-after-error", 5);
|
||||
|
||||
await io.logger.error("This is a log error message", {
|
||||
payload,
|
||||
error,
|
||||
});
|
||||
|
||||
return {
|
||||
foo: "bar",
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
try {
|
||||
await io.runTask(
|
||||
"task-2",
|
||||
{ name: "task-2", retry: { limit: 5 } },
|
||||
async (task) => {
|
||||
throw new Error(`Task failed on ${task.attempts} attempt(s)`);
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
if (isTriggerError(error)) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
await io.wait("wait-after-error", 5);
|
||||
|
||||
await io.logger.error("This is a log error message", {
|
||||
payload,
|
||||
error,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
payload,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "scheduled-job-1",
|
||||
name: "Scheduled Job 1",
|
||||
version: "0.1.1",
|
||||
enabled: true,
|
||||
trigger: intervalTrigger({
|
||||
seconds: 60,
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
|
||||
await io.logger.info("This is a log info message", {
|
||||
payload,
|
||||
});
|
||||
|
||||
await io.sendEvent("send-event", {
|
||||
name: "custom.event",
|
||||
payload,
|
||||
context: ctx,
|
||||
});
|
||||
|
||||
await io.runTask(
|
||||
"level 1",
|
||||
{
|
||||
name: "Level 1",
|
||||
},
|
||||
async () => {
|
||||
await io.runTask(
|
||||
"level 2",
|
||||
{
|
||||
name: "Level 2",
|
||||
},
|
||||
async () => {
|
||||
await io.runTask(
|
||||
"level 3",
|
||||
{
|
||||
name: "Level 3",
|
||||
},
|
||||
async () => {
|
||||
await io.runTask(
|
||||
"level 4",
|
||||
{
|
||||
name: "Level 4",
|
||||
},
|
||||
async () => {
|
||||
await io.runTask(
|
||||
"level 5",
|
||||
{
|
||||
name: "Level 5",
|
||||
},
|
||||
async () => {}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
await io.wait("5 minutes", 5 * 60);
|
||||
|
||||
await io.runTask(
|
||||
"Fingers crossed",
|
||||
{
|
||||
name: "Just a task 🤞",
|
||||
},
|
||||
async () => {
|
||||
throw new Error("You messed up buddy!");
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "scheduled-job-2",
|
||||
name: "Scheduled Job 2",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: cronTrigger({
|
||||
cron: "*/5 * * * *", // every 5 minutes
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
await io.logger.info("This is a log info message", {
|
||||
payload,
|
||||
ctx,
|
||||
});
|
||||
|
||||
return {
|
||||
message: "Hello from scheduled job 1",
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "test-io-functions",
|
||||
name: "Test IO functions",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "test.io",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
await io.logger.info("This is a log info message", {
|
||||
payload,
|
||||
});
|
||||
await io.sendEvent("send-event", {
|
||||
name: "custom.event",
|
||||
payload,
|
||||
context: ctx,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "register-dynamic-trigger-on-new-repo",
|
||||
name: "Register dynamic trigger on new repo",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: eventTrigger({
|
||||
name: "new.repo",
|
||||
schema: z.object({ repo: z.string() }),
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
return await io.registerTrigger(
|
||||
"register-repo",
|
||||
dynamicOnIssueOpenedTrigger,
|
||||
payload.repo,
|
||||
{
|
||||
repo: payload.repo,
|
||||
}
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "listen-for-dynamic-trigger",
|
||||
name: "Listen for dynamic trigger",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicOnIssueOpenedTrigger,
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.slack.postMessage("Slack 📝", {
|
||||
text: `New Issue opened on dynamically triggered repo: ${
|
||||
payload.issue.html_url
|
||||
}. \n\n${JSON.stringify(ctx)}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "listen-for-dynamic-trigger-2",
|
||||
name: "Listen for dynamic trigger-2",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicOnIssueOpenedTrigger,
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.slack.postMessage("Slack 📝", {
|
||||
text: `New Issue opened on dynamically triggered repo 2: ${payload.issue.html_url}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "listen-for-dynamic-trigger-3",
|
||||
name: "Listen for dynamic trigger-3",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
trigger: dynamicOnIssueOpenedTrigger,
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.slack.postMessage("Slack 📝", {
|
||||
text: `New Issue opened on dynamically triggered repo 3: ${payload.issue.html_url}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
new Job(client, {
|
||||
id: "alert-on-new-github-issues-3",
|
||||
name: "Alert on new GitHub issues",
|
||||
version: "0.1.1",
|
||||
enabled,
|
||||
integrations: {
|
||||
slack,
|
||||
},
|
||||
trigger: github.triggers.repo({
|
||||
event: events.onIssueOpened,
|
||||
repo: "ericallam/basic-starter-12k",
|
||||
}),
|
||||
run: async (payload, io, ctx) => {
|
||||
await io.wait("wait", 5); // wait for 5 seconds
|
||||
|
||||
await io.logger.info("This is a simple log info message");
|
||||
|
||||
const response = await io.slack.postMessage("Slack 📝", {
|
||||
text: `New Issue opened: ${payload.issue.html_url}`,
|
||||
channel: "C04GWUTDC3W",
|
||||
});
|
||||
|
||||
return response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@trigger.dev/sdk": ["../../packages/trigger-sdk/src/index"],
|
||||
"@trigger.dev/sdk/*": ["../../packages/trigger-sdk/src/*"],
|
||||
"@trigger.dev/nextjs": ["../../packages/nextjs/src/index"],
|
||||
"@trigger.dev/nextjs/*": ["../../packages/nextjs/src/*"],
|
||||
"@trigger.dev/internal": ["../../packages/internal/src/index"],
|
||||
"@trigger.dev/internal/*": ["../../packages/internal/src/*"],
|
||||
"@trigger.dev/github": ["../../integrations/github/src/index"],
|
||||
"@trigger.dev/github/*": ["../../integrations/github/src/*"],
|
||||
"@trigger.dev/slack": ["../../integrations/slack/src/index"],
|
||||
"@trigger.dev/slack/*": ["../../integrations/slack/src/*"],
|
||||
"@trigger.dev/openai": ["../../integrations/openai/src/index"],
|
||||
"@trigger.dev/openai/*": ["../../integrations/openai/src/*"]
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Generated
+45
-12
@@ -522,6 +522,47 @@ importers:
|
||||
dotenv: 16.0.3
|
||||
tsx: 3.12.2
|
||||
|
||||
examples/todo-example:
|
||||
specifiers:
|
||||
'@trigger.dev/github': workspace:*
|
||||
'@trigger.dev/nextjs': workspace:*
|
||||
'@trigger.dev/openai': workspace:*
|
||||
'@trigger.dev/sdk': workspace:*
|
||||
'@trigger.dev/slack': workspace:*
|
||||
'@types/node': 18.15.13
|
||||
'@types/node-fetch': 2.6.x
|
||||
'@types/react': ^18.0.21
|
||||
'@types/react-dom': ^18.0.6
|
||||
msw: ^0.47.0
|
||||
next: 13.3.1
|
||||
node-fetch: 2.6.x
|
||||
react: ^18.2.0
|
||||
react-dom: ^18.2.0
|
||||
ts-loader: ^9.4.2
|
||||
typescript: 5.0.4
|
||||
webpack: ^5.0.0
|
||||
zod: ^3.20.2
|
||||
dependencies:
|
||||
'@trigger.dev/github': link:../../integrations/github
|
||||
'@trigger.dev/nextjs': link:../../packages/nextjs
|
||||
'@trigger.dev/openai': link:../../integrations/openai
|
||||
'@trigger.dev/sdk': link:../../packages/trigger-sdk
|
||||
'@trigger.dev/slack': link:../../integrations/slack
|
||||
'@types/node': 18.15.13
|
||||
'@types/react': 18.0.26
|
||||
'@types/react-dom': 18.0.10
|
||||
next: 13.3.1_biqbaboplfbrettd7655fr4n2y
|
||||
node-fetch: 2.6.11
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0_react@18.2.0
|
||||
typescript: 5.0.4
|
||||
zod: 3.20.2
|
||||
devDependencies:
|
||||
'@types/node-fetch': 2.6.2
|
||||
msw: 0.47.4_typescript@5.0.4
|
||||
ts-loader: 9.4.2_dmnk2hichoesbonenkf5yk7fmy
|
||||
webpack: 5.80.0
|
||||
|
||||
integrations/github:
|
||||
specifiers:
|
||||
'@octokit/request': ^6.2.5
|
||||
@@ -10706,14 +10747,6 @@ packages:
|
||||
acorn: 7.4.1
|
||||
dev: true
|
||||
|
||||
/acorn-jsx/5.3.2_acorn@8.8.1:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
peerDependencies:
|
||||
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
dependencies:
|
||||
acorn: 8.8.1
|
||||
dev: true
|
||||
|
||||
/acorn-jsx/5.3.2_acorn@8.8.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
peerDependencies:
|
||||
@@ -14217,8 +14250,8 @@ packages:
|
||||
resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dependencies:
|
||||
acorn: 8.8.1
|
||||
acorn-jsx: 5.3.2_acorn@8.8.1
|
||||
acorn: 8.8.2
|
||||
acorn-jsx: 5.3.2_acorn@8.8.2
|
||||
eslint-visitor-keys: 3.3.0
|
||||
dev: true
|
||||
|
||||
@@ -23368,7 +23401,7 @@ packages:
|
||||
dependencies:
|
||||
'@types/node': 18.15.13
|
||||
esbuild: 0.16.17
|
||||
postcss: 8.4.21
|
||||
postcss: 8.4.23
|
||||
resolve: 1.22.1
|
||||
rollup: 3.10.0
|
||||
optionalDependencies:
|
||||
@@ -23403,7 +23436,7 @@ packages:
|
||||
'@types/node': 18.11.18
|
||||
esbuild: 0.16.17
|
||||
less: 4.1.3
|
||||
postcss: 8.4.21
|
||||
postcss: 8.4.23
|
||||
resolve: 1.22.1
|
||||
rollup: 3.10.0
|
||||
optionalDependencies:
|
||||
|
||||
Reference in New Issue
Block a user