routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
import { Document, ToStringOptions } from "yaml";
//#region src/index.d.ts
interface PnpmWorkspaceYamlSchema {
packages?: string[];
overrides?: Record<string, string>;
catalog?: Record<string, string>;
catalogs?: Record<string, Record<string, string>>;
}
interface PnpmWorkspaceYaml {
getDocument: () => Document.Parsed;
setContent: (content: string) => void;
hasChanged: () => boolean;
toJSON: () => PnpmWorkspaceYamlSchema;
toString: (options?: ToStringOptions) => string;
setPath: (path: string[], value: any) => void;
/**
* Set a package to catalog
*/
setPackage: (catalog: 'default' | (string & {}), packageName: string, specifier: string) => void;
/**
* Set a package to catalog only when the version matches, otherwise create a conflicts catalog
*/
setPackageNoConflicts: (catalog: 'default' | (string & {}), packageName: string, specifier: string) => void;
/**
* Get all catalogs for a package
*/
getPackageCatalogs: (packageName: string) => string[];
/**
* Check if the specifier has conflicts with the existing specifier in the catalog
*/
hasSpecifierConflicts: (catalog: 'default' | (string & {}), packageName: string, specifier: string) => {
conflicts: boolean;
newCatalogName: string;
existingSpecifier?: string;
};
}
/**
* Parse pnpm workspace yaml content, and return an object to modify the content
* while preserving the comments, anchor, and alias.
*/
declare function parsePnpmWorkspaceYaml(content: string): PnpmWorkspaceYaml;
//#endregion
export { PnpmWorkspaceYaml, PnpmWorkspaceYamlSchema, parsePnpmWorkspaceYaml };