Skip to content

Commit

Permalink
chore: apply prettier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Nov 18, 2023
1 parent a26e3f5 commit 044466d
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 48 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "pesto-landing",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand Down
22 changes: 11 additions & 11 deletions landing/sentry.client.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: process.env.SENTRY_DSN ?? "",
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
attachStacktrace: true,
sampleRate: 1.0,
tracesSampleRate: 0.2,
tracePropagationTargets: ["localhost", "https://pesto.teknologiumum.com"],
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.02,
replaysOnErrorSampleRate: 0.5,
debug: import.meta.env.DEV,
dsn: process.env.SENTRY_DSN ?? "",
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
attachStacktrace: true,
sampleRate: 1.0,
tracesSampleRate: 0.2,
tracePropagationTargets: ["localhost", "https://pesto.teknologiumum.com"],
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.02,
replaysOnErrorSampleRate: 0.5,
debug: import.meta.env.DEV,
});
14 changes: 6 additions & 8 deletions landing/sentry.server.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: process.env.SENTRY_DSN ?? "",
integrations: [
new Sentry.Integrations.Http({ tracing: true })
],
attachStacktrace: true,
sampleRate: 1.0,
tracesSampleRate: 0.2,
debug: import.meta.env.DEV,
dsn: process.env.SENTRY_DSN ?? "",
integrations: [new Sentry.Integrations.Http({ tracing: true })],
attachStacktrace: true,
sampleRate: 1.0,
tracesSampleRate: 0.2,
debug: import.meta.env.DEV,
});
16 changes: 9 additions & 7 deletions landing/src/components/FieldList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ const props = Astro.props as Props;
---

<ul class="field-list">
{props.items.map((item) => (
<li>
<strong>{item.key}</strong>
{item.value}
{item.nestedItems?.length > 0 && <Astro.self items={item.nestedItems} />}
</li>
))}
{
props.items.map((item) => (
<li>
<strong>{item.key}</strong>
{item.value}
{item.nestedItems?.length > 0 && <Astro.self items={item.nestedItems} />}
</li>
))
}
</ul>

<style lang="scss" is:global>
Expand Down
4 changes: 3 additions & 1 deletion landing/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { BackToTop } from "./BackToTop";
position: relative;
background-color: var(--color-black);
padding: 4rem 2rem;
box-shadow: 0 -0.25rem 0 0 var(--color-background), 0 -0.5rem 0 0 var(--color-tinted-black);
box-shadow:
0 -0.25rem 0 0 var(--color-background),
0 -0.5rem 0 0 var(--color-tinted-black);
width: 100%;

&-content {
Expand Down
2 changes: 1 addition & 1 deletion landing/src/components/GuideSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const props = Astro.props as Props;

<div class="guide">
<h2 class="guide-title">{props.title}</h2>
<slot></slot>
<slot />
</div>

<style lang="scss">
Expand Down
2 changes: 1 addition & 1 deletion landing/src/components/Section.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const props = Astro.props as Props;
<div class="section" id={props.id ?? ""}>
<h1 class="heading">{props.title}</h1>
<div class="content">
<slot></slot>
<slot />
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions landing/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference types="astro/client" />

interface ImportMetaEnv {
readonly SENTRY_DSN?: string;
readonly SENTRY_DSN?: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
readonly env: ImportMetaEnv;
}
4 changes: 2 additions & 2 deletions landing/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "@fontsource/ibm-plex-serif/700.css";
import "@fontsource/ibm-plex-mono/400.css";
---

<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<Seo
Expand All @@ -26,7 +26,7 @@ import "@fontsource/ibm-plex-mono/400.css";
</head>
<body>
<div id="app">
<slot></slot>
<slot />
</div>
<Footer />

Expand Down
8 changes: 4 additions & 4 deletions landing/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { sequence } from "astro:middleware";
import { handleRequest } from "@sentry/astro";

export const onRequest = sequence(
handleRequest({
trackClientIp: false,
trackHeaders: true,
}),
handleRequest({
trackClientIp: false,
trackHeaders: true,
})
);
2 changes: 1 addition & 1 deletion landing/src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Astro.response.status = 404;
<p>
If you think this shouldn't happen, you can help us fix this error by sending us a bug report to our{" "}
<a class="url" href="https://github.com/teknologi-umum/pesto/issues"> Github Issue</a>{" "}
page.
page.
</p>
</Section>
</Layout>
2 changes: 1 addition & 1 deletion landing/src/pages/500.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Astro.response.status = 500;
<p>
If you think this shouldn't happen, you can help us fix this error by sending us a bug report to our{" "}
<a class="url" href="https://github.com/teknologi-umum/pesto/issues"> Github Issue</a>{" "}
page.
page.
</p>
</Section>
</Layout>
16 changes: 8 additions & 8 deletions landing/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const responseExample = `
<Section title="What is Pesto?">
<p>
<strong>Pesto</strong>{" "}
is a Remote Code Execution Engine that lets you execute any piece of code on a remote server via REST API. It is heavily
inspired by{" "}
is a Remote Code Execution Engine that lets you execute any piece of code on a remote server via REST API. It is
heavily inspired by{" "}
<a class="url" href="https://github.com/engineer-man/piston"> Piston.</a>{" "}
Pesto is <strong>not</strong>{" "}
a fork of Piston, it's an entire rewrite from scratch and therefore it's not compatible with Piston but should be similar
if you're already familiar with Piston.
Pesto is <strong>not</strong>{" "}
a fork of Piston, it's an entire rewrite from scratch and therefore it's not compatible with Piston but should be
similar if you're already familiar with Piston.
</p>
</Section>
<Section title="How is it different from Piston?">
Expand Down Expand Up @@ -110,7 +110,7 @@ const responseExample = `
<FieldList
items={[
{ key: "language", value: "The language of the code that you want to execute." },
{ key: "version", value: "The version of the language (or just fill in with \"latest\")." },
{ key: "version", value: 'The version of the language (or just fill in with "latest").' },
{ key: "code", value: "The code that you want to execute." },
]}
/>
Expand Down Expand Up @@ -163,13 +163,13 @@ const responseExample = `
<div class="example-item">
<div class="example-label">Request</div>
<div class="code">
<pre set:html={requestExample}></pre>
<pre set:html={requestExample} />
</div>
</div>
<div class="example-item">
<div class="example-label">Response</div>
<div class="code">
<pre set:html={responseExample}></pre>
<pre set:html={responseExample} />
</div>
</div>
</div>
Expand Down

0 comments on commit 044466d

Please sign in to comment.