@batijs/core 0.0.246 → 0.0.248

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import { Flags } from '@batijs/features';
2
+ import * as yaml from 'yaml';
3
+ import { ParseOptions, DocumentOptions, SchemaOptions, Document } from 'yaml';
4
+ export { Document as YAMLDocument } from 'yaml';
2
5
  import { ProxifiedModule } from 'magicast';
3
6
  export { generateCode, loadFile, parseModule } from 'magicast';
4
7
  export { addVitePlugin } from 'magicast/helpers';
@@ -68,6 +71,7 @@ declare function loadReadme({ readfile }: TransformerProps): Promise<Readme>;
68
71
  declare function loadAsJson({ readfile, source, target }: TransformerProps): Promise<any>;
69
72
  declare function loadAsMagicast<Exports extends object>({ readfile, source, target, }: TransformerProps): Promise<ProxifiedModule<Exports>>;
70
73
  declare function loadRelativeFileAsMagicast<Exports extends object>(relativePath: string, meta: Pick<ImportMeta, "url">): Promise<ProxifiedModule<Exports>>;
74
+ declare function loadYaml({ readfile, source, target }: TransformerProps, options?: ParseOptions & DocumentOptions & SchemaOptions): Promise<Document.Parsed<yaml.Alias.Parsed, true> | Document.Parsed<yaml.Scalar.Parsed, true> | Document.Parsed<yaml.YAMLMap.Parsed<yaml.ParsedNode, yaml.ParsedNode | null>, true> | Document.Parsed<yaml.YAMLSeq.Parsed<yaml.ParsedNode>, true>>;
71
75
 
72
76
  declare const keys: readonly ["dev", "build", "preview", "lint", "format", "deploy"];
73
77
  type Scripts = (typeof keys)[number];
@@ -108,4 +112,4 @@ declare function getVersion(): {
108
112
  semver: string[];
109
113
  };
110
114
 
111
- export { type ContentGetter, type PackageJsonDeps, type PackageJsonScriptOption, type PackageJsonScriptOptions, type PackageJsonScripts, Readme, type Transformer, type TransformerProps, type VikeMeta, addDependency, appendToEnv, formatCode, getArgs, getVersion, loadAsJson, loadAsMagicast, loadReadme, loadRelativeFileAsMagicast, markdown, packageManager, parseReadme, setScripts, transformAndFormat, withIcon };
115
+ export { type ContentGetter, type PackageJsonDeps, type PackageJsonScriptOption, type PackageJsonScriptOptions, type PackageJsonScripts, Readme, type Transformer, type TransformerProps, type VikeMeta, addDependency, appendToEnv, formatCode, getArgs, getVersion, loadAsJson, loadAsMagicast, loadReadme, loadRelativeFileAsMagicast, loadYaml, markdown, packageManager, parseReadme, setScripts, transformAndFormat, withIcon };