@batijs/core 0.0.462 → 0.0.465
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 +19 -19
- package/dist/index.js +603 -603
- package/dist/{jiti-EM3N2G3P.js → jiti-W5Y5D52V.js} +69 -69
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { BatiSet, CategoryLabels, Flags } from '@batijs/features';
|
|
2
1
|
import * as yaml from 'yaml';
|
|
3
2
|
import { ParseOptions, DocumentOptions, SchemaOptions, Document } from 'yaml';
|
|
4
3
|
export { Document as YAMLDocument } from 'yaml';
|
|
4
|
+
import { BatiSet, CategoryLabels, Flags } from '@batijs/features';
|
|
5
5
|
import * as mdast from 'mdast';
|
|
6
6
|
import { Nodes, Parents, Root } from 'mdast';
|
|
7
7
|
import * as attributes_parser from 'attributes-parser';
|
|
8
8
|
import { ProxifiedModule } from 'magicast';
|
|
9
9
|
export { builders, generateCode, loadFile, parseModule } from 'magicast';
|
|
10
10
|
export { addVitePlugin, deepMergeObject } from 'magicast/helpers';
|
|
11
|
-
export { default as which } from 'which';
|
|
12
11
|
import { Color } from 'colorette';
|
|
13
12
|
export * from 'colorette';
|
|
14
13
|
export { randomBytes } from 'node:crypto';
|
|
14
|
+
export { default as which } from 'which';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
imports: Set<string>;
|
|
20
|
-
}
|
|
16
|
+
declare function formatCode(code: string, options: {
|
|
17
|
+
filepath: string;
|
|
18
|
+
}): Promise<string>;
|
|
21
19
|
|
|
22
20
|
type ContentGetter = () => string | Promise<string>;
|
|
23
21
|
interface VikeMeta {
|
|
@@ -40,17 +38,6 @@ interface StringTransformer {
|
|
|
40
38
|
finalize(): string;
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
declare function transformAndFormat(code: string, meta: VikeMeta, options: {
|
|
44
|
-
filepath: string;
|
|
45
|
-
}): Promise<{
|
|
46
|
-
code: string;
|
|
47
|
-
context: FileContext | undefined;
|
|
48
|
-
}>;
|
|
49
|
-
|
|
50
|
-
declare function formatCode(code: string, options: {
|
|
51
|
-
filepath: string;
|
|
52
|
-
}): Promise<string>;
|
|
53
|
-
|
|
54
41
|
/**
|
|
55
42
|
* Parse a comment marker.
|
|
56
43
|
*
|
|
@@ -189,7 +176,18 @@ declare function loadYaml({ readfile, source, target }: TransformerProps, option
|
|
|
189
176
|
fallbackEmpty?: boolean;
|
|
190
177
|
}): 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>>;
|
|
191
178
|
|
|
192
|
-
|
|
179
|
+
type AllowedContextFlags = "include-if-imported";
|
|
180
|
+
interface FileContext {
|
|
181
|
+
flags: Set<AllowedContextFlags>;
|
|
182
|
+
imports: Set<string>;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
declare function transformAndFormat(code: string, meta: VikeMeta, options: {
|
|
186
|
+
filepath: string;
|
|
187
|
+
}): Promise<{
|
|
188
|
+
code: string;
|
|
189
|
+
context: FileContext | undefined;
|
|
190
|
+
}>;
|
|
193
191
|
|
|
194
192
|
declare function withIcon(icon: string, iconColor?: Color, indentLevel?: number): (str: string) => string;
|
|
195
193
|
|
|
@@ -203,4 +201,6 @@ declare function getVersion(): {
|
|
|
203
201
|
semver: string[];
|
|
204
202
|
};
|
|
205
203
|
|
|
204
|
+
declare function appendToEnv(envContent: string | undefined | null, key: string, value: unknown, comment?: string): string;
|
|
205
|
+
|
|
206
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 };
|