Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dist/

# Dependencies
node_modules/
vendor/

# Temporary files
.tmp/
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const compat = new FlatCompat({
export default defineConfig([
globalIgnores([
'dist/**/*',
'vendor/**/*',
'node_modules/**/*',
'**/dist/',
'**/.astro/',
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"astro-compressor": "^1.3.0",
"astro-mermaid": "^2.1.0",
"astro-seo": "^1.2.0",
"braces": "file:vendor/braces",
"cheerio": "^1.2.0",
"dayjs": "^1.11.23",
"ioredis": "^6.0.0",
Expand Down Expand Up @@ -106,7 +107,9 @@
"@rollup/rollup-linux-arm64-gnu": "4.63.1"
},
"overrides": {
"braces": "file:vendor/braces",
"deepmerge-ts": "^8.0.2",
"http-cache-semantics": "^4.3.0",
"markdownlint-cli": {
"js-yaml": "^5.4.1"
},
Expand Down
8 changes: 8 additions & 0 deletions src/pages/llms.txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getCollection } from 'astro:content';
import { site } from 'astro:config/client';
import { extractDescription, buildUrl, stripHtml } from '@utils/llmsUtils';
import { meta as dedicatedCloudMeta } from '@data/dedicatedCloud';
import { inTheWild } from '@data/about';

// Note: handbook entries intentionally excluded — internal company ops content
// is not relevant to AI agents consuming platform documentation.
Expand Down Expand Up @@ -72,6 +73,13 @@ export const GET: APIRoute = async () => {
// collection entry, so the loop above never sees it — add it explicitly.
llmsContent += `- [${dedicatedCloudMeta.title}](${(site || '').replace(/\/+$/, '')}/dedicated-cloud) - ${dedicatedCloudMeta.description}\n`;

// /about, /about/team and /about/in-the-wild are data-driven (src/data/about.ts),
// not `pages` collection entries — list them explicitly.
const baseUrl = (site || '').replace(/\/+$/, '');
llmsContent += `- [About Datum](${baseUrl}/about) - Why Datum exists: the founding insight, investors, and the companies building on it.\n`;
llmsContent += `- [Meet the Team](${baseUrl}/about/team) - The infrastructure, open source software, and design people building Datum.\n`;
llmsContent += `- [${inTheWild.crumb}](${baseUrl}/about/in-the-wild) - ${inTheWild.intro}\n`;

llmsContent += `\n## Docs\n\n`;
llmsContent += `- Full documentation index at ${siteUrl}/docs/llms.txt\n`;

Expand Down
21 changes: 21 additions & 0 deletions vendor/braces/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014-present, Jon Schlinkert.

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.
170 changes: 170 additions & 0 deletions vendor/braces/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
'use strict';

const stringify = require('./lib/stringify');
const compile = require('./lib/compile');
const expand = require('./lib/expand');
const parse = require('./lib/parse');

/**
* Expand the given pattern or create a regex-compatible string.
*
* ```js
* const braces = require('braces');
* console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
* console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
* ```
* @param {String} `str`
* @param {Object} `options`
* @return {String}
* @api public
*/

const braces = (input, options = {}) => {
let output = [];

if (Array.isArray(input)) {
for (const pattern of input) {
const result = braces.create(pattern, options);
if (Array.isArray(result)) {
output.push(...result);
} else {
output.push(result);
}
}
} else {
output = [].concat(braces.create(input, options));
}

if (options && options.expand === true && options.nodupes === true) {
output = [...new Set(output)];
}
return output;
};

/**
* Parse the given `str` with the given `options`.
*
* ```js
* // braces.parse(pattern, [, options]);
* const ast = braces.parse('a/{b,c}/d');
* console.log(ast);
* ```
* @param {String} pattern Brace pattern to parse
* @param {Object} options
* @return {Object} Returns an AST
* @api public
*/

braces.parse = (input, options = {}) => parse(input, options);

/**
* Creates a braces string from an AST, or an AST node.
*
* ```js
* const braces = require('braces');
* let ast = braces.parse('foo/{a,b}/bar');
* console.log(stringify(ast.nodes[2])); //=> '{a,b}'
* ```
* @param {String} `input` Brace pattern or AST.
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/

braces.stringify = (input, options = {}) => {
if (typeof input === 'string') {
return stringify(braces.parse(input, options), options);
}
return stringify(input, options);
};

/**
* Compiles a brace pattern into a regex-compatible, optimized string.
* This method is called by the main [braces](#braces) function by default.
*
* ```js
* const braces = require('braces');
* console.log(braces.compile('a/{b,c}/d'));
* //=> ['a/(b|c)/d']
* ```
* @param {String} `input` Brace pattern or AST.
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/

braces.compile = (input, options = {}) => {
if (typeof input === 'string') {
input = braces.parse(input, options);
}
return compile(input, options);
};

/**
* Expands a brace pattern into an array. This method is called by the
* main [braces](#braces) function when `options.expand` is true. Before
* using this method it's recommended that you read the [performance notes](#performance))
* and advantages of using [.compile](#compile) instead.
*
* ```js
* const braces = require('braces');
* console.log(braces.expand('a/{b,c}/d'));
* //=> ['a/b/d', 'a/c/d'];
* ```
* @param {String} `pattern` Brace pattern
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/

braces.expand = (input, options = {}) => {
if (typeof input === 'string') {
input = braces.parse(input, options);
}

let result = expand(input, options);

// filter out empty strings if specified
if (options.noempty === true) {
result = result.filter(Boolean);
}

// filter out duplicates if specified
if (options.nodupes === true) {
result = [...new Set(result)];
}

return result;
};

/**
* Processes a brace pattern and returns either an expanded array
* (if `options.expand` is true), a highly optimized regex-compatible string.
* This method is called by the main [braces](#braces) function.
*
* ```js
* const braces = require('braces');
* console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
* //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
* ```
* @param {String} `pattern` Brace pattern
* @param {Object} `options`
* @return {Array} Returns an array of expanded values.
* @api public
*/

braces.create = (input, options = {}) => {
if (input === '' || input.length < 3) {
return [input];
}

return options.expand !== true
? braces.compile(input, options)
: braces.expand(input, options);
};

/**
* Expose "braces"
*/

module.exports = braces;
60 changes: 60 additions & 0 deletions vendor/braces/lib/compile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use strict';

const fill = require('fill-range');
const utils = require('./utils');

const compile = (ast, options = {}) => {
const walk = (node, parent = {}) => {
const invalidBlock = utils.isInvalidBrace(parent);
const invalidNode = node.invalid === true && options.escapeInvalid === true;
const invalid = invalidBlock === true || invalidNode === true;
const prefix = options.escapeInvalid === true ? '\\' : '';
let output = '';

if (node.isOpen === true) {
return prefix + node.value;
}

if (node.isClose === true) {
console.log('node.isClose', prefix, node.value);
return prefix + node.value;
}

if (node.type === 'open') {
return invalid ? prefix + node.value : '(';
}

if (node.type === 'close') {
return invalid ? prefix + node.value : ')';
}

if (node.type === 'comma') {
return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
}

if (node.value) {
return node.value;
}

if (node.nodes && node.ranges > 0) {
const args = utils.reduce(node.nodes);
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });

if (range.length !== 0) {
return args.length > 1 && range.length > 1 ? `(${range})` : range;
}
}

if (node.nodes) {
for (const child of node.nodes) {
output += walk(child, node);
}
}

return output;
};

return walk(ast);
};

module.exports = compile;
Loading
Loading