Implement P2 Resend email + PagerDuty Events v2 + Slack retry backoff
- Resend: HTML email with drift summary table and CTA button - PagerDuty: Events API v2 with dedup_key, severity mapping, custom_details - Slack: setTimeout retry on 429 rate limit instead of dropping
This commit is contained in:
@@ -109,6 +109,92 @@ export async function sendWebhookNotification(url: string, notification: DriftNo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Email (Resend) ---
|
||||||
|
|
||||||
|
export async function sendEmailNotification(
|
||||||
|
apiKey: string,
|
||||||
|
from: string,
|
||||||
|
to: string,
|
||||||
|
notification: DriftNotification,
|
||||||
|
): Promise<void> {
|
||||||
|
const severityEmoji = notification.criticalCount > 0 ? '🔴' : notification.highCount > 0 ? '🟠' : '🟡';
|
||||||
|
const subject = `${severityEmoji} Drift detected: ${notification.stackName} (score ${notification.driftScore}/100)`;
|
||||||
|
|
||||||
|
const html = `
|
||||||
|
<div style="font-family: -apple-system, sans-serif; max-width: 600px;">
|
||||||
|
<h2>Drift Detected: ${notification.stackName}</h2>
|
||||||
|
<table style="border-collapse: collapse; width: 100%;">
|
||||||
|
<tr><td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Drift Score</strong></td><td style="padding: 8px; border-bottom: 1px solid #eee;">${notification.driftScore}/100</td></tr>
|
||||||
|
<tr><td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Drifted Resources</strong></td><td style="padding: 8px; border-bottom: 1px solid #eee;">${notification.totalDrifted} of ${notification.totalResources}</td></tr>
|
||||||
|
<tr><td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Critical</strong></td><td style="padding: 8px; border-bottom: 1px solid #eee;">${notification.criticalCount}</td></tr>
|
||||||
|
<tr><td style="padding: 8px;"><strong>High</strong></td><td style="padding: 8px;">${notification.highCount}</td></tr>
|
||||||
|
</table>
|
||||||
|
<p style="margin-top: 16px;"><a href="${notification.reportUrl}" style="background: #6366f1; color: white; padding: 10px 20px; border-radius: 6px; text-decoration: none;">View Report</a></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const resp = await fetch('https://api.resend.com/emails', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Authorization': `Bearer ${apiKey}`,
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ from, to: [to], subject, html }),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!resp.ok) {
|
||||||
|
const text = await resp.text();
|
||||||
|
throw new Error(`Resend email failed: ${resp.status} ${text}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info({ to, stackName: notification.stackName }, 'Email notification sent via Resend');
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- PagerDuty Events API v2 ---
|
||||||
|
|
||||||
|
export async function sendPagerDutyNotification(
|
||||||
|
routingKey: string,
|
||||||
|
notification: DriftNotification,
|
||||||
|
maxSeverity: string,
|
||||||
|
): Promise<void> {
|
||||||
|
const pdSeverity = maxSeverity === 'critical' ? 'critical' : maxSeverity === 'high' ? 'error' : 'warning';
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
routing_key: routingKey,
|
||||||
|
event_action: 'trigger',
|
||||||
|
dedup_key: `dd0c-drift-${notification.tenantId}-${notification.stackName}`,
|
||||||
|
payload: {
|
||||||
|
summary: `Drift detected in ${notification.stackName}: ${notification.totalDrifted}/${notification.totalResources} resources drifted (score ${notification.driftScore}/100)`,
|
||||||
|
severity: pdSeverity,
|
||||||
|
source: 'dd0c/drift',
|
||||||
|
component: notification.stackName,
|
||||||
|
group: 'infrastructure-drift',
|
||||||
|
custom_details: {
|
||||||
|
drift_score: notification.driftScore,
|
||||||
|
critical_count: notification.criticalCount,
|
||||||
|
high_count: notification.highCount,
|
||||||
|
total_drifted: notification.totalDrifted,
|
||||||
|
total_resources: notification.totalResources,
|
||||||
|
report_url: notification.reportUrl,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
links: [{ href: notification.reportUrl, text: 'View Drift Report' }],
|
||||||
|
};
|
||||||
|
|
||||||
|
const resp = await fetch('https://events.pagerduty.com/v2/enqueue', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify(payload),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!resp.ok) {
|
||||||
|
const text = await resp.text();
|
||||||
|
throw new Error(`PagerDuty event failed: ${resp.status} ${text}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info({ stackName: notification.stackName, severity: pdSeverity }, 'PagerDuty event triggered');
|
||||||
|
}
|
||||||
|
|
||||||
// --- Dispatcher ---
|
// --- Dispatcher ---
|
||||||
|
|
||||||
export interface NotificationChannel {
|
export interface NotificationChannel {
|
||||||
@@ -149,18 +235,22 @@ export async function dispatchNotifications(
|
|||||||
await sendWebhookNotification(ch.config.url!, notification);
|
await sendWebhookNotification(ch.config.url!, notification);
|
||||||
break;
|
break;
|
||||||
case 'email':
|
case 'email':
|
||||||
// TODO: Resend integration
|
await sendEmailNotification(ch.config.api_key!, ch.config.from!, ch.config.to!, notification);
|
||||||
logger.info({ channel: 'email' }, 'Email notifications not yet implemented');
|
|
||||||
break;
|
break;
|
||||||
case 'pagerduty':
|
case 'pagerduty':
|
||||||
// TODO: PagerDuty Events API v2
|
await sendPagerDutyNotification(ch.config.routing_key!, notification, maxSeverity);
|
||||||
logger.info({ channel: 'pagerduty' }, 'PagerDuty notifications not yet implemented');
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof SlackRateLimitError) {
|
if (err instanceof SlackRateLimitError) {
|
||||||
// TODO: Queue for retry after backoff
|
// Schedule retry with exponential backoff
|
||||||
logger.warn({ retryAfter: err.retryAfterSeconds }, 'Slack notification queued for retry');
|
const delayMs = err.retryAfterSeconds * 1000;
|
||||||
|
logger.warn({ retryAfter: err.retryAfterSeconds }, 'Slack rate limited — scheduling retry');
|
||||||
|
setTimeout(() => {
|
||||||
|
sendSlackNotification(ch.config.webhook_url!, notification).catch((retryErr) => {
|
||||||
|
logger.error({ error: (retryErr as Error).message }, 'Slack retry failed');
|
||||||
|
});
|
||||||
|
}, delayMs);
|
||||||
} else {
|
} else {
|
||||||
logger.error({ channel: ch.channel, error: (err as Error).message }, 'Notification delivery failed');
|
logger.error({ channel: ch.channel, error: (err as Error).message }, 'Notification delivery failed');
|
||||||
}
|
}
|
||||||
|
|||||||
28
products/docker-init-db.sh
Executable file
28
products/docker-init-db.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Create per-product databases
|
||||||
|
for db in dd0c_route dd0c_drift dd0c_alert dd0c_portal dd0c_cost dd0c_run; do
|
||||||
|
echo "Creating database: $db"
|
||||||
|
psql -v ON_ERROR_STOP=0 --username "$POSTGRES_USER" --dbname postgres -c "CREATE DATABASE $db;" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
|
||||||
|
# Run migrations for each product
|
||||||
|
run_migrations() {
|
||||||
|
local db=$1
|
||||||
|
local dir=$2
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
for sql in "$dir"/*.sql; do
|
||||||
|
[ -f "$sql" ] || continue
|
||||||
|
echo " $db ← $(basename $sql)"
|
||||||
|
psql -v ON_ERROR_STOP=0 --username "$POSTGRES_USER" --dbname "$db" -f "$sql" 2>/dev/null || true
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_migrations dd0c_alert /migrations/03-alert
|
||||||
|
run_migrations dd0c_portal /migrations/04-portal
|
||||||
|
run_migrations dd0c_cost /migrations/05-cost
|
||||||
|
run_migrations dd0c_run /migrations/06-run
|
||||||
|
|
||||||
|
echo "All databases initialized."
|
||||||
1
products/marketing/site/.astro/types.d.ts
vendored
Normal file
1
products/marketing/site/.astro/types.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="astro/client" />
|
||||||
1
products/marketing/site/dist/_astro/alert.BAN0u9re.css
vendored
Normal file
1
products/marketing/site/dist/_astro/alert.BAN0u9re.css
vendored
Normal file
File diff suppressed because one or more lines are too long
8
products/marketing/site/dist/alert/index.html
vendored
Normal file
8
products/marketing/site/dist/alert/index.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Correlate alerts from PagerDuty, Datadog, OpsGenie into incidents. Cut alert noise by 80%."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/alert — Alert Intelligence"><meta property="og:description" content="Correlate alerts from PagerDuty, Datadog, OpsGenie into incidents. Cut alert noise by 80%."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/alert — Alert Intelligence</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/alert</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">Alert fatigue is a bug, not a feature</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Ingest webhooks from PagerDuty, Datadog, OpsGenie, and Grafana. Group related alerts into incidents using time-window correlation. Stop waking up three times for the same outage.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/alert" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 grid md:grid-cols-2 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔗</div> <h3 class="font-semibold mb-2">Multi-source correlation</h3> <p class="text-sm text-dd0c-muted">HMAC-verified webhooks from 4 providers. Canonical alert schema normalizes everything into one format.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">⏱️</div> <h3 class="font-semibold mb-2">Time-window grouping</h3> <p class="text-sm text-dd0c-muted">5-minute correlation windows. Late alerts attach to existing incidents. Very late alerts create new ones.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">📉</div> <h3 class="font-semibold mb-2">80% noise reduction</h3> <p class="text-sm text-dd0c-muted">20 alerts from the same root cause become 1 incident. Your on-call engineer sees one notification, not twenty.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">📧</div> <h3 class="font-semibold mb-2">Slack, email, webhook</h3> <p class="text-sm text-dd0c-muted">Severity-gated notifications. Critical goes to Slack + email. Low goes to a dashboard. You decide.</p> </div> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
8
products/marketing/site/dist/cost/index.html
vendored
Normal file
8
products/marketing/site/dist/cost/index.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Statistical anomaly detection on your AWS bill. Welford baselines, z-score alerts, Slack notifications."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/cost — AWS Cost Anomaly Detection"><meta property="og:description" content="Statistical anomaly detection on your AWS bill. Welford baselines, z-score alerts, Slack notifications."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/cost — AWS Cost Anomaly Detection</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/cost</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">Know about cost spikes before the bill arrives</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Welford's algorithm builds running baselines per resource type. Z-score anomaly detection catches spikes in real time. Slack alerts with one-click snooze for expected costs. Governance engine auto-promotes from shadow to enforce.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/cost" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 grid md:grid-cols-2 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">📈</div> <h3 class="font-semibold mb-2">Statistical baselines</h3> <p class="text-sm text-dd0c-muted">Welford's online algorithm. No batch jobs. Baselines update with every data point. Optimistic locking prevents corruption.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🎯</div> <h3 class="font-semibold mb-2">0-100 anomaly score</h3> <p class="text-sm text-dd0c-muted">Z-score mapped to a simple 0-100 scale. Set your threshold. Default 50 (2σ). Tune per resource type.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🛡️</div> <h3 class="font-semibold mb-2">Governance engine</h3> <p class="text-sm text-dd0c-muted">Shadow → audit → enforce. Auto-promotes after 14 days with <10% false positive rate. Safe by default.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">💤</div> <h3 class="font-semibold mb-2">Snooze & mark expected</h3> <p class="text-sm text-dd0c-muted">Known cost spike? Snooze for 1-168 hours or mark as expected. Reduces false positive rate over time.</p> </div> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
11
products/marketing/site/dist/drift/index.html
vendored
Normal file
11
products/marketing/site/dist/drift/index.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Lightweight Terraform drift detection agent. Scans state, scrubs secrets, alerts on Slack. No ClickOps surprises."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/drift — IaC Drift Detection"><meta property="og:description" content="Lightweight Terraform drift detection agent. Scans state, scrubs secrets, alerts on Slack. No ClickOps surprises."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/drift — IaC Drift Detection</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/drift</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">Catch Terraform drift before it catches you</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Lightweight Go agent scans your Terraform state files, compares against live infrastructure, scrubs secrets from reports, and alerts your team on Slack. Know when someone ClickOps'd your production VPC.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/drift" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 grid md:grid-cols-3 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔍</div> <h3 class="font-semibold mb-2">State scanning</h3> <p class="text-sm text-dd0c-muted">Parses Terraform v4 state files. Detects resource changes, attribute drift, and deleted resources.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔒</div> <h3 class="font-semibold mb-2">Secret scrubbing</h3> <p class="text-sm text-dd0c-muted">Regex + Shannon entropy detection. AWS keys, RSA keys, PEM certs — scrubbed before reports leave your network.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔔</div> <h3 class="font-semibold mb-2">Slack alerts</h3> <p class="text-sm text-dd0c-muted">Block Kit messages with severity, affected resources, and one-click remediate/accept buttons.</p> </div> </div> <div class="mt-16 rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <h3 class="font-semibold mb-4">Install the agent</h3> <pre class="font-mono text-sm text-dd0c-muted overflow-x-auto"><code><span class="text-dd0c-accent">$</span> curl -sSL https://install.dd0c.dev/drift | bash
|
||||||
|
<span class="text-dd0c-accent">$</span> dd0c-drift check --state terraform.tfstate --endpoint https://drift.dd0c.dev
|
||||||
|
<span class="text-emerald-400">✓</span> Scanned 47 resources in 1.2s
|
||||||
|
<span class="text-amber-400">⚠</span> 3 drifted resources detected (1 critical, 2 medium)</code></pre> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
24
products/marketing/site/dist/index.html
vendored
Normal file
24
products/marketing/site/dist/index.html
vendored
Normal file
File diff suppressed because one or more lines are too long
8
products/marketing/site/dist/portal/index.html
vendored
Normal file
8
products/marketing/site/dist/portal/index.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Auto-discover services from AWS and GitHub. Know who owns what. Lightweight Backstage alternative."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/portal — Service Catalog"><meta property="og:description" content="Auto-discover services from AWS and GitHub. Know who owns what. Lightweight Backstage alternative."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/portal — Service Catalog</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/portal</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">"Who owns this service?"<br>answered in 2 seconds</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Auto-discovers ECS services, Lambda functions, and RDS instances from AWS. Reads CODEOWNERS from GitHub. Full-text search across your entire service catalog. Like Backstage, but you can set it up before lunch.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/portal" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 grid md:grid-cols-3 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔎</div> <h3 class="font-semibold mb-2">Auto-discovery</h3> <p class="text-sm text-dd0c-muted">Scans AWS (ECS, Lambda, RDS) and GitHub orgs. Partial scan failures stage results — never corrupts your catalog.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">👤</div> <h3 class="font-semibold mb-2">Ownership resolution</h3> <p class="text-sm text-dd0c-muted">Config > CODEOWNERS > AWS tags > heuristic. Explicit always wins. No more guessing.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">⚡</div> <h3 class="font-semibold mb-2">Instant search</h3> <p class="text-sm text-dd0c-muted">Meilisearch-powered full-text search. Falls back to PostgreSQL if Meili is down. Always available.</p> </div> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
12
products/marketing/site/dist/route/index.html
vendored
Normal file
12
products/marketing/site/dist/route/index.html
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Route AI API calls to the cheapest provider. Set cost caps. Get usage dashboards. Stop overpaying for GPT-4."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/route — LLM Cost Router"><meta property="og:description" content="Route AI API calls to the cheapest provider. Set cost caps. Get usage dashboards. Stop overpaying for GPT-4."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/route — LLM Cost Router</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/route</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">Stop burning money on LLM APIs</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Drop-in proxy that sits between your app and OpenAI/Anthropic/Google. Routes each request to the cheapest provider that meets your quality threshold. Real-time cost dashboards. Budget alerts before you blow through $10K.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/route" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 grid md:grid-cols-3 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">💸</div> <h3 class="font-semibold mb-2">Cost-based routing</h3> <p class="text-sm text-dd0c-muted">Classify prompt complexity. Route simple queries to cheap models, complex ones to GPT-4. Save 40-60% on average.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">📊</div> <h3 class="font-semibold mb-2">Real-time dashboard</h3> <p class="text-sm text-dd0c-muted">Cost per model, per team, per endpoint. Token usage breakdowns. Anomaly detection when spend spikes.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🔑</div> <h3 class="font-semibold mb-2">API key management</h3> <p class="text-sm text-dd0c-muted">Issue scoped keys per team. Set budget caps. Rotate without downtime. Full audit trail.</p> </div> </div> <div class="mt-16 rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <h3 class="font-semibold mb-4">Integration is one line</h3> <pre class="font-mono text-sm text-dd0c-muted overflow-x-auto"><code><span class="text-dd0c-muted"># Before</span>
|
||||||
|
<span class="text-dd0c-accent">OPENAI_BASE_URL</span>=https://api.openai.com/v1
|
||||||
|
|
||||||
|
<span class="text-dd0c-muted"># After</span>
|
||||||
|
<span class="text-dd0c-accent">OPENAI_BASE_URL</span>=https://route.dd0c.dev/v1</code></pre> </div> <div class="mt-16"> <h3 class="text-xl font-semibold mb-6">Compared to alternatives</h3> <div class="overflow-x-auto"> <table class="w-full text-sm"> <thead> <tr class="border-b border-dd0c-border text-left text-dd0c-muted"> <th class="py-3 pr-4">Feature</th> <th class="py-3 px-4">dd0c/route</th> <th class="py-3 px-4">LiteLLM</th> <th class="py-3 px-4">Helicone</th> </tr> </thead> <tbody class="text-dd0c-muted"> <tr class="border-b border-dd0c-border/50"> <td class="py-3 pr-4">Cost-based routing</td> <td class="py-3 px-4 text-emerald-400">✓</td> <td class="py-3 px-4">Partial</td> <td class="py-3 px-4 text-red-400">✗</td> </tr> <tr class="border-b border-dd0c-border/50"> <td class="py-3 pr-4">Self-hosted option</td> <td class="py-3 px-4 text-emerald-400">✓</td> <td class="py-3 px-4 text-emerald-400">✓</td> <td class="py-3 px-4 text-red-400">✗</td> </tr> <tr class="border-b border-dd0c-border/50"> <td class="py-3 pr-4">Sub-ms latency overhead</td> <td class="py-3 px-4 text-emerald-400">✓ (Rust)</td> <td class="py-3 px-4">~5ms (Python)</td> <td class="py-3 px-4">~10ms</td> </tr> <tr> <td class="py-3 pr-4">Starting price</td> <td class="py-3 px-4 text-emerald-400">$49/mo</td> <td class="py-3 px-4">Free (OSS)</td> <td class="py-3 px-4">$20/mo</td> </tr> </tbody> </table> </div> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
23
products/marketing/site/dist/run/index.html
vendored
Normal file
23
products/marketing/site/dist/run/index.html
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html><html lang="en" class="dark"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content="Write runbooks in YAML. Classify commands by safety. Destructive ops require Slack approval. Full audit trail."><meta name="theme-color" content="#0a0a0f"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><!-- OG --><meta property="og:title" content="dd0c/run — Runbook Automation"><meta property="og:description" content="Write runbooks in YAML. Classify commands by safety. Destructive ops require Slack approval. Full audit trail."><meta property="og:type" content="website"><meta property="og:url" content="https://dd0c.dev"><meta name="twitter:card" content="summary_large_image"><title>dd0c/run — Runbook Automation</title><link rel="stylesheet" href="/_astro/alert.BAN0u9re.css"></head> <body class="bg-dd0c-bg text-dd0c-text font-sans antialiased"> <nav class="fixed top-0 w-full z-50 border-b border-dd0c-border bg-dd0c-bg/80 backdrop-blur-xl"> <div class="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between"> <a href="/" class="flex items-center gap-2"> <span class="font-mono font-bold text-xl text-dd0c-primary">dd0c</span> <span class="text-dd0c-muted text-sm hidden sm:inline">/devops</span> </a> <div class="hidden md:flex items-center gap-8 text-sm text-dd0c-muted"> <a href="#products" class="hover:text-dd0c-text transition">Products</a> <a href="#pricing" class="hover:text-dd0c-text transition">Pricing</a> <a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Docs</a> </div> <div class="flex items-center gap-4"> <a href="https://app.dd0c.dev/login" class="text-sm text-dd0c-muted hover:text-dd0c-text transition">Log in</a> <a href="https://app.dd0c.dev/signup" class="text-sm px-4 py-2 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white transition font-medium">Start free</a> </div> </div> </nav> <main> <section class="pt-32 pb-20 px-6"> <div class="max-w-4xl mx-auto"> <div class="mb-8"> <span class="font-mono text-sm text-dd0c-primary">dd0c/run</span> <h1 class="text-4xl sm:text-5xl font-bold mt-2">Runbooks that run themselves<br>(with your permission)</h1> <p class="mt-6 text-lg text-dd0c-muted leading-relaxed max-w-2xl">
|
||||||
|
Write runbooks in YAML. The Rust agent classifies every command as read-only, modifying, or destructive. Read-only runs automatically. Destructive commands pause and ask for Slack approval. Full audit trail. No YOLO.
|
||||||
|
</p> </div> <div class="mt-10 flex gap-4"> <a href="https://app.dd0c.dev/signup" class="px-6 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">Start free →</a> <a href="https://docs.dd0c.dev/run" class="px-6 py-3 rounded-lg border border-dd0c-border hover:border-dd0c-muted text-dd0c-muted hover:text-dd0c-text transition">Read docs</a> </div> <div class="mt-16 rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <h3 class="font-semibold mb-4">Example runbook</h3> <pre class="font-mono text-sm text-dd0c-muted overflow-x-auto"><code><span class="text-dd0c-primary">name:</span> restart-ecs-service
|
||||||
|
<span class="text-dd0c-primary">steps:</span>
|
||||||
|
- <span class="text-dd0c-accent">description:</span> Check current task count
|
||||||
|
<span class="text-dd0c-accent">command:</span> aws ecs describe-services --cluster prod --services api
|
||||||
|
<span class="text-dd0c-muted"># → classified: read_only (auto-approved)</span>
|
||||||
|
|
||||||
|
- <span class="text-dd0c-accent">description:</span> Force new deployment
|
||||||
|
<span class="text-dd0c-accent">command:</span> aws ecs update-service --cluster prod --service api --force-new-deployment
|
||||||
|
<span class="text-dd0c-muted"># → classified: modifying (requires approval)</span>
|
||||||
|
|
||||||
|
- <span class="text-dd0c-accent">description:</span> Wait for stable
|
||||||
|
<span class="text-dd0c-accent">command:</span> aws ecs wait services-stable --cluster prod --services api
|
||||||
|
<span class="text-dd0c-accent">timeout_seconds:</span> 300
|
||||||
|
<span class="text-dd0c-accent">on_failure:</span>
|
||||||
|
<span class="text-dd0c-accent">action:</span> retry
|
||||||
|
<span class="text-dd0c-accent">max_attempts:</span> 3</code></pre> </div> <div class="mt-16 grid md:grid-cols-3 gap-6"> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">🛑</div> <h3 class="font-semibold mb-2">Safety classification</h3> <p class="text-sm text-dd0c-muted">Pattern-based classification for shell, AWS CLI, kubectl, and terraform commands. Destructive ops always require human approval.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">💬</div> <h3 class="font-semibold mb-2">Slack approval flow</h3> <p class="text-sm text-dd0c-muted">Block Kit messages with approve/reject buttons. Click to approve from your phone. No SSH required.</p> </div> <div class="rounded-xl border border-dd0c-border bg-dd0c-surface p-6"> <div class="text-2xl mb-3">📝</div> <h3 class="font-semibold mb-2">Immutable audit log</h3> <p class="text-sm text-dd0c-muted">Every command, every approval, every exit code. SHA-256 hashed stdout. Append-only. Compliance-ready.</p> </div> </div> </div> </section> <section class="py-20 px-6 border-t border-dd0c-border"> <div class="max-w-3xl mx-auto text-center"> <h2 class="text-3xl sm:text-4xl font-bold">Stop paying enterprise prices<br>for tools you half-use</h2> <p class="mt-6 text-dd0c-muted text-lg leading-relaxed">
|
||||||
|
dd0c is built by a solo engineer who got tired of $50K/year DevOps platforms
|
||||||
|
that take 3 months to set up. Each tool does one thing well. Start free. Pay when it saves you money.
|
||||||
|
</p> <div class="mt-10"> <a href="https://app.dd0c.dev/signup" class="inline-flex px-8 py-3 rounded-lg bg-dd0c-primary hover:bg-dd0c-primary-light text-white font-medium transition">
|
||||||
|
Get started — it's free →
|
||||||
|
</a> </div> </div> </section> <footer class="py-12 px-6 border-t border-dd0c-border"> <div class="max-w-6xl mx-auto"> <div class="grid md:grid-cols-4 gap-8"> <div> <span class="font-mono font-bold text-lg text-dd0c-primary">dd0c</span> <p class="mt-2 text-sm text-dd0c-muted">DevOps tools that don't waste your time.</p> </div> <div> <h4 class="font-semibold text-sm mb-3">Products</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="/route" class="hover:text-dd0c-text transition">dd0c/route</a></li> <li><a href="/drift" class="hover:text-dd0c-text transition">dd0c/drift</a></li> <li><a href="/alert" class="hover:text-dd0c-text transition">dd0c/alert</a></li> <li><a href="/portal" class="hover:text-dd0c-text transition">dd0c/portal</a></li> <li><a href="/cost" class="hover:text-dd0c-text transition">dd0c/cost</a></li> <li><a href="/run" class="hover:text-dd0c-text transition">dd0c/run</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Resources</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://docs.dd0c.dev" class="hover:text-dd0c-text transition">Documentation</a></li> <li><a href="https://docs.dd0c.dev/self-hosted" class="hover:text-dd0c-text transition">Self-hosted guide</a></li> <li><a href="https://docs.dd0c.dev/api" class="hover:text-dd0c-text transition">API reference</a></li> <li><a href="/changelog" class="hover:text-dd0c-text transition">Changelog</a></li> </ul> </div> <div> <h4 class="font-semibold text-sm mb-3">Company</h4> <ul class="space-y-2 text-sm text-dd0c-muted"> <li><a href="https://github.com/dd0c" class="hover:text-dd0c-text transition">GitHub</a></li> <li><a href="https://twitter.com/dd0cdev" class="hover:text-dd0c-text transition">Twitter</a></li> <li><a href="/privacy" class="hover:text-dd0c-text transition">Privacy</a></li> <li><a href="/terms" class="hover:text-dd0c-text transition">Terms</a></li> </ul> </div> </div> <div class="mt-12 pt-8 border-t border-dd0c-border flex flex-col sm:flex-row items-center justify-between gap-4"> <p class="text-xs text-dd0c-muted">© 2026 dd0c. All rights reserved.</p> <p class="text-xs text-dd0c-muted">Built with ☕ by a solo founder who ships.</p> </div> </div> </footer> </main> </body></html>
|
||||||
1
products/marketing/site/node_modules/.bin/acorn
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/acorn
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../acorn/bin/acorn
|
||||||
1
products/marketing/site/node_modules/.bin/astro
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/astro
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../astro/astro.js
|
||||||
1
products/marketing/site/node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../autoprefixer/bin/autoprefixer
|
||||||
1
products/marketing/site/node_modules/.bin/baseline-browser-mapping
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/baseline-browser-mapping
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../baseline-browser-mapping/dist/cli.cjs
|
||||||
1
products/marketing/site/node_modules/.bin/browserslist
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/browserslist
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../browserslist/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/cssesc
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/cssesc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cssesc/bin/cssesc
|
||||||
1
products/marketing/site/node_modules/.bin/esbuild
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/esbuild
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../esbuild/bin/esbuild
|
||||||
1
products/marketing/site/node_modules/.bin/esparse
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/esparse
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../esprima/bin/esparse.js
|
||||||
1
products/marketing/site/node_modules/.bin/esvalidate
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/esvalidate
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../esprima/bin/esvalidate.js
|
||||||
1
products/marketing/site/node_modules/.bin/is-docker
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/is-docker
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../is-docker/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/is-inside-container
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/is-inside-container
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../is-inside-container/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/jiti
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/jiti
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../jiti/bin/jiti.js
|
||||||
1
products/marketing/site/node_modules/.bin/js-yaml
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/js-yaml
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../js-yaml/bin/js-yaml.js
|
||||||
1
products/marketing/site/node_modules/.bin/jsesc
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/jsesc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../jsesc/bin/jsesc
|
||||||
1
products/marketing/site/node_modules/.bin/json5
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/json5
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../json5/lib/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/nanoid
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/nanoid
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../nanoid/bin/nanoid.cjs
|
||||||
1
products/marketing/site/node_modules/.bin/parser
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/parser
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../@babel/parser/bin/babel-parser.js
|
||||||
1
products/marketing/site/node_modules/.bin/resolve
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/resolve
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../resolve/bin/resolve
|
||||||
1
products/marketing/site/node_modules/.bin/rollup
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/rollup
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../rollup/dist/bin/rollup
|
||||||
1
products/marketing/site/node_modules/.bin/semver
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/semver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../semver/bin/semver.js
|
||||||
1
products/marketing/site/node_modules/.bin/sucrase
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/sucrase
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../sucrase/bin/sucrase
|
||||||
1
products/marketing/site/node_modules/.bin/sucrase-node
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/sucrase-node
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../sucrase/bin/sucrase-node
|
||||||
1
products/marketing/site/node_modules/.bin/tailwind
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/tailwind
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../tailwindcss/lib/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/tailwindcss
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/tailwindcss
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../tailwindcss/lib/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/tsc
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/tsc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../typescript/bin/tsc
|
||||||
1
products/marketing/site/node_modules/.bin/tsconfck
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/tsconfck
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../tsconfck/bin/tsconfck.js
|
||||||
1
products/marketing/site/node_modules/.bin/tsserver
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/tsserver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../typescript/bin/tsserver
|
||||||
1
products/marketing/site/node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../update-browserslist-db/cli.js
|
||||||
1
products/marketing/site/node_modules/.bin/vite
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/vite
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../vite/bin/vite.js
|
||||||
1
products/marketing/site/node_modules/.bin/yaml
generated
vendored
Symbolic link
1
products/marketing/site/node_modules/.bin/yaml
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../yaml/bin.mjs
|
||||||
5095
products/marketing/site/node_modules/.package-lock.json
generated
vendored
Normal file
5095
products/marketing/site/node_modules/.package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
128
products/marketing/site/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
Normal file
128
products/marketing/site/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
declare namespace QuickLRU {
|
||||||
|
interface Options<KeyType, ValueType> {
|
||||||
|
/**
|
||||||
|
The maximum number of milliseconds an item should remain in the cache.
|
||||||
|
|
||||||
|
@default Infinity
|
||||||
|
|
||||||
|
By default, `maxAge` will be `Infinity`, which means that items will never expire.
|
||||||
|
Lazy expiration upon the next write or read call.
|
||||||
|
|
||||||
|
Individual expiration of an item can be specified by the `set(key, value, maxAge)` method.
|
||||||
|
*/
|
||||||
|
readonly maxAge?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
The maximum number of items before evicting the least recently used items.
|
||||||
|
*/
|
||||||
|
readonly maxSize: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Called right before an item is evicted from the cache.
|
||||||
|
|
||||||
|
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
||||||
|
*/
|
||||||
|
onEviction?: (key: KeyType, value: ValueType) => void;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare class QuickLRU<KeyType, ValueType>
|
||||||
|
implements Iterable<[KeyType, ValueType]> {
|
||||||
|
/**
|
||||||
|
The stored item count.
|
||||||
|
*/
|
||||||
|
readonly size: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
|
||||||
|
|
||||||
|
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
||||||
|
|
||||||
|
@example
|
||||||
|
```
|
||||||
|
import QuickLRU = require('quick-lru');
|
||||||
|
|
||||||
|
const lru = new QuickLRU({maxSize: 1000});
|
||||||
|
|
||||||
|
lru.set('🦄', '🌈');
|
||||||
|
|
||||||
|
lru.has('🦄');
|
||||||
|
//=> true
|
||||||
|
|
||||||
|
lru.get('🦄');
|
||||||
|
//=> '🌈'
|
||||||
|
```
|
||||||
|
*/
|
||||||
|
constructor(options: QuickLRU.Options<KeyType, ValueType>);
|
||||||
|
|
||||||
|
[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set an item. Returns the instance.
|
||||||
|
|
||||||
|
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire.
|
||||||
|
|
||||||
|
@returns The list instance.
|
||||||
|
*/
|
||||||
|
set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get an item.
|
||||||
|
|
||||||
|
@returns The stored item or `undefined`.
|
||||||
|
*/
|
||||||
|
get(key: KeyType): ValueType | undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check if an item exists.
|
||||||
|
*/
|
||||||
|
has(key: KeyType): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get an item without marking it as recently used.
|
||||||
|
|
||||||
|
@returns The stored item or `undefined`.
|
||||||
|
*/
|
||||||
|
peek(key: KeyType): ValueType | undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Delete an item.
|
||||||
|
|
||||||
|
@returns `true` if the item is removed or `false` if the item doesn't exist.
|
||||||
|
*/
|
||||||
|
delete(key: KeyType): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Delete all items.
|
||||||
|
*/
|
||||||
|
clear(): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
||||||
|
|
||||||
|
Useful for on-the-fly tuning of cache sizes in live systems.
|
||||||
|
*/
|
||||||
|
resize(maxSize: number): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterable for all the keys.
|
||||||
|
*/
|
||||||
|
keys(): IterableIterator<KeyType>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterable for all the values.
|
||||||
|
*/
|
||||||
|
values(): IterableIterator<ValueType>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterable for all entries, starting with the oldest (ascending in recency).
|
||||||
|
*/
|
||||||
|
entriesAscending(): IterableIterator<[KeyType, ValueType]>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterable for all entries, starting with the newest (descending in recency).
|
||||||
|
*/
|
||||||
|
entriesDescending(): IterableIterator<[KeyType, ValueType]>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = QuickLRU;
|
||||||
263
products/marketing/site/node_modules/@alloc/quick-lru/index.js
generated
vendored
Normal file
263
products/marketing/site/node_modules/@alloc/quick-lru/index.js
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
class QuickLRU {
|
||||||
|
constructor(options = {}) {
|
||||||
|
if (!(options.maxSize && options.maxSize > 0)) {
|
||||||
|
throw new TypeError('`maxSize` must be a number greater than 0');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof options.maxAge === 'number' && options.maxAge === 0) {
|
||||||
|
throw new TypeError('`maxAge` must be a number greater than 0');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.maxSize = options.maxSize;
|
||||||
|
this.maxAge = options.maxAge || Infinity;
|
||||||
|
this.onEviction = options.onEviction;
|
||||||
|
this.cache = new Map();
|
||||||
|
this.oldCache = new Map();
|
||||||
|
this._size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_emitEvictions(cache) {
|
||||||
|
if (typeof this.onEviction !== 'function') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [key, item] of cache) {
|
||||||
|
this.onEviction(key, item.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_deleteIfExpired(key, item) {
|
||||||
|
if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
|
||||||
|
if (typeof this.onEviction === 'function') {
|
||||||
|
this.onEviction(key, item.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.delete(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_getOrDeleteIfExpired(key, item) {
|
||||||
|
const deleted = this._deleteIfExpired(key, item);
|
||||||
|
if (deleted === false) {
|
||||||
|
return item.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_getItemValue(key, item) {
|
||||||
|
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
_peek(key, cache) {
|
||||||
|
const item = cache.get(key);
|
||||||
|
|
||||||
|
return this._getItemValue(key, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
_set(key, value) {
|
||||||
|
this.cache.set(key, value);
|
||||||
|
this._size++;
|
||||||
|
|
||||||
|
if (this._size >= this.maxSize) {
|
||||||
|
this._size = 0;
|
||||||
|
this._emitEvictions(this.oldCache);
|
||||||
|
this.oldCache = this.cache;
|
||||||
|
this.cache = new Map();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_moveToRecent(key, item) {
|
||||||
|
this.oldCache.delete(key);
|
||||||
|
this._set(key, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
* _entriesAscending() {
|
||||||
|
for (const item of this.oldCache) {
|
||||||
|
const [key, value] = item;
|
||||||
|
if (!this.cache.has(key)) {
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const item of this.cache) {
|
||||||
|
const [key, value] = item;
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get(key) {
|
||||||
|
if (this.cache.has(key)) {
|
||||||
|
const item = this.cache.get(key);
|
||||||
|
|
||||||
|
return this._getItemValue(key, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.oldCache.has(key)) {
|
||||||
|
const item = this.oldCache.get(key);
|
||||||
|
if (this._deleteIfExpired(key, item) === false) {
|
||||||
|
this._moveToRecent(key, item);
|
||||||
|
return item.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set(key, value, {maxAge = this.maxAge === Infinity ? undefined : Date.now() + this.maxAge} = {}) {
|
||||||
|
if (this.cache.has(key)) {
|
||||||
|
this.cache.set(key, {
|
||||||
|
value,
|
||||||
|
maxAge
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this._set(key, {value, expiry: maxAge});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
has(key) {
|
||||||
|
if (this.cache.has(key)) {
|
||||||
|
return !this._deleteIfExpired(key, this.cache.get(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.oldCache.has(key)) {
|
||||||
|
return !this._deleteIfExpired(key, this.oldCache.get(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
peek(key) {
|
||||||
|
if (this.cache.has(key)) {
|
||||||
|
return this._peek(key, this.cache);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.oldCache.has(key)) {
|
||||||
|
return this._peek(key, this.oldCache);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete(key) {
|
||||||
|
const deleted = this.cache.delete(key);
|
||||||
|
if (deleted) {
|
||||||
|
this._size--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.oldCache.delete(key) || deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
this.cache.clear();
|
||||||
|
this.oldCache.clear();
|
||||||
|
this._size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
resize(newSize) {
|
||||||
|
if (!(newSize && newSize > 0)) {
|
||||||
|
throw new TypeError('`maxSize` must be a number greater than 0');
|
||||||
|
}
|
||||||
|
|
||||||
|
const items = [...this._entriesAscending()];
|
||||||
|
const removeCount = items.length - newSize;
|
||||||
|
if (removeCount < 0) {
|
||||||
|
this.cache = new Map(items);
|
||||||
|
this.oldCache = new Map();
|
||||||
|
this._size = items.length;
|
||||||
|
} else {
|
||||||
|
if (removeCount > 0) {
|
||||||
|
this._emitEvictions(items.slice(0, removeCount));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.oldCache = new Map(items.slice(removeCount));
|
||||||
|
this.cache = new Map();
|
||||||
|
this._size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.maxSize = newSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
* keys() {
|
||||||
|
for (const [key] of this) {
|
||||||
|
yield key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
* values() {
|
||||||
|
for (const [, value] of this) {
|
||||||
|
yield value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
* [Symbol.iterator]() {
|
||||||
|
for (const item of this.cache) {
|
||||||
|
const [key, value] = item;
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield [key, value.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const item of this.oldCache) {
|
||||||
|
const [key, value] = item;
|
||||||
|
if (!this.cache.has(key)) {
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield [key, value.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
* entriesDescending() {
|
||||||
|
let items = [...this.cache];
|
||||||
|
for (let i = items.length - 1; i >= 0; --i) {
|
||||||
|
const item = items[i];
|
||||||
|
const [key, value] = item;
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield [key, value.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
items = [...this.oldCache];
|
||||||
|
for (let i = items.length - 1; i >= 0; --i) {
|
||||||
|
const item = items[i];
|
||||||
|
const [key, value] = item;
|
||||||
|
if (!this.cache.has(key)) {
|
||||||
|
const deleted = this._deleteIfExpired(key, value);
|
||||||
|
if (deleted === false) {
|
||||||
|
yield [key, value.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
* entriesAscending() {
|
||||||
|
for (const [key, value] of this._entriesAscending()) {
|
||||||
|
yield [key, value.value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get size() {
|
||||||
|
if (!this._size) {
|
||||||
|
return this.oldCache.size;
|
||||||
|
}
|
||||||
|
|
||||||
|
let oldCacheSize = 0;
|
||||||
|
for (const key of this.oldCache.keys()) {
|
||||||
|
if (!this.cache.has(key)) {
|
||||||
|
oldCacheSize++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.min(this._size + oldCacheSize, this.maxSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = QuickLRU;
|
||||||
9
products/marketing/site/node_modules/@alloc/quick-lru/license
generated
vendored
Normal file
9
products/marketing/site/node_modules/@alloc/quick-lru/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
43
products/marketing/site/node_modules/@alloc/quick-lru/package.json
generated
vendored
Normal file
43
products/marketing/site/node_modules/@alloc/quick-lru/package.json
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "@alloc/quick-lru",
|
||||||
|
"version": "5.2.0",
|
||||||
|
"description": "Simple “Least Recently Used” (LRU) cache",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": "sindresorhus/quick-lru",
|
||||||
|
"funding": "https://github.com/sponsors/sindresorhus",
|
||||||
|
"author": {
|
||||||
|
"name": "Sindre Sorhus",
|
||||||
|
"email": "sindresorhus@gmail.com",
|
||||||
|
"url": "https://sindresorhus.com"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "xo && nyc ava && tsd"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"index.d.ts"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"lru",
|
||||||
|
"quick",
|
||||||
|
"cache",
|
||||||
|
"caching",
|
||||||
|
"least",
|
||||||
|
"recently",
|
||||||
|
"used",
|
||||||
|
"fast",
|
||||||
|
"map",
|
||||||
|
"hash",
|
||||||
|
"buffer"
|
||||||
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^2.0.0",
|
||||||
|
"coveralls": "^3.0.3",
|
||||||
|
"nyc": "^15.0.0",
|
||||||
|
"tsd": "^0.11.0",
|
||||||
|
"xo": "^0.26.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
139
products/marketing/site/node_modules/@alloc/quick-lru/readme.md
generated
vendored
Normal file
139
products/marketing/site/node_modules/@alloc/quick-lru/readme.md
generated
vendored
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
# quick-lru [](https://travis-ci.org/sindresorhus/quick-lru) [](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
|
||||||
|
|
||||||
|
> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
|
||||||
|
|
||||||
|
Useful when you need to cache something and limit memory usage.
|
||||||
|
|
||||||
|
Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install quick-lru
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
const QuickLRU = require('quick-lru');
|
||||||
|
|
||||||
|
const lru = new QuickLRU({maxSize: 1000});
|
||||||
|
|
||||||
|
lru.set('🦄', '🌈');
|
||||||
|
|
||||||
|
lru.has('🦄');
|
||||||
|
//=> true
|
||||||
|
|
||||||
|
lru.get('🦄');
|
||||||
|
//=> '🌈'
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### new QuickLRU(options?)
|
||||||
|
|
||||||
|
Returns a new instance.
|
||||||
|
|
||||||
|
### options
|
||||||
|
|
||||||
|
Type: `object`
|
||||||
|
|
||||||
|
#### maxSize
|
||||||
|
|
||||||
|
*Required*\
|
||||||
|
Type: `number`
|
||||||
|
|
||||||
|
The maximum number of items before evicting the least recently used items.
|
||||||
|
|
||||||
|
#### maxAge
|
||||||
|
|
||||||
|
Type: `number`\
|
||||||
|
Default: `Infinity`
|
||||||
|
|
||||||
|
The maximum number of milliseconds an item should remain in cache.
|
||||||
|
By default maxAge will be Infinity, which means that items will never expire.
|
||||||
|
|
||||||
|
Lazy expiration happens upon the next `write` or `read` call.
|
||||||
|
|
||||||
|
Individual expiration of an item can be specified by the `set(key, value, options)` method.
|
||||||
|
|
||||||
|
#### onEviction
|
||||||
|
|
||||||
|
*Optional*\
|
||||||
|
Type: `(key, value) => void`
|
||||||
|
|
||||||
|
Called right before an item is evicted from the cache.
|
||||||
|
|
||||||
|
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
||||||
|
|
||||||
|
### Instance
|
||||||
|
|
||||||
|
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
||||||
|
|
||||||
|
Both `key` and `value` can be of any type.
|
||||||
|
|
||||||
|
#### .set(key, value, options?)
|
||||||
|
|
||||||
|
Set an item. Returns the instance.
|
||||||
|
|
||||||
|
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire.
|
||||||
|
|
||||||
|
#### .get(key)
|
||||||
|
|
||||||
|
Get an item.
|
||||||
|
|
||||||
|
#### .has(key)
|
||||||
|
|
||||||
|
Check if an item exists.
|
||||||
|
|
||||||
|
#### .peek(key)
|
||||||
|
|
||||||
|
Get an item without marking it as recently used.
|
||||||
|
|
||||||
|
#### .delete(key)
|
||||||
|
|
||||||
|
Delete an item.
|
||||||
|
|
||||||
|
Returns `true` if the item is removed or `false` if the item doesn't exist.
|
||||||
|
|
||||||
|
#### .clear()
|
||||||
|
|
||||||
|
Delete all items.
|
||||||
|
|
||||||
|
#### .resize(maxSize)
|
||||||
|
|
||||||
|
Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
||||||
|
|
||||||
|
Useful for on-the-fly tuning of cache sizes in live systems.
|
||||||
|
|
||||||
|
#### .keys()
|
||||||
|
|
||||||
|
Iterable for all the keys.
|
||||||
|
|
||||||
|
#### .values()
|
||||||
|
|
||||||
|
Iterable for all the values.
|
||||||
|
|
||||||
|
#### .entriesAscending()
|
||||||
|
|
||||||
|
Iterable for all entries, starting with the oldest (ascending in recency).
|
||||||
|
|
||||||
|
#### .entriesDescending()
|
||||||
|
|
||||||
|
Iterable for all entries, starting with the newest (descending in recency).
|
||||||
|
|
||||||
|
#### .size
|
||||||
|
|
||||||
|
The stored item count.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<b>
|
||||||
|
<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||||
|
</b>
|
||||||
|
<br>
|
||||||
|
<sub>
|
||||||
|
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||||
|
</sub>
|
||||||
|
</div>
|
||||||
53
products/marketing/site/node_modules/@astrojs/compiler/LICENSE
generated
vendored
Normal file
53
products/marketing/site/node_modules/@astrojs/compiler/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 [Astro contributors](https://github.com/withastro/compiler/graphs/contributors)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
"""
|
||||||
|
This license applies to parts of the `internal/` subdirectory originating from
|
||||||
|
the https://cs.opensource.google/go/x/net/+/master:html/ repository:
|
||||||
|
|
||||||
|
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following disclaimer
|
||||||
|
in the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
72
products/marketing/site/node_modules/@astrojs/compiler/README.md
generated
vendored
Normal file
72
products/marketing/site/node_modules/@astrojs/compiler/README.md
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# Astro Compiler
|
||||||
|
|
||||||
|
Astro’s [Go](https://golang.org/) + WASM compiler.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install @astrojs/compiler
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
#### Transform `.astro` to valid TypeScript
|
||||||
|
|
||||||
|
The Astro compiler can convert `.astro` syntax to a TypeScript Module whose default export generates HTML.
|
||||||
|
|
||||||
|
**Some notes**...
|
||||||
|
|
||||||
|
- TypeScript is valid `.astro` syntax! The output code may need an additional post-processing step to generate valid JavaScript.
|
||||||
|
- `.astro` files rely on a server implementation exposed as `astro/runtime/server/index.js` in the Node ecosystem. Other runtimes currently need to bring their own rendering implementation and reference it via `internalURL`. This is a pain point we're looking into fixing.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { transform, type TransformResult } from "@astrojs/compiler";
|
||||||
|
|
||||||
|
const result = await transform(source, {
|
||||||
|
filename: "/Users/astro/Code/project/src/pages/index.astro",
|
||||||
|
sourcemap: "both",
|
||||||
|
internalURL: "astro/runtime/server/index.js",
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Parse `.astro` and return an AST
|
||||||
|
|
||||||
|
The Astro compiler can emit an AST using the `parse` method.
|
||||||
|
|
||||||
|
**Some notes**...
|
||||||
|
|
||||||
|
- Position data is currently incomplete and in some cases incorrect. We're working on it!
|
||||||
|
- A `TextNode` can represent both HTML `text` and JavaScript/TypeScript source code.
|
||||||
|
- The `@astrojs/compiler/utils` entrypoint exposes `walk` and `walkAsync` functions that can be used to traverse the AST. It also exposes the `is` helper which can be used as guards to derive the proper types for each `node`.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { parse } from "@astrojs/compiler";
|
||||||
|
import { walk, walkAsync, is } from "@astrojs/compiler/utils";
|
||||||
|
|
||||||
|
const result = await parse(source, {
|
||||||
|
position: false, // defaults to `true`
|
||||||
|
});
|
||||||
|
|
||||||
|
walk(result.ast, (node) => {
|
||||||
|
// `tag` nodes are `element` | `custom-element` | `component`
|
||||||
|
if (is.tag(node)) {
|
||||||
|
console.log(node.name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await walkAsync(result.ast, async (node) => {
|
||||||
|
if (is.tag(node)) {
|
||||||
|
node.value = await expensiveCalculation(node)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Develop
|
||||||
|
|
||||||
|
### VSCode / CodeSpaces
|
||||||
|
|
||||||
|
A `devcontainer` configuration is available for use with VSCode's [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) and GitHub CodeSpaces.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
[CONTRIBUTING.md](/CONTRIBUTING.md)
|
||||||
BIN
products/marketing/site/node_modules/@astrojs/compiler/dist/astro.wasm
generated
vendored
Normal file
BIN
products/marketing/site/node_modules/@astrojs/compiler/dist/astro.wasm
generated
vendored
Normal file
Binary file not shown.
2
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.cjs
generated
vendored
Normal file
2
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
11
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.d.ts
generated
vendored
Normal file
11
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1, teardown as teardown$1, initialize as initialize$1 } from '../shared/types.js';
|
||||||
|
import '../shared/ast.js';
|
||||||
|
import '../shared/diagnostics.js';
|
||||||
|
|
||||||
|
declare const transform: typeof transform$1;
|
||||||
|
declare const parse: typeof parse$1;
|
||||||
|
declare const convertToTSX: typeof convertToTSX$1;
|
||||||
|
declare const teardown: typeof teardown$1;
|
||||||
|
declare const initialize: typeof initialize$1;
|
||||||
|
|
||||||
|
export { convertToTSX, initialize, parse, teardown, transform };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{a as f}from"../chunk-QR6QDSEV.js";var u=(t,e)=>p().transform(t,e),S=(t,e)=>p().parse(t,e),v=(t,e)=>p().convertToTSX(t,e),a,i,h=()=>{a=void 0,i=void 0,globalThis["@astrojs/compiler"]=void 0},T=async t=>{let e=t.wasmURL;if(!e)throw new Error('Must provide the "wasmURL" option');e+="",a||(a=m(e).catch(n=>{throw a=void 0,n})),i=i||await a},p=()=>{if(!a)throw new Error('You need to call "initialize" before calling this');if(!i)throw new Error('You need to wait for the promise returned from "initialize" to be resolved before calling this');return i},y=async(t,e)=>{let n;return WebAssembly.instantiateStreaming?n=await WebAssembly.instantiateStreaming(fetch(t),e):n=await(async()=>{let s=await fetch(t).then(o=>o.arrayBuffer());return WebAssembly.instantiate(s,e)})(),n},m=async t=>{let e=new f,n=await y(t,e.importObject);e.run(n.instance);let c=globalThis["@astrojs/compiler"];return{transform:(s,o)=>new Promise(r=>r(c.transform(s,o||{}))),convertToTSX:(s,o)=>new Promise(r=>r(c.convertToTSX(s,o||{}))).then(r=>({...r,map:JSON.parse(r.map)})),parse:(s,o)=>new Promise(r=>r(c.parse(s,o||{}))).then(r=>({...r,ast:JSON.parse(r.ast)}))}};export{v as convertToTSX,T as initialize,S as parse,h as teardown,u as transform};
|
||||||
3
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.cjs
generated
vendored
Normal file
3
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.cjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)c(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(o,r)&&r!==t&&c(o,r,{get:()=>e[r],enumerable:!(a=d(e,r))||a.enumerable});return o};var y=o=>f(c({},"__esModule",{value:!0}),o);var v={};u(v,{is:()=>s,serialize:()=>k,walk:()=>h,walkAsync:()=>x});module.exports=y(v);function n(o){return e=>e.type===o}var s={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(e){this.callback=e}async visit(e,t,a){if(await this.callback(e,t,a),s.parent(e)){let r=[];for(let i=0;i<e.children.length;i++){let m=e.children[i];r.push(this.callback(m,e,i))}await Promise.all(r)}}};function h(o,e){new l(e).visit(o)}function x(o,e){return new l(e).visit(o)}function g(o){let e="";for(let t of o.attributes)switch(e+=" ",t.kind){case"empty":{e+=`${t.name}`;break}case"expression":{e+=`${t.name}={${t.value}}`;break}case"quoted":{e+=`${t.name}=${t.raw}`;break}case"template-literal":{e+=`${t.name}=\`${t.value}\``;break}case"shorthand":{e+=`{${t.name}}`;break}case"spread":{e+=`{...${t.value}}`;break}}return e}function k(o,e={selfClose:!0}){let t="";function a(r){if(s.root(r))for(let i of r.children)a(i);else if(s.frontmatter(r))t+=`---${r.value}---
|
||||||
|
|
||||||
|
`;else if(s.comment(r))t+=`<!--${r.value}-->`;else if(s.expression(r)){t+="{";for(let i of r.children)a(i);t+="}"}else if(s.literal(r))t+=r.value;else if(s.tag(r))if(t+=`<${r.name}`,t+=g(r),r.children.length===0&&e.selfClose)t+=" />";else{t+=">";for(let i of r.children)a(i);t+=`</${r.name}>`}}return a(o),t}0&&(module.exports={is,serialize,walk,walkAsync});
|
||||||
29
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.d.ts
generated
vendored
Normal file
29
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { Node, ParentNode, LiteralNode, TagLikeNode, TextNode, RootNode, ElementNode, CustomElementNode, ComponentNode, FragmentNode, ExpressionNode, DoctypeNode, CommentNode, FrontmatterNode } from '../shared/ast.js';
|
||||||
|
|
||||||
|
type Visitor = (node: Node, parent?: ParentNode, index?: number) => void | Promise<void>;
|
||||||
|
declare const is: {
|
||||||
|
parent(node: Node): node is ParentNode;
|
||||||
|
literal(node: Node): node is LiteralNode;
|
||||||
|
tag(node: Node): node is TagLikeNode;
|
||||||
|
whitespace(node: Node): node is TextNode;
|
||||||
|
root: (node: Node) => node is RootNode;
|
||||||
|
element: (node: Node) => node is ElementNode;
|
||||||
|
customElement: (node: Node) => node is CustomElementNode;
|
||||||
|
component: (node: Node) => node is ComponentNode;
|
||||||
|
fragment: (node: Node) => node is FragmentNode;
|
||||||
|
expression: (node: Node) => node is ExpressionNode;
|
||||||
|
text: (node: Node) => node is TextNode;
|
||||||
|
doctype: (node: Node) => node is DoctypeNode;
|
||||||
|
comment: (node: Node) => node is CommentNode;
|
||||||
|
frontmatter: (node: Node) => node is FrontmatterNode;
|
||||||
|
};
|
||||||
|
declare function walk(node: ParentNode, callback: Visitor): void;
|
||||||
|
declare function walkAsync(node: ParentNode, callback: Visitor): Promise<void>;
|
||||||
|
interface SerializeOptions {
|
||||||
|
selfClose: boolean;
|
||||||
|
}
|
||||||
|
/** @deprecated Please use `SerializeOptions` */
|
||||||
|
type SerializeOtions = SerializeOptions;
|
||||||
|
declare function serialize(root: Node, opts?: SerializeOptions): string;
|
||||||
|
|
||||||
|
export { SerializeOptions, SerializeOtions, Visitor, is, serialize, walk, walkAsync };
|
||||||
3
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.js
generated
vendored
Normal file
3
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/utils.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function n(o){return t=>t.type===o}var a={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(t){this.callback=t}async visit(t,e,s){if(await this.callback(t,e,s),a.parent(t)){let r=[];for(let i=0;i<t.children.length;i++){let c=t.children[i];r.push(this.callback(c,t,i))}await Promise.all(r)}}};function N(o,t){new l(t).visit(o)}function u(o,t){return new l(t).visit(o)}function m(o){let t="";for(let e of o.attributes)switch(t+=" ",e.kind){case"empty":{t+=`${e.name}`;break}case"expression":{t+=`${e.name}={${e.value}}`;break}case"quoted":{t+=`${e.name}=${e.raw}`;break}case"template-literal":{t+=`${e.name}=\`${e.value}\``;break}case"shorthand":{t+=`{${e.name}}`;break}case"spread":{t+=`{...${e.value}}`;break}}return t}function f(o,t={selfClose:!0}){let e="";function s(r){if(a.root(r))for(let i of r.children)s(i);else if(a.frontmatter(r))e+=`---${r.value}---
|
||||||
|
|
||||||
|
`;else if(a.comment(r))e+=`<!--${r.value}-->`;else if(a.expression(r)){e+="{";for(let i of r.children)s(i);e+="}"}else if(a.literal(r))e+=r.value;else if(a.tag(r))if(e+=`<${r.name}`,e+=m(r),r.children.length===0&&t.selfClose)e+=" />";else{e+=">";for(let i of r.children)s(i);e+=`</${r.name}>`}}return s(o),e}export{a as is,f as serialize,N as walk,u as walkAsync};
|
||||||
2
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs
generated
vendored
Normal file
2
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
37
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts
generated
vendored
Normal file
37
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
declare class Go {
|
||||||
|
importObject: {
|
||||||
|
gojs: {
|
||||||
|
'runtime.wasmExit': (sp: any) => void;
|
||||||
|
'runtime.wasmWrite': (sp: any) => void;
|
||||||
|
'runtime.resetMemoryDataView': (sp: any) => void;
|
||||||
|
'runtime.nanotime1': (sp: any) => void;
|
||||||
|
'runtime.walltime': (sp: any) => void;
|
||||||
|
'runtime.scheduleTimeoutEvent': (sp: any) => void;
|
||||||
|
'runtime.clearTimeoutEvent': (sp: any) => void;
|
||||||
|
'runtime.getRandomData': (sp: any) => void;
|
||||||
|
'syscall/js.finalizeRef': (sp: any) => void;
|
||||||
|
'syscall/js.stringVal': (sp: any) => void;
|
||||||
|
'syscall/js.valueGet': (sp: any) => void;
|
||||||
|
'syscall/js.valueSet': (sp: any) => void;
|
||||||
|
'syscall/js.valueDelete': (sp: any) => void;
|
||||||
|
'syscall/js.valueIndex': (sp: any) => void;
|
||||||
|
'syscall/js.valueSetIndex': (sp: any) => void;
|
||||||
|
'syscall/js.valueCall': (sp: any) => void;
|
||||||
|
'syscall/js.valueInvoke': (sp: any) => void;
|
||||||
|
'syscall/js.valueNew': (sp: any) => void;
|
||||||
|
'syscall/js.valueLength': (sp: any) => void;
|
||||||
|
'syscall/js.valuePrepareString': (sp: any) => void;
|
||||||
|
'syscall/js.valueLoadString': (sp: any) => void;
|
||||||
|
'syscall/js.valueInstanceOf': (sp: any) => void;
|
||||||
|
'syscall/js.copyBytesToGo': (sp: any) => void;
|
||||||
|
'syscall/js.copyBytesToJS': (sp: any) => void;
|
||||||
|
debug: (value: any) => void;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
constructor();
|
||||||
|
run(instance: any): Promise<void>;
|
||||||
|
private _resume;
|
||||||
|
private _makeFuncWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Go as default };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/browser/wasm_exec.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{a}from"../chunk-QR6QDSEV.js";export{a as default};
|
||||||
2
products/marketing/site/node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js
generated
vendored
Normal file
2
products/marketing/site/node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
products/marketing/site/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.d.ts
generated
vendored
Normal file
12
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1, teardown as teardown$1 } from '../shared/types.js';
|
||||||
|
export { HoistedScript, ParseOptions, ParseResult, PreprocessorResult, TransformOptions, TransformResult } from '../shared/types.js';
|
||||||
|
import '../shared/ast.js';
|
||||||
|
import '../shared/diagnostics.js';
|
||||||
|
|
||||||
|
declare const transform: typeof transform$1;
|
||||||
|
declare const parse: typeof parse$1;
|
||||||
|
declare const convertToTSX: typeof convertToTSX$1;
|
||||||
|
declare const compile: (template: string) => Promise<string>;
|
||||||
|
declare const teardown: typeof teardown$1;
|
||||||
|
|
||||||
|
export { compile, convertToTSX, parse, teardown, transform };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{a as c}from"../chunk-W5DTLHV4.js";import{promises as m}from"fs";import{fileURLToPath as f}from"url";var w=async(t,s)=>i().then(r=>r.transform(t,s)),l=async(t,s)=>i().then(r=>r.parse(t,s)),b=async(t,s)=>i().then(r=>r.convertToTSX(t,s)),P=async t=>{let{default:s}=await import(`data:text/javascript;charset=utf-8;base64,${Buffer.from(t).toString("base64")}`);return s},n,g=()=>{n=void 0,globalThis["@astrojs/compiler"]=void 0},i=()=>(n||(n=d().catch(t=>{throw n=void 0,t})),n),y=async(t,s)=>{let r;return r=await(async()=>{let o=await m.readFile(t).then(e=>e.buffer);return WebAssembly.instantiate(new Uint8Array(o),s)})(),r},d=async()=>{let t=new c,s=await y(f(new URL("../astro.wasm",import.meta.url)),t.importObject);t.run(s.instance);let r=globalThis["@astrojs/compiler"];return{transform:(a,o)=>new Promise(e=>{try{e(r.transform(a,o||{}))}catch(p){throw n=void 0,p}}),parse:(a,o)=>new Promise(e=>e(r.parse(a,o||{}))).catch(e=>{throw n=void 0,e}).then(e=>({...e,ast:JSON.parse(e.ast)})),convertToTSX:(a,o)=>new Promise(e=>e(r.convertToTSX(a,o||{}))).catch(e=>{throw n=void 0,e}).then(e=>({...e,map:JSON.parse(e.map)}))}};export{P as compile,b as convertToTSX,l as parse,g as teardown,w as transform};
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.d.ts
generated
vendored
Normal file
16
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { TransformOptions, TransformResult, ParseOptions, ParseResult, ConvertToTSXOptions, TSXResult, transform as transform$1, parse as parse$1, convertToTSX as convertToTSX$1 } from '../shared/types.js';
|
||||||
|
import '../shared/ast.js';
|
||||||
|
import '../shared/diagnostics.js';
|
||||||
|
|
||||||
|
type UnwrappedPromise<T> = T extends (...params: any) => Promise<infer Return> ? (...params: Parameters<T>) => Return : T;
|
||||||
|
interface Service {
|
||||||
|
transform: UnwrappedPromise<typeof transform$1>;
|
||||||
|
parse: UnwrappedPromise<typeof parse$1>;
|
||||||
|
convertToTSX: UnwrappedPromise<typeof convertToTSX$1>;
|
||||||
|
}
|
||||||
|
declare const transform: (input: string, options: TransformOptions | undefined) => TransformResult;
|
||||||
|
declare const parse: (input: string, options: ParseOptions | undefined) => ParseResult;
|
||||||
|
declare const convertToTSX: (input: string, options: ConvertToTSXOptions | undefined) => TSXResult;
|
||||||
|
declare function startRunningService(): Service;
|
||||||
|
|
||||||
|
export { convertToTSX, parse, startRunningService, transform };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/sync.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{a as c}from"../chunk-W5DTLHV4.js";import{readFileSync as p}from"fs";import{fileURLToPath as m}from"url";function i(){return s||(s=f()),s}var s,l=(e,t)=>i().transform(e,t),w=(e,t)=>i().parse(e,t),h=(e,t)=>i().convertToTSX(e,t);function f(){let e=new c,t=v(m(new URL("../astro.wasm",import.meta.url)),e.importObject);e.run(t);let o=globalThis["@astrojs/compiler"];return{transform:(n,a)=>{try{return o.transform(n,a||{})}catch(r){throw s=void 0,r}},parse:(n,a)=>{try{let r=o.parse(n,a||{});return{...r,ast:JSON.parse(r.ast)}}catch(r){throw s=void 0,r}},convertToTSX:(n,a)=>{try{let r=o.convertToTSX(n,a||{});return{...r,map:JSON.parse(r.map)}}catch(r){throw s=void 0,r}}}}function v(e,t){let o=p(e);return new WebAssembly.Instance(new WebAssembly.Module(o),t)}export{h as convertToTSX,w as parse,f as startRunningService,l as transform};
|
||||||
3
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.cjs
generated
vendored
Normal file
3
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.cjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
"use strict";var m=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)m(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!N.call(o,r)&&r!==t&&m(o,r,{get:()=>e[r],enumerable:!(a=d(e,r))||a.enumerable});return o};var y=o=>f(m({},"__esModule",{value:!0}),o);var v={};u(v,{is:()=>s,serialize:()=>k,walk:()=>h,walkAsync:()=>x});module.exports=y(v);function n(o){return e=>e.type===o}var s={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(e){this.callback=e}async visit(e,t,a){if(await this.callback(e,t,a),s.parent(e)){let r=[];for(let i=0;i<e.children.length;i++){let c=e.children[i];r.push(this.callback(c,e,i))}await Promise.all(r)}}};function h(o,e){new l(e).visit(o)}function x(o,e){return new l(e).visit(o)}function g(o){let e="";for(let t of o.attributes)switch(e+=" ",t.kind){case"empty":{e+=`${t.name}`;break}case"expression":{e+=`${t.name}={${t.value}}`;break}case"quoted":{e+=`${t.name}=${t.raw}`;break}case"template-literal":{e+=`${t.name}=\`${t.value}\``;break}case"shorthand":{e+=`{${t.name}}`;break}case"spread":{e+=`{...${t.name}}`;break}}return e}function k(o,e={selfClose:!0}){let t="";function a(r){if(s.root(r))for(let i of r.children)a(i);else if(s.frontmatter(r))t+=`---${r.value}---
|
||||||
|
|
||||||
|
`;else if(s.comment(r))t+=`<!--${r.value}-->`;else if(s.expression(r)){t+="{";for(let i of r.children)a(i);t+="}"}else if(s.literal(r))t+=r.value;else if(s.tag(r))if(t+=`<${r.name}`,t+=g(r),r.children.length===0&&e.selfClose)t+=" />";else{t+=">";for(let i of r.children)a(i);t+=`</${r.name}>`}}return a(o),t}0&&(module.exports={is,serialize,walk,walkAsync});
|
||||||
29
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.d.ts
generated
vendored
Normal file
29
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { Node, ParentNode, LiteralNode, TagLikeNode, TextNode, RootNode, ElementNode, CustomElementNode, ComponentNode, FragmentNode, ExpressionNode, DoctypeNode, CommentNode, FrontmatterNode } from '../shared/ast.js';
|
||||||
|
|
||||||
|
type Visitor = (node: Node, parent?: ParentNode, index?: number) => void | Promise<void>;
|
||||||
|
declare const is: {
|
||||||
|
parent(node: Node): node is ParentNode;
|
||||||
|
literal(node: Node): node is LiteralNode;
|
||||||
|
tag(node: Node): node is TagLikeNode;
|
||||||
|
whitespace(node: Node): node is TextNode;
|
||||||
|
root: (node: Node) => node is RootNode;
|
||||||
|
element: (node: Node) => node is ElementNode;
|
||||||
|
customElement: (node: Node) => node is CustomElementNode;
|
||||||
|
component: (node: Node) => node is ComponentNode;
|
||||||
|
fragment: (node: Node) => node is FragmentNode;
|
||||||
|
expression: (node: Node) => node is ExpressionNode;
|
||||||
|
text: (node: Node) => node is TextNode;
|
||||||
|
doctype: (node: Node) => node is DoctypeNode;
|
||||||
|
comment: (node: Node) => node is CommentNode;
|
||||||
|
frontmatter: (node: Node) => node is FrontmatterNode;
|
||||||
|
};
|
||||||
|
declare function walk(node: ParentNode, callback: Visitor): void;
|
||||||
|
declare function walkAsync(node: ParentNode, callback: Visitor): Promise<void>;
|
||||||
|
interface SerializeOptions {
|
||||||
|
selfClose: boolean;
|
||||||
|
}
|
||||||
|
/** @deprecated Please use `SerializeOptions` */
|
||||||
|
type SerializeOtions = SerializeOptions;
|
||||||
|
declare function serialize(root: Node, opts?: SerializeOptions): string;
|
||||||
|
|
||||||
|
export { SerializeOptions, SerializeOtions, Visitor, is, serialize, walk, walkAsync };
|
||||||
3
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.js
generated
vendored
Normal file
3
products/marketing/site/node_modules/@astrojs/compiler/dist/node/utils.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function n(o){return t=>t.type===o}var a={parent(o){return Array.isArray(o.children)},literal(o){return typeof o.value=="string"},tag(o){return o.type==="element"||o.type==="custom-element"||o.type==="component"||o.type==="fragment"},whitespace(o){return o.type==="text"&&o.value.trim().length===0},root:n("root"),element:n("element"),customElement:n("custom-element"),component:n("component"),fragment:n("fragment"),expression:n("expression"),text:n("text"),doctype:n("doctype"),comment:n("comment"),frontmatter:n("frontmatter")},l=class{constructor(t){this.callback=t}async visit(t,e,s){if(await this.callback(t,e,s),a.parent(t)){let r=[];for(let i=0;i<t.children.length;i++){let m=t.children[i];r.push(this.callback(m,t,i))}await Promise.all(r)}}};function N(o,t){new l(t).visit(o)}function u(o,t){return new l(t).visit(o)}function c(o){let t="";for(let e of o.attributes)switch(t+=" ",e.kind){case"empty":{t+=`${e.name}`;break}case"expression":{t+=`${e.name}={${e.value}}`;break}case"quoted":{t+=`${e.name}=${e.raw}`;break}case"template-literal":{t+=`${e.name}=\`${e.value}\``;break}case"shorthand":{t+=`{${e.name}}`;break}case"spread":{t+=`{...${e.name}}`;break}}return t}function f(o,t={selfClose:!0}){let e="";function s(r){if(a.root(r))for(let i of r.children)s(i);else if(a.frontmatter(r))e+=`---${r.value}---
|
||||||
|
|
||||||
|
`;else if(a.comment(r))e+=`<!--${r.value}-->`;else if(a.expression(r)){e+="{";for(let i of r.children)s(i);e+="}"}else if(a.literal(r))e+=r.value;else if(a.tag(r))if(e+=`<${r.name}`,e+=c(r),r.children.length===0&&t.selfClose)e+=" />";else{e+=">";for(let i of r.children)s(i);e+=`</${r.name}>`}}return s(o),e}export{a as is,f as serialize,N as walk,u as walkAsync};
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
37
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts
generated
vendored
Normal file
37
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
declare class Go {
|
||||||
|
importObject: {
|
||||||
|
gojs: {
|
||||||
|
'runtime.wasmExit': (sp: any) => void;
|
||||||
|
'runtime.wasmWrite': (sp: any) => void;
|
||||||
|
'runtime.resetMemoryDataView': (sp: any) => void;
|
||||||
|
'runtime.nanotime1': (sp: any) => void;
|
||||||
|
'runtime.walltime': (sp: any) => void;
|
||||||
|
'runtime.scheduleTimeoutEvent': (sp: any) => void;
|
||||||
|
'runtime.clearTimeoutEvent': (sp: any) => void;
|
||||||
|
'runtime.getRandomData': (sp: any) => void;
|
||||||
|
'syscall/js.finalizeRef': (sp: any) => void;
|
||||||
|
'syscall/js.stringVal': (sp: any) => void;
|
||||||
|
'syscall/js.valueGet': (sp: any) => void;
|
||||||
|
'syscall/js.valueSet': (sp: any) => void;
|
||||||
|
'syscall/js.valueDelete': (sp: any) => void;
|
||||||
|
'syscall/js.valueIndex': (sp: any) => void;
|
||||||
|
'syscall/js.valueSetIndex': (sp: any) => void;
|
||||||
|
'syscall/js.valueCall': (sp: any) => void;
|
||||||
|
'syscall/js.valueInvoke': (sp: any) => void;
|
||||||
|
'syscall/js.valueNew': (sp: any) => void;
|
||||||
|
'syscall/js.valueLength': (sp: any) => void;
|
||||||
|
'syscall/js.valuePrepareString': (sp: any) => void;
|
||||||
|
'syscall/js.valueLoadString': (sp: any) => void;
|
||||||
|
'syscall/js.valueInstanceOf': (sp: any) => void;
|
||||||
|
'syscall/js.copyBytesToGo': (sp: any) => void;
|
||||||
|
'syscall/js.copyBytesToJS': (sp: any) => void;
|
||||||
|
debug: (value: any) => void;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
constructor();
|
||||||
|
run(instance: any): Promise<void>;
|
||||||
|
private _resume;
|
||||||
|
private _makeFuncWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Go as default };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/node/wasm_exec.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{a}from"../chunk-W5DTLHV4.js";export{a as default};
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var p=(t,e,d,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!N.call(t,o)&&o!==d&&r(t,o,{get:()=>e[o],enumerable:!(n=a(e,o))||n.enumerable});return t};var s=t=>p(r({},"__esModule",{value:!0}),t);var m={};module.exports=s(m);
|
||||||
74
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.d.ts
generated
vendored
Normal file
74
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
type ParentNode = RootNode | ElementNode | ComponentNode | CustomElementNode | FragmentNode | ExpressionNode;
|
||||||
|
type LiteralNode = TextNode | DoctypeNode | CommentNode | FrontmatterNode;
|
||||||
|
type Node = RootNode | ElementNode | ComponentNode | CustomElementNode | FragmentNode | ExpressionNode | TextNode | FrontmatterNode | DoctypeNode | CommentNode;
|
||||||
|
interface Position {
|
||||||
|
start: Point;
|
||||||
|
end?: Point;
|
||||||
|
}
|
||||||
|
interface Point {
|
||||||
|
/** 1-based line number */
|
||||||
|
line: number;
|
||||||
|
/** 1-based column number, per-line */
|
||||||
|
column: number;
|
||||||
|
/** 0-based byte offset */
|
||||||
|
offset: number;
|
||||||
|
}
|
||||||
|
interface BaseNode {
|
||||||
|
type: string;
|
||||||
|
position?: Position;
|
||||||
|
}
|
||||||
|
interface ParentLikeNode extends BaseNode {
|
||||||
|
type: 'element' | 'component' | 'custom-element' | 'fragment' | 'expression' | 'root';
|
||||||
|
children: Node[];
|
||||||
|
}
|
||||||
|
interface ValueNode extends BaseNode {
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
interface RootNode extends ParentLikeNode {
|
||||||
|
type: 'root';
|
||||||
|
}
|
||||||
|
interface AttributeNode extends BaseNode {
|
||||||
|
type: 'attribute';
|
||||||
|
kind: 'quoted' | 'empty' | 'expression' | 'spread' | 'shorthand' | 'template-literal';
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
raw?: string;
|
||||||
|
}
|
||||||
|
interface TextNode extends ValueNode {
|
||||||
|
type: 'text';
|
||||||
|
}
|
||||||
|
interface ElementNode extends ParentLikeNode {
|
||||||
|
type: 'element';
|
||||||
|
name: string;
|
||||||
|
attributes: AttributeNode[];
|
||||||
|
}
|
||||||
|
interface FragmentNode extends ParentLikeNode {
|
||||||
|
type: 'fragment';
|
||||||
|
name: string;
|
||||||
|
attributes: AttributeNode[];
|
||||||
|
}
|
||||||
|
interface ComponentNode extends ParentLikeNode {
|
||||||
|
type: 'component';
|
||||||
|
name: string;
|
||||||
|
attributes: AttributeNode[];
|
||||||
|
}
|
||||||
|
interface CustomElementNode extends ParentLikeNode {
|
||||||
|
type: 'custom-element';
|
||||||
|
name: string;
|
||||||
|
attributes: AttributeNode[];
|
||||||
|
}
|
||||||
|
type TagLikeNode = ElementNode | FragmentNode | ComponentNode | CustomElementNode;
|
||||||
|
interface DoctypeNode extends ValueNode {
|
||||||
|
type: 'doctype';
|
||||||
|
}
|
||||||
|
interface CommentNode extends ValueNode {
|
||||||
|
type: 'comment';
|
||||||
|
}
|
||||||
|
interface FrontmatterNode extends ValueNode {
|
||||||
|
type: 'frontmatter';
|
||||||
|
}
|
||||||
|
interface ExpressionNode extends ParentLikeNode {
|
||||||
|
type: 'expression';
|
||||||
|
}
|
||||||
|
|
||||||
|
export { AttributeNode, BaseNode, CommentNode, ComponentNode, CustomElementNode, DoctypeNode, ElementNode, ExpressionNode, FragmentNode, FrontmatterNode, LiteralNode, Node, ParentLikeNode, ParentNode, Point, Position, RootNode, TagLikeNode, TextNode, ValueNode };
|
||||||
0
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.js
generated
vendored
Normal file
0
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/ast.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";var I=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var U=(E,N)=>{for(var _ in N)I(E,_,{get:N[_],enumerable:!0})},H=(E,N,_,A)=>{if(N&&typeof N=="object"||typeof N=="function")for(let T of G(N))!S.call(E,T)&&T!==_&&I(E,T,{get:()=>N[T],enumerable:!(A=M(N,T))||A.enumerable});return E};var W=E=>H(I({},"__esModule",{value:!0}),E);var P={};U(P,{DiagnosticCode:()=>O});module.exports=W(P);var O=(R=>(R[R.ERROR=1e3]="ERROR",R[R.ERROR_UNTERMINATED_JS_COMMENT=1001]="ERROR_UNTERMINATED_JS_COMMENT",R[R.ERROR_FRAGMENT_SHORTHAND_ATTRS=1002]="ERROR_FRAGMENT_SHORTHAND_ATTRS",R[R.ERROR_UNMATCHED_IMPORT=1003]="ERROR_UNMATCHED_IMPORT",R[R.ERROR_UNSUPPORTED_SLOT_ATTRIBUTE=1004]="ERROR_UNSUPPORTED_SLOT_ATTRIBUTE",R[R.WARNING=2e3]="WARNING",R[R.WARNING_UNTERMINATED_HTML_COMMENT=2001]="WARNING_UNTERMINATED_HTML_COMMENT",R[R.WARNING_UNCLOSED_HTML_TAG=2002]="WARNING_UNCLOSED_HTML_TAG",R[R.WARNING_DEPRECATED_DIRECTIVE=2003]="WARNING_DEPRECATED_DIRECTIVE",R[R.WARNING_IGNORED_DIRECTIVE=2004]="WARNING_IGNORED_DIRECTIVE",R[R.WARNING_UNSUPPORTED_EXPRESSION=2005]="WARNING_UNSUPPORTED_EXPRESSION",R[R.WARNING_SET_WITH_CHILDREN=2006]="WARNING_SET_WITH_CHILDREN",R[R.INFO=3e3]="INFO",R[R.HINT=4e3]="HINT",R))(O||{});0&&(module.exports={DiagnosticCode});
|
||||||
18
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts
generated
vendored
Normal file
18
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
declare enum DiagnosticCode {
|
||||||
|
ERROR = 1000,
|
||||||
|
ERROR_UNTERMINATED_JS_COMMENT = 1001,
|
||||||
|
ERROR_FRAGMENT_SHORTHAND_ATTRS = 1002,
|
||||||
|
ERROR_UNMATCHED_IMPORT = 1003,
|
||||||
|
ERROR_UNSUPPORTED_SLOT_ATTRIBUTE = 1004,
|
||||||
|
WARNING = 2000,
|
||||||
|
WARNING_UNTERMINATED_HTML_COMMENT = 2001,
|
||||||
|
WARNING_UNCLOSED_HTML_TAG = 2002,
|
||||||
|
WARNING_DEPRECATED_DIRECTIVE = 2003,
|
||||||
|
WARNING_IGNORED_DIRECTIVE = 2004,
|
||||||
|
WARNING_UNSUPPORTED_EXPRESSION = 2005,
|
||||||
|
WARNING_SET_WITH_CHILDREN = 2006,
|
||||||
|
INFO = 3000,
|
||||||
|
HINT = 4000
|
||||||
|
}
|
||||||
|
|
||||||
|
export { DiagnosticCode };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/diagnostics.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
var N=(R=>(R[R.ERROR=1e3]="ERROR",R[R.ERROR_UNTERMINATED_JS_COMMENT=1001]="ERROR_UNTERMINATED_JS_COMMENT",R[R.ERROR_FRAGMENT_SHORTHAND_ATTRS=1002]="ERROR_FRAGMENT_SHORTHAND_ATTRS",R[R.ERROR_UNMATCHED_IMPORT=1003]="ERROR_UNMATCHED_IMPORT",R[R.ERROR_UNSUPPORTED_SLOT_ATTRIBUTE=1004]="ERROR_UNSUPPORTED_SLOT_ATTRIBUTE",R[R.WARNING=2e3]="WARNING",R[R.WARNING_UNTERMINATED_HTML_COMMENT=2001]="WARNING_UNTERMINATED_HTML_COMMENT",R[R.WARNING_UNCLOSED_HTML_TAG=2002]="WARNING_UNCLOSED_HTML_TAG",R[R.WARNING_DEPRECATED_DIRECTIVE=2003]="WARNING_DEPRECATED_DIRECTIVE",R[R.WARNING_IGNORED_DIRECTIVE=2004]="WARNING_IGNORED_DIRECTIVE",R[R.WARNING_UNSUPPORTED_EXPRESSION=2005]="WARNING_UNSUPPORTED_EXPRESSION",R[R.WARNING_SET_WITH_CHILDREN=2006]="WARNING_SET_WITH_CHILDREN",R[R.INFO=3e3]="INFO",R[R.HINT=4e3]="HINT",R))(N||{});export{N as DiagnosticCode};
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.cjs
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(r,t)=>{for(var n in t)o(r,n,{get:t[n],enumerable:!0})},g=(r,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!c.call(r,e)&&e!==n&&o(r,e,{get:()=>t[e],enumerable:!(s=a(t,e))||s.enumerable});return r};var d=r=>g(o({},"__esModule",{value:!0}),r);var m={};l(m,{DiagnosticSeverity:()=>i});module.exports=d(m);var i=(e=>(e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint",e))(i||{});0&&(module.exports={DiagnosticSeverity});
|
||||||
160
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.d.ts
generated
vendored
Normal file
160
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
import { RootNode } from './ast.js';
|
||||||
|
export { AttributeNode, BaseNode, CommentNode, ComponentNode, CustomElementNode, DoctypeNode, ElementNode, ExpressionNode, FragmentNode, FrontmatterNode, LiteralNode, Node, ParentLikeNode, ParentNode, Point, Position, TagLikeNode, TextNode, ValueNode } from './ast.js';
|
||||||
|
import { DiagnosticCode } from './diagnostics.js';
|
||||||
|
|
||||||
|
interface PreprocessorResult {
|
||||||
|
code: string;
|
||||||
|
map?: string;
|
||||||
|
}
|
||||||
|
interface PreprocessorError {
|
||||||
|
error: string;
|
||||||
|
}
|
||||||
|
interface ParseOptions {
|
||||||
|
position?: boolean;
|
||||||
|
}
|
||||||
|
declare enum DiagnosticSeverity {
|
||||||
|
Error = 1,
|
||||||
|
Warning = 2,
|
||||||
|
Information = 3,
|
||||||
|
Hint = 4
|
||||||
|
}
|
||||||
|
interface DiagnosticMessage {
|
||||||
|
severity: DiagnosticSeverity;
|
||||||
|
code: DiagnosticCode;
|
||||||
|
location: DiagnosticLocation;
|
||||||
|
hint?: string;
|
||||||
|
text: string;
|
||||||
|
}
|
||||||
|
interface DiagnosticLocation {
|
||||||
|
file: string;
|
||||||
|
line: number;
|
||||||
|
column: number;
|
||||||
|
length: number;
|
||||||
|
}
|
||||||
|
interface TransformOptions {
|
||||||
|
internalURL?: string;
|
||||||
|
filename?: string;
|
||||||
|
normalizedFilename?: string;
|
||||||
|
sourcemap?: boolean | 'inline' | 'external' | 'both';
|
||||||
|
astroGlobalArgs?: string;
|
||||||
|
compact?: boolean;
|
||||||
|
resultScopedSlot?: boolean;
|
||||||
|
scopedStyleStrategy?: 'where' | 'class' | 'attribute';
|
||||||
|
/**
|
||||||
|
* @deprecated "as" has been removed and no longer has any effect!
|
||||||
|
*/
|
||||||
|
as?: 'document' | 'fragment';
|
||||||
|
transitionsAnimationURL?: string;
|
||||||
|
resolvePath?: (specifier: string) => Promise<string> | string;
|
||||||
|
preprocessStyle?: (content: string, attrs: Record<string, string>) => null | Promise<PreprocessorResult | PreprocessorError>;
|
||||||
|
annotateSourceFile?: boolean;
|
||||||
|
/**
|
||||||
|
* Render script tags to be processed (e.g. script tags that have no attributes or only a `src` attribute)
|
||||||
|
* using a `renderScript` function from `internalURL`, instead of stripping the script entirely.
|
||||||
|
* @experimental
|
||||||
|
*/
|
||||||
|
renderScript?: boolean;
|
||||||
|
experimentalScriptOrder?: boolean;
|
||||||
|
}
|
||||||
|
type ConvertToTSXOptions = Pick<TransformOptions, 'filename' | 'normalizedFilename' | 'sourcemap'> & {
|
||||||
|
/** If set to true, script tags content will be included in the generated TSX
|
||||||
|
* Scripts will be wrapped in an arrow function to be compatible with JSX's spec
|
||||||
|
*/
|
||||||
|
includeScripts?: boolean;
|
||||||
|
/** If set to true, style tags content will be included in the generated TSX
|
||||||
|
* Styles will be wrapped in a template literal to be compatible with JSX's spec
|
||||||
|
*/
|
||||||
|
includeStyles?: boolean;
|
||||||
|
};
|
||||||
|
type HoistedScript = {
|
||||||
|
type: string;
|
||||||
|
} & ({
|
||||||
|
type: 'external';
|
||||||
|
src: string;
|
||||||
|
} | {
|
||||||
|
type: 'inline';
|
||||||
|
code: string;
|
||||||
|
map: string;
|
||||||
|
});
|
||||||
|
interface HydratedComponent {
|
||||||
|
exportName: string;
|
||||||
|
localName: string;
|
||||||
|
specifier: string;
|
||||||
|
resolvedPath: string;
|
||||||
|
}
|
||||||
|
interface TransformResult {
|
||||||
|
code: string;
|
||||||
|
map: string;
|
||||||
|
scope: string;
|
||||||
|
styleError: string[];
|
||||||
|
diagnostics: DiagnosticMessage[];
|
||||||
|
css: string[];
|
||||||
|
scripts: HoistedScript[];
|
||||||
|
hydratedComponents: HydratedComponent[];
|
||||||
|
clientOnlyComponents: HydratedComponent[];
|
||||||
|
serverComponents: HydratedComponent[];
|
||||||
|
containsHead: boolean;
|
||||||
|
propagation: boolean;
|
||||||
|
}
|
||||||
|
interface SourceMap {
|
||||||
|
file: string;
|
||||||
|
mappings: string;
|
||||||
|
names: string[];
|
||||||
|
sources: string[];
|
||||||
|
sourcesContent: string[];
|
||||||
|
version: number;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Represents a location in a TSX file.
|
||||||
|
* Both the `start` and `end` properties are 0-based, and are based off utf-16 code units. (i.e. JavaScript's `String.prototype.length`)
|
||||||
|
*/
|
||||||
|
interface TSXLocation {
|
||||||
|
start: number;
|
||||||
|
end: number;
|
||||||
|
}
|
||||||
|
interface TSXExtractedTag {
|
||||||
|
position: TSXLocation;
|
||||||
|
content: string;
|
||||||
|
}
|
||||||
|
interface TSXExtractedScript extends TSXExtractedTag {
|
||||||
|
type: 'processed-module' | 'module' | 'inline' | 'event-attribute' | 'json' | 'raw' | 'unknown';
|
||||||
|
}
|
||||||
|
interface TSXExtractedStyle extends TSXExtractedTag {
|
||||||
|
type: 'tag' | 'style-attribute';
|
||||||
|
lang: 'css' | 'scss' | 'sass' | 'less' | 'stylus' | 'styl' | 'postcss' | 'pcss' | 'unknown' | (string & {});
|
||||||
|
}
|
||||||
|
interface TSXResult {
|
||||||
|
code: string;
|
||||||
|
map: SourceMap;
|
||||||
|
diagnostics: DiagnosticMessage[];
|
||||||
|
metaRanges: {
|
||||||
|
frontmatter: TSXLocation;
|
||||||
|
body: TSXLocation;
|
||||||
|
scripts?: TSXExtractedScript[];
|
||||||
|
styles?: TSXExtractedStyle[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
interface ParseResult {
|
||||||
|
ast: RootNode;
|
||||||
|
diagnostics: DiagnosticMessage[];
|
||||||
|
}
|
||||||
|
declare function transform(input: string, options?: TransformOptions): Promise<TransformResult>;
|
||||||
|
declare function parse(input: string, options?: ParseOptions): Promise<ParseResult>;
|
||||||
|
declare function convertToTSX(input: string, options?: ConvertToTSXOptions): Promise<TSXResult>;
|
||||||
|
declare function initialize(options: InitializeOptions): Promise<void>;
|
||||||
|
/**
|
||||||
|
* When calling the core compiler APIs, e.g. `transform`, `parse`, etc, they
|
||||||
|
* would automatically instantiate a WASM instance to process the input. When
|
||||||
|
* done, you can call this to manually teardown the WASM instance.
|
||||||
|
*
|
||||||
|
* If the APIs are called again, they will automatically instantiate a new WASM
|
||||||
|
* instance. In browsers, you have to call `initialize()` again before using the APIs.
|
||||||
|
*
|
||||||
|
* Note: Calling teardown is optional and exists mostly as an optimization only.
|
||||||
|
*/
|
||||||
|
declare function teardown(): void;
|
||||||
|
interface InitializeOptions {
|
||||||
|
wasmURL?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { ConvertToTSXOptions, DiagnosticLocation, DiagnosticMessage, DiagnosticSeverity, HoistedScript, HydratedComponent, InitializeOptions, ParseOptions, ParseResult, PreprocessorError, PreprocessorResult, RootNode, SourceMap, TSXExtractedScript, TSXExtractedStyle, TSXExtractedTag, TSXLocation, TSXResult, TransformOptions, TransformResult, convertToTSX, initialize, parse, teardown, transform };
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.js
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/dist/shared/types.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
var t=(e=>(e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Information=3]="Information",e[e.Hint=4]="Hint",e))(t||{});export{t as DiagnosticSeverity};
|
||||||
58
products/marketing/site/node_modules/@astrojs/compiler/package.json
generated
vendored
Normal file
58
products/marketing/site/node_modules/@astrojs/compiler/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"name": "@astrojs/compiler",
|
||||||
|
"author": "withastro",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
|
"bugs": "https://github.com/withastro/compiler/issues",
|
||||||
|
"homepage": "https://astro.build",
|
||||||
|
"version": "2.13.1",
|
||||||
|
"main": "./dist/node/index.js",
|
||||||
|
"types": "./dist/shared/types.d.ts",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/withastro/compiler.git"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"types.d.ts",
|
||||||
|
"utils.d.ts",
|
||||||
|
"sync.d.ts"
|
||||||
|
],
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/node/index.d.ts",
|
||||||
|
"browser": "./dist/browser/index.js",
|
||||||
|
"import": "./dist/node/index.js",
|
||||||
|
"require": "./dist/node/index.cjs",
|
||||||
|
"default": "./dist/browser/index.js"
|
||||||
|
},
|
||||||
|
"./sync": {
|
||||||
|
"types": "./dist/node/sync.d.ts",
|
||||||
|
"import": "./dist/node/sync.js",
|
||||||
|
"require": "./dist/node/sync.cjs",
|
||||||
|
"default": "./dist/node/sync.js"
|
||||||
|
},
|
||||||
|
"./utils": {
|
||||||
|
"types": "./dist/node/utils.d.ts",
|
||||||
|
"browser": "./dist/browser/utils.js",
|
||||||
|
"import": "./dist/node/utils.js",
|
||||||
|
"require": "./dist/node/utils.cjs",
|
||||||
|
"default": "./dist/browser/utils.js"
|
||||||
|
},
|
||||||
|
"./astro.wasm": "./dist/astro.wasm",
|
||||||
|
"./types": "./dist/shared/types.d.ts",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.16",
|
||||||
|
"@types/node": "^18.15.11",
|
||||||
|
"@types/sass": "^1.43.1",
|
||||||
|
"acorn": "^8.8.1",
|
||||||
|
"esbuild": "^0.17.17",
|
||||||
|
"tsup": "^6.7.0",
|
||||||
|
"typescript": "~5.0.2"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsup"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/sync.d.ts
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/sync.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './dist/node/sync.js';
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/types.d.ts
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export type * from './dist/shared/types.js';
|
||||||
1
products/marketing/site/node_modules/@astrojs/compiler/utils.d.ts
generated
vendored
Normal file
1
products/marketing/site/node_modules/@astrojs/compiler/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './dist/node/utils.js';
|
||||||
59
products/marketing/site/node_modules/@astrojs/internal-helpers/LICENSE
generated
vendored
Normal file
59
products/marketing/site/node_modules/@astrojs/internal-helpers/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Fred K. Schott
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
"""
|
||||||
|
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
|
||||||
|
|
||||||
|
Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
"""
|
||||||
15
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/fs.d.ts
generated
vendored
Normal file
15
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/fs.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { PathLike } from 'node:fs';
|
||||||
|
export declare function writeJson<T>(path: PathLike, data: T): Promise<void>;
|
||||||
|
export declare function removeDir(dir: PathLike): Promise<void>;
|
||||||
|
export declare function emptyDir(dir: PathLike): Promise<void>;
|
||||||
|
export declare function getFilesFromFolder(dir: URL): Promise<URL[]>;
|
||||||
|
/**
|
||||||
|
* Copies files into a folder keeping the folder structure intact.
|
||||||
|
* The resulting file tree will start at the common ancestor.
|
||||||
|
*
|
||||||
|
* @param {URL[]} files A list of files to copy (absolute path).
|
||||||
|
* @param {URL} outDir Destination folder where to copy the files to (absolute path).
|
||||||
|
* @param {URL[]} [exclude] A list of files to exclude (absolute path).
|
||||||
|
* @returns {Promise<string>} The common ancestor of the copied files.
|
||||||
|
*/
|
||||||
|
export declare function copyFilesToFolder(files: URL[], outDir: URL, exclude?: URL[]): Promise<string>;
|
||||||
66
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/fs.js
generated
vendored
Normal file
66
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/fs.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
import { existsSync } from "node:fs";
|
||||||
|
import * as fs from "node:fs/promises";
|
||||||
|
import nodePath from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
async function writeJson(path, data) {
|
||||||
|
await fs.writeFile(path, JSON.stringify(data, null, " "), { encoding: "utf-8" });
|
||||||
|
}
|
||||||
|
async function removeDir(dir) {
|
||||||
|
await fs.rm(dir, { recursive: true, force: true, maxRetries: 3 });
|
||||||
|
}
|
||||||
|
async function emptyDir(dir) {
|
||||||
|
await removeDir(dir);
|
||||||
|
await fs.mkdir(dir, { recursive: true });
|
||||||
|
}
|
||||||
|
async function getFilesFromFolder(dir) {
|
||||||
|
const data = await fs.readdir(dir, { withFileTypes: true });
|
||||||
|
let files = [];
|
||||||
|
for (const item of data) {
|
||||||
|
if (item.isDirectory()) {
|
||||||
|
const moreFiles = await getFilesFromFolder(new URL(`./${item.name}/`, dir));
|
||||||
|
files = files.concat(moreFiles);
|
||||||
|
} else {
|
||||||
|
files.push(new URL(`./${item.name}`, dir));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
async function copyFilesToFolder(files, outDir, exclude = []) {
|
||||||
|
const excludeList = exclude.map(fileURLToPath);
|
||||||
|
const fileList = files.map(fileURLToPath).filter((f) => !excludeList.includes(f));
|
||||||
|
if (files.length === 0) throw new Error("No files found to copy");
|
||||||
|
let commonAncestor = nodePath.dirname(fileList[0]);
|
||||||
|
for (const file of fileList.slice(1)) {
|
||||||
|
while (!file.startsWith(commonAncestor)) {
|
||||||
|
commonAncestor = nodePath.dirname(commonAncestor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const origin of fileList) {
|
||||||
|
const dest = new URL(nodePath.relative(commonAncestor, origin), outDir);
|
||||||
|
const realpath = await fs.realpath(origin);
|
||||||
|
const isSymlink = realpath !== origin;
|
||||||
|
const isDir = (await fs.stat(origin)).isDirectory();
|
||||||
|
if (isDir && !isSymlink) {
|
||||||
|
await fs.mkdir(new URL("..", dest), { recursive: true });
|
||||||
|
} else {
|
||||||
|
await fs.mkdir(new URL(".", dest), { recursive: true });
|
||||||
|
}
|
||||||
|
if (isSymlink) {
|
||||||
|
const realdest = fileURLToPath(new URL(nodePath.relative(commonAncestor, realpath), outDir));
|
||||||
|
const target = nodePath.relative(fileURLToPath(new URL(".", dest)), realdest);
|
||||||
|
if (!existsSync(dest)) {
|
||||||
|
await fs.symlink(target, dest, isDir ? "dir" : "file");
|
||||||
|
}
|
||||||
|
} else if (!isDir) {
|
||||||
|
await fs.copyFile(origin, dest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return commonAncestor;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
copyFilesToFolder,
|
||||||
|
emptyDir,
|
||||||
|
getFilesFromFolder,
|
||||||
|
removeDir,
|
||||||
|
writeJson
|
||||||
|
};
|
||||||
23
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/path.d.ts
generated
vendored
Normal file
23
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/path.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* A set of common path utilities commonly used through the Astro core and integration
|
||||||
|
* projects. These do things like ensure a forward slash prepends paths.
|
||||||
|
*/
|
||||||
|
export declare function appendExtension(path: string, extension: string): string;
|
||||||
|
export declare function appendForwardSlash(path: string): string;
|
||||||
|
export declare function prependForwardSlash(path: string): string;
|
||||||
|
export declare function collapseDuplicateSlashes(path: string): string;
|
||||||
|
export declare function removeTrailingForwardSlash(path: string): string;
|
||||||
|
export declare function removeLeadingForwardSlash(path: string): string;
|
||||||
|
export declare function removeLeadingForwardSlashWindows(path: string): string;
|
||||||
|
export declare function trimSlashes(path: string): string;
|
||||||
|
export declare function startsWithForwardSlash(path: string): boolean;
|
||||||
|
export declare function startsWithDotDotSlash(path: string): boolean;
|
||||||
|
export declare function startsWithDotSlash(path: string): boolean;
|
||||||
|
export declare function isRelativePath(path: string): boolean;
|
||||||
|
export declare function joinPaths(...paths: (string | undefined)[]): string;
|
||||||
|
export declare function removeFileExtension(path: string): string;
|
||||||
|
export declare function removeQueryString(path: string): string;
|
||||||
|
export declare function isRemotePath(src: string): boolean;
|
||||||
|
export declare function slash(path: string): string;
|
||||||
|
export declare function fileExtension(path: string): string;
|
||||||
|
export declare function removeBase(path: string, base: string): string;
|
||||||
100
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
Normal file
100
products/marketing/site/node_modules/@astrojs/internal-helpers/dist/path.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
function appendExtension(path, extension) {
|
||||||
|
return path + "." + extension;
|
||||||
|
}
|
||||||
|
function appendForwardSlash(path) {
|
||||||
|
return path.endsWith("/") ? path : path + "/";
|
||||||
|
}
|
||||||
|
function prependForwardSlash(path) {
|
||||||
|
return path[0] === "/" ? path : "/" + path;
|
||||||
|
}
|
||||||
|
function collapseDuplicateSlashes(path) {
|
||||||
|
return path.replace(/(?<!:)\/{2,}/g, "/");
|
||||||
|
}
|
||||||
|
function removeTrailingForwardSlash(path) {
|
||||||
|
return path.endsWith("/") ? path.slice(0, path.length - 1) : path;
|
||||||
|
}
|
||||||
|
function removeLeadingForwardSlash(path) {
|
||||||
|
return path.startsWith("/") ? path.substring(1) : path;
|
||||||
|
}
|
||||||
|
function removeLeadingForwardSlashWindows(path) {
|
||||||
|
return path.startsWith("/") && path[2] === ":" ? path.substring(1) : path;
|
||||||
|
}
|
||||||
|
function trimSlashes(path) {
|
||||||
|
return path.replace(/^\/|\/$/g, "");
|
||||||
|
}
|
||||||
|
function startsWithForwardSlash(path) {
|
||||||
|
return path[0] === "/";
|
||||||
|
}
|
||||||
|
function startsWithDotDotSlash(path) {
|
||||||
|
const c1 = path[0];
|
||||||
|
const c2 = path[1];
|
||||||
|
const c3 = path[2];
|
||||||
|
return c1 === "." && c2 === "." && c3 === "/";
|
||||||
|
}
|
||||||
|
function startsWithDotSlash(path) {
|
||||||
|
const c1 = path[0];
|
||||||
|
const c2 = path[1];
|
||||||
|
return c1 === "." && c2 === "/";
|
||||||
|
}
|
||||||
|
function isRelativePath(path) {
|
||||||
|
return startsWithDotDotSlash(path) || startsWithDotSlash(path);
|
||||||
|
}
|
||||||
|
function isString(path) {
|
||||||
|
return typeof path === "string" || path instanceof String;
|
||||||
|
}
|
||||||
|
function joinPaths(...paths) {
|
||||||
|
return paths.filter(isString).map((path, i) => {
|
||||||
|
if (i === 0) {
|
||||||
|
return removeTrailingForwardSlash(path);
|
||||||
|
} else if (i === paths.length - 1) {
|
||||||
|
return removeLeadingForwardSlash(path);
|
||||||
|
} else {
|
||||||
|
return trimSlashes(path);
|
||||||
|
}
|
||||||
|
}).join("/");
|
||||||
|
}
|
||||||
|
function removeFileExtension(path) {
|
||||||
|
let idx = path.lastIndexOf(".");
|
||||||
|
return idx === -1 ? path : path.slice(0, idx);
|
||||||
|
}
|
||||||
|
function removeQueryString(path) {
|
||||||
|
const index = path.lastIndexOf("?");
|
||||||
|
return index > 0 ? path.substring(0, index) : path;
|
||||||
|
}
|
||||||
|
function isRemotePath(src) {
|
||||||
|
return /^(?:http|ftp|https|ws):?\/\//.test(src) || src.startsWith("data:");
|
||||||
|
}
|
||||||
|
function slash(path) {
|
||||||
|
return path.replace(/\\/g, "/");
|
||||||
|
}
|
||||||
|
function fileExtension(path) {
|
||||||
|
const ext = path.split(".").pop();
|
||||||
|
return ext !== path ? `.${ext}` : "";
|
||||||
|
}
|
||||||
|
function removeBase(path, base) {
|
||||||
|
if (path.startsWith(base)) {
|
||||||
|
return path.slice(removeTrailingForwardSlash(base).length);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
appendExtension,
|
||||||
|
appendForwardSlash,
|
||||||
|
collapseDuplicateSlashes,
|
||||||
|
fileExtension,
|
||||||
|
isRelativePath,
|
||||||
|
isRemotePath,
|
||||||
|
joinPaths,
|
||||||
|
prependForwardSlash,
|
||||||
|
removeBase,
|
||||||
|
removeFileExtension,
|
||||||
|
removeLeadingForwardSlash,
|
||||||
|
removeLeadingForwardSlashWindows,
|
||||||
|
removeQueryString,
|
||||||
|
removeTrailingForwardSlash,
|
||||||
|
slash,
|
||||||
|
startsWithDotDotSlash,
|
||||||
|
startsWithDotSlash,
|
||||||
|
startsWithForwardSlash,
|
||||||
|
trimSlashes
|
||||||
|
};
|
||||||
48
products/marketing/site/node_modules/@astrojs/internal-helpers/package.json
generated
vendored
Normal file
48
products/marketing/site/node_modules/@astrojs/internal-helpers/package.json
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"name": "@astrojs/internal-helpers",
|
||||||
|
"description": "Internal helpers used by core Astro packages.",
|
||||||
|
"version": "0.4.1",
|
||||||
|
"type": "module",
|
||||||
|
"author": "withastro",
|
||||||
|
"license": "MIT",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/withastro/astro.git",
|
||||||
|
"directory": "packages/internal-helpers"
|
||||||
|
},
|
||||||
|
"bugs": "https://github.com/withastro/astro/issues",
|
||||||
|
"exports": {
|
||||||
|
"./path": "./dist/path.js",
|
||||||
|
"./fs": "./dist/fs.js"
|
||||||
|
},
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"path": [
|
||||||
|
"./dist/path.d.ts"
|
||||||
|
],
|
||||||
|
"fs": [
|
||||||
|
"./dist/fs.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"astro-scripts": "0.0.14"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"astro",
|
||||||
|
"astro-component"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"provenance": true
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"prepublish": "pnpm build",
|
||||||
|
"build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json",
|
||||||
|
"build:ci": "astro-scripts build \"src/**/*.ts\"",
|
||||||
|
"postbuild": "astro-scripts copy \"src/**/*.js\"",
|
||||||
|
"dev": "astro-scripts dev \"src/**/*.ts\""
|
||||||
|
}
|
||||||
|
}
|
||||||
3
products/marketing/site/node_modules/@astrojs/internal-helpers/readme.md
generated
vendored
Normal file
3
products/marketing/site/node_modules/@astrojs/internal-helpers/readme.md
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# @astrojs/internal-helpers
|
||||||
|
|
||||||
|
These are internal helpers used by core Astro packages. This package does not follow semver and should not be used externally.
|
||||||
59
products/marketing/site/node_modules/@astrojs/markdown-remark/LICENSE
generated
vendored
Normal file
59
products/marketing/site/node_modules/@astrojs/markdown-remark/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Fred K. Schott
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
"""
|
||||||
|
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/sveltejs/kit repository:
|
||||||
|
|
||||||
|
Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
This license applies to parts of the `packages/create-astro` and `packages/astro` subdirectories originating from the https://github.com/vitejs/vite repository:
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
"""
|
||||||
6
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/frontmatter-injection.d.ts
generated
vendored
Normal file
6
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/frontmatter-injection.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import type { VFileData as Data, VFile } from 'vfile';
|
||||||
|
import type { MarkdownAstroData } from './types.js';
|
||||||
|
export declare class InvalidAstroDataError extends TypeError {
|
||||||
|
}
|
||||||
|
export declare function safelyGetAstroData(vfileData: Data): MarkdownAstroData | InvalidAstroDataError;
|
||||||
|
export declare function setVfileFrontmatter(vfile: VFile, frontmatter: Record<string, any>): void;
|
||||||
31
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/frontmatter-injection.js
generated
vendored
Normal file
31
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/frontmatter-injection.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
function isValidAstroData(obj) {
|
||||||
|
if (typeof obj === "object" && obj !== null && obj.hasOwnProperty("frontmatter")) {
|
||||||
|
const { frontmatter } = obj;
|
||||||
|
try {
|
||||||
|
JSON.stringify(frontmatter);
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return typeof frontmatter === "object" && frontmatter !== null;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
class InvalidAstroDataError extends TypeError {
|
||||||
|
}
|
||||||
|
function safelyGetAstroData(vfileData) {
|
||||||
|
const { astro } = vfileData;
|
||||||
|
if (!astro || !isValidAstroData(astro)) {
|
||||||
|
return new InvalidAstroDataError();
|
||||||
|
}
|
||||||
|
return astro;
|
||||||
|
}
|
||||||
|
function setVfileFrontmatter(vfile, frontmatter) {
|
||||||
|
vfile.data ??= {};
|
||||||
|
vfile.data.astro ??= {};
|
||||||
|
vfile.data.astro.frontmatter = frontmatter;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
InvalidAstroDataError,
|
||||||
|
safelyGetAstroData,
|
||||||
|
setVfileFrontmatter
|
||||||
|
};
|
||||||
15
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/highlight.d.ts
generated
vendored
Normal file
15
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/highlight.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import type { Root } from 'hast';
|
||||||
|
type Highlighter = (code: string, language: string, options?: {
|
||||||
|
meta?: string;
|
||||||
|
}) => Promise<string>;
|
||||||
|
/**
|
||||||
|
* A hast utility to syntax highlight code blocks with a given syntax highlighter.
|
||||||
|
*
|
||||||
|
* @param tree
|
||||||
|
* The hast tree in which to syntax highlight code blocks.
|
||||||
|
* @param highlighter
|
||||||
|
* A function which receives the code and language, and returns the HTML of a syntax
|
||||||
|
* highlighted `<pre>` element.
|
||||||
|
*/
|
||||||
|
export declare function highlightCodeBlocks(tree: Root, highlighter: Highlighter): Promise<void>;
|
||||||
|
export {};
|
||||||
53
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/highlight.js
generated
vendored
Normal file
53
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/highlight.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import { fromHtml } from "hast-util-from-html";
|
||||||
|
import { toText } from "hast-util-to-text";
|
||||||
|
import { removePosition } from "unist-util-remove-position";
|
||||||
|
import { visitParents } from "unist-util-visit-parents";
|
||||||
|
const languagePattern = /\blanguage-(\S+)\b/;
|
||||||
|
async function highlightCodeBlocks(tree, highlighter) {
|
||||||
|
const nodes = [];
|
||||||
|
visitParents(tree, { type: "element", tagName: "code" }, (node, ancestors) => {
|
||||||
|
const parent = ancestors.at(-1);
|
||||||
|
if (parent?.type !== "element" || parent.tagName !== "pre") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parent.children.length !== 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let languageMatch;
|
||||||
|
let { className } = node.properties;
|
||||||
|
if (typeof className === "string") {
|
||||||
|
languageMatch = languagePattern.exec(className);
|
||||||
|
} else if (Array.isArray(className)) {
|
||||||
|
for (const cls of className) {
|
||||||
|
if (typeof cls !== "string") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
languageMatch = languagePattern.exec(cls);
|
||||||
|
if (languageMatch) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (languageMatch?.[1] === "math") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
nodes.push({
|
||||||
|
node,
|
||||||
|
language: languageMatch?.[1] || "plaintext",
|
||||||
|
parent,
|
||||||
|
grandParent: ancestors.at(-2)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
for (const { node, language, grandParent, parent } of nodes) {
|
||||||
|
const meta = node.data?.meta ?? node.properties.metastring ?? void 0;
|
||||||
|
const code = toText(node, { whitespace: "pre" });
|
||||||
|
const html = await highlighter(code, language, { meta });
|
||||||
|
const replacement = fromHtml(html, { fragment: true }).children[0];
|
||||||
|
removePosition(replacement);
|
||||||
|
const index = grandParent.children.indexOf(parent);
|
||||||
|
grandParent.children[index] = replacement;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
highlightCodeBlocks
|
||||||
|
};
|
||||||
2
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.d.ts
generated
vendored
Normal file
2
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import type * as unified from 'unified';
|
||||||
|
export declare function importPlugin(p: string): Promise<unified.Plugin>;
|
||||||
7
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.js
generated
vendored
Normal file
7
products/marketing/site/node_modules/@astrojs/markdown-remark/dist/import-plugin-browser.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
async function importPlugin(p) {
|
||||||
|
const importResult = await import(p);
|
||||||
|
return importResult.default;
|
||||||
|
}
|
||||||
|
export {
|
||||||
|
importPlugin
|
||||||
|
};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user