@evertondgn/solid-tooling 0.5.0 → 0.7.0
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/README.md +543 -598
- package/app-env.d.ts +7 -0
- package/dist/architecture-plugin.mjs +1 -1
- package/dist/backend-plugin.mjs +139 -4
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +42 -0
- package/dist/{constants-Jqvtbvxu.mjs → constants-BZJm7ouk.mjs} +1 -1
- package/dist/css-filename-CEHQd2gz.mjs +40 -0
- package/dist/css-filename.mjs +1 -40
- package/dist/fmt-9dlUYOMk.mjs +34 -0
- package/dist/fmt.mjs +1 -34
- package/dist/i18n-generate.d.mts +1 -0
- package/dist/i18n-generate.mjs +23 -0
- package/dist/i18nPlugin-CS7Gob6R.mjs +109 -0
- package/dist/knip.d.mts +2 -1
- package/dist/knip.mjs +7 -2
- package/dist/{lint-UTfyg7AR.mjs → lint-ehdtTKfw.mjs} +33 -86
- package/dist/lint.mjs +1 -1
- package/dist/playwright-teardown.mjs +1 -1
- package/dist/playwright.d.mts +2 -1
- package/dist/playwright.mjs +4 -3
- package/dist/prepareMessages-BXmY6Ko2.mjs +222 -0
- package/dist/project-plugin.mjs +2 -2
- package/dist/protocol-DSNNUYja.mjs +18 -0
- package/dist/publication/read-llms-index.d.mts +12 -0
- package/dist/publication/read-llms-index.mjs +1 -0
- package/dist/publication-CRUTOB0B.mjs +885 -0
- package/dist/readLlmsIndex-Gj4iTxAk.mjs +27 -0
- package/dist/stylelint.mjs +2 -2
- package/dist/test-locale--tuH0Np5.mjs +3 -0
- package/dist/types-DHu2Z_ot.d.mts +49 -0
- package/dist/vite.d.mts +33 -7
- package/dist/vite.mjs +449 -88
- package/dist/vitest-BjLr7iLf.mjs +362 -0
- package/dist/vitest.d.mts +3 -7
- package/dist/vitest.mjs +1 -129
- package/lefthook.yml +3 -1
- package/node-env.d.ts +1 -0
- package/package.json +32 -39
- package/tsconfig.app.json +4 -9
- package/virtual-modules.d.ts +90 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/publication/markdownPrerender/helpers/readLlmsIndex/index.ts
|
|
2
|
+
const LINK_LINE = /^- \[(?<label>(?:\\.|[^\\\]])*)\]\((?<href>[^\s()]+)\)(?:: (?<summary>.*))?$/u;
|
|
3
|
+
const ESCAPED = /\\(?<character>.)/gu;
|
|
4
|
+
function unescape(text) {
|
|
5
|
+
return text.replaceAll(ESCAPED, "$<character>");
|
|
6
|
+
}
|
|
7
|
+
function readLlmsIndex(text) {
|
|
8
|
+
const lines = text.split("\n");
|
|
9
|
+
const title = lines.find((line) => line.startsWith("# "))?.slice(2);
|
|
10
|
+
const description = lines.find((line) => line.startsWith("> "))?.slice(2);
|
|
11
|
+
if (!title) throw new Error("llms.txt has no title");
|
|
12
|
+
const links = lines.flatMap((line) => {
|
|
13
|
+
const groups = LINK_LINE.exec(line)?.groups;
|
|
14
|
+
if (!groups?.href) return [];
|
|
15
|
+
return [{
|
|
16
|
+
label: unescape(groups.label ?? ""),
|
|
17
|
+
href: groups.href,
|
|
18
|
+
summary: unescape(groups.summary ?? "")
|
|
19
|
+
}];
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
title,
|
|
23
|
+
description: description ?? "",
|
|
24
|
+
links
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export { readLlmsIndex as t };
|
package/dist/stylelint.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cssFilenameError } from "./css-filename.mjs";
|
|
1
|
+
import { n as cssFilenameError } from "./css-filename-CEHQd2gz.mjs";
|
|
2
2
|
import { t as hasMatch } from "./has-match-BITlj0EE.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { readdir } from "node:fs/promises";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { readdir } from "node:fs/promises";
|
|
6
6
|
import stylelint from "stylelint";
|
|
7
7
|
// src/stylelint/index.ts
|
|
8
8
|
const VAR = String.raw`var\(\s*--[a-z0-9-]+\s*\)`;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ViteUserConfig } from "vite-plus";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
declare const MarkdownSchema: v.StrictObjectSchema<{
|
|
4
|
+
readonly static: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
5
|
+
readonly maxInputBytes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, 2097152>;
|
|
6
|
+
readonly maxOutputBytes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, 2097152>;
|
|
7
|
+
readonly timeoutMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, v.MaxValueAction<number, 2147483647, undefined>]>, 15000>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
declare const LlmsSchema: v.StrictObjectSchema<{
|
|
10
|
+
readonly maxBytes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, 1048576>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
declare const LlmsFullSchema: v.StrictObjectSchema<{
|
|
13
|
+
readonly maxBytes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>]>, 10485760>;
|
|
14
|
+
}, undefined>;
|
|
15
|
+
declare const SitemapSchema: v.UnionSchema<[v.BooleanSchema<undefined>, v.StrictObjectSchema<{
|
|
16
|
+
readonly static: v.LiteralSchema<true, undefined>;
|
|
17
|
+
}, undefined>], undefined>;
|
|
18
|
+
type MarkdownOptions = v.InferInput<typeof MarkdownSchema>;
|
|
19
|
+
type LlmsOptions = v.InferInput<typeof LlmsSchema>;
|
|
20
|
+
type LlmsFullOptions = v.InferInput<typeof LlmsFullSchema>;
|
|
21
|
+
type PublicationFeatures = {
|
|
22
|
+
markdown?: false | MarkdownOptions;
|
|
23
|
+
llms?: false | LlmsOptions;
|
|
24
|
+
llmsFull?: false | LlmsFullOptions;
|
|
25
|
+
sitemap?: v.InferInput<typeof SitemapSchema>;
|
|
26
|
+
};
|
|
27
|
+
type SeoOptions = PublicationFeatures & {
|
|
28
|
+
originEnv?: string;
|
|
29
|
+
robots?: false | {
|
|
30
|
+
groups?: readonly {
|
|
31
|
+
userAgents: readonly string[];
|
|
32
|
+
allow?: readonly string[];
|
|
33
|
+
disallow?: readonly string[];
|
|
34
|
+
}[];
|
|
35
|
+
sitemapPaths?: readonly string[];
|
|
36
|
+
cacheControl?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type SolidTestOptions = {
|
|
40
|
+
root: string;
|
|
41
|
+
language?: string;
|
|
42
|
+
seo?: SeoOptions | false;
|
|
43
|
+
plugins: () => ViteUserConfig['plugins'];
|
|
44
|
+
sourcePackages?: string[];
|
|
45
|
+
domUrl?: string;
|
|
46
|
+
locale?: string;
|
|
47
|
+
};
|
|
48
|
+
type SolidTestSettings = Omit<SolidTestOptions, 'root' | 'plugins' | 'language' | 'seo'>;
|
|
49
|
+
export { SolidTestSettings as n, SeoOptions as r, SolidTestOptions as t };
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { n as SolidTestSettings, r as SeoOptions } from "./types-DHu2Z_ot.mjs";
|
|
1
2
|
import { PluginOption, UserConfig, ViteUserConfigFnObject } from "vite-plus";
|
|
2
3
|
import { NitroConfig, NitroModuleInput, PublicAssetDir } from "nitro/types";
|
|
4
|
+
type FontFile = {
|
|
5
|
+
path: string;
|
|
6
|
+
weight?: string | number;
|
|
7
|
+
style?: 'normal' | 'italic' | 'oblique';
|
|
8
|
+
unicodeRange?: string;
|
|
9
|
+
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
10
|
+
preload?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type FontFamily = {
|
|
13
|
+
family: string;
|
|
14
|
+
files: readonly FontFile[];
|
|
15
|
+
};
|
|
3
16
|
type StaticSecurityHeaders = Record<'strict-transport-security' | 'x-content-type-options' | 'cross-origin-resource-policy', string>;
|
|
4
17
|
type E2eOptions = {
|
|
5
18
|
middleware?: string;
|
|
@@ -13,6 +26,17 @@ type StaticAssetDir = PublicAssetDir & {
|
|
|
13
26
|
baseURL: string;
|
|
14
27
|
};
|
|
15
28
|
type RouteRule = NonNullable<NitroConfig['routeRules']>[string];
|
|
29
|
+
type SharedOptions = {
|
|
30
|
+
fonts?: readonly FontFamily[];
|
|
31
|
+
i18nPlugin?: false;
|
|
32
|
+
language?: string;
|
|
33
|
+
root: string;
|
|
34
|
+
icons?: Record<string, string>;
|
|
35
|
+
extend?: (context: ExtensionContext) => SolidAppExtension | Promise<SolidAppExtension>;
|
|
36
|
+
workspace?: WorkspaceOptions;
|
|
37
|
+
tasks?: Record<string, RunTask>;
|
|
38
|
+
test?: SolidTestSettings;
|
|
39
|
+
};
|
|
16
40
|
type RunTask = NonNullable<NonNullable<UserConfig['run']>['tasks']>[string];
|
|
17
41
|
type ExtensionContext = {
|
|
18
42
|
target: 'app' | 'test';
|
|
@@ -22,19 +46,21 @@ type SolidAppExtension = {
|
|
|
22
46
|
plugins?: PluginOption[];
|
|
23
47
|
nitroModules?: NitroModuleInput[];
|
|
24
48
|
};
|
|
25
|
-
type
|
|
26
|
-
|
|
49
|
+
type ServerAppOptions = SharedOptions & {
|
|
50
|
+
ssr?: true;
|
|
27
51
|
middleware?: string;
|
|
28
52
|
serverSetup?: string;
|
|
29
53
|
e2e?: E2eOptions;
|
|
30
|
-
icons?: Record<string, string>;
|
|
31
54
|
securityHeaders: StaticSecurityHeaders;
|
|
32
55
|
publicAssets?: StaticAssetDir[];
|
|
33
56
|
staticPaths?: string[];
|
|
34
57
|
routeRules?: Record<string, RouteRule>;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
58
|
+
seo?: SeoOptions | false;
|
|
59
|
+
};
|
|
60
|
+
type ClientAppOptions = SharedOptions & {
|
|
61
|
+
ssr: false;
|
|
62
|
+
e2e?: Pick<E2eOptions, 'routes'>;
|
|
38
63
|
};
|
|
64
|
+
type SolidAppOptions = ServerAppOptions | ClientAppOptions;
|
|
39
65
|
export declare function defineSolidApp(options: SolidAppOptions): ViteUserConfigFnObject;
|
|
40
|
-
export type { SolidAppOptions };
|
|
66
|
+
export type { ClientAppOptions, FontFamily, FontFile, SeoOptions, ServerAppOptions, SolidAppOptions };
|