Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="data:," />
<title>Hello World</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "sarah-s-app-wed-aug-19-1-18-25-pm",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"upload": "DD_APPS_UPLOAD_ASSETS=1 vite build",
"preview": "vite preview",
"typecheck": "tsc --noEmit",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"react": "^19.2.3",
"react-dom": "^19.2.3"
},
"optionalDependencies": {
"@napi-rs/keyring": "^1.3.0"
},
"devDependencies": {
"@datadog/vite-plugin": "3.2.9-dev.0",
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.2",
"eslint": "^9.39.2",
"typescript": "^5.9.3",
"vite": "^7.3.1"
}
}
62 changes: 62 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
* {
box-sizing: border-box;
}

body {
margin: 0;
min-width: 320px;
background: #f6f8fb;
color: #1f2933;
font-family:
Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hello-app {
display: grid;
min-height: 100vh;
place-items: center;
padding: 24px;
}

.hello-panel {
width: min(100%, 720px);
padding: 40px;
border: 1px solid #d9e0ea;
border-radius: 8px;
background: #ffffff;
box-shadow: 0 18px 45px rgba(35, 48, 73, 0.1);
}

.hello-kicker {
margin: 0 0 10px;
color: #667085;
font-size: 0.875rem;
font-weight: 700;
letter-spacing: 0;
}

.hello-panel h1 {
margin: 0;
color: #111827;
font-size: 3rem;
line-height: 1.05;
letter-spacing: 0;
}

.hello-panel p:last-child {
max-width: 560px;
margin: 18px 0 0;
color: #526172;
font-size: 1rem;
line-height: 1.6;
}

@media (max-width: 560px) {
.hello-panel {
padding: 28px;
}

.hello-panel h1 {
font-size: 2.25rem;
}
}
15 changes: 15 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import './App.css';

function App() {
return (
<main className="hello-app">
<section className="hello-panel" aria-labelledby="hello-title">
<p className="hello-kicker">Sarah&apos;s App</p>
<h1 id="hello-title">Hello, world!</h1>
<p>Your Datadog App is ready.</p>
</section>
</main>
);
}

export default App;
16 changes: 16 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

import App from './App';

const appRoot = document.getElementById('app');

if (appRoot) {
createRoot(appRoot).render(
<StrictMode>
<App />
</StrictMode>,
);
} else {
console.error('Missing #app div for createRoot.');
}
1 change: 1 addition & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
7 changes: 7 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"include": [
"src",
"vite.config.ts"
]
}
53 changes: 53 additions & 0 deletions apps/sarah-s-app-wed-aug-19-1-18-25-pm/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { datadogVitePlugin } from '@datadog/vite-plugin';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

import appManifest from './package.json';
import rootManifest from '../../package.json';

process.env.DD_SITE ||= rootManifest.datadogApps?.site;
process.env.DATADOG_SITE ||= process.env.DD_SITE;
process.env.DD_API_KEY ||= process.env.DATADOG_API_KEY;
process.env.DD_APP_KEY ||= process.env.DATADOG_APP_KEY;

const hasDatadogApiKeys = Boolean(process.env.DD_API_KEY && process.env.DD_APP_KEY);

export default defineConfig({
base: './',
cacheDir: '../../node_modules/.vite/sarah-s-app-wed-aug-19-1-18-25-pm',
build: {
sourcemap: true,
},
plugins: [
react(),
datadogVitePlugin({
logLevel: 'debug',
auth: {
site: process.env.DD_SITE,
apiKey: process.env.DD_API_KEY,
appKey: process.env.DD_APP_KEY,
},
apps: {
enable: true,
authOverrides: {
method: hasDatadogApiKeys ? 'apiKey' : 'oauth',
},
identifier: 'dd6bc30b796b3230bb96be74f4ea94fc',
},
errorTracking: {
enable: hasDatadogApiKeys,
sourcemaps: {
minifiedPathPrefix: '/',
releaseVersion: appManifest.version,
service: appManifest.name,
},
},
metadata: {
name: 'Hello World',
},
metrics: {
enable: hasDatadogApiKeys,
},
}),
],
});
59 changes: 41 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.