.gitignore + untrack build outputs (node_modules, dist) — the nested repo needs its own ignore rules; the pipeline rebuilds anyway
deploy / build-and-publish (push) Successful in 45s

This commit is contained in:
2026-11-21 09:25:25 +01:00
parent 477bf5114f
commit c117a97cd3
14483 changed files with 14 additions and 2443432 deletions
+14
View File
@@ -0,0 +1,14 @@
# Build outputs + tool caches — the pipeline runs npm ci && npm run build;
# never track these in the site repo (note: this repo is nested inside the
# app repo, whose .gitignore does NOT apply here).
node_modules/
dist/
.astro/
public/uploads/
public/admin/sveltia-cms.js
public/admin/sveltia-cms.mjs
public/admin/sveltia-cms.mjs.map
public/admin/sveltia-cms.js.map
public/admin/chunks/
*.log
.DS_Store
-1
View File
@@ -1 +0,0 @@
:root{--ink: #16213a;--muted: #5b6478;--accent: #3a55d9;--accent-soft: #eef1fd;--line: #e3e7f2;--bg: #fbfcfe}*{box-sizing:border-box}html{scrollbar-gutter:stable}body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink);background:var(--bg);line-height:1.65}a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:2px}h1{font-size:2.3rem;line-height:1.15;margin:0 0 1rem;letter-spacing:-.02em}h2{font-size:1.45rem;margin:2.5rem 0 1rem;letter-spacing:-.01em}h3{font-size:1.12rem;margin:0 0 .5rem}p{margin:0 0 1rem}img{max-width:100%;height:auto;border-radius:.5rem}.site-header nav{display:flex;gap:1.25rem;align-items:center;flex-wrap:wrap;padding:.9rem 2rem;border-bottom:1px solid var(--line);background:#fff}.site-header .brand{font-weight:700;margin-inline-end:auto;color:var(--ink);text-decoration:none}.site-header nav a:not(.brand){color:var(--muted);text-decoration:none;font-size:.95rem}.site-header nav a:hover{color:var(--accent)}.switcher{display:flex;gap:.45rem;align-items:center;font-size:.85rem;color:var(--muted)}.switcher span{display:none}.switcher select{font:inherit;font-size:.85rem;padding:.3rem .4rem;border:1px solid var(--line);border-radius:.4rem;background:#fff;color:var(--ink)}main{max-width:46rem;margin:0 auto;padding:2.5rem 1.25rem 4rem}.hero{margin-inline:-1.25rem;margin-top:-2.5rem;padding:3.2rem 1.25rem 2.6rem;background:linear-gradient(180deg,var(--accent-soft),var(--bg))}.hero-sub{font-size:1.15rem;color:var(--muted);max-width:38rem}.cta-row{margin-top:1.6rem;display:flex;gap:.75rem;flex-wrap:wrap}.button{display:inline-block;background:var(--accent);color:#fff!important;border-radius:.5rem;padding:.6rem 1.1rem;text-decoration:none;font-weight:600;font-size:.95rem;border:1px solid transparent}.button:hover{filter:brightness(1.08)}.button-secondary{background:#fff;color:var(--accent)!important;border-color:var(--accent)}.cards{margin-top:2rem;display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))}.card{background:#fff;border:1px solid var(--line);border-radius:.7rem;padding:1.1rem 1.2rem;margin:0}.card p{color:var(--muted);font-size:.95rem;margin:0}.card h2,.card h3{margin:0 0 .5rem}.journey ol{padding:0;margin:0;list-style:none;counter-reset:none;display:grid;gap:.55rem}.journey li{padding:.55rem .9rem;background:#fff;border:1px solid var(--line);border-inline-start:3px solid var(--accent);border-radius:.45rem;color:var(--muted);font-size:.97rem}.journey li strong{color:var(--ink);margin-inline-end:.2rem}.note{margin-top:1.5rem;padding:.9rem 1.2rem;background:var(--accent-soft);border-radius:.5rem}.note p{margin:0}form.lead{margin-top:2.5rem;padding:1.5rem 1.6rem;background:#fff;border:1px solid var(--line);border-radius:.8rem}form.lead h2{margin-top:0}form.lead label{display:block;font-size:.9rem;margin-bottom:1rem}form.lead input[type=text],form.lead input[type=email],form.lead select,form.lead textarea{display:block;width:100%;margin-top:.3rem;font:inherit;padding:.55rem .65rem;border:1px solid var(--line);border-radius:.45rem;color:var(--ink);background:#fff}form.lead textarea{min-height:6rem;resize:vertical}form.lead label.consent{display:flex;gap:.5rem;align-items:start}form.lead .hp{position:absolute;inset-inline-start:-9999px}footer{border-top:1px solid var(--line);color:var(--muted);font-size:.85rem;padding:1.5rem 2rem 2rem;text-align:center}#cookie-consent{position:fixed;inset-inline:0;bottom:0;display:flex;gap:1rem;align-items:center;justify-content:center;flex-wrap:wrap;padding:.8rem 1.5rem;background:var(--ink);color:#fff;font-size:.85rem}#cookie-consent p{margin:0}#cookie-consent button{font:inherit;font-size:.85rem;border-radius:.4rem;border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;padding:.35rem .8rem;cursor:pointer}#cookie-consent button[data-answer=yes]{background:#fff;color:var(--ink);border-color:#fff}blockquote{margin:1.5rem 0;padding:.5rem 1.25rem;border-inline-start:3px solid var(--accent);color:var(--muted)}ul,ol{padding-inline-start:1.5rem}@media(prefers-reduced-motion:no-preference){.hero{transition:none}}
@@ -1 +0,0 @@
import{r as e}from"./_shared-module_42-B_M8U-E0.js";var ee=e[4][0],t=e[6][0],n=e[11],te=n[0],r=n[1],i=n[2],a=n[3],o=e[18],ne=o[0],re=o[1],ie=o[2],ae=o[3],s=e[27],oe=s[0],se=s[1],ce=s[2],le=s[3],ue=s[4],c=s[5],l=s[6],u=s[7],d=e[37][0],f=e[39][0],p=e[31][0],m=e[12],h=m[0],g=m[1],_=e[2],v=_[0],y=_[1],b=_[2],x=_[3],S=e[20],C=S[0],w=S[1],T=S[2],E=S[3],D=S[4],O=S[5],k=S[6],A=S[7],j=S[8],M=S[9],N=S[10],P=S[11],F=S[12],I=e[14],L=I[0],R=I[1],z=I[2],B=I[3],V=I[4],H=I[5],U=e[21][0],W=e[15],G=W[0],de=W[1],K=e[16],fe=K[0],pe=K[1],me=K[2],he=K[3],ge=e[10][0],_e=e[17][0],ve=e[19][0],ye=e[30][0],q=e[33],be=q[0],xe=q[1],J=e[38],Se=J[0],Ce=J[1],Y=e[24],we=Y[0],Te=Y[1],X=e[26],Ee=X[0],De=X[1],Oe=X[2],ke=X[3],Z=e[32],Ae=Z[0],je=Z[1],Me=Z[2],Ne=Z[3],Pe=Z[4],Fe=Z[5],Ie=Z[6],Le=Z[7],Re=Z[8],ze=Z[9],Be=Z[10],Ve=Z[11],He=Z[12],Ue=Z[13],We=Z[14],Ge=Z[15],Ke=Z[16],Q=e[47],qe=Q[0],Je=Q[1],Ye=Q[2],Xe=Q[3],$=e[48],Ze=$[0],Qe=$[1],$e=e[45][0],et=e[22][0],tt=e[34][0];export{H as $,ke as A,ne as At,ge as B,Ie as C,se as Ct,Ee as D,c as Dt,ze as E,ue as Et,be as F,r as Ft,G,pe as H,xe as I,i as It,L as J,de as K,ye as L,a as Lt,Te as M,ie as Mt,Se as N,ae as Nt,De as O,l as Ot,Ce as P,te as Pt,V as Q,ve as R,t as Rt,Fe as S,oe as St,Re as T,le as Tt,me as U,fe as V,he as W,z as X,R as Y,B as Z,Ge as _,h as _t,Qe as a,T as at,Ne as b,f as bt,Ye as c,O as ct,je as d,j as dt,C as et,Be as f,M as ft,We as g,x as gt,Ue as h,b as ht,Ze as i,F as it,we as j,re as jt,Oe as k,u as kt,Xe as l,k as lt,He as m,y as mt,et as n,N as nt,qe as o,E as ot,Ve as p,v as pt,U as q,$e as r,P as rt,Je as s,D as st,tt as t,w as tt,Ae as u,A as ut,Ke as v,g as vt,Le as w,ce as wt,Pe as x,d as xt,Me as y,p as yt,_e as z,ee as zt};
@@ -1 +0,0 @@
var e=globalThis[`__SVELTIA_CMS_MODULES_0.266.0_82a9571e9238`];if(!e)throw Error(`The chunk was built with another version of the CMS.`);var t=e[42],n=t[0],r=t[1];export{r as n,e as r,n as t};
-1
View File
@@ -1 +0,0 @@
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);export{u as a,d as i,o as n,c as r,s as t};
-84
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-105
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-9
View File
File diff suppressed because one or more lines are too long
-40
View File
File diff suppressed because one or more lines are too long
-88
View File
@@ -1,88 +0,0 @@
# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
# The CMS for the editable-site flow. THIS REPO IS THE SITE REPO: when
# pushed to the app's Gitea (the deploy-selfhosted skill's E5), its root
# is the repo root — the paths below are repo-root-relative with NO
# site/ prefix.
#
# Sign-in is a browser-only PKCE OAuth2 flow against the app's Gitea —
# no token-exchange server, no client secret. Every save commits to THIS
# repository; the Gitea Actions pipeline (.gitea/workflows/) rebuilds
# and republishes the site.
#
# BOOTSTRAP: app_id (and, if the repo owner differs, repo) are filled by
# the deploy bootstrap — the OAuth2 application only exists once the
# Gitea instance is up. See the deploy-selfhosted skill's E4.
backend:
name: gitea
repo: editor/site
base_url: https://gitea.validationlab.eu
api_root: https://gitea.validationlab.eu/api/v1
app_id: 11c9cc34-20b4-435f-ba8c-dbafd3c888b1
# Uploaded images live in the static tree (Astro copies public/ to the
# build root) so they resolve on the published site.
media_folder: /public/uploads
public_folder: /uploads
collections:
- name: pages
label: Pages
label_singular: Page
folder: /src/pages
nested:
depth: 2
summary: "{{title}}"
extension: md
format: yaml-frontmatter
create: true # pages land in src/pages/<locale>/ and appear in the nav (built from the folder)
delete: false # a page (the Home page above all) cannot be deleted from the CMS
slug: "{{slug}}"
identifier_field: title
summary: "{{title}}"
fields:
- { label: Title (also the page <title> and h1), name: title, widget: string }
- { label: Meta description (search engines), name: description, widget: string, required: false }
- { label: Layout, name: layout, widget: hidden, default: ../layouts/Site.astro }
- { label: Hero headline, name: hero_headline, widget: string, required: false }
- { label: Hero subline, name: hero_sub, widget: text, required: false }
- label: Hero CTA to the founders page
name: cta_founders
widget: string
required: false
- label: Hero CTA to the hubs page
name: cta_hubs
widget: string
required: false
- label: Cards section (optional)
name: value_props
widget: list
required: false
fields:
- { label: Heading, name: heading, widget: string }
- { label: Text, name: text, widget: text }
- { label: Cards section heading, name: value_props_title, widget: string, required: false }
- label: Journey steps (optional)
name: journey
widget: list
required: false
fields:
- { label: Step title, name: title, widget: string }
- { label: Step text (optional), name: text, widget: string, required: false }
- { label: Journey heading, name: journey_title, widget: string, required: false }
- { label: Journey note, name: journey_note, widget: text, required: false }
- label: Capability blocks (hubs page, optional)
name: capabilities
widget: list
required: false
fields:
- { label: Key (lowercase_with_underscores), name: key, widget: string }
- { label: Heading, name: heading, widget: string }
- { label: Text, name: text, widget: text }
- { label: CTA label, name: cta, widget: string }
- { label: Capabilities heading, name: capabilities_title, widget: string, required: false }
- { label: Capabilities note, name: capabilities_note, widget: text, required: false }
- { label: Pricing note, name: pricing_note, widget: text, required: false }
- label: Body
name: body
widget: richtext
hint: The page's long-form content. Everything here is published as the page's main content.
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<title>Sveltia CMS</title>
</head>
<body>
<script src="sveltia-cms.js"></script>
</body>
</html>
-3635
View File
File diff suppressed because one or more lines are too long
-43
View File
@@ -1,43 +0,0 @@
<!DOCTYPE html><html lang="en" dir="ltr"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Cookies</title><meta name="description" content="This site uses no cookies; the only local storage is your analytics choice, and analytics loads only after you opt in."><link rel="canonical" href="https://validationlab.eu/cookies/"><link rel="alternate" hreflang="en" href="https://validationlab.eu/cookies/"><link rel="alternate" hreflang="x-default" href="https://validationlab.eu/cookies/"><meta property="og:title" content="Cookies"><meta property="og:description" content="This site uses no cookies; the only local storage is your analytics choice, and analytics loads only after you opt in."><meta property="og:url" content="https://validationlab.eu/cookies/"><meta property="og:type" content="website"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Service","serviceType":"Innovation hub programmes","provider":{"@type":"Organization","name":"Validation Lab","url":"https://validationlab.eu"},"areaServed":"EU","url":"https://validationlab.eu/cookies/","description":"This site uses no cookies; the only local storage is your analytics choice, and analytics loads only after you opt in."}</script><script>(() => {
// Cookie-gated analytics: nothing loads until the visitor opts in,
// and the choice is remembered in localStorage.
const banner = document.getElementById("cookie-consent");
if (!banner) return;
const KEY = "vl-consent";
const STATS_URL = "REPLACE_STATS_SCRIPT_URL";
const STATS_ID = "REPLACE_STATS_WEBSITE_ID";
const injectStats = () => {
if (STATS_URL.indexOf("REPLACE_") === 0 || document.getElementById("vl-stats")) return;
const s = document.createElement("script");
s.id = "vl-stats";
s.defer = true;
s.src = STATS_URL + "";
s.setAttribute("data-website-id", STATS_ID);
document.head.appendChild(s);
};
const decide = (allow) => {
try { localStorage.setItem(KEY, allow ? "granted" : "denied"); } catch {}
banner.remove();
if (allow) injectStats();
};
banner.addEventListener("click", (event) => {
const b = event.target.closest("button");
if (!b) return;
decide(b.dataset.answer === "yes");
});
let stored = null;
try { stored = localStorage.getItem(KEY); } catch {}
if (stored) {
banner.remove();
if (stored === "granted") injectStats();
}
})();</script><link rel="stylesheet" href="/_astro/cookies.a9D3y7n-.css"></head> <body> <header class="site-header"> <nav> <a class="brand" href="/">Validation Lab</a> <a href="/cookies/" aria-current="page">Cookies</a> <label class="switcher"> <span aria-hidden="true">Read this page in:</span> <select aria-label="Language" onchange="const u=new URL(this.value, location.origin); location.href = u.href;"> <option value="https://validationlab.eu/cookies/" selected> English </option> </select> </label> </nav> </header> <main> <p><strong>DRAFT — this notice needs review before launch.</strong></p>
<p>This website sets no cookies of any kind. The only thing stored in your
browser is a single local entry recording your answer to the analytics
banner (allow / decline) so we don’t ask you again.</p>
<p>The analytics itself is a self-hosted, privacy-first tool on our own
server. It is not loaded — not even its script — until you explicitly
allow it, and no third-party trackers or advertising networks run on this
site.</p> </main> <footer> <p>Guided validation for early-stage startups — from Business Model Canvas to validated learning.</p> <p> <a href="/privacy/">Privacy</a> ·
<a href="/cookies/">Cookies</a> ·
<a href="/admin/">This site is editable in the browser at /admin/ — no git knowledge required.</a> </p> <p>Hosted on EU infrastructure (Aruba, Italy).</p> </footer> <div id="cookie-consent" role="region" aria-label="We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in."> <p>We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in.</p> <button data-answer="yes">Allow analytics</button> <button data-answer="no">Decline</button> </div> </body></html>
-105
View File
@@ -1,105 +0,0 @@
<!DOCTYPE html><html lang="en" dir="ltr"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>For founders — validate before you build</title><meta name="description" content="Validation Lab guides founding teams from idea to depth interviews in fifteen structured stages, with an AI facilitator drafting the documents and the team keeping the decisions. Early access for founding teams."><link rel="canonical" href="https://validationlab.eu/for-founders/"><link rel="alternate" hreflang="en" href="https://validationlab.eu/for-founders/"><link rel="alternate" hreflang="x-default" href="https://validationlab.eu/for-founders/"><meta property="og:title" content="For founders — validate before you build"><meta property="og:description" content="Validation Lab guides founding teams from idea to depth interviews in fifteen structured stages, with an AI facilitator drafting the documents and the team keeping the decisions. Early access for founding teams."><meta property="og:url" content="https://validationlab.eu/for-founders/"><meta property="og:type" content="website"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Service","serviceType":"Startup validation guidance","provider":{"@type":"Organization","name":"Validation Lab","url":"https://validationlab.eu"},"areaServed":"EU","url":"https://validationlab.eu/for-founders/","description":"Validation Lab guides founding teams from idea to depth interviews in fifteen structured stages, with an AI facilitator drafting the documents and the team keeping the decisions. Early access for founding teams."}</script><script>(() => {
// Cookie-gated analytics: nothing loads until the visitor opts in,
// and the choice is remembered in localStorage.
const banner = document.getElementById("cookie-consent");
if (!banner) return;
const KEY = "vl-consent";
const STATS_URL = "REPLACE_STATS_SCRIPT_URL";
const STATS_ID = "REPLACE_STATS_WEBSITE_ID";
const injectStats = () => {
if (STATS_URL.indexOf("REPLACE_") === 0 || document.getElementById("vl-stats")) return;
const s = document.createElement("script");
s.id = "vl-stats";
s.defer = true;
s.src = STATS_URL + "";
s.setAttribute("data-website-id", STATS_ID);
document.head.appendChild(s);
};
const decide = (allow) => {
try { localStorage.setItem(KEY, allow ? "granted" : "denied"); } catch {}
banner.remove();
if (allow) injectStats();
};
banner.addEventListener("click", (event) => {
const b = event.target.closest("button");
if (!b) return;
decide(b.dataset.answer === "yes");
});
let stored = null;
try { stored = localStorage.getItem(KEY); } catch {}
if (stored) {
banner.remove();
if (stored === "granted") injectStats();
}
})();</script><link rel="stylesheet" href="/_astro/cookies.a9D3y7n-.css"></head> <body> <header class="site-header"> <nav> <a class="brand" href="/">Validation Lab</a> <a href="/for-founders/" aria-current="page">For founders</a> <label class="switcher"> <span aria-hidden="true">Read this page in:</span> <select aria-label="Language" onchange="const u=new URL(this.value, location.origin); location.href = u.href;"> <option value="https://validationlab.eu/for-founders/" selected> English </option> </select> </label> </nav> </header> <main> <section class="hero"> <h1>Skip the opinions. Find out what your market thinks.</h1> <p class="hero-sub">You have an idea. Everyone around you has opinions. The only answers that count come from outside the building — and there is a right order to go get them.</p> </section> <section class="note"><p>We&#39;re onboarding founding teams in small cohorts. Early-access terms for the first teams through the door.</p></section> <p>Founders rarely fail for lack of ideas — they fail from building before
validating. Validation Lab walks your team through the full journey, one
focused stage at a time: frame the idea, build and stress-test the Business
Model Canvas, decide what you know versus what you’re merely assuming, and
only then explore which market opportunity to pursue. Later stages get
concrete: persona matrices, a positioning statement, a depth-interview panel
with a scripted interview guide, and a systematic analysis of what you heard.</p>
<p>You stay in the driving seat: the AI facilitator asks the hard questions,
drafts each document and challenges weak answers — but the team decides.
Everything you produce is a real, reusable document your accelerator,
institute or investor can read.</p>
<p>Mentors fit in naturally: hand them a stage to review, and their feedback
lands in the same documents.</p> <section class="lead-wrap"> <form id="lead-form" class="lead" data-webhook="REPLACE_ZOHO_FLOW_WEBHOOK_FOUNDERS" data-sending-label="Sending…" data-locale="en" data-type="founders" data-i18n-success="Thank you — your request is on its way. We'll be in touch shortly." data-i18n-error="Something went wrong sending your request. Please email us instead:" data-contact-email="hello@app.validationlab.eu"> <h2 id="lead-form">Talk to us about your startup</h2> <p class="lead-note">Tell us where you are on the journey — we&#39;ll get back to you within a few days.</p> <label> Name * <input type="text" name="name" required> </label><label> Email * <input type="email" name="email" required> </label><label> Startup stage <select name="stage"> <option value="idea">Idea</option><option value="prototype">Prototype</option><option value="launch">Launched</option> </select> </label><label> Sector <input type="text" name="sector"> </label><label> Country <input type="text" name="country"> </label><label> How did you hear about us? <input type="text" name="heard"> </label> <input class="hp" type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true"> <input type="hidden" name="capabilities" value=""> <input type="hidden" name="locale" value="en"> <input type="hidden" name="source" value="founders"> <label class="consent"> <input type="checkbox" name="consent" required> <span>I agree that my details may be used to contact me about Validation Lab.</span> </label> <button class="button" type="submit">Send</button> </form> <script>
(() => {
const form = document.getElementById("lead-form");
if (!form || form.dataset.bound) return;
form.dataset.bound = "1";
const STRINGS = {
sending: form.dataset.sendingLabel,
};
// capability blocks tag the form (analyst clicks are separate, via
// data-umami-event attributes on the block links)
const capField = form.querySelector('input[name="capabilities"]');
document.querySelectorAll("[data-cap]").forEach((el) => {
el.addEventListener("click", () => {
if (!capField.value.split(",").includes(el.dataset.cap)) {
capField.value = capField.value
? capField.value + "," + el.dataset.cap
: el.dataset.cap;
}
});
});
form.addEventListener("submit", async (event) => {
event.preventDefault();
const button = form.querySelector('button[type="submit"]');
const data = new FormData(form);
const payload = {};
data.forEach((v, k) => { payload[k] = v; });
if (payload.website) return; // honeypot: pretend success, send nothing
if (capField && !payload.capabilities) payload.capabilities = capField.value;
button.disabled = true;
button.textContent = STRINGS.sending || "Sending…";
try {
const res = await fetch(form.dataset.webhook, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
if (!res.ok) throw new Error("HTTP " + res.status);
form.innerHTML =
'<p class="lead-ok"></p>';
form.querySelector(".lead-ok").textContent = form.dataset.i18nSuccess;
} catch {
const p = document.createElement("p");
p.className = "lead-err";
p.textContent = form.dataset.i18nError + " ";
const a = document.createElement("a");
a.href = `mailto:${form.dataset.contactEmail}?subject=Validation%20Lab`;
a.textContent = form.dataset.contactEmail;
p.appendChild(a);
form.innerHTML = "";
form.appendChild(p);
button.disabled = false;
}
});
})();
</script> </section> </main> <footer> <p>Guided validation for early-stage startups — from Business Model Canvas to validated learning.</p> <p> <a href="/privacy/">Privacy</a> ·
<a href="/cookies/">Cookies</a> ·
<a href="/admin/">This site is editable in the browser at /admin/ — no git knowledge required.</a> </p> <p>Hosted on EU infrastructure (Aruba, Italy).</p> </footer> <div id="cookie-consent" role="region" aria-label="We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in."> <p>We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in.</p> <button data-answer="yes">Allow analytics</button> <button data-answer="no">Decline</button> </div> </body></html>
-114
View File
@@ -1,114 +0,0 @@
<!DOCTYPE html><html lang="en" dir="ltr"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>For innovation hubs — a validation layer for your programme</title><meta name="description" content="Validation Lab gives incubators, EDIHs and accelerators an asynchronous, structured validation layer between mentoring sessions, with a cohort overview on the roadmap. Tell us which capabilities matter to you."><link rel="canonical" href="https://validationlab.eu/for-innovation-hubs/"><link rel="alternate" hreflang="en" href="https://validationlab.eu/for-innovation-hubs/"><link rel="alternate" hreflang="x-default" href="https://validationlab.eu/for-innovation-hubs/"><meta property="og:title" content="For innovation hubs — a validation layer for your programme"><meta property="og:description" content="Validation Lab gives incubators, EDIHs and accelerators an asynchronous, structured validation layer between mentoring sessions, with a cohort overview on the roadmap. Tell us which capabilities matter to you."><meta property="og:url" content="https://validationlab.eu/for-innovation-hubs/"><meta property="og:type" content="website"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Service","serviceType":"Innovation hub programmes","provider":{"@type":"Organization","name":"Validation Lab","url":"https://validationlab.eu"},"areaServed":"EU","url":"https://validationlab.eu/for-innovation-hubs/","description":"Validation Lab gives incubators, EDIHs and accelerators an asynchronous, structured validation layer between mentoring sessions, with a cohort overview on the roadmap. Tell us which capabilities matter to you."}</script><script>(() => {
// Cookie-gated analytics: nothing loads until the visitor opts in,
// and the choice is remembered in localStorage.
const banner = document.getElementById("cookie-consent");
if (!banner) return;
const KEY = "vl-consent";
const STATS_URL = "REPLACE_STATS_SCRIPT_URL";
const STATS_ID = "REPLACE_STATS_WEBSITE_ID";
const injectStats = () => {
if (STATS_URL.indexOf("REPLACE_") === 0 || document.getElementById("vl-stats")) return;
const s = document.createElement("script");
s.id = "vl-stats";
s.defer = true;
s.src = STATS_URL + "";
s.setAttribute("data-website-id", STATS_ID);
document.head.appendChild(s);
};
const decide = (allow) => {
try { localStorage.setItem(KEY, allow ? "granted" : "denied"); } catch {}
banner.remove();
if (allow) injectStats();
};
banner.addEventListener("click", (event) => {
const b = event.target.closest("button");
if (!b) return;
decide(b.dataset.answer === "yes");
});
let stored = null;
try { stored = localStorage.getItem(KEY); } catch {}
if (stored) {
banner.remove();
if (stored === "granted") injectStats();
}
})();</script><link rel="stylesheet" href="/_astro/cookies.a9D3y7n-.css"></head> <body> <header class="site-header"> <nav> <a class="brand" href="/">Validation Lab</a> <a href="/for-innovation-hubs/" aria-current="page">For innovation hubs</a> <label class="switcher"> <span aria-hidden="true">Read this page in:</span> <select aria-label="Language" onchange="const u=new URL(this.value, location.origin); location.href = u.href;"> <option value="https://validationlab.eu/for-innovation-hubs/" selected> English </option> </select> </label> </nav> </header> <main> <section class="hero"> <h1>Your programme, with a validation spine.</h1> <p class="hero-sub">Mentoring hours are scarce. Validation Lab is the asynchronous layer between your sessions: a structured, fifteen-stage journey each startup works through — while your mentors intervene where they add most.</p> </section> <section class="capabilities"> <h2>The capabilities we&#39;re building towards</h2> <p class="capabilities-note">These are on our near-term roadmap, sequenced by what teams and hubs actually ask for. Click what matters to you — your click and your message arrive together in our CRM.</p> <div class="cards"> <article class="card"> <h3>White-labelling</h3> <p>Run the journey as your own branded programme, on your own server instance — your data, your look.</p> <a class="button button-secondary" data-umami-event="capability-white_label" data-cap="white_label" href="/for-innovation-hubs/#lead-form">I&#39;m interested in this</a> </article><article class="card"> <h3>Instructor-led breakpoints</h3> <p>Your mentors step in at defined break-points in the journey — reviewing and signing off each stage for each team.</p> <a class="button button-secondary" data-umami-event="capability-instructor_led" data-cap="instructor_led" href="/for-innovation-hubs/#lead-form">I&#39;m interested in this</a> </article><article class="card"> <h3>Team collaboration</h3> <p>Founding teams work the journey together: shared documents, shared edits, one team view.</p> <a class="button button-secondary" data-umami-event="capability-team_collaboration" data-cap="team_collaboration" href="/for-innovation-hubs/#lead-form">I&#39;m interested in this</a> </article><article class="card"> <h3>Cohort grouping and overview</h3> <p>Group startups into cohorts and see where each team stands across your programme — one overview for programme managers.</p> <a class="button button-secondary" data-umami-event="capability-cohort_dashboards" data-cap="cohort_dashboards" href="/for-innovation-hubs/#lead-form">I&#39;m interested in this</a> </article> </div> </section> <p>Innovation hubs — incubators, accelerators, EDIHs, EEN nodes, regional
agencies — run on two scarce resources: mentor hours and reviewer
attention. Validation Lab is designed to complement your programme, not
replace it: it is the structured layer a startup works through <em>between</em>
your sessions, producing documents your mentors and selection committees can
actually assess.</p>
<p>Use cases we’re building for:</p>
<ul>
<li><strong>Between mentor sessions.</strong> Teams arrive at each session with the stage
completed and the document drafted — the session starts from substance,
not from status updates.</li>
<li><strong>A selection funnel.</strong> Run candidates through the early stages and
read the canvas, focus and opportunity documents before you award a
place in your programme.</li>
<li><strong>White-label programmes.</strong> For hubs that want the journey under their own
brand and on their own infrastructure (roadmap capability above).</li>
</ul>
<p>The journey today is the fifteen-stage validation path — from the Business
Model Canvas, through market opportunities and personas, to scripted depth
interviews with systematic analysis. The hub-facing capabilities above are
the roadmap; the cohort overview and mentor sign-off gates are sequenced
first, and your signal below helps us sequence the rest.</p> <section class="lead-wrap"> <form id="lead-form" class="lead" data-webhook="REPLACE_ZOHO_FLOW_WEBHOOK_HUBS" data-sending-label="Sending…" data-locale="en" data-type="hubs" data-i18n-success="Thank you — your request is on its way. We'll be in touch shortly." data-i18n-error="Something went wrong sending your request. Please email us instead:" data-contact-email="hello@app.validationlab.eu"> <h2 id="lead-form">Talk to us about your hub</h2> <p class="lead-note">No long forms, no survey — the capabilities you clicked above arrive with your message.</p> <label> Organisation * <input type="text" name="organisation" required> </label><label> Name * <input type="text" name="name" required> </label><label> Email * <input type="email" name="email" required> </label><label> Country <input type="text" name="country"> </label><label> Programme type <select name="programme"> <option value="incubator">Incubator</option><option value="accelerator">Accelerator</option><option value="edih">EDIH</option><option value="een">EEN node</option><option value="agency">Regional agency</option><option value="other">Other</option> </select> </label><label> Message (optional) <textarea name="message"></textarea> </label> <input class="hp" type="text" name="website" tabindex="-1" autocomplete="off" aria-hidden="true"> <input type="hidden" name="capabilities" value=""> <input type="hidden" name="locale" value="en"> <input type="hidden" name="source" value="hubs"> <label class="consent"> <input type="checkbox" name="consent" required> <span>I agree that my details may be used to contact me about Validation Lab.</span> </label> <button class="button" type="submit">Send</button> </form> <script>
(() => {
const form = document.getElementById("lead-form");
if (!form || form.dataset.bound) return;
form.dataset.bound = "1";
const STRINGS = {
sending: form.dataset.sendingLabel,
};
// capability blocks tag the form (analyst clicks are separate, via
// data-umami-event attributes on the block links)
const capField = form.querySelector('input[name="capabilities"]');
document.querySelectorAll("[data-cap]").forEach((el) => {
el.addEventListener("click", () => {
if (!capField.value.split(",").includes(el.dataset.cap)) {
capField.value = capField.value
? capField.value + "," + el.dataset.cap
: el.dataset.cap;
}
});
});
form.addEventListener("submit", async (event) => {
event.preventDefault();
const button = form.querySelector('button[type="submit"]');
const data = new FormData(form);
const payload = {};
data.forEach((v, k) => { payload[k] = v; });
if (payload.website) return; // honeypot: pretend success, send nothing
if (capField && !payload.capabilities) payload.capabilities = capField.value;
button.disabled = true;
button.textContent = STRINGS.sending || "Sending…";
try {
const res = await fetch(form.dataset.webhook, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
if (!res.ok) throw new Error("HTTP " + res.status);
form.innerHTML =
'<p class="lead-ok"></p>';
form.querySelector(".lead-ok").textContent = form.dataset.i18nSuccess;
} catch {
const p = document.createElement("p");
p.className = "lead-err";
p.textContent = form.dataset.i18nError + " ";
const a = document.createElement("a");
a.href = `mailto:${form.dataset.contactEmail}?subject=Validation%20Lab`;
a.textContent = form.dataset.contactEmail;
p.appendChild(a);
form.innerHTML = "";
form.appendChild(p);
button.disabled = false;
}
});
})();
</script> </section> </main> <footer> <p>Guided validation for early-stage startups — from Business Model Canvas to validated learning.</p> <p> <a href="/privacy/">Privacy</a> ·
<a href="/cookies/">Cookies</a> ·
<a href="/admin/">This site is editable in the browser at /admin/ — no git knowledge required.</a> </p> <p>Hosted on EU infrastructure (Aruba, Italy).</p> </footer> <div id="cookie-consent" role="region" aria-label="We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in."> <p>We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in.</p> <button data-answer="yes">Allow analytics</button> <button data-answer="no">Decline</button> </div> </body></html>
-38
View File
@@ -1,38 +0,0 @@
<!DOCTYPE html><html lang="en" dir="ltr"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Validation Lab — guided startup validation, from canvas to validated learning</title><meta name="description" content="A guided, AI-facilitated validation journey for early-stage startups: fifteen structured stages, real documents, from Business Model Canvas to validated learning. EU-hosted."><link rel="canonical" href="https://validationlab.eu/"><link rel="alternate" hreflang="en" href="https://validationlab.eu/"><link rel="alternate" hreflang="x-default" href="https://validationlab.eu/"><meta property="og:title" content="Validation Lab — guided startup validation, from canvas to validated learning"><meta property="og:description" content="A guided, AI-facilitated validation journey for early-stage startups: fifteen structured stages, real documents, from Business Model Canvas to validated learning. EU-hosted."><meta property="og:url" content="https://validationlab.eu/"><meta property="og:type" content="website"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Organization","name":"Validation Lab","url":"https://validationlab.eu","description":"A guided, AI-facilitated validation journey for early-stage startups: fifteen structured stages, real documents, from Business Model Canvas to validated learning. EU-hosted."}</script><script>(() => {
// Cookie-gated analytics: nothing loads until the visitor opts in,
// and the choice is remembered in localStorage.
const banner = document.getElementById("cookie-consent");
if (!banner) return;
const KEY = "vl-consent";
const STATS_URL = "REPLACE_STATS_SCRIPT_URL";
const STATS_ID = "REPLACE_STATS_WEBSITE_ID";
const injectStats = () => {
if (STATS_URL.indexOf("REPLACE_") === 0 || document.getElementById("vl-stats")) return;
const s = document.createElement("script");
s.id = "vl-stats";
s.defer = true;
s.src = STATS_URL + "";
s.setAttribute("data-website-id", STATS_ID);
document.head.appendChild(s);
};
const decide = (allow) => {
try { localStorage.setItem(KEY, allow ? "granted" : "denied"); } catch {}
banner.remove();
if (allow) injectStats();
};
banner.addEventListener("click", (event) => {
const b = event.target.closest("button");
if (!b) return;
decide(b.dataset.answer === "yes");
});
let stored = null;
try { stored = localStorage.getItem(KEY); } catch {}
if (stored) {
banner.remove();
if (stored === "granted") injectStats();
}
})();</script><link rel="stylesheet" href="/_astro/cookies.a9D3y7n-.css"></head> <body> <header class="site-header"> <nav> <a class="brand" href="/">Validation Lab</a> <a href="/" aria-current="page">Home</a> <label class="switcher"> <span aria-hidden="true">Read this page in:</span> <select aria-label="Language" onchange="const u=new URL(this.value, location.origin); location.href = u.href;"> <option value="https://validationlab.eu/" selected> English </option> </select> </label> </nav> </header> <main> <section class="hero"> <h1>Validate your startup before you build it.</h1> <p class="hero-sub">Validation Lab walks founding teams through a fifteen-stage validation journey — from the Business Model Canvas to depth interviews and validated learning — with an AI facilitator that drafts, questions and challenges every step.</p> <p class="cta-row"> <a class="button" href="/for-founders/">I&#39;m a founder</a> <a class="button button-secondary" href="/for-innovation-hubs/">I run an innovation hub</a> </p> </section> <section class="cards" aria-label="Why teams use it"> <article class="card"> <h2>A guided path, not guesswork</h2> <p>Fifteen structured stages replace ad-hoc mentoring checklists. Every stage ends with a real document — canvas, assessment, persona set, positioning statement, interview script.</p> </article><article class="card"> <h2>AI-facilitated, human-steered</h2> <p>The agent interviews the team, drafts the documents and challenges weak assumptions. You and your mentor keep every decision.</p> </article><article class="card"> <h2>EU-hosted, GDPR-aligned</h2> <p>Served and stored on European infrastructure. Your startup&#39;s documents stay in the EU.</p> </article> </section> <section class="journey"> <h2>How the journey works</h2> <p class="journey-note">Fifteen guided stages in six phases — each producing documents the team keeps.</p> <ol> <li value="1"><strong>Frame the Startup Idea</strong><span> — the idea, the problem it solves, a validation self-rating.</span></li><li value="2"><strong>Model the business</strong><span> — build or normalise the Business Model Canvas, then assess it against Osterwalder&#39;s seven questions.</span></li><li value="3"><strong>Define the validation focus</strong><span> — turn the assessment into priorities — what is knowledge, what is assumption.</span></li><li value="4"><strong>Explore market opportunities</strong><span> — rank the segments, evaluate the shortlist, choose the focus opportunity.</span></li><li value="5"><strong>Personas and positioning</strong><span> — persona matrices, a focus persona, and a positioning statement on the Geoffrey Moore template.</span></li><li value="6"><strong>Interviews and analysis</strong><span> — plan and script depth interviews, then analyse the findings systematically.</span></li> </ol> </section> <p>Guided validation for early-stage startups: from Business Model Canvas to
validated learning. Piloted with early-stage teams and mentors in Italy and
Malta — tell us which language you’re reading this in, and you’ll hear from us.</p> </main> <footer> <p>Guided validation for early-stage startups — from Business Model Canvas to validated learning.</p> <p> <a href="/privacy/">Privacy</a> ·
<a href="/cookies/">Cookies</a> ·
<a href="/admin/">This site is editable in the browser at /admin/ — no git knowledge required.</a> </p> <p>Hosted on EU infrastructure (Aruba, Italy).</p> </footer> <div id="cookie-consent" role="region" aria-label="We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in."> <p>We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in.</p> <button data-answer="yes">Allow analytics</button> <button data-answer="no">Decline</button> </div> </body></html>
-50
View File
@@ -1,50 +0,0 @@
<!DOCTYPE html><html lang="en" dir="ltr"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Privacy notice</title><meta name="description" content="How this website handles personal data — hosting, forms, analytics and your rights."><link rel="canonical" href="https://validationlab.eu/privacy/"><link rel="alternate" hreflang="en" href="https://validationlab.eu/privacy/"><link rel="alternate" hreflang="x-default" href="https://validationlab.eu/privacy/"><meta property="og:title" content="Privacy notice"><meta property="og:description" content="How this website handles personal data — hosting, forms, analytics and your rights."><meta property="og:url" content="https://validationlab.eu/privacy/"><meta property="og:type" content="website"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Service","serviceType":"Innovation hub programmes","provider":{"@type":"Organization","name":"Validation Lab","url":"https://validationlab.eu"},"areaServed":"EU","url":"https://validationlab.eu/privacy/","description":"How this website handles personal data — hosting, forms, analytics and your rights."}</script><script>(() => {
// Cookie-gated analytics: nothing loads until the visitor opts in,
// and the choice is remembered in localStorage.
const banner = document.getElementById("cookie-consent");
if (!banner) return;
const KEY = "vl-consent";
const STATS_URL = "REPLACE_STATS_SCRIPT_URL";
const STATS_ID = "REPLACE_STATS_WEBSITE_ID";
const injectStats = () => {
if (STATS_URL.indexOf("REPLACE_") === 0 || document.getElementById("vl-stats")) return;
const s = document.createElement("script");
s.id = "vl-stats";
s.defer = true;
s.src = STATS_URL + "";
s.setAttribute("data-website-id", STATS_ID);
document.head.appendChild(s);
};
const decide = (allow) => {
try { localStorage.setItem(KEY, allow ? "granted" : "denied"); } catch {}
banner.remove();
if (allow) injectStats();
};
banner.addEventListener("click", (event) => {
const b = event.target.closest("button");
if (!b) return;
decide(b.dataset.answer === "yes");
});
let stored = null;
try { stored = localStorage.getItem(KEY); } catch {}
if (stored) {
banner.remove();
if (stored === "granted") injectStats();
}
})();</script><link rel="stylesheet" href="/_astro/cookies.a9D3y7n-.css"></head> <body> <header class="site-header"> <nav> <a class="brand" href="/">Validation Lab</a> <a href="/privacy/" aria-current="page">Privacy</a> <label class="switcher"> <span aria-hidden="true">Read this page in:</span> <select aria-label="Language" onchange="const u=new URL(this.value, location.origin); location.href = u.href;"> <option value="https://validationlab.eu/privacy/" selected> English </option> </select> </label> </nav> </header> <main> <p><strong>DRAFT — this notice needs legal review before launch.</strong></p>
<p>This website is operated by Validation Lab. The pages you read are served
from a self-managed server hosted by Aruba S.p.A. in Italy — all hosting,
storage and content stay on EU infrastructure.</p>
<p><strong>What we process.</strong> Reading this site processes no personal data beyond
standard server logs. If you send a message through one of our forms, we
receive the details you type (name, email, and whichever optional fields
you complete) plus the page language, and pass them to our CRM provider,
Zoho (EU data centres), to reply to you. If you allow analytics, a
self-hosted, privacy-first analytics tool records page views, the referrer
and the language you read — without cookies and without sharing data with
third parties. Analytics loads only after you opt in via the banner.</p>
<p><strong>Your data rights.</strong> You may request access to, correction of, or
erasure of your data at any time — write to us and we will action it.</p>
<p><strong>Email:</strong> <a href="mailto:hello@app.validationlab.eu">hello@app.validationlab.eu</a></p> </main> <footer> <p>Guided validation for early-stage startups — from Business Model Canvas to validated learning.</p> <p> <a href="/privacy/">Privacy</a> ·
<a href="/cookies/">Cookies</a> ·
<a href="/admin/">This site is editable in the browser at /admin/ — no git knowledge required.</a> </p> <p>Hosted on EU infrastructure (Aruba, Italy).</p> </footer> <div id="cookie-consent" role="region" aria-label="We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in."> <p>We use a self-hosted, privacy-first analytics tool to understand which pages and languages matter. Nothing is loaded until you opt in.</p> <button data-answer="yes">Allow analytics</button> <button data-answer="no">Decline</button> </div> </body></html>
-5
View File
@@ -1,5 +0,0 @@
User-agent: *
Allow: /
Disallow: /admin/
Sitemap: https://validationlab.eu/sitemap-index.xml
-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://validationlab.eu/</loc></url><url><loc>https://validationlab.eu/cookies/</loc></url><url><loc>https://validationlab.eu/for-founders/</loc></url><url><loc>https://validationlab.eu/for-innovation-hubs/</loc></url><url><loc>https://validationlab.eu/privacy/</loc></url></urlset>
-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://validationlab.eu/sitemap-0.xml</loc></sitemap></sitemapindex>
-1
View File
@@ -1 +0,0 @@
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.18.2","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://validationlab.eu\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[],\"actionBodySizeLimit\":1048576},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false,\"svgo\":false},\"legacy\":{\"collections\":false}}"]
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../acorn/bin/acorn
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../astro/astro.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../cssesc/bin/cssesc
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../esbuild/bin/esbuild
-1
View File
@@ -1 +0,0 @@
../is-docker/cli.js
-1
View File
@@ -1 +0,0 @@
../is-inside-container/cli.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../js-yaml/bin/js-yaml.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../nanoid/bin/nanoid.cjs
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../@babel/parser/bin/babel-parser.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../rollup/dist/bin/rollup
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../semver/bin/semver.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../sitemap/dist/cli.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../svgo/bin/svgo.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../typescript/bin/tsc
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../tsconfck/bin/tsconfck.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../typescript/bin/tsserver
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../vite/bin/vite.js
-4190
View File
File diff suppressed because it is too large Load Diff
-31
View File
@@ -1,31 +0,0 @@
{
"hash": "d5107548",
"configHash": "7fd3838c",
"lockfileHash": "256cca60",
"browserHash": "d846223f",
"optimized": {
"astro > cssesc": {
"src": "../../cssesc/cssesc.js",
"file": "astro___cssesc.js",
"fileHash": "7182d6c6",
"needsInterop": true
},
"astro > aria-query": {
"src": "../../aria-query/lib/index.js",
"file": "astro___aria-query.js",
"fileHash": "9223ca2a",
"needsInterop": true
},
"astro > axobject-query": {
"src": "../../axobject-query/lib/index.js",
"file": "astro___axobject-query.js",
"fileHash": "f86a104f",
"needsInterop": true
}
},
"chunks": {
"chunk-BUSYA2B4": {
"file": "chunk-BUSYA2B4.js"
}
}
}
-6776
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-3754
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-99
View File
@@ -1,99 +0,0 @@
import {
__commonJS
} from "./chunk-BUSYA2B4.js";
// node_modules/cssesc/cssesc.js
var require_cssesc = __commonJS({
"node_modules/cssesc/cssesc.js"(exports, module) {
var object = {};
var hasOwnProperty = object.hasOwnProperty;
var merge = function merge2(options, defaults) {
if (!options) {
return defaults;
}
var result = {};
for (var key in defaults) {
result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
}
return result;
};
var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
var cssesc = function cssesc2(string, options) {
options = merge(options, cssesc2.options);
if (options.quotes != "single" && options.quotes != "double") {
options.quotes = "single";
}
var quote = options.quotes == "double" ? '"' : "'";
var isIdentifier = options.isIdentifier;
var firstChar = string.charAt(0);
var output = "";
var counter = 0;
var length = string.length;
while (counter < length) {
var character = string.charAt(counter++);
var codePoint = character.charCodeAt();
var value = void 0;
if (codePoint < 32 || codePoint > 126) {
if (codePoint >= 55296 && codePoint <= 56319 && counter < length) {
var extra = string.charCodeAt(counter++);
if ((extra & 64512) == 56320) {
codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536;
} else {
counter--;
}
}
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
} else {
if (options.escapeEverything) {
if (regexAnySingleEscape.test(character)) {
value = "\\" + character;
} else {
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
}
} else if (/[\t\n\f\r\x0B]/.test(character)) {
value = "\\" + codePoint.toString(16).toUpperCase() + " ";
} else if (character == "\\" || !isIdentifier && (character == '"' && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
value = "\\" + character;
} else {
value = character;
}
}
output += value;
}
if (isIdentifier) {
if (/^-[-\d]/.test(output)) {
output = "\\-" + output.slice(1);
} else if (/\d/.test(firstChar)) {
output = "\\3" + firstChar + " " + output.slice(1);
}
}
output = output.replace(regexExcessiveSpaces, function($0, $1, $2) {
if ($1 && $1.length % 2) {
return $0;
}
return ($1 || "") + $2;
});
if (!isIdentifier && options.wrap) {
return quote + output + quote;
}
return output;
};
cssesc.options = {
"escapeEverything": false,
"isIdentifier": false,
"quotes": "single",
"wrap": false
};
cssesc.version = "3.0.0";
module.exports = cssesc;
}
});
export default require_cssesc();
/*! Bundled license information:
cssesc/cssesc.js:
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
*/
//# sourceMappingURL=astro___cssesc.js.map
-7
View File
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": ["../../cssesc/cssesc.js"],
"sourcesContent": ["/*! https://mths.be/cssesc v3.0.0 by @mathias */\n'use strict';\n\nvar object = {};\nvar hasOwnProperty = object.hasOwnProperty;\nvar merge = function merge(options, defaults) {\n\tif (!options) {\n\t\treturn defaults;\n\t}\n\tvar result = {};\n\tfor (var key in defaults) {\n\t\t// `if (defaults.hasOwnProperty(key) { … }` is not needed here, since\n\t\t// only recognized option names are used.\n\t\tresult[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];\n\t}\n\treturn result;\n};\n\nvar regexAnySingleEscape = /[ -,\\.\\/:-@\\[-\\^`\\{-~]/;\nvar regexSingleEscape = /[ -,\\.\\/:-@\\[\\]\\^`\\{-~]/;\nvar regexAlwaysEscape = /['\"\\\\]/;\nvar regexExcessiveSpaces = /(^|\\\\+)?(\\\\[A-F0-9]{1,6})\\x20(?![a-fA-F0-9\\x20])/g;\n\n// https://mathiasbynens.be/notes/css-escapes#css\nvar cssesc = function cssesc(string, options) {\n\toptions = merge(options, cssesc.options);\n\tif (options.quotes != 'single' && options.quotes != 'double') {\n\t\toptions.quotes = 'single';\n\t}\n\tvar quote = options.quotes == 'double' ? '\"' : '\\'';\n\tvar isIdentifier = options.isIdentifier;\n\n\tvar firstChar = string.charAt(0);\n\tvar output = '';\n\tvar counter = 0;\n\tvar length = string.length;\n\twhile (counter < length) {\n\t\tvar character = string.charAt(counter++);\n\t\tvar codePoint = character.charCodeAt();\n\t\tvar value = void 0;\n\t\t// If it’s not a printable ASCII character…\n\t\tif (codePoint < 0x20 || codePoint > 0x7E) {\n\t\t\tif (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {\n\t\t\t\t// It’s a high surrogate, and there is a next character.\n\t\t\t\tvar extra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) {\n\t\t\t\t\t// next character is low surrogate\n\t\t\t\t\tcodePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;\n\t\t\t\t} else {\n\t\t\t\t\t// It’s an unmatched surrogate; only append this code unit, in case\n\t\t\t\t\t// the next code unit is the high surrogate of a surrogate pair.\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t} else {\n\t\t\tif (options.escapeEverything) {\n\t\t\t\tif (regexAnySingleEscape.test(character)) {\n\t\t\t\t\tvalue = '\\\\' + character;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t\t}\n\t\t\t} else if (/[\\t\\n\\f\\r\\x0B]/.test(character)) {\n\t\t\t\tvalue = '\\\\' + codePoint.toString(16).toUpperCase() + ' ';\n\t\t\t} else if (character == '\\\\' || !isIdentifier && (character == '\"' && quote == character || character == '\\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {\n\t\t\t\tvalue = '\\\\' + character;\n\t\t\t} else {\n\t\t\t\tvalue = character;\n\t\t\t}\n\t\t}\n\t\toutput += value;\n\t}\n\n\tif (isIdentifier) {\n\t\tif (/^-[-\\d]/.test(output)) {\n\t\t\toutput = '\\\\-' + output.slice(1);\n\t\t} else if (/\\d/.test(firstChar)) {\n\t\t\toutput = '\\\\3' + firstChar + ' ' + output.slice(1);\n\t\t}\n\t}\n\n\t// Remove spaces after `\\HEX` escapes that are not followed by a hex digit,\n\t// since they’re redundant. Note that this is only possible if the escape\n\t// sequence isn’t preceded by an odd number of backslashes.\n\toutput = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {\n\t\tif ($1 && $1.length % 2) {\n\t\t\t// It’s not safe to remove the space, so don’t.\n\t\t\treturn $0;\n\t\t}\n\t\t// Strip the space.\n\t\treturn ($1 || '') + $2;\n\t});\n\n\tif (!isIdentifier && options.wrap) {\n\t\treturn quote + output + quote;\n\t}\n\treturn output;\n};\n\n// Expose default options (so they can be overridden globally).\ncssesc.options = {\n\t'escapeEverything': false,\n\t'isIdentifier': false,\n\t'quotes': 'single',\n\t'wrap': false\n};\n\ncssesc.version = '3.0.0';\n\nmodule.exports = cssesc;\n"],
"mappings": ";;;;;AAAA;AAAA;AAGA,QAAI,SAAS,CAAC;AACd,QAAI,iBAAiB,OAAO;AAC5B,QAAI,QAAQ,SAASA,OAAM,SAAS,UAAU;AAC7C,UAAI,CAAC,SAAS;AACb,eAAO;AAAA,MACR;AACA,UAAI,SAAS,CAAC;AACd,eAAS,OAAO,UAAU;AAGzB,eAAO,GAAG,IAAI,eAAe,KAAK,SAAS,GAAG,IAAI,QAAQ,GAAG,IAAI,SAAS,GAAG;AAAA,MAC9E;AACA,aAAO;AAAA,IACR;AAEA,QAAI,uBAAuB;AAC3B,QAAI,oBAAoB;AAExB,QAAI,uBAAuB;AAG3B,QAAI,SAAS,SAASC,QAAO,QAAQ,SAAS;AAC7C,gBAAU,MAAM,SAASA,QAAO,OAAO;AACvC,UAAI,QAAQ,UAAU,YAAY,QAAQ,UAAU,UAAU;AAC7D,gBAAQ,SAAS;AAAA,MAClB;AACA,UAAI,QAAQ,QAAQ,UAAU,WAAW,MAAM;AAC/C,UAAI,eAAe,QAAQ;AAE3B,UAAI,YAAY,OAAO,OAAO,CAAC;AAC/B,UAAI,SAAS;AACb,UAAI,UAAU;AACd,UAAI,SAAS,OAAO;AACpB,aAAO,UAAU,QAAQ;AACxB,YAAI,YAAY,OAAO,OAAO,SAAS;AACvC,YAAI,YAAY,UAAU,WAAW;AACrC,YAAI,QAAQ;AAEZ,YAAI,YAAY,MAAQ,YAAY,KAAM;AACzC,cAAI,aAAa,SAAU,aAAa,SAAU,UAAU,QAAQ;AAEnE,gBAAI,QAAQ,OAAO,WAAW,SAAS;AACvC,iBAAK,QAAQ,UAAW,OAAQ;AAE/B,4BAAc,YAAY,SAAU,OAAO,QAAQ,QAAS;AAAA,YAC7D,OAAO;AAGN;AAAA,YACD;AAAA,UACD;AACA,kBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,QACvD,OAAO;AACN,cAAI,QAAQ,kBAAkB;AAC7B,gBAAI,qBAAqB,KAAK,SAAS,GAAG;AACzC,sBAAQ,OAAO;AAAA,YAChB,OAAO;AACN,sBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,YACvD;AAAA,UACD,WAAW,iBAAiB,KAAK,SAAS,GAAG;AAC5C,oBAAQ,OAAO,UAAU,SAAS,EAAE,EAAE,YAAY,IAAI;AAAA,UACvD,WAAW,aAAa,QAAQ,CAAC,iBAAiB,aAAa,OAAO,SAAS,aAAa,aAAa,OAAQ,SAAS,cAAc,gBAAgB,kBAAkB,KAAK,SAAS,GAAG;AAC1L,oBAAQ,OAAO;AAAA,UAChB,OAAO;AACN,oBAAQ;AAAA,UACT;AAAA,QACD;AACA,kBAAU;AAAA,MACX;AAEA,UAAI,cAAc;AACjB,YAAI,UAAU,KAAK,MAAM,GAAG;AAC3B,mBAAS,QAAQ,OAAO,MAAM,CAAC;AAAA,QAChC,WAAW,KAAK,KAAK,SAAS,GAAG;AAChC,mBAAS,QAAQ,YAAY,MAAM,OAAO,MAAM,CAAC;AAAA,QAClD;AAAA,MACD;AAKA,eAAS,OAAO,QAAQ,sBAAsB,SAAU,IAAI,IAAI,IAAI;AACnE,YAAI,MAAM,GAAG,SAAS,GAAG;AAExB,iBAAO;AAAA,QACR;AAEA,gBAAQ,MAAM,MAAM;AAAA,MACrB,CAAC;AAED,UAAI,CAAC,gBAAgB,QAAQ,MAAM;AAClC,eAAO,QAAQ,SAAS;AAAA,MACzB;AACA,aAAO;AAAA,IACR;AAGA,WAAO,UAAU;AAAA,MAChB,oBAAoB;AAAA,MACpB,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAEA,WAAO,UAAU;AAEjB,WAAO,UAAU;AAAA;AAAA;",
"names": ["merge", "cssesc"]
}
-8
View File
@@ -1,8 +0,0 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__commonJS
};
-7
View File
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}
-3
View File
@@ -1,3 +0,0 @@
{
"type": "module"
}
-53
View File
@@ -1,53 +0,0 @@
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
View File
@@ -1,72 +0,0 @@
# 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
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
-11
View File
@@ -1,11 +0,0 @@
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
View File
@@ -1 +0,0 @@
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
View File
@@ -1,3 +0,0 @@
"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
View File
@@ -1,29 +0,0 @@
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
View File
@@ -1,3 +0,0 @@
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};
File diff suppressed because one or more lines are too long
-37
View File
@@ -1,37 +0,0 @@
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
View File
@@ -1 +0,0 @@
import{a}from"../chunk-QR6QDSEV.js";export{a as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-12
View File
@@ -1,12 +0,0 @@
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
View File
@@ -1 +0,0 @@
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};
File diff suppressed because one or more lines are too long
-16
View File
@@ -1,16 +0,0 @@
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
View File
@@ -1 +0,0 @@
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
View File
@@ -1,3 +0,0 @@
"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
View File
@@ -1,29 +0,0 @@
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
View File
@@ -1,3 +0,0 @@
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};
File diff suppressed because one or more lines are too long
-37
View File
@@ -1,37 +0,0 @@
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
View File
@@ -1 +0,0 @@
import{a}from"../chunk-W5DTLHV4.js";export{a as default};
-1
View File
@@ -1 +0,0 @@
"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
View File
@@ -1,74 +0,0 @@
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 };
View File
-1
View File
@@ -1 +0,0 @@
"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
View File
@@ -1,18 +0,0 @@
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
View File
@@ -1 +0,0 @@
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
View File
@@ -1 +0,0 @@
"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
View File
@@ -1,160 +0,0 @@
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
View File
@@ -1 +0,0 @@
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
View File
@@ -1,58 +0,0 @@
{
"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
View File
@@ -1 +0,0 @@
export * from './dist/node/sync.js';
-1
View File
@@ -1 +0,0 @@
export type * from './dist/shared/types.js';
-1
View File
@@ -1 +0,0 @@
export * from './dist/node/utils.js';
-59
View File
@@ -1,59 +0,0 @@
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
View File
@@ -1,15 +0,0 @@
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
View File
@@ -1,66 +0,0 @@
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((url) => fileURLToPath(url));
const fileList = files.map((url) => fileURLToPath(url)).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
};
-39
View File
@@ -1,39 +0,0 @@
/**
* 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 const MANY_TRAILING_SLASHES: RegExp;
export declare function collapseDuplicateTrailingSlashes(path: string, trailingSlash: boolean): 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 isAbsolutePath(path: string): boolean;
export declare function isInternalPath(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;
/**
* Checks whether the path is considered a remote path.
* Remote means untrusted in this context, so anything that isn't a straightforward
* local path is considered remote.
*
* @param src
*/
export declare function isRemotePath(src: string): boolean;
/**
* Checks if parentPath is a parent directory of childPath.
*/
export declare function isParentDirectory(parentPath: string, childPath: 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;
export declare function hasFileExtension(path: string): boolean;
-196
View File
@@ -1,196 +0,0 @@
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, "/");
}
const MANY_TRAILING_SLASHES = /\/{2,}$/g;
function collapseDuplicateTrailingSlashes(path, trailingSlash) {
if (!path) {
return path;
}
return path.replace(MANY_TRAILING_SLASHES, trailingSlash ? "/" : "") || "/";
}
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 isAbsolutePath(path) {
return startsWithForwardSlash(path) || /^[a-zA-Z]:/.test(path);
}
function isString(path) {
return typeof path === "string" || path instanceof String;
}
const INTERNAL_PREFIXES = /* @__PURE__ */ new Set(["/_", "/@", "/.", "//"]);
const JUST_SLASHES = /^\/{2,}$/;
function isInternalPath(path) {
return INTERNAL_PREFIXES.has(path.slice(0, 2)) && !JUST_SLASHES.test(path);
}
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) {
if (!src) return false;
const trimmed = src.trim();
if (!trimmed) return false;
let decoded = trimmed;
let previousDecoded = "";
let maxIterations = 10;
while (decoded !== previousDecoded && maxIterations > 0) {
previousDecoded = decoded;
try {
decoded = decodeURIComponent(decoded);
} catch {
break;
}
maxIterations--;
}
if (/^[a-zA-Z]:/.test(decoded)) {
return false;
}
if (decoded[0] === "/" && decoded[1] !== "/" && decoded[1] !== "\\") {
return false;
}
if (decoded[0] === "\\") {
return true;
}
if (decoded.startsWith("//")) {
return true;
}
try {
const url = new URL(decoded, "http://n");
if (url.username || url.password) {
return true;
}
if (decoded.includes("@") && !url.pathname.includes("@") && !url.search.includes("@")) {
return true;
}
if (url.origin !== "http://n") {
const protocol = url.protocol.toLowerCase();
if (protocol === "file:") {
return false;
}
return true;
}
if (URL.canParse(decoded)) {
return true;
}
return false;
} catch {
return true;
}
}
function isParentDirectory(parentPath, childPath) {
if (!parentPath || !childPath) {
return false;
}
if (parentPath.includes("://") || childPath.includes("://")) {
return false;
}
if (isRemotePath(parentPath) || isRemotePath(childPath)) {
return false;
}
if (parentPath.includes("..") || childPath.includes("..")) {
return false;
}
if (parentPath.includes("\0") || childPath.includes("\0")) {
return false;
}
const normalizedParent = appendForwardSlash(slash(parentPath).toLowerCase());
const normalizedChild = slash(childPath).toLowerCase();
if (normalizedParent === normalizedChild || normalizedParent === normalizedChild + "/") {
return false;
}
return normalizedChild.startsWith(normalizedParent);
}
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;
}
const WITH_FILE_EXT = /\/[^/]+\.\w+$/;
function hasFileExtension(path) {
return WITH_FILE_EXT.test(path);
}
export {
MANY_TRAILING_SLASHES,
appendExtension,
appendForwardSlash,
collapseDuplicateSlashes,
collapseDuplicateTrailingSlashes,
fileExtension,
hasFileExtension,
isAbsolutePath,
isInternalPath,
isParentDirectory,
isRelativePath,
isRemotePath,
joinPaths,
prependForwardSlash,
removeBase,
removeFileExtension,
removeLeadingForwardSlash,
removeLeadingForwardSlashWindows,
removeQueryString,
removeTrailingForwardSlash,
slash,
startsWithDotDotSlash,
startsWithDotSlash,
startsWithForwardSlash,
trimSlashes
};
-62
View File
@@ -1,62 +0,0 @@
export type RemotePattern = {
hostname?: string;
pathname?: string;
protocol?: string;
port?: string;
};
/**
* Evaluates whether a given URL matches the specified remote pattern based on protocol, hostname, port, and pathname.
*
* @param {URL} url - The URL object to be matched against the remote pattern.
* @param {RemotePattern} remotePattern - The remote pattern object containing the protocol, hostname, port, and pathname to match.
* @return {boolean} Returns `true` if the URL matches the given remote pattern; otherwise, `false`.
*/
export declare function matchPattern(url: URL, remotePattern: RemotePattern): boolean;
/**
* Checks if the given URL's port matches the specified port. If no port is provided, it returns `true`.
*
* @param {URL} url - The URL object whose port will be checked.
* @param {string} [port=] - The port to match against the URL's port. Optional.
* @return {boolean} Returns `true` if the URL's port matches the specified port or if no port is provided; otherwise, `false`.
*/
export declare function matchPort(url: URL, port?: string): boolean;
/**
* Compares the protocol of the provided URL with a specified protocol.
*
* @param {URL} url - The URL object whose protocol needs to be checked.
* @param {string} [protocol] - The protocol to compare against, without the trailing colon. If not provided, the method will always return `true`.
* @return {boolean} Returns `true` if the protocol matches or if no protocol is specified; otherwise, `false`.
*/
export declare function matchProtocol(url: URL, protocol?: string): boolean;
/**
* Matches a given URL's hostname against a specified hostname, with optional support for wildcard patterns.
*
* @param {URL} url - The URL object whose hostname is to be matched.
* @param {string} [hostname] - The hostname to match against. Supports wildcard patterns if `allowWildcard` is `true`.
* @param {boolean} [allowWildcard=false] - Indicates whether wildcard patterns in the `hostname` parameter are allowed.
* @return {boolean} - Returns `true` if the URL's hostname matches the given hostname criteria; otherwise, `false`.
*/
export declare function matchHostname(url: URL, hostname?: string, allowWildcard?: boolean): boolean;
/**
* Matches a given URL's pathname against a specified pattern, with optional support for wildcards.
*
* @param {URL} url - The URL object containing the pathname to be matched.
* @param {string} [pathname] - The pathname pattern to match the URL against.
* @param {boolean} [allowWildcard=false] - Determines whether wildcard matching is allowed.
* @return {boolean} - Returns `true` if the URL's pathname matches the specified pattern; otherwise, `false`.
*/
export declare function matchPathname(url: URL, pathname?: string, allowWildcard?: boolean): boolean;
/**
* Determines whether a given remote resource, identified by its source URL,
* is allowed based on specified domains and remote patterns.
*
* @param {string} src - The source URL of the remote resource to be validated.
* @param {Object} options - The configuration options for domain and pattern matching.
* @param {string[]} options.domains - A list of allowed domain names.
* @param {RemotePattern[]} options.remotePatterns - A list of allowed remote patterns for matching.
* @return {boolean} Returns `true` if the source URL matches any of the specified domains or remote patterns; otherwise, `false`.
*/
export declare function isRemoteAllowed(src: string, { domains, remotePatterns, }: {
domains: string[];
remotePatterns: RemotePattern[];
}): boolean;
-66
View File
@@ -1,66 +0,0 @@
function matchPattern(url, remotePattern) {
return matchProtocol(url, remotePattern.protocol) && matchHostname(url, remotePattern.hostname, true) && matchPort(url, remotePattern.port) && matchPathname(url, remotePattern.pathname, true);
}
function matchPort(url, port) {
return !port || port === url.port;
}
function matchProtocol(url, protocol) {
return !protocol || protocol === url.protocol.slice(0, -1);
}
function matchHostname(url, hostname, allowWildcard = false) {
if (!hostname) {
return true;
} else if (!allowWildcard || !hostname.startsWith("*")) {
return hostname === url.hostname;
} else if (hostname.startsWith("**.")) {
const slicedHostname = hostname.slice(2);
return slicedHostname !== url.hostname && url.hostname.endsWith(slicedHostname);
} else if (hostname.startsWith("*.")) {
const slicedHostname = hostname.slice(1);
if (!url.hostname.endsWith(slicedHostname)) {
return false;
}
const subdomainWithDot = url.hostname.slice(0, -(slicedHostname.length - 1));
return subdomainWithDot.endsWith(".") && !subdomainWithDot.slice(0, -1).includes(".");
}
return false;
}
function matchPathname(url, pathname, allowWildcard = false) {
if (!pathname) {
return true;
} else if (!allowWildcard || !pathname.endsWith("*")) {
return pathname === url.pathname;
} else if (pathname.endsWith("/**")) {
const slicedPathname = pathname.slice(0, -2);
return slicedPathname !== url.pathname && url.pathname.startsWith(slicedPathname);
} else if (pathname.endsWith("/*")) {
const slicedPathname = pathname.slice(0, -1);
if (!url.pathname.startsWith(slicedPathname)) {
return false;
}
const additionalPathChunks = url.pathname.slice(slicedPathname.length).split("/").filter(Boolean);
return additionalPathChunks.length === 1;
}
return false;
}
function isRemoteAllowed(src, {
domains,
remotePatterns
}) {
if (!URL.canParse(src)) {
return false;
}
const url = new URL(src);
if (!["http:", "https:", "data:"].includes(url.protocol)) {
return false;
}
return domains.some((domain) => matchHostname(url, domain)) || remotePatterns.some((remotePattern) => matchPattern(url, remotePattern));
}
export {
isRemoteAllowed,
matchHostname,
matchPathname,
matchPattern,
matchPort,
matchProtocol
};
-52
View File
@@ -1,52 +0,0 @@
{
"name": "@astrojs/internal-helpers",
"description": "Internal helpers used by core Astro packages.",
"version": "0.7.6",
"type": "module",
"author": "withastro",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/withastro/astro.git",
"directory": "packages/internal-helpers"
},
"bugs": "https://github.com/withastro/astro/issues",
"exports": {
"./path": "./dist/path.js",
"./remote": "./dist/remote.js",
"./fs": "./dist/fs.js"
},
"typesVersions": {
"*": {
"path": [
"./dist/path.d.ts"
],
"remote": [
"./dist/remote.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\"",
"dev": "astro-scripts dev \"src/**/*.ts\"",
"test": "astro-scripts test \"test/**/*.test.js\""
}
}
-3
View File
@@ -1,3 +0,0 @@
# @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
View File
@@ -1,59 +0,0 @@
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.
"""

Some files were not shown because too many files have changed in this diff Show More