var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
var Buffer = require("node:buffer").Buffer;
// src/node-fallbacks/node_modules/querystring-es3/src/object-keys.js
var require_object_keys = __commonJS((exports, module) => {
var objectKeys =
Object.keys ||
(function () {
var hasOwnProperty = Object.prototype.hasOwnProperty;
var hasDontEnumBug = !{ toString: null }.propertyIsEnumerable("toString");
var dontEnums = [
"toString",
"toLocaleString",
"valueOf",
"hasOwnProperty",
"isPrototypeOf",
"propertyIsEnumerable",
"constructor",
];
var dontEnumsLength = dontEnums.length;
return function (obj) {
if (typeof obj !== "function" && (typeof obj !== "object" || obj === null)) {
throw new TypeError("Object.keys called on non-object");
}
var result = [];
var prop;
var i;
for (prop in obj) {
if (hasOwnProperty.call(obj, prop)) {
result.push(prop);
}
}
if (hasDontEnumBug) {
for (i = 0; i < dontEnumsLength; i++) {
if (hasOwnProperty.call(obj, dontEnums[i])) {
result.push(dontEnums[i]);
}
}
}
return result;
};
})();
module.exports = objectKeys;
});
// src/node-fallbacks/node_modules/querystring-es3/src/index.js
var require_src = __commonJS((exports, module) => {
var ParsedQueryString = function () {};
var unescapeBuffer = function (s, decodeSpaces) {
var out = Buffer.allocUnsafe(s.length);
var state = 0;
var n, m, hexchar, c;
for (var inIndex = 0, outIndex = 0; ; inIndex++) {
if (inIndex < s.length) {
c = s.charCodeAt(inIndex);
} else {
if (state > 0) {
out[outIndex++] = 37;
if (state === 2) out[outIndex++] = hexchar;
}
break;
}
switch (state) {
case 0:
switch (c) {
case 37:
n = 0;
m = 0;
state = 1;
break;
case 43:
if (decodeSpaces) c = 32;
default:
out[outIndex++] = c;
break;
}
break;
case 1:
hexchar = c;
n = unhexTable[c];
if (!(n >= 0)) {
out[outIndex++] = 37;
out[outIndex++] = c;
state = 0;
break;
}
state = 2;
break;
case 2:
state = 0;
m = unhexTable[c];
if (!(m >= 0)) {
out[outIndex++] = 37;
out[outIndex++] = hexchar;
out[outIndex++] = c;
break;
}
out[outIndex++] = 16 * n + m;
break;
}
}
return out.slice(0, outIndex);
};
var qsUnescape = function (s, decodeSpaces) {
try {
return decodeURIComponent(s);
} catch (e) {
return QueryString.unescapeBuffer(s, decodeSpaces).toString();
}
};
var qsEscape = function (str) {
if (typeof str !== "string") {
if (typeof str === "object") str = String(str);
else str += "";
}
var out = "";
var lastPos = 0;
for (var i2 = 0; i2 < str.length; ++i2) {
var c = str.charCodeAt(i2);
if (c < 128) {
if (noEscape[c] === 1) continue;
if (lastPos < i2) out += str.slice(lastPos, i2);
lastPos = i2 + 1;
out += hexTable[c];
continue;
}
if (lastPos < i2) out += str.slice(lastPos, i2);
if (c < 2048) {
lastPos = i2 + 1;
out += hexTable[192 | (c >> 6)] + hexTable[128 | (c & 63)];
continue;
}
if (c < 55296 || c >= 57344) {
lastPos = i2 + 1;
out += hexTable[224 | (c >> 12)] + hexTable[128 | ((c >> 6) & 63)] + hexTable[128 | (c & 63)];
continue;
}
++i2;
var c2;
if (i2 < str.length) c2 = str.charCodeAt(i2) & 1023;
else throw new URIError("URI malformed");
lastPos = i2 + 1;
c = 65536 + (((c & 1023) << 10) | c2);
out +=
hexTable[240 | (c >> 18)] +
hexTable[128 | ((c >> 12) & 63)] +
hexTable[128 | ((c >> 6) & 63)] +
hexTable[128 | (c & 63)];
}
if (lastPos === 0) return str;
if (lastPos < str.length) return out + str.slice(lastPos);
return out;
};
var stringifyPrimitive = function (v) {
if (typeof v === "string") return v;
if (typeof v === "number" && isFinite(v)) return "" + v;
if (typeof v === "boolean") return v ? "true" : "false";
return "";
};
var stringify = function (obj, sep, eq, options) {
sep = sep || "&";
eq = eq || "=";
var encode = QueryString.escape;
if (options && typeof options.encodeURIComponent === "function") {
encode = options.encodeURIComponent;
}
if (obj !== null && typeof obj === "object") {
var keys = objectKeys(obj);
var len = keys.length;
var flast = len - 1;
var fields = "";
for (var i2 = 0; i2 < len; ++i2) {
var k = keys[i2];
var v = obj[k];
var ks = encode(stringifyPrimitive(k)) + eq;
if (isArray(v)) {
var vlen = v.length;
var vlast = vlen - 1;
for (var j = 0; j < vlen; ++j) {
fields += ks + encode(stringifyPrimitive(v[j]));
if (j < vlast) fields += sep;
}
if (vlen && i2 < flast) fields += sep;
} else {
fields += ks + encode(stringifyPrimitive(v));
if (i2 < flast) fields += sep;
}
}
return fields;
}
return "";
};
var charCodes = function (str) {
if (str.length === 0) return [];
if (str.length === 1) return [str.charCodeAt(0)];
const ret = [];
for (var i2 = 0; i2 < str.length; ++i2) ret[ret.length] = str.charCodeAt(i2);
return ret;
};
var parse = function (qs, sep, eq, options) {
const obj = new ParsedQueryString();
if (typeof qs !== "string" || qs.length === 0) {
return obj;
}
var sepCodes = !sep ? defSepCodes : charCodes(sep + "");
var eqCodes = !eq ? defEqCodes : charCodes(eq + "");
const sepLen = sepCodes.length;
const eqLen = eqCodes.length;
var pairs = 1000;
if (options && typeof options.maxKeys === "number") {
pairs = options.maxKeys > 0 ? options.maxKeys : -1;
}
var decode = QueryString.unescape;
if (options && typeof options.decodeURIComponent === "function") {
decode = options.decodeURIComponent;
}
const customDecode = decode !== qsUnescape;
const keys = [];
var posIdx = 0;
var lastPos = 0;
var sepIdx = 0;
var eqIdx = 0;
var key = "";
var value = "";
var keyEncoded = customDecode;
var valEncoded = customDecode;
var encodeCheck = 0;
for (var i2 = 0; i2 < qs.length; ++i2) {
const code = qs.charCodeAt(i2);
if (code === sepCodes[sepIdx]) {
if (++sepIdx === sepLen) {
const end = i2 - sepIdx + 1;
if (eqIdx < eqLen) {
if (lastPos < end) key += qs.slice(lastPos, end);
} else if (lastPos < end) value += qs.slice(lastPos, end);
if (keyEncoded) key = decodeStr(key, decode);
if (valEncoded) value = decodeStr(value, decode);
if (key || value || lastPos - posIdx > sepLen || i2 === 0) {
if (indexOf(keys, key) === -1) {
obj[key] = value;
keys[keys.length] = key;
} else {
const curValue = obj[key] || "";
if (curValue.pop) curValue[curValue.length] = value;
else if (curValue) obj[key] = [curValue, value];
}
} else if (i2 === 1) {
delete obj[key];
}
if (--pairs === 0) break;
keyEncoded = valEncoded = customDecode;
encodeCheck = 0;
key = value = "";
posIdx = lastPos;
lastPos = i2 + 1;
sepIdx = eqIdx = 0;
}
continue;
} else {
sepIdx = 0;
if (!valEncoded) {
if (code === 37) {
encodeCheck = 1;
} else if (
encodeCheck > 0 &&
((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))
) {
if (++encodeCheck === 3) valEncoded = true;
} else {
encodeCheck = 0;
}
}
}
if (eqIdx < eqLen) {
if (code === eqCodes[eqIdx]) {
if (++eqIdx === eqLen) {
const end = i2 - eqIdx + 1;
if (lastPos < end) key += qs.slice(lastPos, end);
encodeCheck = 0;
lastPos = i2 + 1;
}
continue;
} else {
eqIdx = 0;
if (!keyEncoded) {
if (code === 37) {
encodeCheck = 1;
} else if (
encodeCheck > 0 &&
((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))
) {
if (++encodeCheck === 3) keyEncoded = true;
} else {
encodeCheck = 0;
}
}
}
}
if (code === 43) {
if (eqIdx < eqLen) {
if (lastPos < i2) key += qs.slice(lastPos, i2);
key += "%20";
keyEncoded = true;
} else {
if (lastPos < i2) value += qs.slice(lastPos, i2);
value += "%20";
valEncoded = true;
}
lastPos = i2 + 1;
}
}
if (pairs !== 0 && (lastPos < qs.length || eqIdx > 0)) {
if (lastPos < qs.length) {
if (eqIdx < eqLen) key += qs.slice(lastPos);
else if (sepIdx < sepLen) value += qs.slice(lastPos);
}
if (keyEncoded) key = decodeStr(key, decode);
if (valEncoded) value = decodeStr(value, decode);
if (indexOf(keys, key) === -1) {
obj[key] = value;
keys[keys.length] = key;
} else {
const curValue = obj[key];
if (curValue.pop) curValue[curValue.length] = value;
else obj[key] = [curValue, value];
}
}
return obj;
};
var decodeStr = function (s, decoder) {
try {
return decoder(s);
} catch (e) {
return QueryString.unescape(s, true);
}
};
var QueryString = (module.exports = {
unescapeBuffer,
unescape: qsUnescape,
escape: qsEscape,
stringify,
encode: stringify,
parse,
decode: parse,
});
var objectKeys = require_object_keys();
var isArray = arg => Object.prototype.toString.call(arg) === "[object Array]";
var indexOf = (arr, searchElement, fromIndex) => {
var k;
if (arr == null) {
throw new TypeError('"arr" is null or not defined');
}
var o = Object(arr);
var len = o.length >>> 0;
if (len === 0) {
return -1;
}
var n = fromIndex | 0;
if (n >= len) {
return -1;
}
k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
while (k < len) {
if (k in o && o[k] === searchElement) {
return k;
}
k++;
}
return -1;
};
ParsedQueryString.prototype = Object.create ? Object.create(null) : {};
var unhexTable = [
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1,
-1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
];
var hexTable = [];
for (i = 0; i < 256; ++i) hexTable[i] = "%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase();
var i;
var noEscape = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0,
];
var defSepCodes = [38];
var defEqCodes = [61];
});
export default require_src();
/option>
fix/nested-get-collection-call
fix/preact-package-build-failure
fix/primary-key-optional
fix/regex-flags
fix/server-headers
fix/stable-renderer-order
fix/transaction-type
fix/vue-nested
fix/webapi-dev
fork/markdoc-poc-with-md-support
fork/markdoc-poc-with-parser
format-imports-run
formatting
forward-button
framework-agnostic-astro-components
fryuni/db-pluggable-backend
fryuni/test-route-setup-hook
fryuni/tracing-hooks
hippotastic/legitimate-bat
hoisted-script-ts
host-ssr-example-2
hostfornode
image-non-node
improve-base-handling
inline-hoisted-scripts-now
jn.convert-assertions-to-query-params
latest
live-loaders
main
mandar1jn/ci-repo-check
markdoc-embed-prototyping
markdown
markdown-poc
mdx-path
mk/render-slot-template-backup
move-default-md-code-component
mt/lit-DSD
mt/lit-regen
mt/parse-DSD
mt/router_refactoring
nate/new-blog-template
netlify-1
netlify-preview
new-adapter-api
next
next-render
no-more-vite-postprocess
no-more-vite-postprocess2
old-build
plt-1006/unified-and-mdx
plt-1768-trailing-slash-object
preact-shared-signals
process-env-override
progress-log
re-export-drivers
react-fast-refresh
redirects-priority2
redirects-ssg-object
refactor-how-client-directives-work
refactor/image-internals
refactor/markdoc-renderer
refactor/rendere-queue
refactor/sitemap
refactor/ssr-size
release/0.17
release/0.18
remote-cdn-link
remove-fs-abstraction
remove-start
restart-on-lock
revert-13008-renovate/all-minor-patch
revert-lockfile
route-manifest-adapter
sarah11918-image-errors
sarah11918-patch-2
sb-tests2
seroval
server-islands-children
session-docs
single-file-build-2
slash-404-hint
slot-bug-1
solid-ecosystem-pkg
spike/app-setup
spike/autonav
spike/codehike
spike/context
spike/csr
spike/default-content
spike/incremental
spike/incremental-ii
spike/markdown-wasm
spike/render
spike/streaming
spike/svg
sqlite-test
squeal
ssr-redirect
stream-buffer
streaming
telemetry-audit-1
test/new-integrations-demo
test/new-ssr-demo
top-level-exports-integrations
ts-in-hoisted-script
ts-no-err
upd-vite-vendored
upgrade-deps
v1-beta
vercel-test
vite-fork
vscode-astro-global
vt-follow-redirects
warn-exp-flag
win
windows-tests-beta
wip-assets
wip-component-api-2
wip-docs-components
wip-docs-reference-gen
wip-fetch-cache
wip-fun-flags
wip-icons
wip-logging
wip-logging-saved
wip-mdc
wip-mdx-to-astro-js
wip-preview-command-integrations
wip-setup-content
wip-smoke
wip-speed-up-markdown
wip-stage
wip/react-19-test
Unnamed repository; edit this file 'description' to name the repository.
Age Commit message (Collapse ) Author Files Lines
* fix: middleware for API endpoints
* feat: remove experimental flag middleware
* chore: rebase and update
* chore: check if physical file exists
* chore: restore change
* merge
* merge
* fix: remove options, not needed
* remove experimental from types
* chore: don't have the middleware inside the manifest
* Update how redirects work, slightly
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
JSX (#7296)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* changeset
* chore(inline stylesheets config): stabilize
* grammar
* not a major change
* Update inlineStylesheets version in the configuration reference
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Redirects spike
* Allow redirects in static mode
* Support in Netlify as well
* Adding a changeset
* Rename file
* Fix build problem
* Refactor to be more modular
* Fix location ref
* Late test should only run in SSR
* Support redirects in Netlify SSR configuration (#7167)
* Implement support for dynamic routes in redirects (#7173)
* Implement support for dynamic routes in redirects
* Remove the .only
* No need to special-case redirects in static build
* Implement support for redirects config in the Vercel adapter (#7182)
* Implement support for redirects config in the Vercel adapter
* Remove unused condition
* Move to a internal helper package
* Add support for the object notation in redirects
* Use status 308 for non-GET redirects (#7186)
* Implement redirects in Cloudflare (#7198)
* Implement redirects in Cloudflare
* Fix build
* Update tests b/c of new ordering
* Debug issue
* Use posix.join
* Update packages/underscore-redirects/package.json
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update based on review comments
* Update broken test
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Test that redirects can come from middleware (#7213)
* Test that redirects can come from middleware
* Allow non-promise returns for middleware
* Implement priority (#7210)
* Refactor
* Fix netlify test ordering
* Fix ordering again
* Redirects: Allow preventing the output of the static HTML file (#7245)
* Do a simple push for priority
* Adding changesets
* Put the implementation behind a flag.
* Self review
* Update .changeset/chatty-actors-stare.md
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
* Update docs on dynamic restrictions.
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Code review changes
* Document netlify static adapter
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Slight reword
* Update .changeset/twenty-suns-vanish.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add a note about public/_redirects file
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Fixes cookies being set by middleware
* Adding a changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* feat(create-astro): add starlight as template alias
* chore: lint
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: ignored underscore dirs in glob
* chore: changeset
* chore(action): fix duplicate blocks
* chore(action): fix block logic
* Revert "revert: markdoc asset bleed (#7178)"
This reverts commit 57e65d247f67de61bcc3a585c2254feb61ed2e74.
* fix: missing result param on `renderUniqueStylesheet`
* test: bundled styles (fails!)
* fix: use `type: 'external'` for links
* fix: split Astro components from markdoc config
* test: style bleed (it fails...)
* chore: remove unused util
* fix: revert entry change
* Stop traversing the graph when you encounter a propagated asset
* chore: cleanup unused `entry` prop
* refactor: add isPropagatedAssetsMod check
* chore: remove unused import
* chore: changeset
* Normalize path using vite
* Update packages/integrations/markdoc/src/index.ts
Co-authored-by: Ben Holmes <hey@bholmes.dev>
---------
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: bholmesdev <bholmesdev@gmail.com>
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
* Update check-merge.yml
* chore: update action
* chore(action): better check if block exists
* chore(action): update check-merge action
This reverts commit bc5d6ed39faf2f73eab161774bf66ebc5fd00db2.
* feat: strip HTML comments from output
* chore: changeset
* revert changeset patch
* deps: bump astro across examples
* deps: bump @astrojs packages across examples
* deps: bump @astrojs/markdoc
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix: avoid error on collectionType === 'unknown'
* fix: ignore underscores in file globs
* chore: clarify [!_]
* fix: mismatch error not throwing
* fix: bad collectionType var
* test: no error for empty collection
* chore: changeset
* refactor: remove entry prop from `getRenderModule()`
* refactor: remove `$entry` from markdoc
* test: update entry-prop -> variables test
* refactor: unify `getEntryConfigByExt`
* chore: clean up shared content / data get logic
* docs: update `$entry` recommendation
* chore: rename entry-prop -> variables
* chore: changeset
* chore: missed a spot
* docs: all-new nodes documentation
* edit: `.astro` ONLY
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* edit: `.` outside links, line break
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* edit: such as, not like
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* edit: more Astro less probs
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* edit: reviewers React to
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* edit: tagz
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* chore: add `default: 'article'` for document
* edit: reword client-side instructions
* edit: prism stylesheet got lost
* fix: heading -> blockquote
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* test: add unit tests
* fix: prioritize prerendered routes
* chore: fix test
* add comment
* test: try avoiding race condition
* chore: changeset
* try avoiding race conditions attempt #2
* try avoiding race conditions (attempt 3)
* final fix hopefuly
* tet: add more tests
* sort conflicting dynamic routes aplhabetically
* test: fix test
* fix miss a head when the templaterender has a promise
* fix
* add some test
* test files move to md directory
* fix add
* delect file
---------
Co-authored-by: wuls <linsheng.wu@beantechs.com>