@batijs/core 0.0.435 → 0.0.436

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
@@ -29,8 +29,13 @@ type TransformerProps = {
29
29
  target: string;
30
30
  source: string;
31
31
  meta: VikeMeta;
32
+ packageJson: PackageJson;
32
33
  };
33
34
  type Transformer = (props: TransformerProps) => unknown;
35
+ interface PackageJson {
36
+ dependencies?: Record<string, string>;
37
+ devDependencies?: Record<string, string>;
38
+ }
34
39
  interface StringTransformer {
35
40
  finalize(): string;
36
41
  }
@@ -180,7 +185,9 @@ declare function loadAsJson({ readfile, source, target }: TransformerProps): Pro
180
185
  declare function loadPackageJson<U extends PackageJsonDeps>({ readfile, source, target }: TransformerProps, scopedPackageJson: U): Promise<PackageJsonTransformer<U>>;
181
186
  declare function loadAsMagicast<Exports extends object>({ readfile, source, target, }: TransformerProps): Promise<ProxifiedModule<Exports>>;
182
187
  declare function loadRelativeFileAsMagicast<Exports extends object>(relativePath: string, meta: Pick<ImportMeta, "url">): Promise<ProxifiedModule<Exports>>;
183
- 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>>;
188
+ declare function loadYaml({ readfile, source, target }: TransformerProps, options?: ParseOptions & DocumentOptions & SchemaOptions & {
189
+ fallbackEmpty?: boolean;
190
+ }): 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>>;
184
191
 
185
192
  declare function appendToEnv(envContent: string | undefined | null, key: string, value: unknown, comment?: string): string;
186
193
 
@@ -196,4 +203,4 @@ declare function getVersion(): {
196
203
  semver: string[];
197
204
  };
198
205
 
199
- export { type ContentGetter, type FileContext, MarkdownV2, Readme, type StringTransformer, type Transformer, type TransformerProps, type VikeMeta, appendToEnv, formatCode, getArgs, getVersion, loadAsJson, loadAsMagicast, loadMarkdown, loadPackageJson, loadReadme, loadRelativeFileAsMagicast, loadYaml, markdown, packageManager, parseMarkdown, parseReadme, transformAndFormat, withIcon };
206
+ export { type ContentGetter, type FileContext, MarkdownV2, type PackageJson, Readme, type StringTransformer, type Transformer, type TransformerProps, type VikeMeta, appendToEnv, formatCode, getArgs, getVersion, loadAsJson, loadAsMagicast, loadMarkdown, loadPackageJson, loadReadme, loadRelativeFileAsMagicast, loadYaml, markdown, packageManager, parseMarkdown, parseReadme, transformAndFormat, withIcon };